Skip to content

Commit

Permalink
explicitly state headers and comments for bakta annotations
Browse files Browse the repository at this point in the history
this fixes gitlab  clavellab/genome-assembly#14
  • Loading branch information
cpauvert committed Apr 17, 2024
1 parent e968020 commit f7c566f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion workflow/scripts/check_tRNAs_5S.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
sys.stderr = open(snakemake.log[0], "w")

# Read Bakta tabular annotations
annotations = pd.read_table(snakemake.input[0], sep="\t", header=2)
# Header of TSV files changes between v1.6.3 and v1.9.3
# https://git.rwth-aachen.de/clavellab/genome-assembly/-/issues/14
# So more flexible input options.
annotations = pd.read_table(snakemake.input[0], sep="\t", header=0, comment = "#",
names = ["Sequence Id","Start","Stop","Strand","Locus Tag","Gene","Product","DbXrefs"])
# Casting the column as string to fix a AttributeError when no gene names are found
# Can only use .str accessor with string values
annotations['Gene']=annotations['Gene'].astype(str)
Expand Down

0 comments on commit f7c566f

Please sign in to comment.