reassignTxDbByCage {ORFik}R Documentation

Input a txdb and reassign the TSS for each transcript by CAGE

Description

Given a TxDb object, reassign the start site per transcript using max peaks from CageSeq data. A max peak is defined as new TSS if it is within boundary of 5' leader range, specified by 'extension' in bp. A max peak must also be higher than minimum CageSeq peak cutoff specified in 'filterValue'. The new TSS will then be the positioned where the cage read (with highest read count in the interval).

Usage

reassignTxDbByCage(txdb, cage, extension = 1000, filterValue = 1,
  restrictUpstreamToTx = FALSE)

Arguments

txdb

a TxDb object, normally from a gtf file.

cage

Either a filePath for CageSeq file, or already loaded CageSeq peak data as GRanges.

extension

The maximum number of basses upstream of the TSS to search for CageSeq peak.

filterValue

The minimum number of reads on cage position, for it to be counted as possible new tss. (represented in score column in CageSeq data) If you already filtered, set it to 0.

restrictUpstreamToTx

a logical (FALSE), if you want to restrict leaders to not extend closer than 5 bases from closest upstream leader, set this to TRUE.

Value

a TxDb obect of reassigned transcripts

See Also

Other CAGE: assignTSSByCage, reassignTSSbyCage

Examples

 ## Not run: 
 library(GenomicFeatures)
 # Get the gtf txdb file
 txdbFile <- system.file("extdata", "hg19_knownGene_sample.sqlite",
 package = "GenomicFeatures")
 txdb <- loadDb(txdbFile)
 cagePath <- system.file("extdata", "cage-seq-heart.bed.bgz",
 package = "ORFik")
 reassignTxDbByCage(txdb, cagePath)
 
## End(Not run)

[Package ORFik version 1.2.1 Index]