Skip to content

Commit

Permalink
Update summarize_barrnap.py
Browse files Browse the repository at this point in the history
If there is more than one gene for a given domain,
retains the lowest e-value (case of full rRNA operon sequences).
  • Loading branch information
vaulot authored Mar 26, 2024
1 parent c828ef4 commit 42a7556
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/summarize_barrnap.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# Takes a list of files with barrnap predictions (rrna.arc.gff, rrna.bac.gff, etc)
# for ASV sequences, extracts evalues for each prediction and summarize the results
# in a new file "summary.gff". Assumes that the same program/barrnap version is
# used for all predictions.
# used for all predictions. If there is more than one gene for a given domain,
# retains the lowest e-value (case of full rRNA operon sequences).

# import pandas as pd
import sys
Expand All @@ -27,7 +28,8 @@
method[asv] = rowparts[1]
if asv not in evalues:
evalues[asv] = dict()
evalues[asv][org] = rowparts[5]
if (org not in evalues[asv]) or (float(evalues[asv][org]) > float(rowparts[5])) :
evalues[asv][org] = rowparts[5]
fh.close()

# Write results
Expand Down

0 comments on commit 42a7556

Please sign in to comment.