Skip to content

Commit

Permalink
more flexible geneID parsing for annotate
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Palmer committed Oct 4, 2019
1 parent 603d2f1 commit 84219c6
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 @@ -932,7 +932,13 @@ def getGeneBasename(fastafile):
line = line.replace('\n', '')
if line.startswith('>'):
line = line.replace('>', '')
Base = line.split('_')[0]+'_'
transcript, gene = line.split(' ')
if '_' in gene:
Base = line.split('_')[0]+'_'
elif '-' in gene:
Base = line.split('-')[0]
else:
Base = gene
if not Base in bases:
bases.append(Base)
return bases
Expand Down

0 comments on commit 84219c6

Please sign in to comment.