Mercurial > repos > bgruening > find_subsequences
diff find_subsequences.py @ 4:424b06390084 draft
Uploaded
author | bgruening |
---|---|
date | Fri, 20 Mar 2015 06:05:15 -0400 |
parents | 9bc84bbab418 |
children | 53c20f28562e |
line wrap: on
line diff
--- a/find_subsequences.py Fri Mar 20 04:15:42 2015 -0400 +++ b/find_subsequences.py Fri Mar 20 06:05:15 2015 -0400 @@ -33,7 +33,7 @@ """ bed_template = '%s\t%s\t%s\t%s\t%s\t%s\n' for match in re.finditer( str(pattern), str(sequence.seq) ): - outfile.write(bed_template % (sequence.id, match.start(), match.end(), sequence.name, '', strand)) + outfile.write(bed_template % (sequence.id, match.start(), match.end(), sequence.description, '', strand)) def complex_pattern_search(sequence, pattern, outfile, strand='+'): @@ -45,7 +45,7 @@ matches = nt_search(str(sequence.seq), pattern) bed_template = '%s\t%s\t%s\t%s\t%s\t%s\n' for match in matches[1:]: - outfile.write(bed_template % (sequence.id, match, match+l, sequence.name, '', strand) ) + outfile.write(bed_template % (sequence.id, match, match+l, sequence.description, '', strand) ) if __name__ == "__main__":