permTestTxIA | R Documentation |
Perform permutation test for evaluating spatial association between some features (with isoform ambiguity) and a region set. It randomizes the features and compares it with the region set to see if there is an association between the features and the region set. The difference between this function and permTestTx
is that it is for RNA-related genomic features that have isoform ambiguity, i.e., features that one does not know which transcript they comes from.
permTestTxIA(RS1 = NULL,
RS2 = NULL,
txdb = NULL,
type = 'mature',
ntimes = 50,
ev_function_1 = overlapCountsTx,
ev_function_2 = overlapCountsTx,
pval_z = FALSE,
...)
RS1 |
The feature set to be randomized. It should be in the |
RS2 |
The region set to be compared with. It should be in the |
txdb |
A TxDb object. |
type |
A character object. Default is "mature". It accepts options "mature", "full", "fiveUTR", "CDS" or "threeUTR", with which one can get corresponding types of transcriptome regions. |
ntimes |
Randomization times. |
ev_function_1 |
Evaluation function defines what statistic to be tested between |
ev_function_2 |
Evaluation function defines what statistic to be tested between each element in |
pval_z |
Boolean. Default is FALSE. If FALSE, the p-value is calculated based on the number of random evaluations is larger or less than the initial evaluation. If TRUE, the p-value is calculated based on a z-test. |
... |
Any additional parameters needed. |
permTestTxIA
only needs users to input two region sets. It will automatically randomize the first region set into transcriptome.
A list object, which is defined to be permTestTx.results
class. It contains the following items:
RSL:
Randomized region sets of RS1
.
RS1:
The feature set to be randomized.
RS2:
The region set to be compared with the feature set.
orig.ev:
The value of overlapping counts between RS1
and RS2
.
rand.ev:
The values of overlapping counts between each element in RSL
and RS2
.
pval:
p-value of the test.
zscore:
Standard score of the test.
plotPermResults
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
file <- system.file(package="RgnTX", "extdata/m6A_sites_data.rds")
m6A_sites_data <- readRDS(file)
RS1 <- m6A_sites_data[1:500]
trans.ids <- getTransInfo(RS1, txdb)[, "trans_ID"]
RS2 <- getStopCodon(trans.ids, txdb)
permTestTx_results <- permTestTxIA(RS1 = RS1, RS2 = RS2,
txdb = txdb, ntimes = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.