R/xtail-class.R, R/xtail.R
xtail.RdBy pairwise comparisons of ribosome profiling data, Xtail identifies differentially translated genes across two experimental or physiological conditions.
xtail( mrna, rpf, condition, baseLevel = NA, minMeanCount = 1, normalize = TRUE, p.adjust.method = "BH", threads = NA, bins = 10000L, ci = 0 )
| mrna | a matrix or data frame of raw mRNA count data whose rows correspond to genes and columns correspond to samples. The column names should be non-empty, and in same order with condition. |
|---|---|
| rpf | a matrix or data frame of raw RPF count data whose rows correspond to genes and columns correspond to samples.The column names should be non-empty, and in same order with condition. |
| condition | condition labels corresponding to the order of samples in mrna and rpf. There must be exactly two unique values. |
| baseLevel | The baseLevel indicates which one of the two conditions will
be compared against by the other one. If not specified, |
| minMeanCount |
|
| normalize | Whether normalization should be done (TRUE \ FALSE). If
missing, |
| p.adjust.method | The method to use for adjusting multiple comparisons, by
default "BH", see |
| threads | The number of CPU cores used. By default, all available cores are used. |
| bins | The number of bins used for calculating the probability density of log2FC or log2R (default is 10000). This paramater will determine accuracy of pvalue. Set it small for a very quick test run. |
| ci | The level of confindence to get credible intervals of log2 fold change of translational efficiency (TE), for example 0.95. |
a xtail object
No missing values are allowed in input data mrna and rpf.
Duplicate row names (gene names or gene ids) are not allowed.
Xtail takes in raw read counts of RPF and mRNA, and performs
median-of-ratios normalization. Alternatively, users can provide normalized
read counts and skip the built-in normal by setting "normalize" to FALSE.
The step of estimation of the probability distributions, for log2FC or log2R, will execute slowly in the current implementation, but can be speeded up by running on multiple cores using the parallel library. By default, the "detectCores" function in parallel library is used to determine the number of CPU cores in the machine on which R is running. To adjust the number of cores used, use "threads" argument to assign.
Zhengtao Xiao, Qin Zou, Yu Liu, and Xuerui Yang: Genome-wide assessment of differential translations with ribosome profiling data.
Zhengtao xiao
#load the data data(xtaildata) # Get the mrna count data and rpf count data. For the example only the first # 100 are used test.mrna <- xtaildata$mrna[1:100,] test.rpf <- xtaildata$rpf[1:100,] #Assign condition labels to samples. condition <- c("control","control","treat","treat") #run xtail test.results <- xtail(test.mrna,test.rpf,condition, threads = 2)#>#>#>#>#>#>#>#>#>#>test.results#> 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): 2