Skip to content

Commit

Permalink
find_telomers.py with gzip support
Browse files Browse the repository at this point in the history
  • Loading branch information
lpryszcz committed Aug 20, 2015
1 parent 7809657 commit cff9f4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions find_telomers.py
Expand Up @@ -11,8 +11,7 @@
done
"""

import sys
import re
import gzip, re, sys
from copy import copy
from Bio.Seq import Seq
from datetime import datetime
Expand Down Expand Up @@ -107,7 +106,10 @@ def main():
k=5
seqs={}
for fn in sys.argv[1:]:
f=open(fn)
if fn.endswith('.gz'):
f=gzip.open(fn)
else:
f=open(fn)
while 1:
#read sequence id (contain occurencies info), sequence and it's reverse complement
sid = f.readline()[1:-1] #>5-1870
Expand Down

0 comments on commit cff9f4b

Please sign in to comment.