DMRcate Error in if (nsig == 0) { : missing value where TRUE/FALSE needed
1
0
Entering edit mode
Jeni • 0
@jeni-23673
Last seen 5 months ago

Hi!

I am using DMRcate to find diferencially methylated regions between two groups of samples, from the Beta Values of a set of samples data that I downloaded from TCGA repository.

I have performed the probe wise analysis first, using limma, so I have generated the design and contrast matrix with this package. Now, I am using this command with DMRcate:

myAnnotation <- cpg.annotate(object = as.matrix(bVals_filtered), datatype = "array", arraytype = c("450K"), what = "Beta", 
                          analysis.type = "differential", design = design, 
                          contrasts = TRUE, cont.matrix = contMatrix, 
                          coef = "B - A", fdr = 0.01)

After that, I get this error:

Error in if (nsig == 0) { : missing value where TRUE/FALSE needed

Is any way to handle NA in the Beta values matrix? If I filter rows containing some NA then I keep just a few probes, compared with the total amount of probes in the array.

DMRcate differencial methylation • 208 views
ADD COMMENT
0
Entering edit mode

Why do you have so many NA values in your Beta matrix? I've never actually (so far as I recall) even seen one NA value, not to mention enough that you filter out most of your probes.

ADD REPLY
0
Entering edit mode

I don't know that, I have downloaded this data from the TCGA. But, if I remove rows with some NA, then I get just 47495 probes, which is a quite low amount.

ADD REPLY
3
Entering edit mode
@james-w-macdonald-5106
Last seen 23 hours ago
United States

The test for nsig == 0 comes from a test for the adjusted p-values being < your significance cutoff. The only way you will have NA values for your adjusted p-values is if you have NA values for all the subjects in a single group. So you don't have to get rid of all the probes with any NA value, just those that have all NA values for one or more of the groups you are comparing.

You should have seen a warning that said

Warning message:
Partial NA coefficients for N probe(s)

When you did the limma analysis. And you could find out which probes those are by doing

naind <- is.na(rowSums(fit$p.value))

where 'fit' is the name of the MArrayLM object you got after calling eBayes.

ADD COMMENT
1
Entering edit mode

Hi Jeni,

Yep Jim's right - run your limma fit manually with his code to see which probes you need to filter out.

Alternatively, you could impute the NAs using knn.impute or some such method, taking into account the risks inherent to imputation.

Cheers, Tim

ADD REPLY

Login before adding your answer.

Traffic: 529 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