Question: Issue with minfi when performing DMP analysis
0
gravatar for mforde84
3.2 years ago by
mforde841.2k
mforde841.2k wrote:

Hi,

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

subscript error dmp methly • 871 views
ADD COMMENTlink modified 3.2 years ago • written 3.2 years ago by mforde841.2k
0
gravatar for mforde84
3.2 years ago by
mforde841.2k
mforde841.2k wrote:

Never mind, found it.

Issues was with unlist.

Changed to:

dmp.primnorm <- dmpFinder(as.matrix(primnorm.beta), pheno = as.character(primnorm.pheno), type = "categorical")
ADD COMMENTlink written 3.2 years ago by mforde841.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1352 users visited in the last hour