Question: SC3 gene clusters
1
20 months ago by
ahmed.elewa20
Karolinska Institute
ahmed.elewa20 wrote:

Greetings,

SC3 provides an expression matrix after clustering genes by kmeans with k = 100. How does one extract the cluster to which each gene was clustered? I checked the features data (fData) but this data isn't included. Oddly, the column sc3_N_markers_clusts has numbers ranging from 1 to N, where N is the k used to cluster cells, not genes. I'm not sure how a gene can be discretely associated with a cell cluster and I think perhaps this column was intended for the gene clusters instead.

Ahmed

modified 20 months ago by Martin Morgan ♦♦ 23k • written 20 months ago by ahmed.elewa20
Answer: SC3 gene clusters
0
20 months ago by
Sanger Institute, Cambridge, UK

Hi Ahmed,

SC3 does not perform gene clustering. It only clusters cells. Therefore there is no column in fData for that. sc3_N_markers_clusts column defines which cell cluster each gene is a marker for.

Hope this helps,

Cheers,

Thanks for your reply. I'm interested in interrogating the dendogram on the left when I use the command sc3_plot_expression(scesetk = N). The top dendogram is for the cells, but what is the dendogram on the left?

## 5.3 Expression Matrix

The expression panel represents the original input expression matrix (cells in columns and genes in rows) after cell and gene filters. Genes are clustered by kmeans with k = 100 (dendrogram on the left) and the heatmap represents the expression levels of the gene cluster centers after log2-scaling.

Ahmed

Hi Ahmed,

Oh sorry, now I see what confused you. Clustering of genes on all heatmaps is done by default functionality of the pheatmap package (it has nothing to do with SC3):

?pheatmap::pheatmap()

kmeans_k - the number of kmeans clusters to make, if we want to agggregate the rows before drawing heatmap. If NA then the rows are not aggregated.

I just used it to reduce the complexity of the heatmaps, visualising just 100 cluster centers instead of plotting all genes. Unfortunately, this clusterings are not saved anywhere. But you can always run a simple k-means on your genes and should get the same result.

Cheers,

1

AE

2

And if you do run 'tmp <- pheatmap(...)', then tmp$kmeans$cluster will give you the clusters (though you might want to set.seed(1) so that you always get the same results!)