diff --git a/workflow/scripts/format_pileup.py b/workflow/scripts/format_pileup.py index 94c3f19..c84cde4 100644 --- a/workflow/scripts/format_pileup.py +++ b/workflow/scripts/format_pileup.py @@ -12,7 +12,7 @@ print("\t".join(["contig", "position", "depth", "ref_base", "count_A", "count_C", "count_G", "count_T", "count_del", "alt_frequency"])) for pc in samfile.pileup(ignore_orphans=False): - freqs = {'A': 0, 'T': 0, 'G': 0, 'C': 0, '-': 0, 'R': 0 } + freqs = {'A': 0, 'T': 0, 'G': 0, 'C': 0, '-': 0, 'R': 0, 'N': 0 } for pr in pc.pileups: if pr.is_del: freqs['-'] += 1 diff --git a/workflow/scripts/plot/plot_qc_sequencing.R b/workflow/scripts/plot/plot_qc_sequencing.R index dd99e10..79d4d94 100644 --- a/workflow/scripts/plot/plot_qc_sequencing.R +++ b/workflow/scripts/plot/plot_qc_sequencing.R @@ -122,6 +122,9 @@ if(!interactive()) { if(args$metadata != "") { metadata.raw <- read.table(args$metadata, header=T, sep="\t") + if(all(is.na(metadata.raw$ct))) { + metadata.raw$ct <- 0 + } # clean metadata of unknown Cts metadata = subset(metadata.raw, ct != "unknown")