Skip to content

Commit

Permalink
potential fix for #727, seems to happen if gene removed that has alt-…
Browse files Browse the repository at this point in the history
…transcript
  • Loading branch information
Jon Palmer committed Jun 16, 2022
1 parent a5266cd commit 1597d3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions funannotate/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -4446,6 +4446,8 @@ def gff2dict(file, fasta, Genes, debug=False, gap_filter=False):
# loop through and make sure CDS and exons are properly sorted and codon_start is correct, translate to protein space
for k, v in list(Genes.items()):
for i in range(0, len(v['ids'])):
if not k in Genes: # capture if gene was removed
continue
if v['type'] in ['mRNA', 'tRNA', 'ncRNA', 'rRNA']:
if v['strand'] == '+':
sortedExons = sorted(v['mRNA'][i], key=lambda tup: tup[0])
Expand Down

0 comments on commit 1597d3b

Please sign in to comment.