The generic function query()
is the interface for querying gene annotations from
a data base connection.
Value
A S4Vectors::DataFrame
with the gene annotations. It is required that:
The
rownames
are identical to the inputgenes
.The
colnames
are equal to the annotation columns.row_data_annotation_cols
.Therefore, missing information needs to be properly included in the
DataFrame
withNA
entries.
Details
A method is provided for the
ConnectionBiomart
class. 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
BioMart
queries might not return information for all the genes. This can be due to different versions being used in the gene IDs and the queriedEnsembl
data base.
Examples
if (interactive()) {
object <- hermes_data
connection <- connect_biomart(prefix(object))
result <- query(genes(object), connection)
head(result)
head(annotation(object))
}