COMPASS
model.
COMPASS(data, treatment, control, subset = NULL, category_filter = function(x) colSums(x > 5) > 2, filter_lowest_frequency = 0, filter_specific_markers = NULL, model = "discrete", iterations = 40000, replications = 8, keep_original_data = FALSE, verbose = TRUE, dropDegreeOne = FALSE, ...)
COMPASSContainer
.TRUE
for those samples that should belong to the
treatment group. For example, if the samples that received a positive
stimulation were named "92TH023 Env"
within a variable in
meta
called Stim
, you could write Stim == "92TH023 Env"
.
The expression should have the name of the stimulation vector on the
left hand side.TRUE
for those samples that should belong to the
control group. See above for details.TRUE
in the metadata.category_filter
criteria will
be kept.filter_lowest_frequency
,
but lets you explicitly exclude markers."discrete"
) is available.COMPASSContainer
as part of the COMPASS
output? If memory or disk space is an issue,
you may set this to FALSE
.TRUE
we output progress information.TRUE
we drop degree one categories
and merge them with the negative subset.COMPASSResult
is a list with the following components:COMPASS
model fitting procedure.COMPASS
fitting
procedure -- in particular, the counts matrices generated for the
selected categories, n_s
and n_u
, can be extracted
from here.keep_original_data
was set to TRUE
in the COMPASS
fit, then this will be the COMPASSContainer
passed in. This is primarily kept for easier running of the Shiny app.fit
component is a list with the following components:COMPASS
model
fitting process.alpha_s
, as computed
through the MCMC sampling process in COMPASS
.COMPASS
model fitting process.alpha_u
, as computed
through the MCMC sampling process in COMPASS
.I x K x T
, where I
denotes the number of individuals, K
denotes the number of
categories / subsets, and T
denotes the number of iterations.
Each cell in a matrix for a given iteration is either zero or one,
reflecting whether individual i
is responding to the stimulation
for subset k
.i
and subset k
.gamma
vector was updated.data
component is a list with the following components:orig
component (included if keep_original_data
is
TRUE
) is the COMPASSContainer
object used in the model
fit.
treatment
counts matrix, which is a
N
samples by K
categories matrix. Those categories which
are mostly unexpressed can be excluded here. For example, the default
criteria, category_filter=function(x) colSums(x > 5) > 2
indicates that we should only retain categories for which at least three samples
had at least six cells expressing that particular combination of markers.COMPASSContainer
, for constructing the data object
required by COMPASS
data(COMPASS) ## loads the COMPASSContainer 'CC'
fit <- COMPASS(CC,
category_filter=NULL,
treatment=trt == "Treatment",
control=trt == "Control",
verbose=FALSE,
iterations=100 ## set higher for a real analysis
)
Run the code above in your browser using DataLab