The generic function query() is the interface for querying gene annotations from
a data base connection.
Usage
query(genes, connection)
# S4 method for class 'character,ConnectionBiomart'
query(genes, connection)Value
A S4Vectors::DataFrame with the gene annotations. It is required that:
The
rownamesare identical to the inputgenes.The
colnamesare equal to the annotation columns.row_data_annotation_cols.Therefore, missing information needs to be properly included in the
DataFramewithNAentries.
Details
A method is provided for the
ConnectionBiomartclass. However, the framework is extensible: It is simple to add new connections and corresponding query methods for other data bases, e.g. company internal data bases. Please make sure to follow the required format of the returned value.The
BioMartqueries might not return information for all the genes. This can be due to different versions being used in the gene IDs and the queriedEnsembldata base.
Examples
if (interactive()) {
object <- hermes_data
connection <- connect_biomart(prefix(object))
result <- query(genes(object), connection)
head(result)
head(annotation(object))
}
