Search
Question: SC3 gene clusters
1
gravatar for ahmed.elewa
4 weeks 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

 

ADD COMMENTlink modified 4 weeks ago by Martin Morgan ♦♦ 20k • written 4 weeks ago by ahmed.elewa20
0
gravatar for Vladimir Kiselev
4 weeks ago by
Sanger Institute, Cambridge, UK
Vladimir Kiselev120 wrote:

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 COMMENTlink written 4 weeks ago by Vladimir Kiselev120

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 REPLYlink written 4 weeks ago by ahmed.elewa20

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 REPLYlink written 4 weeks ago by Vladimir Kiselev120
1

Excellent! Thanks Vlad.

AE

ADD REPLYlink written 4 weeks ago by ahmed.elewa20
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!)

 

ADD REPLYlink written 4 weeks ago by Gavin Kelly510
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 122 users visited in the last hour