From 0665cc853012000a738e92aa34450e0bef8185ac Mon Sep 17 00:00:00 2001 From: Edgardo Ortiz Date: Tue, 28 Jan 2025 21:51:44 -0500 Subject: [PATCH] Update extract.py - Fix f-string syntax to be compatible with Python >=3.6 (backslashes not allowed inside f-string expressions) --- captus/extract.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/captus/extract.py b/captus/extract.py index d0e3295..5b031dc 100644 --- a/captus/extract.py +++ b/captus/extract.py @@ -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: @@ -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):