Adds biomaRt annotations (e.g. gene, gene_biotype) and calculates the following QC metrics:

  • qc_metric_ensembl_mapped - was the ensembl_gene_id found in biomaRt

  • qc_metric_is_mito - is the gene mitochondrial

  • qc_metric_is_ribosomal - is the gene ribosomal

annotate_sce_genes(
  sce,
  drop_unmapped = TRUE,
  drop_mito = TRUE,
  drop_ribo = FALSE,
  ensembl_mapping_file = NULL,
  species = getOption("scflow_species", default = "human")
)

Arguments

sce

a SingleCellExperiment object with ensembl_gene_id rowData

drop_unmapped

set TRUE to remove unmapped ensembl_gene_id

drop_mito

set TRUE to remove mitochondrial genes

drop_ribo

set TRUE to remove ribosomal genes

ensembl_mapping_file

a local tsv file with ensembl_gene_id and additional columns for mapping ensembl_gene_id to gene info. If not provided, the biomaRt db is queried (slower).

species

The biological species of the sample.#'

Value

sce a SingleCellExperiment object annotated with gene data