flattenGTF: Flatten features provided in a GTF annotation

Description Usage Arguments Details Value Author(s) See Also

View source: R/flattenGTF.R

Description

Overlapping features in a GTF annotation, such as overlapping exons from the same gene, are collapsed into a single feature that covers all overlapping features.

Usage

1
flattenGTF(GTFfile, GTF.featureType = "exon", GTF.attrType = "gene_id")

Arguments

GTFfile

a character string giving the name of a GTF file as input.

GTF.featureType

a character string giving the feature type used to select rows in a GTF annotation. "exon" by default. Feature types can be found in the third column of a GTF annotation.

GTF.attrType

a character string giving the attribute type in a GTF annotation which will be used to group features. "gene_id" by default. Attributes can be found in the ninth column of a GTF annotation.

Details

This function locates features in a GTF annotation via GTF.featureType and then groups them into meta-features via GTF.attrType. Default values of these two parameters will make exons be identified and then grouped into genes.

If there is overlap found between features belonging to the same meta-feature, this function will merge all overlaping features to form a single larger feature that covers all overlapping features. Output of this function is a SAF format annotation which can be fed to featureCounts function for read counting. Description to SAF format annotation can also be found in featureCounts.

Value

A data.frame including a SAF format annotation.

Author(s)

Yang Liao and Wei Shi

See Also

featureCounts


Rsubread documentation built on Nov. 9, 2018, 6 p.m.