Issue with minfi when performing DMP analysis
Entering edit mode
4.9 years ago
mforde84 ★ 1.3k


I'm trying to determine differential methylation of probe positions using R package minfi.

I have a matrix of 14 probes as rows 142 samples:

> dim(primnorm.beta)
[1]  14 142

For phenotypes I have a list:

> str(primnorm.pheno)
 chr [1:142] "primary" "primary" "primary" "primary" "primary" ...

When I run the analysis I get an error concerning the number of samples listed in the phenotype variable even through it's equal to the number of columns in the data matrix:

> dmp.primnorm <- dmpFinder(as.numeric(unlist(primnorm.beta)), pheno = as.character(primnorm.pheno), type = "categorical")
Error in dmpFinder(as.numeric(unlist(primnorm.beta)), pheno = as.character(primnorm.pheno),  : 
  length of pheno does not equal number of samples

Does any one see what this issue is? I thought it might be an issue with the type of variables I'm passing to the function. Though I've double checked with the example vignette, and the the types of variables passed in there examples are the same as mine.

Thanks, Martin

methly dmp subscript error • 1.2k views
Entering edit mode
4.9 years ago
mforde84 ★ 1.3k

Never mind, found it.

Issues was with unlist.

Changed to:

dmp.primnorm <- dmpFinder(as.matrix(primnorm.beta), pheno = as.character(primnorm.pheno), type = "categorical")

Login before adding your answer.

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