You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tangram is a Python package, written in [PyTorch](https://pytorch.org/) and based on [scanpy](https://scanpy.readthedocs.io/en/stable/), for mapping single-cell (or single-nucleus) gene expression data onto spatial gene expression data. The single-cell dataset and the spatial dataset should be collected from the same anatomical region/tissue type, ideally from a biological replicate, and need to share a set of genes. Tangram aligns the single-cell data in space by fitting gene expression on the shared genes. The best way to familiarize yourself with Tangram is to check out [our tutorial](https://github.com/broadinstitute/Tangram/blob/master/tangram_tutorial.ipynb). [](https://colab.research.google.com/drive/1SVLUIZR6Da6VUyvX_2RkgVxbPn8f62ge?usp=sharing)
5
+
Tangram is a Python package, written in [PyTorch](https://pytorch.org/) and based on [scanpy](https://scanpy.readthedocs.io/en/stable/), for mapping single-cell (or single-nucleus) gene expression data onto spatial gene expression data. The single-cell dataset and the spatial dataset should be collected from the same anatomical region/tissue type, ideally from a biological replicate, and need to share a set of genes. Tangram aligns the single-cell data in space by fitting gene expression on the shared genes. The best way to familiarize yourself with Tangram is to check out [our tutorial](https://github.com/broadinstitute/Tangram/blob/master/example/1_tutorial_tangram.ipynb). [](https://colab.research.google.com/drive/1gDmtiRN45OwCMu4n6l1uygQ_jIGe7NgJ)
Tangram has been tested on various types of transcriptomic data (10Xv3, Smart-seq2 and SHARE-seq for single cell data; MERFISH, Visium, Slide-seq, smFISH and STARmap as spatial data). In our [preprint](https://www.biorxiv.org/content/10.1101/2020.08.29.272831v1), we used Tangram to reveal spatial maps of cell types and gene expression at single cell resolution in the adult mouse brain. More recently, we have applied our method to different tissue types including human lung, human kidney developmental mouse brain and metastatic breast cancer.
@@ -21,11 +21,16 @@ Tangram has been tested on various types of transcriptomic data (10Xv3, Smart-se
21
21
22
22
To install Tangram, make sure you have [PyTorch](https://pytorch.org/) and [scanpy](https://scanpy.readthedocs.io/en/stable/) installed. If you need more details on the dependences, look at the `environment.yml` file.
23
23
24
+
* set up conda environment for Tangram
25
+
```
26
+
conda env create -f environment.yml
27
+
```
24
28
* install tangram-sc from shell:
25
29
```
30
+
conda activate tangram-env
26
31
pip install tangram-sc
27
32
```
28
-
* import tangram
33
+
*To start using Tangram, import tangram in your jupyter notebooks or/and scripts
29
34
```
30
35
import tangram as tg
31
36
```
@@ -52,7 +57,7 @@ The returned AnnData,`ad_map`, is a cell-by-voxel structure where `ad_map.X[i, j
52
57
53
58
The returned `ad_ge` is a voxel-by-gene AnnData, similar to spatial data `ad_sp`, but where gene expression has been projected from the single cells. This allows to extend gene throughput, or correct for dropouts, if the single cells have higher quality (or more genes) than single cell data. It can also be used to transfer cell types onto space.
54
59
55
-
For more details on how to use Tangram check out [our tutorial](https://github.com/broadinstitute/Tangram/blob/master/tangram_tutorial.ipynb). [](https://colab.research.google.com/drive/1SVLUIZR6Da6VUyvX_2RkgVxbPn8f62ge?usp=sharing)
60
+
For more details on how to use Tangram check out [our tutorial](https://github.com/broadinstitute/Tangram/blob/master/example/1_tutorial_tangram.ipynb). [](https://colab.research.google.com/drive/1SVLUIZR6Da6VUyvX_2RkgVxbPn8f62ge?usp=sharing)
56
61
57
62
***
58
63
@@ -111,9 +116,6 @@ You do not need to segment cells in your histology for mapping on spatial transc
111
116
#### I run out of memory when I map: what should I do?
112
117
Reduce your spatial data in various parts and map each single part. If that is not sufficient, you will need to downsample your single cell data as well.
113
118
114
-
#### How to use Tangram with Squidpy?
115
-
For tutorial, please reference the example [here](https://github.com/broadinstitute/Tangram/blob/master/tutorial_sq_tangram.ipynb). For environment setup, please use squidpy=1.1.0 and reference this [yml file](https://github.com/broadinstitute/Tangram/blob/master/environment.yml).
116
-
117
119
***
118
120
## How to cite Tangram
119
121
Tangram has been released in the following publication
@@ -127,6 +129,7 @@ If you have questions, please contact the authors of the method:
Copy file name to clipboardExpand all lines: docs/source/getting_started.rst
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,13 @@ Cell Level
17
17
**************************
18
18
To install Tangram, make sure you have `PyTorch <https://pytorch.org/>`_ and `scanpy <https://scanpy.readthedocs.io/en/stable/>`_ installed. If you need more details on the dependences, look at the `environment.yml <https://github.com/broadinstitute/Tangram/blob/master/environment.yml>`_ file.
Copy file name to clipboardExpand all lines: docs/source/news.rst
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,4 +3,8 @@ Tangram News
3
3
4
4
- On Jan 28th 2021, Sten Linnarsson gave a `talk <https://www.youtube.com/watch?v=0mxIe2AsSKs>`_ at the WWNDev Forum and demostrated their mappings of the developmental mouse brain using Tangram.
5
5
6
-
- On Mar 9th 2021, Nicholas Eagles wrote a `blog post <http://research.libd.org/rstatsclub/2021/03/09/lessons-learned-applying-tangram-on-visium-data/#.YPsZphNKhb->`_ about applying Tangram on Visium data.
6
+
- On Mar 9th 2021, Nicholas Eagles wrote a `blog post <http://research.libd.org/rstatsclub/2021/03/09/lessons-learned-applying-tangram-on-visium-data/#.YPsZphNKhb->`_ about applying Tangram on Visium data.
7
+
8
+
- The Tangram method has been used by our colleagues at Harvard and Broad Institute, to map cell types for the developmental mouse brain -see Fig. 2 (`Nature(2021) <https://www.nature.com/articles/s41586-021-03670-5>`_ )
9
+
10
+
- Tangram is now officially a part of `Squidpy <https://squidpy.readthedocs.io/en/stable/index.html>`_
Copy file name to clipboardExpand all lines: docs/source/working.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@ Tangram Under the Hood
2
2
===========================
3
3
4
4
Tangram instantiates a `Mapper` object passing the following arguments:
5
-
* _S_: single cell matrix with shape cell-by-gene. Note that genes is the number of training genes.
6
-
* _G_: spatial data matrix with shape voxels-by-genes. Voxel can contain multiple cells.
5
+
|_S_: single cell matrix with shape cell-by-gene. Note that genes is the number of training genes.
6
+
|_G_: spatial data matrix with shape voxels-by-genes. Voxel can contain multiple cells.
7
7
8
8
Then, Tangram searches for a mapping matrix *M*, with shape voxels-by-cells, where the element *M\_ij* signifies the probability of cell *i* of being in spot *j*. Tangram computes the matrix *M* by minimizing the following loss:
0 commit comments