Mercurial > repos > drosofff > sam_to_fastq
comparison sam_to_fastq.py @ 2:de6fd19d1576 draft default tip
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sam_to_fastq commit 55671fc041c29c7985cbb44e6b49a10e1889f907
| author | drosofff |
|---|---|
| date | Mon, 21 Mar 2016 18:04:13 -0400 |
| parents | c1ab6747fb66 |
| children |
comparison
equal
deleted
inserted
replaced
| 1:c1ab6747fb66 | 2:de6fd19d1576 |
|---|---|
| 13 return args | 13 return args |
| 14 | 14 |
| 15 | 15 |
| 16 def print_fastq_sequence(samline, file): | 16 def print_fastq_sequence(samline, file): |
| 17 samfields = samline[:-1].split("\t") | 17 samfields = samline[:-1].split("\t") |
| 18 file.write ( '@%s\n%s\n+\n%s' % (samfields[0], samfields[9], samfields[10]) ) | 18 file.write ( '@%s\n%s\n+\n%s\n' % (samfields[0], samfields[9], samfields[10]) ) |
| 19 | 19 |
| 20 def main(input, output): | 20 def main(input, output): |
| 21 infile = open (input, "r") | 21 infile = open (input, "r") |
| 22 outfile = open (output, "w") | 22 outfile = open (output, "w") |
| 23 with open (input, "r") as infile: | 23 with open (input, "r") as infile: |
