Skip to content

Commit

Permalink
roxygen changed its mind about indentation again, i guess
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Apr 4, 2014
1 parent cd025fb commit c1f953e
Show file tree
Hide file tree
Showing 26 changed files with 305 additions and 407 deletions.
124 changes: 56 additions & 68 deletions man/COMPASS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,50 @@ COMPASS(data, treatment, control, subset = NULL,
keep_original_data = TRUE, verbose = TRUE, ...)
}
\arguments{
\item{data}{An object of class \code{COMPASSContainer}.}

\item{treatment}{An \R expression, evaluated within the
metadata, that returns \code{TRUE} for those samples that
should belong to the treatment group. For example, if the
samples that received a positive stimulation were named
\code{"92TH023 Env"} within a variable in \code{meta}
called \code{Stim}, you could write \code{Stim ==
"92TH023 Env"}. The expression should have the name of
the stimulation vector on the left hand side.}

\item{control}{An \R expression, evaluated within the
metadata, that returns \code{TRUE} for those samples that
should belong to the control group. See above for
details.}

\item{subset}{An expression used to subset the data. We
keep only the samples for which the expression evaluates
to \code{TRUE} in the metadata.}

\item{category_filter}{A filter for the categories that
are generated. This is a function that will be applied to
the \emph{treatment counts} matrix generated from the
intensities. Only categories meeting the
\code{category_filter} criteria will be kept.}

\item{filter_lowest_frequency}{A number specifying how
many of the least expressed markers should be removed.}

\item{filter_specific_markers}{Similar to
\code{filter_lowest_frequency}, but lets you explicitly
exclude markers.}

\item{model}{A string denoting which model to fit;
currently, only the discrete model (\code{"discrete"}) is
available.}

\item{iterations}{The number of iterations (per
'replication') to perform.}

\item{replications}{The number of 'replications' to
perform. In order to conserve memory, we only keep the
model estimates from the last replication.}

\item{keep_original_data}{Keep the original
\code{COMPASSContainer} as part of the \code{COMPASS}
output? Note that if you want to run \code{shinyCOMPASS}
later, it is necessary that you set this as \code{TRUE}.
If memory or disk space is an issue, you may set this to
\code{FALSE}.}

\item{verbose}{Boolean; if \code{TRUE} we output progress
information.}

\item{...}{Other arguments; currently unused.}
\item{data}{An object of class \code{COMPASSContainer}.}

\item{treatment}{An \R expression, evaluated within the metadata, that
returns \code{TRUE} for those samples that should belong to the
treatment group. For example, if the samples that received a positive
stimulation were named \code{"92TH023 Env"} within a variable in
\code{meta} called \code{Stim}, you could write \code{Stim == "92TH023 Env"}.
The expression should have the name of the stimulation vector on the
left hand side.}

\item{control}{An \R expression, evaluated within the metadata, that
returns \code{TRUE} for those samples that should belong to the
control group. See above for details.}

\item{subset}{An expression used to subset the data. We keep only the samples
for which the expression evaluates to \code{TRUE} in the metadata.}

\item{category_filter}{A filter for the categories that are generated. This is a
function that will be applied to the \emph{treatment counts} matrix generated from
the intensities. Only categories meeting the \code{category_filter} criteria will
be kept.}

\item{filter_lowest_frequency}{A number specifying how many of the least
expressed markers should be removed.}

\item{filter_specific_markers}{Similar to \code{filter_lowest_frequency},
but lets you explicitly exclude markers.}

\item{model}{A string denoting which model to fit; currently, only
the discrete model (\code{"discrete"}) is available.}

\item{iterations}{The number of iterations (per 'replication') to perform.}

\item{replications}{The number of 'replications' to perform. In order to
conserve memory, we only keep the model estimates from the last replication.}

\item{keep_original_data}{Keep the original \code{COMPASSContainer}
as part of the \code{COMPASS} output? Note that if you want to run
\code{shinyCOMPASS} later, it is necessary that you set this as \code{TRUE}.
If memory or disk space is an issue, you may set this to \code{FALSE}.}

\item{verbose}{Boolean; if \code{TRUE} we output progress information.}

\item{...}{Other arguments; currently unused.}
}
\value{
A \code{COMPASSResult} is a list with the following components:
Expand Down Expand Up @@ -130,19 +119,18 @@ fit.
This function fits the \code{COMPASS} model.
}
\section{Category Filter}{
The category filter is used to exclude categories
(combinations of markers expressed for a particular cell)
that are expressed very rarely. It is applied to the
\code{treatment} \emph{counts} matrix, which is a
\code{N} samples by \code{K} categories matrix. Those
categories which are mostly unexpressed can be excluded
here. For example, the default criteria,
\code{category_filter=function(x) colSums(x > 5) > 2}
indicates that we should only retain categories for which
at least two samples had at least 5 cells expressing that
particular combination of markers.
The category filter is used to exclude categories (combinations of
markers expressed for a particular cell) that are expressed very rarely.
It is applied to the \code{treatment} \emph{counts} matrix, which is a
\code{N} samples by \code{K} categories matrix. Those categories which
are mostly unexpressed can be excluded here. For example, the default
criteria,
\code{category_filter=function(x) colSums(x > 5) > 2}
indicates that we should only retain categories for which at least two samples
had at least 5 cells expressing that particular combination of markers.
}
\examples{
data(COMPASS) ## loads the COMPASSContainer 'CC'
Expand Down
34 changes: 15 additions & 19 deletions man/COMPASSContainer.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,25 @@
COMPASSContainer(data, counts, meta, individual_id, sample_id)
}
\arguments{
\item{data}{A list of matrices. Each matrix \code{M_i} is
made up of \code{N_i} cells by \code{K} markers; for
example, it could be the intensity information from an
intracellular cytokine experiment. Each element of the
list should be named; this name denotes which sample the
cell intensities were measured from.}
\item{data}{A list of matrices. Each matrix \code{M_i} is made up of
\code{N_i} cells by \code{K} markers; for example, it could be the
intensity information from an intracellular cytokine experiment.
Each element of the list should be named; this name denotes which
sample the cell intensities were measured from.}

\item{counts}{A named integer vector of the cell counts
for each sample in \code{data}.}
\item{counts}{A named integer vector of the cell counts for each
sample in \code{data}.}

\item{meta}{A \code{data.frame} of metadata, describing
the individuals in the experiment. Each row in
\code{meta} should correspond to a row in \code{data}.
There should be one row for each sample; i.e., one row
for each element of \code{data}.}
\item{meta}{A \code{data.frame} of metadata, describing the individuals
in the experiment. Each row in \code{meta} should correspond to a row
in \code{data}. There should be one row for each sample;
i.e., one row for each element of \code{data}.}

\item{individual_id}{The name of the vector in
\code{meta} that denotes the individuals from which
samples were drawn.}
\item{individual_id}{The name of the vector in \code{meta} that denotes the
individuals from which samples were drawn.}

\item{sample_id}{The name of the vector in \code{meta}
that denotes the samples. This vector should contain all
of the names in the \code{data} input.}
\item{sample_id}{The name of the vector in \code{meta} that denotes the samples.
This vector should contain all of the names in the \code{data} input.}
}
\value{
A \code{COMPASSContainer} returns a list made up of the same
Expand Down
35 changes: 12 additions & 23 deletions man/COMPASSContainerFromGatingSet.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,26 @@ COMPASSContainerFromGatingSet(gs = NULL, node = NULL, filter.fun = NULL,
markers = NA)
}
\arguments{
\item{gs}{a \code{GatingSet} or \code{GatingSetList}}
\item{gs}{a \code{GatingSet} or \code{GatingSetList}}

\item{node}{a \code{regular expression} to match a single
node in the gating tree. If more than one node is
matched, an error is thrown.}
\item{node}{a \code{regular expression} to match a single node in the gating tree. If more than one node is matched, an error is thrown.}

\item{filter.fun}{a \code{function} that does string
substitution to clean up node names, i.e. turns a 'CD4+'
into a 'CD4' to try and match against the
\code{parameters} slot of the \code{flowFrames} in
\code{gs}}
\item{filter.fun}{a \code{function} that does string substitution to clean up node names, i.e. turns a 'CD4+' into a 'CD4' to try and
match against the \code{parameters} slot of the \code{flowFrames} in \code{gs}}

\item{individual_id}{a \code{character} identifying the
subject id column in the \code{gs} metadata}
\item{individual_id}{a \code{character} identifying the subject id column in the \code{gs} metadata}

\item{sample_id}{a \code{character} idetifying the sample
id column in the \code{gs} metadata.}
\item{sample_id}{a \code{character} idetifying the sample id column in the \code{gs} metadata.}

\item{mp}{a \code{list} mapping node names to markers.
This function tries to guess, but may fail. The user can
override the guesswork.}
\item{mp}{a \code{list} mapping node names to markers. This function tries to guess, but may fail. The user can override the guesswork.}

\item{countFilterThreshold}{Numeric; if the number of
cells expressing at least one marker of interest is less
than this threshold, we remove that file.}
\item{countFilterThreshold}{Numeric; if the number of cells expressing at
least one marker of interest is less than this threshold, we remove that
file.}

\item{matchmethod}{a \code{character} either 'regex' or
'Levenshtein' for matching nodes to markers.}
\item{matchmethod}{a \code{character} either 'regex' or 'Levenshtein' for matching nodes to markers.}

\item{markers}{a \code{character} vector of marker names
to include.}
\item{markers}{a \code{character} vector of marker names to include.}
}
\description{
This code expects a \code{GatingSet} or \code{GatingSetList}.
Expand Down
6 changes: 3 additions & 3 deletions man/COMPASSDescription.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ COMPASSDescription(x)
COMPASSDescription(x) <- value
}
\arguments{
\item{x}{A \code{COMPASS} fit.}
\item{x}{A \code{COMPASS} fit.}

\item{value}{A set of paragraphs describing the
experiment, as a character vector.}
\item{value}{A set of paragraphs describing the experiment, as a character
vector.}
}
\description{
This is used for setting an informative description used in the Shiny
Expand Down
12 changes: 5 additions & 7 deletions man/CellCounts.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
CellCounts(data, combinations)
}
\arguments{
\item{data}{Either a \code{COMPASSContainer}, or a list
of matrices. Each matrix \code{i} is of dimension
\code{N_i} cells (rows) by \code{K} common markers
(columns).}
\item{data}{Either a \code{COMPASSContainer}, or a list of matrices.
Each matrix \code{i} is of dimension \code{N_i} cells (rows) by
\code{K} common markers (columns).}

\item{combinations}{A list of 'combinations', used to
denote the subsets of interest. See the examples for
usage.}
\item{combinations}{A list of 'combinations', used to denote the
subsets of interest. See the examples for usage.}
}
\description{
Compute the number of cells expressing a particular
Expand Down
2 changes: 1 addition & 1 deletion man/Combinations.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Combinations(n)
}
\arguments{
\item{n}{An integer.}
\item{n}{An integer.}
}
\description{
Given an intenger \code{n}, generate all binary combinations of
Expand Down
7 changes: 3 additions & 4 deletions man/FunctionalityScore.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ FunctionalityScore(x)
\method{FunctionalityScore}{default}(x)
}
\arguments{
\item{x}{An object of class \code{COMPASSResult}, as
returned by \code{\link{COMPASS}}. Alternatively, a
matrix of functionality scores, used under the assumption
that the 'null' category has been dropped.}
\item{x}{An object of class \code{COMPASSResult}, as returned by
\code{\link{COMPASS}}. Alternatively, a matrix of functionality scores,
used under the assumption that the 'null' category has been dropped.}
}
\value{
A numeric vector of functionality scores.
Expand Down
8 changes: 4 additions & 4 deletions man/GetThresholdedIntensities.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
GetThresholdedIntensities(gs, node, map)
}
\arguments{
\item{gs}{A \code{GatingSet} or \code{GatingSetList}.}
\item{gs}{A \code{GatingSet} or \code{GatingSetList}.}

\item{node}{The name, or path, of a single node in a
\code{GatingSet} / \code{GatingSetList}.}
\item{node}{The name, or path, of a single node in a
\code{GatingSet} / \code{GatingSetList}.}

\item{map}{A \code{list}, mapping node names to markers.}
\item{map}{A \code{list}, mapping node names to markers.}
}
\value{
A \code{list} with two components:
Expand Down
19 changes: 8 additions & 11 deletions man/PolyfunctionalityScore.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@ PolyfunctionalityScore(x, degree, normalization)
\method{PolyfunctionalityScore}{default}(x, degree, normalization)
}
\arguments{
\item{x}{An object of class \code{COMPASSResult}, as
returned by \code{\link{COMPASS}}. Alternatively, a
matrix of functionality scores.}
\item{x}{An object of class \code{COMPASSResult}, as returned by
\code{\link{COMPASS}}. Alternatively, a matrix of functionality scores.}

\item{degree}{A vector of weights. If missing, this is
the 'degree of functionality', that is, the number of
markers expressed in a particular category.}
\item{degree}{A vector of weights. If missing, this is the 'degree of
functionality', that is, the number of markers expressed in a particular
category.}

\item{normalization}{A \code{character} vector specifying
how the score is to be normalized. Either using
\code{"all"} possible categories, or just the
\code{"observed"} categories. Defaults to \code{"all"}
categories.}
\item{normalization}{A \code{character} vector specifying how the score
is to be normalized. Either using \code{"all"} possible categories, or
just the \code{"observed"} categories. Defaults to \code{"all"} categories.}
}
\value{
A numeric vector of polyfunctionality scores.
Expand Down
2 changes: 1 addition & 1 deletion man/Posterior.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PosteriorPs(x)
PosteriorPu(x)
}
\arguments{
\item{x}{An object of class \code{COMPASSResult}.}
\item{x}{An object of class \code{COMPASSResult}.}
}
\description{
These functions can be used to retrieve different posterior measures
Expand Down
34 changes: 14 additions & 20 deletions man/SimpleCOMPASS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,27 @@ SimpleCOMPASS(n_s, n_u, meta, individual_id, sample_id, iterations = 10000,
replications = 8, verbose = TRUE)
}
\arguments{
\item{n_s}{The cell counts for stimulated cells.}
\item{n_s}{The cell counts for stimulated cells.}

\item{n_u}{The cell counts for unstimulated cells.}
\item{n_u}{The cell counts for unstimulated cells.}

\item{meta}{A \code{data.frame} of metadata, describing
the individuals in the experiment. Each row in
\code{meta} should correspond to a row in \code{data}.
There should be one row for each sample; i.e., one row
for each element of \code{n_s} and \code{n_u}.}
\item{meta}{A \code{data.frame} of metadata, describing the individuals
in the experiment. Each row in \code{meta} should correspond to a row
in \code{data}. There should be one row for each sample;
i.e., one row for each element of \code{n_s} and \code{n_u}.}

\item{individual_id}{The name of the vector in
\code{meta} that denotes the individuals from which
samples were drawn.}
\item{individual_id}{The name of the vector in \code{meta} that denotes the
individuals from which samples were drawn.}

\item{sample_id}{The name of the vector in \code{meta}
that denotes the samples. This vector should contain all
of the names in the \code{data} input.}
\item{sample_id}{The name of the vector in \code{meta} that denotes the samples.
This vector should contain all of the names in the \code{data} input.}

\item{iterations}{The number of iterations (per
'replication') to perform.}
\item{iterations}{The number of iterations (per 'replication') to perform.}

\item{replications}{The number of 'replications' to
perform. In order to conserve memory, we only keep the
model estimates from the last replication.}
\item{replications}{The number of 'replications' to perform. In order to
conserve memory, we only keep the model estimates from the last replication.}

\item{verbose}{Boolean; if \code{TRUE} we output progress
information.}
\item{verbose}{Boolean; if \code{TRUE} we output progress information.}
}
\value{
A \code{list} with class \code{COMPASSResult} with two components,
Expand Down
Loading

0 comments on commit c1f953e

Please sign in to comment.