Skip to content

Commit

Permalink
corrected AF 20% computation for QVALUE_20PC
Browse files Browse the repository at this point in the history
  • Loading branch information
nalcala committed Oct 20, 2016
1 parent 219b4dd commit 56b0378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/needlestack.r
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ common_annot=function() {
}

toQvalue20pc <- function(x,rob_nb_res){
y = ceiling(x*0.2) #take ceiling to be conservative
y = floor(x*0.2) #take floor to be conservative
unlist(-10*log10(p.adjust((dnbinom(c(rob_nb_res$ma_count,y),size=1/rob_nb_res$coef[[1]],mu=rob_nb_res$coef[[2]]*c(rob_nb_res$coverage,x)) +
pnbinom(c(rob_nb_res$ma_count,y),size=1/rob_nb_res$coef[[1]],mu=rob_nb_res$coef[[2]]*c(rob_nb_res$coverage,x),lower.tail = F)))
[length(rob_nb_res$coverage)+1]))
Expand Down

0 comments on commit 56b0378

Please sign in to comment.