Skip to content

Commit

Permalink
Update extract.py
Browse files Browse the repository at this point in the history
- Fix f-string syntax to be compatible with Python >=3.6 (backslashes not allowed inside f-string expressions)
  • Loading branch information
edgardomortiz committed Jan 29, 2025
1 parent 5dd2e29 commit 0665cc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions captus/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -2392,8 +2392,8 @@ def cleanup_post_extraction(
gff_lines = 0
with open(gff_file, "wt") as gff_out:
gff_out.write("##gff-version 3\n")
gff_out.write(f"#{tsv_comment.split('\n')[0]}\n")
gff_out.write(f"#{tsv_comment.split('\n')[1]}\n")
tsv_comment = tsv_comment.split('\n')
gff_out.write(f"#{tsv_comment[0]}\n#{tsv_comment[1]}\n")
if sample_gffs:
for gff in sorted(sample_gffs):
with open(gff, "rt") as gff_in:
Expand Down Expand Up @@ -2422,7 +2422,7 @@ def cleanup_post_extraction(
]
tsv_lines = 0
with open(stats_file, "wt") as tsv_out:
tsv_out.write(tsv_comment)
tsv_out.write(f"{tsv_comment[0]}\n{tsv_comment[1]}\n")
tsv_out.write(stats_header)
if sample_stats:
for table in sorted(sample_stats):
Expand Down

0 comments on commit 0665cc8

Please sign in to comment.