Skip to content

Commit 31d798d

Browse files
committed
version 1.1.0 release
1 parent f655b73 commit 31d798d

36 files changed

+2704
-3188
lines changed

.ipynb_checkpoints/Tutorial-checkpoint.ipynb

-1,159
This file was deleted.

README.md

+15-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
# PASTE
22

33
PASTE is a computational method that leverages both gene expression similarity and spatial distances between spots align and integrate spatial transcriptomics data. In particular, there are two methods:
4-
1. `pairwise_align`: align spots across pairwise ST layers.
5-
2. `center_align`: integrate multiple ST layers into one center layer.
4+
1. `pairwise_align`: align spots across pairwise slices.
5+
2. `center_align`: integrate multiple slices into one center slice.
66

77
You can read our preprint [here](https://www.biorxiv.org/content/10.1101/2021.03.16.435604v1).
88

99
PASTE is actively being worked on with future updates coming.
1010

11+
### Recent News
12+
13+
As of version 1.1.0, PASTE now runs on AnnData making it very easy to integrate with Scanpy for better downstream analysis. Hooray!
14+
1115
### Dependencies
1216

1317
To run PASTE, you will need the following Python packages:
1418
1. POT: Python Optimal Transport (https://PythonOT.github.io/)
19+
2. Scanpy (https://scanpy.readthedocs.io/en/stable/)
1520
3. Numpy
1621
4. Pandas
1722
5. scipy.spatial
@@ -36,9 +41,11 @@ First, clone the repository:
3641

3742
`git clone https://github.com/raphael-group/paste.git`
3843

39-
Sample execution: `python paste-cmd-line.py -m pairwise -f file1.csv file2.csv file3.csv`
44+
Next, when providing files, you will need to provide two separate files: the gene expression data followed by spatial data (both as .csv) for the code to initialize one slice object.
45+
46+
Sample execution: `python paste-cmd-line.py -m pairwise -f slice1.csv slice1_coor.csv slice2.csv slice2_coor.csv slice3.csv slice3_coor.csv`
4047

41-
Note: `pairwise` will return pairwise alignment between each consecutive pair of files (e.g. \[file1,file2\], \[file2,file3\]).
48+
Note: `pairwise` will return pairwise alignment between each consecutive pair of slices (e.g. \[slice1,slice2\], \[slice2,slice3\]).
4249

4350
| Flag | Name | Description | Default Value |
4451
| --- | --- | --- | --- |
@@ -48,25 +55,16 @@ Note: `pairwise` will return pairwise alignment between each consecutive pair of
4855
| -a | alpha | alpha parameter for PASTE | (float) `0.1` |
4956
| -p | n_components | n_components for NMF step in `center_align` | (int) `15` |
5057
| -l | lmbda | lambda parameter in `center_align` | (floats) probability vector of length `n` |
51-
| -i | intial_layer | Specify which file is also the intial layer in `center_align` | (int) `1` |
58+
| -i | intial_slice | Specify which file is also the intial slice in `center_align` | (int) `1` |
5259
| -t | threshold | Convergence threshold for `center_align` | (float) `0.001` |
5360

54-
Input files are .csv files of the form:
55-
56-
```
57-
'gene_a' 'gene_b'
58-
'2x5' 0 9
59-
'2x7' 2 6
60-
```
61-
Where the columns indexes are gene names (str), row indexes are spatial coordinates (str), and entries are gene counts (int). In particular, row indexes are of the form `AxB` where `A` and `B` are floats.
62-
63-
`pairwise_align` outputs a (.csv) file containing mapping of spots between each consecutive pair of layers. The rows correspond to spots of the first layer, and cols the second.
61+
`pairwise_align` outputs a (.csv) file containing mapping of spots between each consecutive pair of slices. The rows correspond to spots of the first slice, and cols the second.
6462

65-
`center_align` outputs two files containing the low dimensional representation (NMF decomposition) of the center layer gene expression, and files containing a mapping of spots between the center layer (rows) to each input layer (cols).
63+
`center_align` outputs two files containing the low dimensional representation (NMF decomposition) of the center slice gene expression, and files containing a mapping of spots between the center slice (rows) to each input slice (cols).
6664

6765
### Sample Dataset
6866

69-
Added sample spatial transcriptomics dataset consisting of four breast cancer layers courtesy of:
67+
Added sample spatial transcriptomics dataset consisting of four breast cancer slice courtesy of:
7068

7169
Ståhl, Patrik & Salmén, Fredrik & Vickovic, Sanja & Lundmark, Anna & Fernandez Navarro, Jose & Magnusson, Jens & Giacomello, Stefania & Asp, Michaela & Westholm, Jakub & Huss, Mikael & Mollbrink, Annelie & Linnarsson, Sten & Codeluppi, Simone & Borg, Åke & Pontén, Fredrik & Costea, Paul & Sahlén, Pelin Akan & Mulder, Jan & Bergmann, Olaf & Frisén, Jonas. (2016). Visualization and analysis of gene expression in tissue sections by spatial transcriptomics. Science. 353. 78-82. 10.1126/science.aaf2403.
7270

0 commit comments

Comments
 (0)