createAnnotationFile: Create an annotation file from a GRanges object, suitable for...

Description Usage Arguments Value Author(s) Examples

View source: R/createAnnotationFile.R

Description

Any of rtracklayer::import.bed('samplesubjunc.bed'), unlist(spliceGraph(TxDb)), transcripts(TxDb), exons(TxDb), or features(FDB) will produce a GRanges object containing usable features for read counting.

This function converts a suitably streamlined GRanges object into annotations which can then be used by featureCounts() to quickly count aligned reads.

The GRanges object must contain an elementMetadata column named 'id'.

Usage

1
2

Arguments

GR

The GRanges object to convert to an Rsubread annotation file

Value

A data frame with five columns named GeneID, Chr, Start, End and Strand.

Author(s)

Tim Triche, Jr. and Wei Shi

Examples

1
2
3
4
5
6
7
## Not run: 
  library(TxDb.Hsapiens.UCSC.hg19.lincRNAsTranscripts)
  hg19LincRNAs <- transcripts(TxDb.Hsapiens.UCSC.hg19.lincRNAsTranscripts)
  names(values(hg19LincRNAs)) <- gsub('tx_id','id',names(values(hg19LincRNAs)))
  annot_for_featureCounts <- createAnnotationFile(hg19LincRNAs)

## End(Not run)

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