Mercurial > repos > greg > repmatch_gff3
comparison repmatch_gff3.py @ 9:39cb3eeacdbd draft
Uploaded
author | greg |
---|---|
date | Wed, 02 Dec 2015 16:15:42 -0500 |
parents | 6df81aade62c |
children |
comparison
equal
deleted
inserted
replaced
8:d10ae3aeebc8 | 9:39cb3eeacdbd |
---|---|
1 # repmatch.py | 1 # repmatch.py |
2 # | 2 # |
3 # Replicate matching - matches paired peaks from two or more replicates | 3 # Replicate matching - matches paired peaks from two or more replicates |
4 # | 4 # |
5 # Input: one or more gff files (simple output from cwpair2, each a list of paired peaks from a replicate | 5 # Input: one or more gff files (matched_peak output from cwpair2, each a list of paired peaks from a replicate |
6 # | 6 # |
7 # Output: list of matched groups and list of unmatched orphans | 7 # Output: list of matched groups and list of unmatched peaks |
8 # Files: key.tabular (file to replicate IDsummary.tabular, detail.tabular, orphans.tabular | 8 # Files: statistics_table.tabular (file to replicate ID), matched_paired_peaks.tabular, detail.tabular, unmatched_peaks.tabular |
9 | 9 |
10 import argparse | 10 import argparse |
11 import repmatch_gff3_util | 11 import repmatch_gff3_util |
12 | 12 |
13 if __name__ == '__main__': | 13 if __name__ == '__main__': |
17 parser.add_argument('--distance', dest='distance', type=int, default=50, help='Maximum distance between peaks in different replicates to allow merging') | 17 parser.add_argument('--distance', dest='distance', type=int, default=50, help='Maximum distance between peaks in different replicates to allow merging') |
18 parser.add_argument('--step', dest='step', type=int, default=0, help='Step size of distance for each iteration') | 18 parser.add_argument('--step', dest='step', type=int, default=0, help='Step size of distance for each iteration') |
19 parser.add_argument('--replicates', dest='replicates', type=int, default=2, help='Minimum number of replicates that must be matched for merging to occur') | 19 parser.add_argument('--replicates', dest='replicates', type=int, default=2, help='Minimum number of replicates that must be matched for merging to occur') |
20 parser.add_argument('--low_limit', dest='low_limit', type=int, default=-1000, help='Lower limit for c-w distance filter') | 20 parser.add_argument('--low_limit', dest='low_limit', type=int, default=-1000, help='Lower limit for c-w distance filter') |
21 parser.add_argument('--up_limit', dest='up_limit', type=int, default=1000, help='Upper limit for c-w distance filter') | 21 parser.add_argument('--up_limit', dest='up_limit', type=int, default=1000, help='Upper limit for c-w distance filter') |
22 parser.add_argument('--output_files', dest='output_files', default='simple', help='Restrict output dataset collections.') | 22 parser.add_argument('--output_files', dest='output_files', default='all', help='Restrict output dataset collections.') |
23 parser.add_argument('--output_summary', dest='output_summary', help='Matched groups in gff format') | 23 parser.add_argument('--output_matched_peaks', dest='output_matched_peaks', help='Matched groups in gff format') |
24 parser.add_argument('--output_orphan', dest='output_orphan', default=None, help='Orphans in tabular format') | 24 parser.add_argument('--output_unmatched_peaks', dest='output_unmatched_peaks', default=None, help='Unmatched paired peaks in tabular format') |
25 parser.add_argument('--output_detail', dest='output_detail', default=None, help='Details in tabular format') | 25 parser.add_argument('--output_detail', dest='output_detail', default=None, help='Details in tabular format') |
26 parser.add_argument('--output_key', dest='output_key', default=None, help='Keys in tabular format') | 26 parser.add_argument('--output_statistics_table', dest='output_statistics_table', default=None, help='Keys in tabular format') |
27 parser.add_argument('--output_histogram', dest='output_histogram', default=None, help='Histogram') | 27 parser.add_argument('--output_statistics_histogram', dest='output_statistics_histogram', default=None, help='Histogram') |
28 | 28 |
29 args = parser.parse_args() | 29 args = parser.parse_args() |
30 | 30 |
31 dataset_paths = [] | 31 dataset_paths = [] |
32 hids = [] | 32 hids = [] |
40 args.step, | 40 args.step, |
41 args.replicates, | 41 args.replicates, |
42 args.up_limit, | 42 args.up_limit, |
43 args.low_limit, | 43 args.low_limit, |
44 args.output_files, | 44 args.output_files, |
45 args.output_summary, | 45 args.output_matched_peaks, |
46 args.output_orphan, | 46 args.output_unmatched_peaks, |
47 args.output_detail, | 47 args.output_detail, |
48 args.output_key, | 48 args.output_statistics_table, |
49 args.output_histogram) | 49 args.output_statistics_histogram) |