Description Usage Arguments Value Author(s) Examples
Wrapper function to estimate gene- and time specific concentrations for labeled (alpha) and unlabeled (beta) RNA for whole count table The initial values for alpha and beta can be provided, but are otherwise estimated from the data. In case the estimation yields negative or too small values they are replaced by alphabeta.min. For conditions, where no counts are available in both Labeled and Total samples, no rate estimation takes place and NA values are returned.
1 2 3 4 5 |
counts |
count table, counts per gene (rows) and sample (columns) |
dispersion |
matrix or dataframe with gene-specific disperion estimates (alpha) for labeled and total sample to be used in Negative Binomial. Rownames should correspond to rownames in count matrix |
lengths |
gene lengths, should be in same order as rownames of count table |
conditions |
vector of time points/treatment of experiment for each sample |
conditions.labeling |
vector indicating for each sample if it was labeled RNA or total RNA |
replicates |
replicate number of each sample |
cross.cont |
vector with cross contamination rate values for each sample (total RNAseq cross.cont=1) |
seq.depths |
vector with sequencing depth values for each sample |
lab.time |
vector of same length as unique conditions, indicating labeling duration |
N |
number of cells |
consider.replicates |
should - if available - be replicates taken into account or not? If not, rep replicates is only considered for estimation |
rep |
if no replicate is available this is replicate that should be chosen |
logloglik |
should log-loglikelihood function be used? |
alpha.initial |
initial value for alpha, can be numeric (same for all genes and timepoints), a vector (same for all timepoints of one gene), or a matrix (individual for each gene and time point) |
beta.initial |
initial value for beta, can be numeric (same for all genes and timepoints), a vector (same for all timepoints of one gene), or a matrix (individual for each gene and time point) |
alphabeta.min |
minimum value as initial value for alpha and beta rates |
gene.indices |
indices of genes that should be used for calculation (in order to run code on smaller subset) |
debug |
should debugging modus be used? |
estimates for alpha and beta, expected counts in Labeled and Total and loss for each gene and each labeling time point
Carina Demel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(gene.counts)
lengths = rnbinom(nrow(gene.counts), mu=1000, size=10)
data(spikein.counts)
data(spikein.labeling)
data(spikein.lengths)
spikeins = rownames(spikein.counts)
data(samples)
norm.res = spikein.normalization(spikein.counts, spikeins, spikein.lengths, spikein.labeling,
samples=colnames(spikein.counts), samples$conditions.labeling)
seq.depths = norm.res$sequencing.depth
cross.cont = norm.res$cross.contamination
dispersion = estimateGeneDispersion(gene.counts, samples$conditions.labeling, samples$conditions)
fittingres = estimateAlphaBeta.genes(1:12, gene.counts, dispersion, lengths,
samples$conditions, samples$conditions.labeling, samples$replicates, cross.cont, seq.depths,
N=1, consider.replicates=TRUE, lab.time=c(5,5), alpha.initial=1, beta.initial=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.