SC3 gene clusters
1
1
Entering edit mode
ahmed.elewa ▴ 20
@ahmedelewa-14236
Last seen 6.4 years ago
Karolinska Institute

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

 

SC3 single cell single-cell Tutorial • 1.8k views
ADD COMMENT
0
Entering edit mode
@vladimir-kiselev-9342
Last seen 5.0 years ago
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,

Vlad

ADD COMMENT
0
Entering edit mode

Hi Vlad,

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

ADD REPLY
0
Entering edit mode

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,

Vlad

ADD REPLY
1
Entering edit mode

Excellent! Thanks Vlad.

AE

ADD REPLY
2
Entering edit mode

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

 

ADD REPLY

Login before adding your answer.

Traffic: 730 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6