DMRcate Error in if (nsig == 0) { : missing value where TRUE/FALSE needed
Entering edit mode
Jeni • 0
Last seen 8 months ago


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 • 395 views
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.

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.

Entering edit mode
Last seen 18 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 <-$p.value))

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

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


Login before adding your answer.

Traffic: 703 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6