From cc557a64bb489bb39c3abf932a6cdfb87ad4a383 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Mon, 20 Apr 2020 17:25:37 -0400 Subject: Make sure there is a newline in relabeled fasta (but no blank lines) --- workflows/pangenome-generate/relabel-seqs.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'workflows') diff --git a/workflows/pangenome-generate/relabel-seqs.py b/workflows/pangenome-generate/relabel-seqs.py index b558fe2..1188ceb 100644 --- a/workflows/pangenome-generate/relabel-seqs.py +++ b/workflows/pangenome-generate/relabel-seqs.py @@ -12,4 +12,7 @@ for i, r in enumerate(reads): data = fa.read(8096) while data: relabeled_fasta.write(data) + endswithnewline = data.endswith("\\n") data = fa.read(8096) + if not endswithnewline: + relabeled_fasta.write("\\n") -- cgit v1.2.3