CalculateCluster: CalculateCluster

View source: R/popsicleR.R

CalculateClusterR Documentation

CalculateCluster

Description

Performs a Louvain clustering exploiting Seurat functions and generate the reduced dimensional embeddings (tSNE and UMAP). Clusters and embeddings are calculated according to the user-provided number of principal components. first time to explore variables distribution and subsequently to regress on appropriate variables.

Usage

CalculateCluster(UMI, dim_pca, organism=c("human","mouse"), marker.list='none', PCA=TRUE, cluster_res=0.8, out_folder=getwd())

Arguments

UMI

Input UMI object generated via ApplyRegression function

dim_pca

Number of principal component to use for clustering and embeddings calculation.

organism

Input organism to define the marker list to use. Can be human or mouse

marker.list

List of markers. Default is 'none' and a proprietary marker list is applied for the selected organism. User can fed a custom genelist specifying the file_name of a tab delimited file stored in the working directory; first row must be a header.

PCA

If TRUE plots also the PCA embeddings, else only tSNE and UMAP are shown. Default is TRUE

cluster_res

Cluster resolution. Default is 0.8. User can specify, through a numeric vector, multiple clustering resolution to explore. When more than one resolution are specified, time consuming steps (e.g. Seurat::FindAllMarkers) are not performed.

out_folder

Output folder. Default is the working directory.

Details

CalculateCluster returns several graphs in the "03.Clustering" dedicated subfolder: graphs 03a, show for each user-provided clustering resolution projections on reduced spaces (PCA, t-SNE, and UMAP) colored according to the clustering.

graph 03b, computed only when more clustering resolution are provided, displays a clustering tree that shows how cells are assigned to the clusters at the various clustering resolutions

graph 03c, reports a phylogenetic tree showing correlation between the identified clusters for each clustering resolution.

graphs 03d, explore data distribution based on QC features, MALAT1 and GAPDH expression and doublets estimation through projections on reduced spaces (PCA, t-SNE, and UMAP) final embeddings.

graph 03e, returns violin plots reporting the expression of the 2 top marker genes for each cluster.

graphs 03f, report the expression of the 2 top marker genes for each cluster on reduced spaces projections (t-SNE and UMAP).

graphs 03h, show marker genes expression on reduced spaces projections (t-SNE and UMAP).

graph 03i, returns violin plots of marker genes expression for each clustering resolution provided.

graph 03j, displays dot plots reporting marker genes expression in the identified clusters for each user-provided clustering resolution.

Graphs from 03e to 03g are computed only when a single clustering resolution is provided by the user. popsicleR also provides a .txt file containing a marker list for each cluster. This file is computed only when a single clustering resolution is specified.

Value

Returns a Seurat Object after clustering.

Author(s)

Jimmy Caroli, Francesco Grandi

Examples


CalculateCluster(umi_object, dim_pca= 12, organism= "human", cluster_res= c(0.4, 0.6, 0.8))

CalculateCluster(umi_object, dim_pca= 12, organism= "human", cluster_res= 0.8)


bicciatolab/PoPsicleR documentation built on May 7, 2024, 7:26 a.m.