Created
June 20, 2015 15:53
-
-
Save msuprun/09319809bd70faf8e2f8 to your computer and use it in GitHub Desktop.
R combining / merging EspressionSets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# using Merge | |
lists <- list(eset,eset3) | |
eset_both <- inSilicoMerging::merge(lists, method='NONE') | |
# using combine | |
eset_both2 <- combine(eset, eset3) | |
# Manually | |
neweset<-ExpressionSet(assayData=cbind(exprs(eset),exprs(eset3)[featureNames(eset),])) | |
phenoData(neweset)<-new("AnnotatedDataFrame",rbind(pData(eset),pData(eset3))[sampleNames(neweset),]) | |
# Compare results | |
sum(exprs(eset_both)[featureNames(neweset),sampleNames(neweset)]!=exprs(neweset))/length(featureNames(neweset)) | |
sum(exprs(eset_both2)[featureNames(neweset),sampleNames(neweset)]!=exprs(neweset))/length(featureNames(neweset)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment