detectReplicas {arrayMagic} | R Documentation |
arrayDescription |
data frame which contains a column spotIdentifier |
spotIdentifier |
character string |
identifiersToBeSkipped |
vector of character strings to be ignored |
a list containing nrOfReplicas
, i.e. an integer characterizing the
same number of spot replicas given for each identifier or otherwise NA
, and
containing spotReplicas
, i.e. a list of the length of unique identifiers
where each element contains a vector of indeces corresponding to the identifier
used as name for the list element
otherwise NA
Andreas Buness <a.buness@dkfz.de>
aD <- data.frame(ID=c("Blank", "Blank", "x", "x", "Control1", "y", "x", "z", "y", "Control2")) re <- detectReplicas(aD, identifiersToBeSkipped = c("Blank", "Control1", "Control2")) stopifnot(is.na(re$nrOfReplicas)) aD <- data.frame(ID=c("Blank", "x", "x", "Control1", "y", "z", "z", "y", "Control2")) re <- detectReplicas(aD, identifiersToBeSkipped = c("Blank", "Control1", "Control2")) stopifnot(re$nrOfReplicas == 2 ) aD <- data.frame(ID=c("z", "x", "x", "x", "y", "z", "z", "y", "y")) re <- detectReplicas(aD, identifiersToBeSkipped = c("Blank", "Control1", "Control2")) stopifnot(re$nrOfReplicas == 3 ) aD <- data.frame(ID=c("z", "x", "Control1", "y")) re <- detectReplicas(aD, identifiersToBeSkipped = c("Control1")) stopifnot(re$nrOfReplicas == 1 ) aD <- data.frame(ID=c("Blank", "Control1", "Blank", "Control2")) re <- detectReplicas(aD, identifiersToBeSkipped = c("Blank", "Control1", "Control2")) stopifnot(is.na(re$nrOfReplicas))