getOntology: Get GO terms for a specified ontology

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/GOhelpers.R

Description

Find the subset of GO terms for the specified ontology, for each element of the supplied list of associations. The input list is typically from one of the chip-specific meta-data files.

Usage

1
getOntology(inlist, ontology=c("MF", "BP", "CC"))

Arguments

inlist

A list of GO associations

ontology

The name of the ontology you want returned.

Details

The input list should be a list of lists, each element of inlist is itself a list containing the information that maps from a specified ID (usually LocusLink) to GO information. Each element of the inner list is a list with elements GOID, Ontology and Evidence.

Value

A list of the same length as the input list. Each element of this list will contain a vector of GOIDs for those terms that match the requested ontology.

Author(s)

R. Gentleman

See Also

getEvidence, dropECode

Examples

1
2
3
4
 library("hgu95av2.db")
 bb <- hgu95av2GO[["39613_at"]]
 getOntology(bb)
 sapply(bb, function(x) x$Ontology)

Example output

Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: IRanges
Loading required package: S4Vectors

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: XML
Loading required package: org.Hs.eg.db


[1] "GO:0004571" "GO:0005509" "GO:0015923"
GO:0006486 GO:0006491 GO:1904381 GO:0000139 GO:0000139 GO:0005783 GO:0005793 
      "BP"       "BP"       "BP"       "CC"       "CC"       "CC"       "CC" 
GO:0005794 GO:0005829 GO:0016020 GO:0016021 GO:0070062 GO:0004571 GO:0005509 
      "CC"       "CC"       "CC"       "CC"       "CC"       "MF"       "MF" 
GO:0015923 
      "MF" 

annotate documentation built on Nov. 8, 2020, 8:14 p.m.