<p>You are looking for a way to compare expression profiles between cell types, and your data is counts of genes expressed per cell. Your issue is that the data is highly dimensional. It has as many dimensions as you have genes. To be able find useful information, you must reduce these dimensions using a statistical technique such as Principal COmponents Analysis (PCA), t-Distributed Stochastic Neighbor Embedding (t-SNE), or Multidimensional Scaling (MDS). The result of these analyses is a reduction of your thousands of dimensions to vectors (eigenvectors in PCA) of variance which you can plot against each other in a scatter plot.</p>

<p>I have been working with Single Cell RNA-seq data and have been exploring the difference in gene expression in a certain type of cells between timepoints. <a href="http://satijalab.org/seurat/pbmc3k_tutorial.html" rel="nofollow noreferrer">Seurat</a> (R package) is a very powerful tool for scRNA-Seq data analysis. </p>

<p>Here is a a tSNE of my data. I have added the timepoint labels, but you can see that after performing the dimensionality reduction the two different timepoints cluster by their gene expression profiles. I can then use Seurat to see which specific genes are differentially expressed between the clusters and a whole bunch of other fun things.</p>

<p><a href="https://i.sstatic.net/wFePQ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wFePQ.png" alt="tSNE plot of scRNA-Seq data"></a></p>

CC BY-SA 3.0
2018-01-28T20:42:01.383Z
I just add the module to run t-SNE in python, since OP seems to want to use a python module: http://scikit-learn.org/0.15/modules/generated/sklearn.manifold.TSNE.html
gc5
CC BY-SA 3.0
2018-01-28T20:14:39.997Z
2018-01-28T20:14:39.997Z
Kohl Kinning
<p>Scatterplots are used to represent multiple dimensions of the same piece of data. A scatterplot would be used in this case to display <em>all</em> genes in your set on a single plot, but I would have some difficulty interpreting such a plot. If you want to look separately at each gene, then a density curve (or histogram) would be more appropriate.</p>

<p>Your problem is similar to common problems in flow cytometry, and I don't think there's any reason why similar approaches can't be used. Here's a histogram / density plot showing two different types of cells (negative control, and treatment condition), indicating the difference in fluorescence of a particular marker (somewhat analogous to gene expression) across all cells of each type. Note that the number of cells are different between the negative control and treatment:</p>

<p><a href="https://i.sstatic.net/v4BoC.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/v4BoC.jpg" alt="Flow cytometry histogram"></a></p>

<p>This image was taken from <a href="http://www.assay-protocol.com/cell-biology/flow-cytometry/flowcytometry-diagrams" rel="nofollow noreferrer">here</a>, which also demonstrates a 2D scatter plot (where each point is a <em>cell</em>, rather than a gene).</p>

CC BY-SA 3.0
2017-12-29T01:47:13.300Z
2017-12-29T01:53:13.823Z
2017-12-29T01:53:13.823Z
gringer
<p>seurat3 may help. You can compare the marker genes from the 2 cell types or treat one cell type as a control. Please see the example analysis from: <a href="https://satijalab.org/seurat/v3.0/immune_alignment.html" rel="nofollow noreferrer">https://satijalab.org/seurat/v3.0/immune_alignment.html</a></p>

CC BY-SA 4.0
2019-06-27T03:30:13.147Z
2019-06-27T03:30:13.147Z
Zhi-Ping Feng
<p>I found this interesting <a href="https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE84133" rel="nofollow noreferrer">Single RNA-seq data set in GEO</a>, but I am not sure how to analyze it appropriately.</p>

<p>They have deposited transcriptomic profiles of human and mouse pancreatic islets (pancreatic cells: Beta cells, Delta, etc).  The problem I see is that the different pancreatic cell types are not in equal numbers: 872 Beta cells and 214 Delta cells.</p>

<p>I want to see whether the expression of a set of genes are correlated between the two cell types. I don't think that I can visualize the correlation between the expression of the Beta and Delta cells on a scatter plot if they are unequal in number. Is there a workaround to include all the cells in the analysis, without losing good quality transcriptome of beta/delta cell?</p>

<p>What I would like to do is to compare the expression of two pancreatic cell types (Beta v.s. Delta cells) using a scatter plot. I have a set of genes that I am interested in, and would like to see their expression profile for beta and delta cells. As far as I know, it is only possible to visualize this using a scatterplot (X:Beta vs Y:Delta) where the number of isolated beta cells is the same as the number of delta cells.</p>

<p><strong>Question:</strong> Given unequal number of isolated panacriatic cells, what would be an appropriate way to compare the expression profiles? Should I just ignore the extra ones? </p>

<p>Any idea how to approch this problem?</p>

<p>Thanks,  </p>

CC BY-SA 3.0
2017-12-21T20:20:56.497Z
What is wrong with a traditional differential expression analysis? How big is the difference in number between Beta and Delta cells?
llrs
CC BY-SA 3.0
2017-12-21T20:32:29.490Z
@Llopis Quite large ... the difference between beta and delta is 658 cells.
MEhsan
CC BY-SA 3.0
2017-12-21T22:29:06.827Z
Do you have a particular set of genes in mind or are you hoping to go fishing for one? It's also unclear why you can't do visualizations with unequal sample sizes.
Devon Ryan
CC BY-SA 3.0
2017-12-21T23:06:00.290Z
Any clarifications (such as what you have just written) should be put in the question, rather than the comment.
gringer
CC BY-SA 3.0
2017-12-21T23:06:23.070Z
What makes you think you wouldn't be able to visualise the correlation for unequal numbers?
gringer
CC BY-SA 3.0
2017-12-22T07:49:15.507Z
@MEhsan You can randomly pick the same amount of delta cells than of beta cells and bootstrap to find the real correlation (or plot the scatter plot)
llrs
CC BY-SA 3.0
2017-12-22T15:06:53.623Z
@Llopis I'm not familiar of how to use bootstrapping and randomly sample the cells.  Could you give me an example?  Is there a way to do this in Python ...?
MEhsan
CC BY-SA 3.0
2017-12-22T15:22:14.597Z
It is "just" a `for` loop where you pick different samples, I have never done it in Python so you'll need to search in the web.
llrs
<python><transcriptome><scrnaseq>
How to compare transcriptomic profiles of two cell types (single cell RNA-seq)?
# How to compare transcriptomic profiles of two cell types (single cell RNA-seq)?

