The xtail function can be used directly with
SummarizedExperiment
objects. The mrna and rpf data must be stored as two separate
assays.
runXtail(x, mrna_assay, rpf_assay, ...) # S4 method for SummarizedExperiment runXtail(x, mrna_assay, rpf_assay, ...) addXtail(x, ...) # S4 method for SummarizedExperiment addXtail(x, ...)
| x | a |
|---|---|
| mrna_assay | a scalar character. The name of the |
| rpf_assay | a scalar character. The name of the |
| ... |
A xtail object for runXtail or
an object of class(x).
See xtail for more details on the analysis
function.
data(xtaildata) test.mrna <- xtaildata$mrna[1:100,] test.rpf <- xtaildata$rpf[1:100,] condition <- c("control","control","treat","treat") se <- SummarizedExperiment(assays = list(mrna = test.mrna, rpf = test.rpf), colData = DataFrame(condition = condition)) xtail <- runXtail(se, "mrna", "rpf", condition = colData(se)$condition, bins = 1000, threads = 2)#>#>#>#>#>#>#>#>#>#>xtail#> A xtail object: #> Number of genes tested: 100 #> Number of the log2FC and log2R used in determining the final p-value: #> log2FC: 16 #> log2R : 84 #> #> Number of result with adjusted pvalue < 0.1 #> log2FC_TE > 0 (up) : 0 #> log2FC_TE < 0 (down): 2se <- addXtail(se, "mrna", "rpf", condition = colData(se)$condition, bins = 1000, threads = 2)#>#>#>#>#>#>#>#>#>#>rowData(se)#> DataFrame with 100 rows and 8 columns #> log2FC_TE_v1 pvalue_v1 treat_log2TE log2FC_TE_v2 pvalue_v2 #> <numeric> <numeric> <numeric> <numeric> <numeric> #> ENSG00000000003 0.0546202 0.8086310 0.389025 0.057880 0.810210 #> ENSG00000000419 0.3673323 0.0845792 1.211761 0.367332 0.080353 #> ENSG00000000457 -0.2989464 0.6586512 -0.211788 -0.276236 0.702403 #> ENSG00000000460 -0.2944345 0.4683274 0.655145 -0.299734 0.485571 #> ENSG00000000971 -0.4746186 0.6119576 1.213196 -0.469285 0.636172 #> ... ... ... ... ... ... #> ENSG00000006459 -0.0346566 0.970913 -0.4062572 -0.0338558 0.964283 #> ENSG00000006468 -0.0216823 0.934741 0.0284734 -0.0216823 0.942783 #> ENSG00000006530 0.1441922 0.583793 0.7738261 0.1507464 0.604515 #> ENSG00000006534 -0.3085919 0.649289 -0.8103674 -0.3013847 0.687958 #> ENSG00000006555 -1.0652561 0.394785 -1.0512473 -1.0456365 0.438515 #> log2FC_TE_final pvalue_final pvalue.adjust #> <numeric> <numeric> <numeric> #> ENSG00000000003 0.057880 0.8102096 0.964435 #> ENSG00000000419 0.367332 0.0845792 0.964435 #> ENSG00000000457 -0.276236 0.7024034 0.964435 #> ENSG00000000460 -0.299734 0.4855705 0.964435 #> ENSG00000000971 -0.469285 0.6361716 0.964435 #> ... ... ... ... #> ENSG00000006459 -0.0346566 0.970913 0.975041 #> ENSG00000006468 -0.0216823 0.942783 0.975041 #> ENSG00000006530 0.1507464 0.604515 0.964435 #> ENSG00000006534 -0.3013847 0.687958 0.964435 #> ENSG00000006555 -1.0456365 0.438515 0.964435