Mercurial > repos > greg > genetrack
comparison genetrack.py @ 5:551630d1fae3 draft
Uploaded
author | greg |
---|---|
date | Sat, 21 Nov 2015 08:57:27 -0500 |
parents | fcc2f5992551 |
children | 1a9f1a4fa36c |
comparison
equal
deleted
inserted
replaced
4:a952b6740fb9 | 5:551630d1fae3 |
---|---|
1 """ | 1 """ |
2 genetrack.py | 2 genetrack.py |
3 | 3 |
4 Input: either ssccidx or gff format of reads | 4 Input: either scidx or gff format of reads |
5 .ssccidx format: tab-separated chromosome (chr##), index, + reads, - reads | 5 Output: Called peaks in gff format |
6 .gff format: standard gff, score interpreted as number of reads | |
7 | |
8 Output: Called peaks in either gff or txt format | |
9 .txt format: tab-separated chromosome, strand, start, end, read count | |
10 .gff format: standard gff, score is read count | |
11 """ | 6 """ |
12 import optparse | 7 import optparse |
13 import csv | 8 import csv |
14 import os | 9 import os |
15 import genetrack_util | 10 import genetrack_util |
31 for (dataset_path, hid) in options.inputs: | 26 for (dataset_path, hid) in options.inputs: |
32 if options.input_format == 'gff': | 27 if options.input_format == 'gff': |
33 # Make sure the reads for each chromosome are sorted by index. | 28 # Make sure the reads for each chromosome are sorted by index. |
34 input_path = genetrack_util.sort_chromosome_reads_by_index(dataset_path) | 29 input_path = genetrack_util.sort_chromosome_reads_by_index(dataset_path) |
35 else: | 30 else: |
36 # We're processing ssccidx data. | 31 # We're processing scidx data. |
37 input_path = dataset_path | 32 input_path = dataset_path |
38 output_name = 's%se%su%sd%sF%s_on_data_%s' % (str(options.sigma), | 33 output_name = 's%se%su%sd%sF%s_on_data_%s' % (str(options.sigma), |
39 str(options.exclusion), | 34 str(options.exclusion), |
40 str(options.up_width), | 35 str(options.up_width), |
41 str(options.down_width), | 36 str(options.down_width), |