Skip to content

Commit

Permalink
Merge pull request #111 from jts/fix/metadata-na
Browse files Browse the repository at this point in the history
Fix/metadata na
  • Loading branch information
jts authored Apr 25, 2024
2 parents 7a19778 + 3028cc6 commit 04c7654
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion workflow/scripts/format_pileup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions workflow/scripts/plot/plot_qc_sequencing.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 04c7654

Please sign in to comment.