Hi Community,
I've been working through the OSCA workflow for single cell Lun 416B cell line (http://bioconductor.org/books/3.14/OSCA.workflows/lun-416b-cell-line-smart-seq2.html).
I'm trying to understand the logic of what is happening in the argument, "col", in the plot below as I haven't come across parentheses followed by brackets used in this way and couldn't insert an operator in between that returned the same result.
The individual components make sense; c("black", "red") is specifying two colours. grepl() is a search through "phenotype" looking for the string "induced" and will return 1 or 2 representing T or F. But how are those two parts interacting in a 'programming' sense? Is there an operator that can be placed in between that might give me some insight?
plot(librarySizeFactors(sce.416b), sizeFactors(sce.416b), pch=16,
xlab="Library size factors", ylab="Deconvolution factors",
col=c("black", "red")[grepl("induced", sce.416b$phenotype)+1],
log="xy")