There are some functions of my code that could not be run using NChannelSet (i.e, Biobase::exprs(raw_data) ). I was just curious if exists some way to transform a NChannelSet object to an expressionSet.
Any idea?
There are some functions of my code that could not be run using NChannelSet (i.e, Biobase::exprs(raw_data) ). I was just curious if exists some way to transform a NChannelSet object to an expressionSet.
Any idea?
It might depend exactly on your object, but extracting a channel might do the trick. From ?NChannelSet
:
> ## An NChannelSet with two channels and channel-specific phenoData
> R <- matrix(0, 10, 3, dimnames=list(NULL, LETTERS[1:3]))
> G <- matrix(1, 10, 3, dimnames=list(NULL, LETTERS[1:3]))
> assayData <- assayDataNew(R=R, G=G)
> data <- data.frame(ChannelRData=numeric(ncol(R)),
+ ChannelGData=numeric(ncol(R)),
+ ChannelRAndG=numeric(ncol(R)))
> varMetadata <- data.frame(labelDescription=c(
+ "R-specific phenoData",
+ "G-specific phenoData",
+ "Both channel phenoData"),
+ channel=factor(c("R", "G", "_ALL_")))
> phenoData <- AnnotatedDataFrame(data=data, varMetadata=varMetadata)
> obj <- NChannelSet(assayData=assayData, phenoData=phenoData)
> obj
NChannelSet (storageMode: lockedEnvironment)
assayData: 10 features, 3 samples
element names: G, R
protocolData: none
phenoData
sampleNames: A B C
varLabels: ChannelRData ChannelGData ChannelRAndG
varMetadata: labelDescription channel
featureData: none
experimentData: use 'experimentData(object)'
Annotation:
> channel(obj, "G")
ExpressionSet (storageMode: lockedEnvironment)
assayData: 10 features, 3 samples
element names: exprs
protocolData: none
phenoData
sampleNames: A B C
varLabels: ChannelGData ChannelRAndG
varMetadata: labelDescription channel
featureData: none
experimentData: use 'experimentData(object)'
Annotation:
NChannel objects are almost always two-color microarrays. There is more information in the two-channels than in any single expression summary, so any attempt to convert to an expressionSet will lose information. Two-color microarrays are analysed in terms of log-ratios (also called M-values), so the least bad way convert an NChannel object to an expressionSet is to compute the normalized M-values and to use those as the expression matrix. Simply extracting one channel and ignoring the other will give much noisier and possibly meaningless results.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.