Skip to content

Commit

Permalink
denoise discarded reads fix
Browse files Browse the repository at this point in the history
discarded reads were previously misscounted
  • Loading branch information
VascoElbrecht committed Aug 23, 2017
1 parent 82eedd1 commit 1ab8331
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JAMP/R/Denoise.R
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ names(data)[i+2] <- sub("_data/3_unoise/(.*)_denoised.txt", "\\1", denoised_sequ

data <- cbind(data, "sequences"=unlist(haplotypes), stringsAsFactors=F)
# sort by OTUs
data <- data[order(as.numeric(sub("OTU_", "", data$OTU))),]
data <- data[order(suppressWarnings(as.numeric(sub("OTU_", "", data$OTU)))),]
data <- cbind("sort"=1:nrow(data), data)

data <- rbind(data, c(nrow(data)+1, NA, "rm_bydenoising", counts, NA))
data <- rbind(data, c(nrow(data)+1, NA, "rm_bydenoising", counts-colSums(data[4:(ncol(data)-1)]), NA))

dir.create("_data/4_denoised")

Expand Down

0 comments on commit 1ab8331

Please sign in to comment.