1
$\begingroup$

My data of 4000 gene expression values across 159 different cells is formatted as so:

       Cell1        Cell2        Cell3        Cell4      ....
gene1  expression   expression   expression   expression ....
gene2  expression   expression   expression   expression ....
gene3  expression   expression   expression   expression ....
gene4  expression   expression   expression   expression ....
gene5  expression   expression   expression   expression ....
....

I did a PCA on the data in R with the 159 cells as the variables, and then I did k-means clustering on the PCA, and I ended up with 2 clusters. When I plot the PCA data, I have 2 clusters of the 159 cells.

Now, is there any possible way to find out which GENES define (or drive) each cluster? In other words, how to find which genes have a higher overall expression in the cells of one cluster versus the cells in the other? Is there some sort of R package or statistical method that could help with this?

I could not find anything online that could help me do this with k-means clusters and I am kind of lost. I'd appreciate any suggestions.

$\endgroup$

2 Answers 2

0
$\begingroup$

I think your own suggestion is a good place to start - "find which genes have a higher overall expression in the cells of one cluster versus the cells in the other" So ... get the average expression of each gene by cluster. Take the absolute value of the difference between the means for the two clusters and then sort these values. Since you do not really give your data structure it is hard to answer precisely, but it will look something like

ExpDiff = apply(Expressions, 1, 
   function(x) { abs(mean(x[Cluster == 1]) - mean(x[Cluster == 2])) }
which.max(ExpDiff)

OR

sort(ExpDiff)
$\endgroup$
0
$\begingroup$

Use a 2-sample Student's t-test for every gene and look at the mean expression of each gene. The grouping variable for the t-test is the cluster membership (1,2). Within each cluster you can look at the mean expression for each gene (assigned to that cluster).

Your question is really to find out what the means are, so you would simply be exploiting the t-test to output the averages for each gene in cluster 1 and cluster 2. You could also just run summary statistics to see what the means are for each gene in the assigned cluster.

There are assumptions surrounding use of the t-test, which involve normality, skewness, variance inequality between the two groups, etc. Outliers can also bias the t-test, since they will drag the means into territory where there are no data. (the average of 1, 2, 3, and 1000000) is a little north of 250,000 -- where there are no data).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.