unique.feat: Remove overlapping genes

Description Usage Arguments Value Note Author(s)

View source: R/feat.R

Description

Remove overlapping genes

Usage

1
2
## S3 method for class 'feat'
unique(x, incomparables = FALSE, ...)

Arguments

x

An object of type feat, usually read from a genepred file. Should have attributes labelled "transcript_id" which identify features belonging to the same gene.

incomparables

Not currently used (present for S3 compatibility).

...

Not currently used.

Value

An object of type feat with overlapping genes removed. If the features are scored, then the feature with the highest score is kept; otherwise the feature with the longest length. If x is a pointer to an object stored in C, the return value will also be a pointer (and x will be altered to the return value).

Note

VERY IMPORTANT: this function is not currently implemented to look at chromosomes (ie the seqname field of the feature). Therefore any genes which have overlapping coordinates REGARDLESS OF THE CHROMOSOME will be pruned to a single "non-overlapping" gene. To get around this, first subset the features by chromosome and call uniq.feat on each subset.

Also, this algorithm considers genes to be overlapping even if they are on different strands. If this is undesirable, then subset the features by strand as well as chromosome.

Author(s)

Melissa J. Hubisz and Adam Siepel


rphast documentation built on May 1, 2019, 9:26 p.m.