Skip to content

Commit

Permalink
fix low consensus error
Browse files Browse the repository at this point in the history
  • Loading branch information
ViralVerity committed Sep 13, 2024
1 parent a7c7bf1 commit 35c312c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions denv_pipeline/scripts/make_summary_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,17 @@ def pull_low_coverage_seqs(config, all_coverage, high_coverage):

top_call[name] = top

low_cov_seqs = set()
depth = config["depth"]
with open(os.path.join(config["outdir"], "results", "low_coverage_calls.csv"), 'w') as fw:
fw.write("sample_id,serotype\n")
for name,call in top_call.items():
if call != "NA":
fw.write(f"{name},{call}\n")

low_cov_seqs.add(f'{name}.{call}.{depth}.cons.fa')

for cons in low_cov_seqs:
source = os.path.join(config['tempdir'], cons)
dest = os.path.join(config["outdir"], "results", "low_coverage_consensus")
shutil.move(source, dest)
low_cov_seqs = set()
depth = config["depth"]
with open(os.path.join(config["outdir"], "results", "low_coverage_calls.csv"), 'w') as fw:
fw.write("sample_id,serotype\n")
for name,call in top_call.items():
if call != "NA":
fw.write(f"{name},{call}\n")

low_cov_seqs.add(f'{name}.{call}.{depth}.cons.fa')

for cons in low_cov_seqs:
source = os.path.join(config['tempdir'], cons)
dest = os.path.join(config["outdir"], "results", "low_coverage_consensus")
shutil.move(source, dest)

0 comments on commit 35c312c

Please sign in to comment.