[BioC] merging two sets of genes

Seth Falcon sfalcon at fhcrc.org
Tue Dec 27 19:13:38 CET 2005


On 26 Dec 2005, kfbargad at ehu.es wrote:

> Dear list,
>
> I have two sets of genes from the same experiment,
>
>> PinC
> Expression Set (exprSet) with 
> 1310 genes
> 8 samples
> phenoData object with 2 variables and 8 cases
> varLabels
> FileName: read from file
> Target: read from file
>> PinS
> Expression Set (exprSet) with 
> 2891 genes
> 8 samples
> phenoData object with 2 variables and 8 cases
> varLabels
> FileName: read from file
> Target: read from file
>
>
> How can I merge these two sets? I tried union() on two vectors
> created from the probe IDs but failed. Any hints?

One approach would be to create a new exprSet object manually using
the data from PinC and PinS.  Basically, create a new phenoData object
with the data for all 16 cases, and a new epxression matrix with 16
columns (assuming the two original exprSets represent disjoint sets of
samples).

Thinking out loud, is this a common enough operation to warrant a
method for exprSets?  I could imagine c() being defined on exprSets
such that if the phenoData columns are the same and the "sample ids"
as given by the rownames of phenoData/colnames of exprs are disjoint,
then do the obvious thing, else error.

+ seth



More information about the Bioconductor mailing list