(Asked by: username_0 on 2017-12-21)

I found this interesting [Single RNA-seq data set in GEO](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE84133), but I am not sure how to analyze it appropriately.

They have deposited transcriptomic profiles of human and mouse pancreatic islets (pancreatic cells: Beta cells, Delta, etc). The problem I see is that the different pancreatic cell types are not in equal numbers: 872 Beta cells and 214 Delta cells.

I want to see whether the expression of a set of genes are correlated between the two cell types. I don't think that I can visualize the correlation between the expression of the Beta and Delta cells on a scatter plot if they are unequal in number. Is there a workaround to include all the cells in the analysis, without losing good quality transcriptome of beta/delta cell?

What I would like to do is to compare the expression of two pancreatic cell types (Beta v.s. Delta cells) using a scatter plot. I have a set of genes that I am interested in, and would like to see their expression profile for beta and delta cells. As far as I know, it is only possible to visualize this using a scatterplot (X:Beta vs Y:Delta) where the number of isolated beta cells is the same as the number of delta cells.

**Question:** Given unequal number of isolated panacriatic cells, what would be an appropriate way to compare the expression profiles? Should I just ignore the extra ones?

Any idea how to approch this problem?

Thanks,

**Tags:** python, transcriptome, scrnaseq
> **Comments:**
> **username_1**: What is wrong with a traditional differential expression analysis? How big is the difference in number between Beta and Delta cells?  
> **username_0**: @Llopis Quite large ... the difference between beta and delta is 658 cells.  
> **username_2**: Do you have a particular set of genes in mind or are you hoping to go fishing for one? It's also unclear why you can't do visualizations with unequal sample sizes.  
> **username_3**: Any clarifications (such as what you have just written) should be put in the question, rather than the comment.  
> **username_3**: What makes you think you wouldn't be able to visualise the correlation for unequal numbers?  
> **username_1**: @MEhsan You can randomly pick the same amount of delta cells than of beta cells and bootstrap to find the real correlation (or plot the scatter plot)  
> **username_0**: @Llopis I'm not familiar of how to use bootstrapping and randomly sample the cells.  Could you give me an example?  Is there a way to do this in Python ...?  
> **username_1**: It is "just" a `for` loop where you pick different samples, I have never done it in Python so you'll need to search in the web.  

---

## 3 answers

### Answer by username_4 on 2018-01-28. Score: 3

You are looking for a way to compare expression profiles between cell types, and your data is counts of genes expressed per cell. Your issue is that the data is highly dimensional. It has as many dimensions as you have genes. To be able find useful information, you must reduce these dimensions using a statistical technique such as Principal COmponents Analysis (PCA), t-Distributed Stochastic Neighbor Embedding (t-SNE), or Multidimensional Scaling (MDS). The result of these analyses is a reduction of your thousands of dimensions to vectors (eigenvectors in PCA) of variance which you can plot against each other in a scatter plot.

I have been working with Single Cell RNA-seq data and have been exploring the difference in gene expression in a certain type of cells between timepoints. [Seurat](http://satijalab.org/seurat/pbmc3k_tutorial.html) (R package) is a very powerful tool for scRNA-Seq data analysis.

Here is a a tSNE of my data. I have added the timepoint labels, but you can see that after performing the dimensionality reduction the two different timepoints cluster by their gene expression profiles. I can then use Seurat to see which specific genes are differentially expressed between the clusters and a whole bunch of other fun things.

[![tSNE plot of scRNA-Seq data](https://i.sstatic.net/wFePQ.png)](https://i.sstatic.net/wFePQ.png)

> **Comments:**
> **username_5**: I just add the module to run t-SNE in python, since OP seems to want to use a python module: http://scikit-learn.org/0.15/modules/generated/sklearn.manifold.TSNE.html  

---

### Answer by username_3 on 2017-12-29. Score: 1

Scatterplots are used to represent multiple dimensions of the same piece of data. A scatterplot would be used in this case to display *all* genes in your set on a single plot, but I would have some difficulty interpreting such a plot. If you want to look separately at each gene, then a density curve (or histogram) would be more appropriate.

Your problem is similar to common problems in flow cytometry, and I don't think there's any reason why similar approaches can't be used. Here's a histogram / density plot showing two different types of cells (negative control, and treatment condition), indicating the difference in fluorescence of a particular marker (somewhat analogous to gene expression) across all cells of each type. Note that the number of cells are different between the negative control and treatment:

[![Flow cytometry histogram](https://i.sstatic.net/v4BoC.jpg)](https://i.sstatic.net/v4BoC.jpg)

This image was taken from [here](http://www.assay-protocol.com/cell-biology/flow-cytometry/flowcytometry-diagrams), which also demonstrates a 2D scatter plot (where each point is a *cell*, rather than a gene).


---

### Answer by username_6 on 2019-06-27. Score: 0

seurat3 may help. You can compare the marker genes from the 2 cell types or treat one cell type as a control. Please see the example analysis from: <https://satijalab.org/seurat/v3.0/immune_alignment.html>


---

