Skip to content

Commit

Permalink
fix: gffread - properly generate fasta output (#1797)
Browse files Browse the repository at this point in the history
### Description

Addresses bug discussed in detail in #1794. Details about proposed fix
implemented in this PR are discussed in that issue report as well.
  • Loading branch information
isaacvock committed Sep 11, 2023
1 parent 873937e commit 89ea854
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bio/gffread/wrapper.py
Expand Up @@ -22,6 +22,8 @@
else:
raise ValueError("Unknown annotation format")

# In most cases, output can be specified with -o
out_flag = " -o "

# Output format control
if records.endswith((".gtf", ".gff", ".gff3")):
Expand All @@ -31,7 +33,8 @@
elif records.endswith(".tlf"):
extra += " --tlf "
elif records.endswith((".fasta", ".fa", ".fna")):
pass
# Fasta output must be specified with -w
out_flag = " -w "
else:
raise ValueError("Unknown records format")

Expand Down Expand Up @@ -80,8 +83,8 @@

shell(
"gffread {extra} "
"-o {records} "
"{snakemake.input.fasta} "
"{out_flag} {records} "
"-g {snakemake.input.fasta} "
"{annotation} "
"{log} "
)

0 comments on commit 89ea854

Please sign in to comment.