Error: missing values and NaN's not allowed if 'na.rm' is FALSE
0
2
Entering edit mode
2.3 years ago
sunnykevin97 ▴ 990
setwd("/home/sun/Documents/genesite/pvalues/")

library(qvalue)

 p <- scan("/home/sun/Documents/genesite/pvalues  
/pvalues.txt",na.strings=T)

hist(p, breaks = 20, main = paste("Distribution of p-values"), xlab="Value")

aa <- is.na(p)

aa

[1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[20] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[39] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[58] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE


qobj <- qvalue(p, pi0.meth="bootstrap", fdr.level=0.05,na.rm=TRUE)

Error in quantile.default(pi0, prob = 0.1) : 
  missing values and NaN's not allowed if 'na.rm' is FALSE

write.qvalue(qobj, file="qvalues.list")
Genome Software • 2.4k views
ADD COMMENT
3
Entering edit mode

You should share the values with dput instead of just the results of is.na so we can check they are valid finite numeric values.

ADD REPLY
0
Entering edit mode
cat pvalues.txt
5.88E-05
1.42E-04
2.10E-04
2.24E-04
2.95E-04
3.07E-04
4.54E-04
4.66E-04
1.05E-03
1.80E-03
1.95E-03
2.02E-03
2.46E-03
2.76E-03
3.22E-03
3.66E-03
3.92E-03
4.14E-03
4.91E-03
5.79E-03
6.65E-03
7.09E-03
7.48E-03
7.93E-03
8.70E-03
9.76E-03
1.00E-02
1.03E-02
1.06E-02
1.13E-02
1.18E-02
1.26E-02
1.32E-02
1.44E-02
1.45E-02
1.54E-02
1.56E-02
1.61E-02
1.61E-02
1.72E-02
1.72E-02
1.77E-02
1.77E-02
1.87E-02
2.08E-02
2.27E-02
2.42E-02
2.43E-02
2.47E-02
2.54E-02
2.89E-02
2.89E-02
2.96E-02
3.06E-02
3.35E-02
3.44E-02
3.72E-02
3.88E-02
4.06E-02
4.15E-02
4.50E-02
4.51E-02
4.70E-02
4.84E-02
4.92E-02
5.02E-02
ADD REPLY
0
Entering edit mode

Any suggestions ?

ADD REPLY
2
Entering edit mode
co <- p.adjust(p, method = c("BH"),n = length(p))

[1] 2.160000e-05 2.160000e-05 4.725000e-05 2.314286e-05 9.000000e-06 9.000000e-06 2.314286e-05 2.160000e-05 5.800000e-05
[10] 4.355471e-02 4.355471e-02 3.442371e-02 4.355471e-02 3.442371e-02 2.333291e-02 4.960600e-02 3.132000e-02 2.333291e-02
ADD REPLY

Login before adding your answer.

Traffic: 2612 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6