addClustering,scRNAseq-method | R Documentation |
This method enables to add a clustering to the existing object in order to change the coloration of the t-sne. It is particularly useful to compare the performance of different tools.
addClustering(theObject, filePathAdd=NA, clusToAdd=NA)
theObject |
An Object of class scRNASeq for which ?calculateClustersSimilarity was used. |
filePathAdd |
Default=NA. Path to the file containing the clustering to replace in the object. It should be made of two columns 'clusters' and 'cells'. This should be left to NA if clusToAdd is used. Default=NA. |
clusToAdd |
Data frame having two columns 'clusters' and 'cells' containing the clustering to be used in theObject. Should be left to NA if filePathAdd is used. Default=NA. |
An object of class scRNASeq with its column name metadata updated.
Ilyess RACHEDI, based on code by Polina PAVLOVICH and Nicolas DESCOSTES.
## Object scr containing the results of previous steps load(system.file("extdata/scrFull.Rdat", package="conclus")) ## Retrieving the table indicating to which cluster each cell belongs clustCellsDf <- retrieveTableClustersCells(scr) ## Replace “4” by “3” to merge 3/4 clustCellsDf$clusters[which(clustCellsDf$clusters == 4)] <- 3 ## Modifying the object to take into account the new classification scrUpdated <- addClustering(scr, clusToAdd=clustCellsDf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.