Skip to content

Commit

Permalink
ignoring weird RNA prediction from aragorn
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMainguy committed Jul 3, 2024
1 parent accbd36 commit 308731d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ppanggolin/annotate/synta.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ def launch_aragorn(fna_file: str, org: Organism) -> defaultdict:
elif len(line) > 0: # if the line isn't empty, there's data to get.
line_data = line.split()
start, stop = map(int, ast.literal_eval(line_data[2].replace("c", "")))
if start < 1 or stop < 1:
# In some case aragorn gives negative coordinates. This case is just ignored.
logging.warning(f'Aragorn gives non valide coordiates for a RNA gene: {line_data} This RNA is ignored.')
continue
c += 1
gene = RNA(rna_id=locustag + '_tRNA_' + str(c).zfill(4))
gene.fill_annotations(start=start, stop=stop, strand="-" if line_data[2].startswith("c") else "+",
Expand Down

0 comments on commit 308731d

Please sign in to comment.