getGeneMapping: Gets the isoform-to-gene mapping

View source: R/annotation.R

getGeneMappingR Documentation

Gets the isoform-to-gene mapping

Description

The annotation in the reference folders is at the isoform level but for gene-level analyses we need to map the annotation to the gene level. Especially all enrichment analyses should be run at the gene-level

Usage

getGeneMapping(param, seqAnnoDF)

hasGeneMapping(param, seqAnnoDF)

Arguments

param

the global parameter object. We need the entries geneColumn or geneColumnSet to figure out which columns of the annotation data frame should be used for the mapping

seqAnnoDF

a data.frame containing the sequence annotation.

Value

Returns a named character vector containing the gene mapping.

Functions

  • hasGeneMapping: Returns a logical indicating if the set parameters have gene mapping or not.

Author(s)

Rehrauer, Hubert

Schmid, Peter

Examples

param = ezParam()
annoFile = system.file("extdata/genes_annotation.txt", package="ezRun", mustWork=TRUE)
param$ezRef["refAnnotationFile"] = annoFile
param$ezRef["refFeatureFile"] = system.file("extdata/genes.gtf", package="ezRun", mustWork=TRUE)
param$ezRef["refFastaFile"] = system.file("extdata/genome.fa", package="ezRun", mustWork=TRUE)
seqAnno = writeAnnotationFromGtf(param)
seqAnno = ezFeatureAnnotation(param, rownames(seqAnno), dataFeatureType="gene")
gm = getGeneMapping(param, seqAnno)
hasGeneMapping(param, seqAnno)

uzh/ezRun documentation built on April 24, 2024, 4:01 p.m.