Description Usage Arguments Value Methods (by class)
View source: R/calculate_posterior.R
The method uses MCMC sampling implemented by Stan to find a good approximation
to the posterior for each mean. The method is called using the parameters inferred
from fit_parameters()
. The parameter niter
specifies how many
samples are drawn for each mean. The number of samples that are available
after burnin are samples = niter / 2 * nchains.
1 2 3 4 5 6 7 8 9 10 11 12 | sample_protein_means(X, params, niter = 1000, nchains = 4,
ncores = nchains, batch_size = 1000, verbose = TRUE, ...)
## S4 method for signature 'SummarizedExperiment'
sample_protein_means(X, params,
niter = 1000, nchains = 4, ncores = nchains, batch_size = 1000,
verbose = TRUE, ...)
## S4 method for signature 'MSnSet'
sample_protein_means(X, params, niter = 1000,
nchains = 4, ncores = nchains, batch_size = 1000, verbose = TRUE,
...)
|
X |
the numerical data where each column is one sample and each row
is one protein. Missing values are coded as |
params |
an object of class 'prodd_parameters' |
niter |
the number of iteration for each posterior and chain. In
the end you will have |
nchains |
the number of chains to run in parallel. Default: 4 |
ncores |
the number of cores that are used in parallel. Deafault: nchains. |
batch_size |
Often it is faster to run the inference for multiple proteins at the same time, but there is a limit after which too many proteins slow down the inference. Set the number of proteins that are considered in a single run. Default: 1000 |
verbose |
boolean indicating how much output the function generates. D Default: 'TRUE' |
... |
additional parameters for passed to |
a list with one matrix per condtion. Each matrix has one row per protein and one column per MCMC sample.
SummarizedExperiment
: S4 method of sample_protein_means
for
SummarizedExperiment
MSnSet
: S4 method of sample_protein_means
for
MSnSet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.