featAnnoIO: Feature annotation file IO

ezFeatureAnnotationR Documentation

Feature annotation file IO

Description

Read feature annotation file, either from transcript/isoform level or gene level.

Usage

  ezFeatureAnnotation(param, ids = NULL, 
                      dataFeatureType = c("gene", "transcript", "isoform"))

Arguments

param

A list of ezRun parameters or character(1) of filepath to *_annotation_byTranscript.txt.

ids

character(n) of gene_id or transcript_id to fetch. When NULL, all annotation are returned.

dataFeatureType

character(1): it can be “gene”, “transcript” or “isoform”.

Details

For each genome build, we have two types of gtf files: genes.gtf and featrues.gtf. For each gtf file, we have two correspodning feature annotation file: *_annotation_byGene.txt and *_annotation_byTranscript.txt. The former has one gene per row and the latter has one transcript per row.

When dataFeatureType is ‘gene’, *_annotation_byGene.txt, in the same folder of *_annotation_byTranscript.txt, is used when available. Otherwise, *_annotation_byTranscript.txt is used with aggregation.

Value

data.frame of feature annotation.

Author(s)

Ge Tan

Examples

  param <- list()
  param[['refBuild']] <- 'Saccharomyces_cerevisiae/Ensembl/R64/Annotation/Release_98-2019-12-03'
  param[['refFeatureFile']] <- 'genes.gtf'
  param <- ezParam(param)
  txAnno <- ezFeatureAnnotation(param, dataFeatureType="transcript")
  geneAnno <- ezFeatureAnnotation(param, dataFeatureType="gene")

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