Mercurial > repos > davidvanzessen > baseline_bayesian_estimation
diff script_imgt.py @ 5:d8de51314d3f draft
Uploaded
author | davidvanzessen |
---|---|
date | Thu, 14 Aug 2014 07:17:26 -0400 |
parents | 94fada165724 |
children | 7eeb7b808af9 |
line wrap: on
line diff
--- a/script_imgt.py Wed Aug 13 09:09:56 2014 -0400 +++ b/script_imgt.py Thu Aug 14 07:17:26 2014 -0400 @@ -14,7 +14,7 @@ with open(args.ref, 'r') as ref: currentSeq = "" currentId = "" - for line in ref.readlines(): + for line in ref: if line[0] is ">": if currentSeq is not "" and currentId is not "": refdic[currentId[1:]] = currentSeq @@ -48,11 +48,15 @@ currentSeq = "" currentId = "" +first=True with open(args.input, 'r') as i: with open(args.output, 'a') as o: o.write(">>>" + args.id + "\n") outputdic = dict() - for line in i.readlines()[1:]: + for line in i: + if first: + first = False + continue linesplt = line.split("\t") ref = filterGene(linesplt[1], vPattern) if not ref or not linesplt[2].rstrip():