Tests the overlap of transcript features with supplied peaks. See details.

txFeatureOverlap(object, quiet = FALSE)

Arguments

object

An RLRanges object.

quiet

If TRUE, messages will be suppressed. Default: FALSE

Value

An RLRanges object containing the results of the enrichment test accessed via rlresult(object, "txFeatureOverlap"). The results are in tbl format.

Details

Method

Transcript annotations were curated as part of the RLBase-data workflow and are provided via RLHub::annotations.

In txFeatureOverlap, each annotation "type" (e.g., "Exons", "Introns", etc) is compared to the supplied RLRanges, yielding overlap statistics with the following procedure:

  1. For each annotation type, the peaks are overlapped with the annotations.

  2. Then the number of overlapping peaks is counted and summarised using a priority order. This order determines which feature is assigned to a peak when that peak overlaps multiple features. The order is "TSS", "TTS", "5'UTR", "3'UTR", "Exon", "Intron", "Intergenic".

Examples


# Example RLRanges dataset
rlr <- readRDS(system.file("extdata", "rlrsmall.rds", package = "RLSeq"))

# RL Region Test
txFeatureOverlap(rlr)
#> see ?RLHub and browseVignettes('RLHub') for documentation
#>  - Done
#> GRanges object with 7 ranges and 6 metadata columns:
#>                   seqnames            ranges strand |                     V4
#>                      <Rle>         <IRanges>  <Rle> |            <character>
#>   1                  chr14 20343155-20343313      * | /home/UTHSCSA/miller..
#>   2                  chr21   8214588-8214866      * | /home/UTHSCSA/miller..
#>   3                  chr21   8396653-8396835      * | /home/UTHSCSA/miller..
#>   4 chr22_KI270733v1_ran..     129919-130080      * | /home/UTHSCSA/miller..
#>   5 chr22_KI270733v1_ran..     174979-175184      * | /home/UTHSCSA/miller..
#>   6                   chr6 52995648-52995831      * | /home/UTHSCSA/miller..
#>   7                   chr9 35657778-35657976      * | /home/UTHSCSA/miller..
#>            V5          V6        V7        V8      qval
#>     <integer> <character> <numeric> <numeric> <numeric>
#>   1        56           .   7.40428   12.1836   5.63076
#>   2        56           .   7.27639   12.2524   5.66372
#>   3        15           .   5.19728    7.7825   1.52856
#>   4       256           .  16.31970   32.6965  25.65290
#>   5      1085           .  30.29480  116.1250 108.58400
#>   6        95           .   9.63809   16.3088   9.58453
#>   7       100           .   9.84017   16.7326  10.04910
#>   -------
#>   seqinfo: 640 sequences (1 circular) from hg38 genome
#> 
#> RDIP-Seq +RNH1: 
#>   Mode: RDIP 
#>   Genome: hg38 
#>   Label: NEG
#> 
#> RLSeq Results Available: 
#>   featureEnrichment, txFeatureOverlap, correlationMat, rlfsRes, noiseAnalysis, geneAnnoRes, predictRes, rlRegionRes 
#> 
#> prediction: NEG
#>