|
pData$col <- c(rep("red", length(group1Samples)), rep("blue", length(group2Samples))) |
1/ if length(group1Samples)+length(group2Samples) is different than nrow(pData), the call will fail
2/ sampleNames is not necessarily c(group1Samples, group2Samples) (order might be different) ?
Something like the following would therefore be safer?:
pData$col <- "black"
pData$col[rownames(pData) %in% group1Samples] <- "red"
pData$col[rownames(pData) %in% group2Samples] <- "blue"
wg-blimp/snakemake_wrapper/scripts/bsseq.R
Line 29 in b63eaba
1/ if
length(group1Samples)+length(group2Samples)is different thannrow(pData), the call will fail2/
sampleNamesis not necessarilyc(group1Samples, group2Samples)(order might be different) ?Something like the following would therefore be safer?: