setMethod("channel",
signature(object = "ExpressionSetIllumina"),
function (object, name, ...)
{
allNames = channelNames(object)
if(!name %in% allNames) stop("No channel of name ", name, " was not found. Use channelNames function to see what names are valid")
selArray = which(object@channelData[[1]] == name)
BSData = new("ExpressionSetIllumina")
if(!is.null(Detection(object))){
assayData(BSData)=assayDataNew(exprs = exprs(object)[,selArray], se.exprs = se.exprs(object)[,selArray],nObservations=nObservations(object)[,selArray],Detection = Detection(object)[,selArray],storage.mode="list")
}
else assayData(BSData)=assayDataNew(exprs = exprs(object)[,selArray], se.exprs = se.exprs(object)[,selArray],nObservations=nObservations(object)[,selArray],storage.mode="list")
#assayData(BSData)=assayDataNew(exprs = exprs(object)[,selArray], se.exprs = se.exprs(object)[,selArray],storage.mode="list")
##Create new channel information
##Remove channel name from all assayData matrices
for(el in assayDataElementNames(BSData)){
colnames(assayDataElement(BSData, el)) = gsub(paste(name, ":",sep=""), "", colnames(assayDataElement(BSData, el)))
}
cData = NULL
cData[[1]] = object@channelData[[1]][which(object@channelData[[1]] == name)]
cData[[2]] = object@channelData[[2]][[which(channelNames(object) == name)]]
BSData@channelData = cData
BSData@phenoData = object@phenoData
BSData@featureData = object@featureData
BSData@QC = object@QC
annotation(BSData) <- annotation(object)
BSData
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.