hannot: hannot

Description Usage Arguments Details Value See Also Examples

Description

Hierarchical annotation of the CAGE clusters

Usage

1
hannot(annot, hierarchy = "default")

Arguments

annot

A character vector of annotations.

hierarchy

Either the character “default”, or a data frame whith patterns in its first column and keywords in its second column. The default data frame is picked when “default” is passed as argument.

The default data frame is as follows (as of version 0.2.1).

None               None
snoscan            other
antisense          antisense
intron,sense\|    intron
exon,sense\|      exon
lncRNA\|          exon
miRNA\|           miRNA
snRNA\|           snRNA
snoRNA\|          snoRNA
tRNA\|            tRNA

Details

Parses a vector of annotations in character format an returns a vector of annotations as factors, where one single keyword has been selected from a provided list or the default list (see below).

Value

A vector of annotations as factors, where the levels are sorted in the hierarchical order. For instance, with the data frame above, if an annotation matches for the keywords ‘miRNA’ and ‘snoRNA’, then the reported one will be ‘snoRNA’.

See Also

Other smallCAGEqc annotation functions: hierarchAnnot, mapStats, plotAnnot, ranges2annot, ranges2genes

Examples

1
2
3
4
x <- c('exon,sense|foo', 'foo', 'antisense of bar', 'intron,sense|bar'
      , 'antisense of baz;snoRNA|SNORA70')
hannot(x)
cbind(x, as.character(hannot(x)))

charles-plessy/smallCAGEqc documentation built on May 13, 2019, 3:31 p.m.