xtail: A tool to quantitatively assess differential translations...

View source: R/xtail.R

xtail-classR Documentation

A tool to quantitatively assess differential translations with ribosome profiling data.

Description

By pairwise comparisons of ribosome profiling data, Xtail identifies differentially translated genes across two experimental or physiological conditions.

Usage

xtail(
  mrna,
  rpf,
  condition,
  baseLevel = NA,
  minMeanCount = 1,
  normalize = TRUE,
  p.adjust.method = "BH",
  threads = NA,
  bins = 10000L,
  ci = 0
)

Arguments

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, Xtail will return results of comparing the second condition over the first one.

minMeanCount

Xtail uses the average expression level of each gene, across all samples as filter criterion and it omits all genes with mean counts below minMeanCount.

normalize

Whether normalization should be done (TRUE \ FALSE). If missing, Xtail will perform median-of-ratios normlazation by default.

p.adjust.method

The method to use for adjusting multiple comparisons, by default "BH", see ?p.adjust

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.

Details

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.

Value

a xtail object

Author(s)

Zhengtao xiao

References

Zhengtao Xiao, Qin Zou, Yu Liu, and Xuerui Yang: Genome-wide assessment of differential translations with ribosome profiling data.

Examples

#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

xryanglab/xtail documentation built on April 13, 2022, 2:34 p.m.