HandlingConditions | R Documentation |
These functions manage the conditions.
A condition is a set of labels that can be assigned to cells:
one label per cell. This is especially useful in cases when the
data-set
is the result of merging multiple experiments' raw data
## S4 method for signature 'COTAN'
getAllConditions(objCOTAN, keepPrefix = FALSE)
## S4 method for signature 'COTAN'
getConditionName(objCOTAN, condName = "", keepPrefix = FALSE)
## S4 method for signature 'COTAN'
getCondition(objCOTAN, condName = "")
normalizeNameAndLabels(objCOTAN, name = "", labels = NULL, isCond = FALSE)
## S4 method for signature 'COTAN'
addCondition(objCOTAN, condName, conditions, override = FALSE)
## S4 method for signature 'COTAN'
dropCondition(objCOTAN, condName)
objCOTAN |
a |
keepPrefix |
When |
condName |
the name of an existing condition. |
name |
the name of the clusterization/condition. If not given the last available clusterization will be used, or no conditions |
labels |
a clusterization/condition to use. If given it will take
precedence on the one indicated by |
isCond |
a Boolean to indicate whether the function is dealing with
clusterizations |
conditions |
a (factors) array of condition labels |
override |
When |
getAllConditions()
extracts the list of the conditions defined
in the COTAN
object.
getConditionName()
normalizes the given condition name or, if
none were given, returns the name of last available condition in the
COTAN
object. It can return the condition internal name if needed
getCondition()
extracts the asked condition from the COTAN
object
normalizeNameAndLabels()
takes a pair of name/labels and
normalize them based on the available information in the COTAN
object
addCondition()
adds a condition to the current COTAN
object,
by adding a new column in the metaCells
data.frame
dropCondition()
drops a condition from the current COTAN
object, by removing the corresponding column in the metaCells
data.frame
getAllConditions()
returns a vector of conditions names,
usually without the COND_
prefix
getConditionName()
returns the normalized condition name or
NULL
if no conditions are present
getCondition()
returns a named factor
with the condition
normalizeNameAndLabels()
returns a list
with:
"name"
the relevant name
"labels"
the relevant clusterization/condition
addCondition()
returns the updated COTAN
object
dropCondition()
returns the updated COTAN
object
data("test.dataset")
objCOTAN <- COTAN(raw = test.dataset)
cellLine <- rep(c("A", "B"), getNumCells(objCOTAN) / 2)
names(cellLine) <- getCells(objCOTAN)
objCOTAN <- addCondition(objCOTAN, condName = "Line", conditions = cellLine)
##objCOTAN <- dropCondition(objCOTAN, "Genre")
conditionsNames <- getAllConditions(objCOTAN)
condName <- getConditionName(objCOTAN)
condition <- getCondition(objCOTAN, condName = condName)
isa(condition, "factor")
nameAndCond <- normalizeNameAndLabels(objCOTAN, name = condName,
isCond = TRUE)
isa(nameAndCond[["labels"]], "factor")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.