Skip to contents

[Experimental]

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)

Arguments

genes

(character)
gene IDs.

connection

(connection class)
data base connection object.

Value

A S4Vectors::DataFrame with the gene annotations. It is required that:

  • The rownames are identical to the input genes.

  • The colnames are equal to the annotation columns .row_data_annotation_cols.

  • Therefore, missing information needs to be properly included in the DataFrame with NA 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 queried Ensembl data base.

Examples

if (interactive()) {
  object <- hermes_data
  connection <- connect_biomart(prefix(object))
  result <- query(genes(object), connection)
  head(result)
  head(annotation(object))
}