[BioC] Specific annotation information from ExpressionSet

Martin Morgan mtmorgan at fhcrc.org
Thu May 22 15:09:35 CEST 2008


Hi Daniel --

Daniel Brewer <daniel.brewer at icr.ac.uk> writes:

> No you are not missing anything.  I thought this was a useful feature
> and so probably some one had done it before and submitted it to
> bioconductor, that is normally the case.  I will just have to code it
> myself.

GSEABase does this kind of operation, for instance

> library(GSEABase)
> data(sample.ExpressionSet)
> gs <- GeneSet(sample.ExpressionSet)
> gs
setName: NA 
geneIds: AFFX-MurIL2_at, AFFX-MurIL10_at, ..., 31739_at (total: 500)
geneIdType: Annotation (hgu95av2)
collectionType: ExpressionSet 
details: use 'details(object)'
> mapIdentifiers(gs, SymbolIdentifier())
setName: NA 
geneIds: STAT1, GAPDH, ..., OBSCN (total: 344)
geneIdType: Symbol (hgu95av2)
collectionType: ExpressionSet 
details: use 'details(object)'

You can retrieve the mapped ids with the accessor geneIds(). In the
reverse direction:

> refseqIds
[1] "NM_003747" "NM_007315" "NM_139266" "NP_003738" "NP_009330" "NP_644671"
> gs <- GeneSet(refseqIds, geneIdType=RefseqIdentifier())
> gs
setName: NA 
geneIds: NM_003747, NM_007315, ..., NP_644671 (total: 6)
geneIdType: Refseq
collectionType: Null 
details: use 'details(object)'
> es <- sample.ExpressionSet[gs,]
> es
ExpressionSet (storageMode: lockedEnvironment)
assayData: 8 features, 26 samples 
  element names: exprs, se.exprs 
phenoData
  sampleNames: A, B, ..., Z  (26 total)
  varLabels and varMetadata description:
    sex: Female/Male
    type: Case/Control
    score: Testing Score
featureData
  featureNames: 31473_s_at, 31474_r_at, ..., AFFX-HUMISGF3A/M97935_MB_at  (8 total)
  fvarLabels and fvarMetadata description: none
experimentData: use 'experimentData(object)'
Annotation: hgu95av2

you could then use exprs(es) to retrieve the expression values of the
corresponding probes. Note the map between geneIds and features is not
1:1 in either direction.

Martin

> Dan
>
> Sean Davis wrote:
>> On Wed, May 21, 2008 at 7:47 AM, Daniel Brewer <daniel.brewer at icr.ac.uk> wrote:
>>> Hello,
>>>
>>> Is there any functions in bioconductor that can take an ExpressionSet,
>>> find the correct annotation object and then get information? So the
>>> function would use annotation() to get the object and then use that
>>> object for a specific purpose
>>>
>>> I have two uses for this:
>>> 1) Given a REFSEQ ID find the corresponding probes in an ExpressionSet
>>> and print the expression for those probes e.g.
>>> getExprFromREFSEQ(REFSEQID, ExpressionSet)
>>> 2) Given a probe and ExpressionSet find the gene symbol.
>>> getSymbol(ExpressionSet, ProbeID)
>>>
>>> If not, any ideas on the best way to do this?
>> 
>> There are not functions for this, I do not think.  However, you could,
>> in a pretty straightforward way, write a function to extract the
>> annotation slot (when it has something in it--it is not guaranteed to
>> be non-NULL), load the appropriate annotation package if it exists,
>> and then do the lookups you want.  Or is there some other detail that
>> I am missing from your post?
>> 
>> Sean
>
> -- 
> **************************************************************
> Daniel Brewer, Ph.D.
>
> Institute of Cancer Research
> Molecular Carcinogenesis
> Email: daniel.brewer at icr.ac.uk
> **************************************************************
>
> The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.
>
> This e-mail message is confidential and for use by the a...{{dropped:2}}
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M2 B169
Phone: (206) 667-2793



More information about the Bioconductor mailing list