addClustering-scRNAseq: addClustering

addClustering,scRNAseq-methodR Documentation

addClustering

Description

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.

Usage

addClustering(theObject, filePathAdd=NA, clusToAdd=NA)

Arguments

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.

Value

An object of class scRNASeq with its column name metadata updated.

Author(s)

Ilyess RACHEDI, based on code by Polina PAVLOVICH and Nicolas DESCOSTES.

Examples

## 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)



ilyessr/conclus documentation built on April 8, 2022, 1:43 p.m.