Hi,
It is the first time I try to use forum , I am not sure if it is the correct place to ask but.......
I have NGS data of 12,500 unique sgRNA. I wanted to compare the abundance, of every sgRNA, between four control samples to four treatment samples. For doing so I have used R and got the p-value by doing multiple comparison t-test. I have received 12,500 p-values.
The command - p.adjust(p,method="BH") to was used to calculate the corrected p-value.
Now for my question: Seven sgRNA's, out of the pool of 12,500, are predicted to be enriched in my treatment sample.
If I assume these seven sgRNA's would be enriched, based on previews published studies, is it correct to rank the p-value of the seven sgRNA's higher in my BH analysis for corrected p-value?
Here is the code I would use:
ordered.p <- sort(p)
critical.vals <- NULL
bh.fdr.adjusted.p <- NULL
for (i in 1:length(ordered.p)) {
temp <- (i/length(ordered.p))*0.05
critical.vals <- c(critical.vals,temp)
bh.fdr.adjusted.p <- c(bh.fdr.adjusted.p, min((ordered.p*length(ordered.p)/i),1))
}
final.out <- cbind(ordered.p,critical.vals,bh.fdr.adjusted.p)