The OrganismDb class is a container for storing knowledge about existing Annotation packages and the relationships between these resources. The purpose of this object and it's associated methods is to provide a means by which users can conveniently query for data from several different annotation resources at the same time using a familiar interface.
The supporting methods
used together to extract data from an
object in a manner that should be consistent with how these are used
on the supporting annotation resources.
The family of
seqinfo style getters (
seqnameStyle) is also supported for OrganismDb objects
provided that the object in question has an embedded TxDb
In the code snippets below,
x is a OrganismDb object. For the
metadata and show methods, there is also support for FeatureDb objects.
keytypes(x): allows the user to discover which keytypes can be passed in to
keys(x, keytype, pattern, column, fuzzy): Return keys for the database contained in the TxDb object . The
keytypeargument specifies the kind of keys that will be returned and is always required. If
keysis used with
pattern, it will pattern match on the
keytype. But if the
columnargument is also provided along with the
patternwill be matched against the values in
keysis called with
patternargument, then it will return all keys that have corresponding values in the
columnargument. Thus, the behavior of
keysall depends on how many arguments are specified. Use of the
fuzzyargument will toggle fuzzy matching to TRUE or FALSE. If
patternis not used, fuzzy is ignored.
columns(x): shows which kinds of data can be returned for the
select(x, keys, columns, keytype): When all the appropriate arguments are specifiedm
selectwill retrieve the matching data as a data.frame based on parameters for selected
- AnnotationDb-class for more descriptsion
- makeOrganismPackage for functions
used to generate an
- rangeBasedAccessors for the range based methods
used in extracting data from a
- seqlevels .
- seqlengths .
- isCircular .
- genome .
## load a package that creates an OrganismDb library(Homo.sapiens) ls(2) ## then the methods can be used on this object. columns <- columns(Homo.sapiens)[c(7,10,11,12)] keys <- head(keys(org.Hs.eg.db, "ENTREZID")) keytype <- "ENTREZID" res <- select(Homo.sapiens, keys, columns, keytype) head(res) ## Get the DB connections or DB file paths associated with those for ## each. dbconn(Homo.sapiens) dbfile(Homo.sapiens)