Combining .idat and GEO data sets in minfi
1
0
Entering edit mode
matts • 0
@matts-10552
Last seen 6.7 years ago

Hi,

I am trying to combine raw (.idat) and GEO (intensity matrix) Illumina 450K data sets using minfi.


library(minfi)

geo.data <- getGenomicRatioSetFromGEO(GSE="")

targets < read.450k.sheet("my.data.csv")

my.data <- read.450k.exp(base="data", targets=targets)

my.data.raw <- preprocessRaw(my.data)

my.data.RG <- ratioConvert(my.data.raw, what = "both")

my.data.mset <- mapToGenome(my.data.RG)

At this point, is there a way I can combine the two GenomicRatioSets to form a single data set for downstream analysis? Sorry if this is a basic question, but I havn't been able to figure it out.

Thank you

Matt

 

minfi • 2.2k views
ADD COMMENT
0
Entering edit mode

Hi,

Do you have any idea about "TableControl data GSnormalisation HM450" and "TableControl annotations HM450" in illumina HM 450 k data?

ADD REPLY
0
Entering edit mode

I thought they are control probe tables (~700-800 probes?).  I am not 100% sure, but I believe those are integrated in the minfi package. So you shouldn't worry about these files when you are using minfi. Ask Kasper the author to double check. I am not 100% certain.

ADD REPLY
1
Entering edit mode
@chao-jen-wong-7035
Last seen 16 months ago
USA/Seattle/Fred Hutchinson Cancer Rese…

Below is a reproducible example for combing two MethylSet instances :

library(minfiData)
## creating two different sets
a <- MsetEx[1:100, ]
b <- MsetEx[50:120, ]
sampleNames(b) <- paste0("set", 1:6)
p <- intersect(featureNames(b), featureNames(a))
## found 51 overlapping featureNames then combine the sets
com <- combine(a[p, ], b[p, ])
ADD COMMENT
0
Entering edit mode

Hi Chao-Jen,

Thank you so much for your response.

I tried your suggestion:

p <- intersect(featureNames(geo.data), featureNames(my.data.mset))
com_set <- combine(geo.data[p, ], my.data.mset[p, ])

However, I get this error:

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘combine’ for signature ‘"GenomicRatioSet", "GenomicRatioSet"’

Is there a similar function to combine that works on GenomicRatioSets?

Matt

ADD REPLY
0
Entering edit mode

Hi, Matt,

I just realize, by using showMethod("combine"), that the method only for "MethylSet".  My mistake. So it gets a little bit complicated here. I would manually construct a GenomicRatioSet to combine two GenomicRatioSet instances. Below is an example:

library(minfiData)
## 1. creating two different GenomicRatioSets
a <- MsetEx[1:100, ]
b <- MsetEx[50:120, ]
sampleNames(b) <- paste0("set", 1:6)
a_gr <- mapToGenome(ratioConvert(a, what="beta"))
b_gr <- mapToGenome(ratioConvert(b, what="beta"))

## 2. finding the common probe and subsetting the sets
p <- intersect(featureNames(b), featureNames(a))
a_sub <- a_gr[p, ]
b_sub <- b_gr[p, ]

## Combine the phenotype data and beta or M-values
## Note that the phenotype data (pData) is a data
## frame (or DataFrame) with samples as rows, variables as columns
pdata <- rbind(pData(a_sub), pData(b_sub)) 
beta <- cbind(getBeta(a_sub), getBeta(b_sub))
com <- GenomicRatioSet(gr = granges(a_sub), Beta=beta, 
    M=NULL, CN=NULL, pData=pdata, annotation=annotation(a_sub))

 

I don't know the GenomicRatioSet object you get from GEO has beta values or M-value and the return of pData might have different variable (in column) from that of your set. So you will need to be careful when creating the data.frame to feed to pData argument. 

ADD REPLY
0
Entering edit mode

Fantastic! Thank you so much and I really appreciate the help.

 

Take care,

 

Matt

ADD REPLY

Login before adding your answer.

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