unique.feat: Remove overlapping genes

Description Usage Arguments Value Note Author(s)

View source: R/feat.R


Remove overlapping genes


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



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.


Not currently used (present for S3 compatibility).


Not currently used.


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).


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.


Melissa J. Hubisz and Adam Siepel

rphast documentation built on May 30, 2017, 5:13 a.m.