Skip to content

Commit

Permalink
fix for #193
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer committed Jul 6, 2018
1 parent 574d271 commit 8e1a21b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,8 @@ def updateTBL(input, annotDict, output):
with open(input, 'rU') as infile:
with open(output, 'w') as outfile:
for gene in readBlocks2(infile, '>Feature', '\tgene\n'):
transcriptsSeen = []
#transcriptNum = 0
if gene[0].startswith('>Feature'):
outfile.write(''.join(gene))
else:
Expand Down Expand Up @@ -1780,7 +1782,11 @@ def updateTBL(input, annotDict, output):
elif line.startswith('\t\t\ttranscript_id\t'):
ID = line.split('|')[-1]
ID = ID.split('_mrna')[0]
transcriptNum = int(ID.split('-T')[-1])
#transcriptNum = int(ID.split('-T')[-1])
#transcriptNum += 1
if not ID in transcriptsSeen:
transcriptsSeen.append(ID)
transcriptNum = len(transcriptsSeen)
if ID in annotDict:
transcriptAnnot = annotDict.get(ID)
if 'product' in geneAnnot:
Expand Down

0 comments on commit 8e1a21b

Please sign in to comment.