├── .gitattributes
├── .github
└── workflows
│ ├── build-unix-mac-win.yml
│ ├── dockerhub.yml
│ ├── docs.yml
│ ├── draft-pdf.yml
│ └── nbtomd.yml
├── .gitignore
├── .isort.cfg
├── .mypy.ini
├── .pydocstyle.ini
├── .pylint.ini
├── .verchew.ini
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── archive
├── _add_roi_omero.py
├── _gate_finder.py
├── _gmm_gate.py
├── _image_viewer.py
├── _rescale.py
├── _spatial_expression.py
├── dev.py
├── lasso_selector.py
├── rescale-01-04-24.py
└── spatial_scatterPlot _withouttoplayer.py
├── bin
├── checksum
├── open
├── update
└── verchew
├── docs
├── .Rhistory
├── CNAME
├── Functions
│ ├── hl
│ │ ├── addROI_omero.md
│ │ ├── animate.md
│ │ ├── classify.md
│ │ ├── dropFeatures.md
│ │ ├── merge_adata_obs.md
│ │ ├── rename.md
│ │ └── scimap_to_csv.md
│ ├── pl
│ │ ├── addROI_image.md
│ │ ├── cluster_plots.md
│ │ ├── densityPlot2D.md
│ │ ├── distPlot.md
│ │ ├── foldchange.md
│ │ ├── gate_finder.md
│ │ ├── groupCorrelation.md
│ │ ├── heatmap.md
│ │ ├── image_viewer.md
│ │ ├── markerCorrelation.md
│ │ ├── napariGater.md
│ │ ├── pie.md
│ │ ├── spatialInteractionNetwork.md
│ │ ├── spatial_distance.md
│ │ ├── spatial_interaction.md
│ │ ├── spatial_pscore.md
│ │ ├── spatial_scatterPlot.md
│ │ ├── stacked_barplot.md
│ │ ├── umap.md
│ │ └── voronoi.md
│ ├── pp
│ │ ├── combat.md
│ │ ├── log1p.md
│ │ ├── mcmicro_to_scimap.md
│ │ └── rescale.md
│ └── tl
│ │ ├── .Rhistory
│ │ ├── cluster.md
│ │ ├── foldchange.md
│ │ ├── phenotype_cells.md
│ │ ├── spatial_aggregate.md
│ │ ├── spatial_cluster.md
│ │ ├── spatial_count.md
│ │ ├── spatial_distance.md
│ │ ├── spatial_expression.md
│ │ ├── spatial_interaction.md
│ │ ├── spatial_lda.md
│ │ ├── spatial_pscore.md
│ │ ├── spatial_similarity_search.md
│ │ └── umap.md
├── Getting Started.md
├── Tools Shortcut.md
├── assets
│ ├── favicon.png
│ ├── scimap_logo.jpg
│ └── scimap_logo_b.png
├── contribute.md
├── index.md
├── stylesheets
│ ├── .Rhistory
│ ├── extra.css
│ └── font
│ │ ├── Avenir-Black.eot
│ │ ├── Avenir-Black.ttf
│ │ ├── Avenir-Black.woff
│ │ ├── Avenir-Black.woff2
│ │ ├── Avenir-BlackOblique.eot
│ │ ├── Avenir-BlackOblique.ttf
│ │ ├── Avenir-BlackOblique.woff
│ │ ├── Avenir-BlackOblique.woff2
│ │ ├── Avenir-Book.eot
│ │ ├── Avenir-Book.ttf
│ │ ├── Avenir-Book.woff
│ │ ├── Avenir-Book.woff2
│ │ ├── Avenir-BookOblique.eot
│ │ ├── Avenir-BookOblique.ttf
│ │ ├── Avenir-BookOblique.woff
│ │ ├── Avenir-BookOblique.woff2
│ │ ├── Avenir-Heavy.eot
│ │ ├── Avenir-Heavy.ttf
│ │ ├── Avenir-Heavy.woff
│ │ ├── Avenir-Heavy.woff2
│ │ ├── Avenir-HeavyOblique.eot
│ │ ├── Avenir-HeavyOblique.ttf
│ │ ├── Avenir-HeavyOblique.woff
│ │ ├── Avenir-HeavyOblique.woff2
│ │ ├── Avenir-Light.eot
│ │ ├── Avenir-Light.ttf
│ │ ├── Avenir-Light.woff
│ │ ├── Avenir-Light.woff2
│ │ ├── Avenir-LightOblique.eot
│ │ ├── Avenir-LightOblique.ttf
│ │ ├── Avenir-LightOblique.woff
│ │ ├── Avenir-LightOblique.woff2
│ │ ├── Avenir-Medium.eot
│ │ ├── Avenir-Medium.ttf
│ │ ├── Avenir-Medium.woff
│ │ ├── Avenir-Medium.woff2
│ │ ├── Avenir-MediumOblique.eot
│ │ ├── Avenir-MediumOblique.ttf
│ │ ├── Avenir-MediumOblique.woff
│ │ ├── Avenir-MediumOblique.woff2
│ │ ├── Avenir-Oblique.eot
│ │ ├── Avenir-Oblique.ttf
│ │ ├── Avenir-Oblique.woff
│ │ ├── Avenir-Oblique.woff2
│ │ ├── Avenir-Roman.eot
│ │ ├── Avenir-Roman.ttf
│ │ ├── Avenir-Roman.woff
│ │ └── Avenir-Roman.woff2
├── tutorials
│ ├── Releases
│ │ ├── CHANGELOG.md
│ │ └── license.md
│ ├── archive
│ │ ├── 1-scimap-tutorial-getting-started.md
│ │ ├── 2-scimap-tutorial-cell-phenotyping.md
│ │ ├── 3-Cell_Type_calling_and_adding_ROIs.md
│ │ ├── 3-Cell_Type_calling_and_adding_ROIs_files
│ │ │ ├── 3-Cell_Type_calling_and_adding_ROIs_23_2.png
│ │ │ ├── 3-Cell_Type_calling_and_adding_ROIs_25_0.png
│ │ │ ├── 3-Cell_Type_calling_and_adding_ROIs_27_0.png
│ │ │ └── 3-Cell_Type_calling_and_adding_ROIs_35_0.png
│ │ ├── 4-CellType_Proportion_Exploration.md
│ │ ├── 4-CellType_Proportion_Exploration_files
│ │ │ ├── 4-CellType_Proportion_Exploration_10_0.png
│ │ │ ├── 4-CellType_Proportion_Exploration_16_0.png
│ │ │ ├── 4-CellType_Proportion_Exploration_17_0.png
│ │ │ ├── 4-CellType_Proportion_Exploration_7_0.png
│ │ │ └── 4-CellType_Proportion_Exploration_8_0.png
│ │ ├── 5-Simple_Spatial_Analysis.md
│ │ ├── 5-Simple_Spatial_Analysis_files
│ │ │ ├── 5-Simple_Spatial_Analysis_10_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_11_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_12_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_13_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_14_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_15_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_16_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_17_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_23_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_24_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_26_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_27_0.png
│ │ │ ├── 5-Simple_Spatial_Analysis_32_1.png
│ │ │ ├── 5-Simple_Spatial_Analysis_33_1.png
│ │ │ └── 5-Simple_Spatial_Analysis_34_0.png
│ │ ├── 6_animate_with_scimap.md
│ │ ├── 6_animate_with_scimap_files
│ │ │ ├── 6_animate_with_scimap_18_0.png
│ │ │ ├── 6_animate_with_scimap_20_1.png
│ │ │ ├── 6_animate_with_scimap_22_0.png
│ │ │ └── 6_animate_with_scimap_24_0.png
│ │ ├── scimap-tutorial-cell-phenotyping_files
│ │ │ ├── scimap-tutorial-cell-phenotyping_13_0.png
│ │ │ ├── scimap-tutorial-cell-phenotyping_16_0.png
│ │ │ ├── scimap-tutorial-cell-phenotyping_18_0.png
│ │ │ ├── scimap-tutorial-cell-phenotyping_40_0.png
│ │ │ ├── scimap-tutorial-cell-phenotyping_41_0.png
│ │ │ ├── scimap-tutorial-cell-phenotyping_42_0.png
│ │ │ └── scimap-tutorial-cell-phenotyping_43_0.png
│ │ └── scimap-tutorial-getting-started_files
│ │ │ ├── scimap-tutorial-getting-started_26_0.png
│ │ │ ├── scimap-tutorial-getting-started_27_0.png
│ │ │ └── scimap-tutorial-getting-started_28_0.png
│ ├── md
│ │ ├── add_rois_scimap.md
│ │ ├── add_rois_scimap_files
│ │ │ ├── add_rois_scimap_11_0.png
│ │ │ ├── add_rois_scimap_12_0.png
│ │ │ └── add_rois_scimap_13_1.png
│ │ ├── animate_scimap.md
│ │ ├── animate_scimap_files
│ │ │ ├── animate_scimap_11_1.png
│ │ │ ├── animate_scimap_13_2.png
│ │ │ ├── animate_scimap_17_0.png
│ │ │ └── animate_scimap_19_1.png
│ │ ├── anndata_scimap.md
│ │ ├── cell_interaction_scimap.md
│ │ ├── cell_interaction_scimap_files
│ │ │ ├── cell_interaction_scimap_11_0.png
│ │ │ ├── cell_interaction_scimap_13_0.png
│ │ │ ├── cell_interaction_scimap_17_0.png
│ │ │ ├── cell_interaction_scimap_19_1.png
│ │ │ └── cell_interaction_scimap_7_0.png
│ │ ├── cell_proportion_scimap.md
│ │ ├── cell_proportion_scimap_files
│ │ │ ├── cell_proportion_scimap_10_0.png
│ │ │ ├── cell_proportion_scimap_13_1.png
│ │ │ ├── cell_proportion_scimap_15_1.png
│ │ │ ├── cell_proportion_scimap_17_0.png
│ │ │ ├── cell_proportion_scimap_19_1.png
│ │ │ ├── cell_proportion_scimap_4_0.png
│ │ │ ├── cell_proportion_scimap_5_0.png
│ │ │ └── cell_proportion_scimap_9_0.png
│ │ ├── clustering_scimap.md
│ │ ├── clustering_scimap_files
│ │ │ ├── clustering_scimap_12_1.png
│ │ │ ├── clustering_scimap_15_0.png
│ │ │ └── clustering_scimap_8_1.png
│ │ ├── demo_data_scimap.md
│ │ ├── export_scimap.md
│ │ ├── install_scimap.md
│ │ ├── proximity_scimap.md
│ │ ├── proximity_scimap_files
│ │ │ ├── proximity_scimap_5_0.png
│ │ │ ├── proximity_scimap_6_0.png
│ │ │ └── proximity_scimap_8_0.png
│ │ ├── scimap_helper_functions.md
│ │ ├── scimap_phenotyping.md
│ │ ├── scimap_phenotyping_files
│ │ │ ├── scimap_phenotyping_14_0.png
│ │ │ ├── scimap_phenotyping_16_0.png
│ │ │ ├── scimap_phenotyping_16_1.png
│ │ │ ├── scimap_phenotyping_17_0.png
│ │ │ ├── scimap_phenotyping_18_1.png
│ │ │ ├── scimap_phenotyping_19_1.png
│ │ │ ├── scimap_phenotyping_28_1.png
│ │ │ ├── scimap_phenotyping_30_1.png
│ │ │ ├── scimap_phenotyping_31_0.png
│ │ │ ├── scimap_phenotyping_31_1.png
│ │ │ ├── scimap_phenotyping_32_0.png
│ │ │ ├── scimap_phenotyping_33_1.png
│ │ │ ├── scimap_phenotyping_34_0.png
│ │ │ ├── scimap_phenotyping_34_1.png
│ │ │ └── scimap_phenotyping_35_0.png
│ │ ├── scimap_video.md
│ │ ├── spatial_analysis_scimap.md
│ │ ├── spatial_analysis_scimap_files
│ │ │ ├── spatial_analysis_scimap_10_0.png
│ │ │ ├── spatial_analysis_scimap_13_0.png
│ │ │ ├── spatial_analysis_scimap_15_0.png
│ │ │ ├── spatial_analysis_scimap_17_0.png
│ │ │ ├── spatial_analysis_scimap_19_0.png
│ │ │ ├── spatial_analysis_scimap_21_0.png
│ │ │ ├── spatial_analysis_scimap_6_0.png
│ │ │ └── spatial_analysis_scimap_8_0.png
│ │ ├── spatial_biology_scimap.md
│ │ ├── spatial_lag_scimap.md
│ │ ├── spatial_lag_scimap_files
│ │ │ └── spatial_lag_scimap_6_0.png
│ │ ├── spatial_lda_scimap.md
│ │ ├── spatial_lda_scimap_files
│ │ │ ├── spatial_lda_scimap_11_0.png
│ │ │ ├── spatial_lda_scimap_19_1.png
│ │ │ ├── spatial_lda_scimap_22_1.png
│ │ │ ├── spatial_lda_scimap_29_0.png
│ │ │ └── spatial_lda_scimap_9_0.png
│ │ ├── spatial_search_scimap.md
│ │ └── spatial_search_scimap_files
│ │ │ ├── spatial_search_scimap_13_0.png
│ │ │ ├── spatial_search_scimap_19_0.png
│ │ │ └── spatial_search_scimap_8_0.png
│ └── nbs
│ │ ├── add_rois_scimap.ipynb
│ │ ├── animate_scimap.ipynb
│ │ ├── anndata_scimap.ipynb
│ │ ├── cell_interaction_scimap.ipynb
│ │ ├── cell_proportion_scimap.ipynb
│ │ ├── clustering_scimap.ipynb
│ │ ├── demo_data_scimap.ipynb
│ │ ├── export_scimap.ipynb
│ │ ├── install_scimap.ipynb
│ │ ├── proximity_scimap.ipynb
│ │ ├── scimap_helper_functions.ipynb
│ │ ├── scimap_phenotyping.ipynb
│ │ ├── scimap_video.ipynb
│ │ ├── spatial_analysis_scimap.ipynb
│ │ ├── spatial_biology_scimap.ipynb
│ │ ├── spatial_lag_scimap.ipynb
│ │ ├── spatial_lda_scimap.ipynb
│ │ └── spatial_search_scimap.ipynb
└── workspace.code-workspace
├── mkdocs.yml
├── paper
├── figure-workflow.png
├── paper.bib
└── paper.md
├── poetry.lock
├── pyproject.toml
├── pytest.ini
└── scimap
├── __init__.py
├── __main__.py
├── cli
├── __init__.py
├── _scimap_mcmicro.py
└── test.py
├── dev
├── cluster.py
├── image_viewer_vit.py
└── roi_building.py
├── external
└── __init__.py
├── helpers
├── __init__.py
├── addROI_omero.py
├── add_roi_scatter.py
├── animate.py
├── classify.py
├── downloadDemoData.py
├── dropFeatures.py
├── merge_adata_obs.py
├── rename.py
└── scimap_to_csv.py
├── plotting
├── __init__.py
├── addROI_image.py
├── cluster_plots.py
├── densityPlot2D.py
├── distPlot.py
├── foldchange.py
├── gate_finder.py
├── groupCorrelation.py
├── heatmap.py
├── image_viewer.py
├── markerCorrelation.py
├── napariGater.py
├── pie.py
├── spatialInteractionNetwork.py
├── spatial_distance.py
├── spatial_interaction.py
├── spatial_pscore.py
├── spatial_scatterPlot.py
├── stacked_barplot.py
├── umap.py
└── voronoi.py
├── preprocessing
├── __init__.py
├── combat.py
├── log1p.py
├── mcmicro_to_scimap.py
├── ngraph.py
└── rescale.py
├── tests
├── _data
│ ├── example_data.csv
│ ├── example_data.h5ad
│ └── phenotype_workflow.csv
├── expected_test_values
│ ├── test_classify.pkl
│ ├── test_cluster.pkl
│ ├── test_combat.npz
│ ├── test_foldchange.npz
│ ├── test_log1p.npz
│ ├── test_phenotype.pkl
│ ├── test_rename.pkl
│ ├── test_rescale.npz
│ ├── test_spatial_aggregate.pkl
│ ├── test_spatial_cluster.pkl
│ ├── test_spatial_count.npz
│ ├── test_spatial_distance.npz
│ ├── test_spatial_expression.npz
│ ├── test_spatial_lda.npz
│ ├── test_spatial_pscore.npz
│ ├── test_spatial_similarity_search.pkl
│ └── test_umap.npz
├── scimapExampleData
│ ├── exemplar-001--unmicst_cell.csv
│ ├── manual_gates.csv
│ ├── markers.csv
│ ├── phenotype_workflow.csv
│ └── scimapExampleData.h5ad
├── test_hl.py
├── test_pl.py
├── test_pp.py
└── test_tl.py
└── tools
├── __init__.py
├── cluster.py
├── foldchange.py
├── phenotype_cells.py
├── spatial_aggregate.py
├── spatial_cluster.py
├── spatial_count.py
├── spatial_distance.py
├── spatial_expression.py
├── spatial_interaction.py
├── spatial_lda.py
├── spatial_pscore.py
├── spatial_similarity_search.py
└── umap.py
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | CHANGELOG.md merge=union
3 |
--------------------------------------------------------------------------------
/.github/workflows/build-unix-mac-win.yml:
--------------------------------------------------------------------------------
1 | # This workflow will install Python dependencies, run tests and lint with a single version of Python
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3 |
4 | name: build-unix-mac-win
5 |
6 | on:
7 | push:
8 | branches: [ master ]
9 | pull_request:
10 | branches: [ master ]
11 |
12 | env:
13 | # To fix an error when running Poetry on Windows
14 | # (https://github.com/python-poetry/poetry/issues/2629),
15 | # we set Poetry's cache directory to .poetry_cache in the current directory.
16 | # It makes it easier to later remove the virtualenv when it's broken.
17 | # Absolute path is necessary to avoid this issue:
18 | # https://github.com/python-poetry/poetry/issues/3049
19 | POETRY_CACHE_DIR: ${{ github.workspace }}/.poetry_cache
20 |
21 | jobs:
22 | ci:
23 | strategy:
24 | fail-fast: false
25 | matrix:
26 | python-version: ['3.9', '3.10']
27 | os: [ubuntu-latest, macos-13, windows-latest]
28 | runs-on: ${{ matrix.os }}
29 |
30 | steps:
31 | - name: Checkout current branch
32 | uses: actions/checkout@v4
33 |
34 | - name: Install required version of Python
35 | uses: actions/setup-python@v5
36 | with:
37 | python-version: ${{ matrix.python-version }}
38 | architecture: x64
39 |
40 | - name: Python Poetry Action
41 | uses: abatilo/actions-poetry@v2
42 | # with:
43 | # poetry-version: 1.1.2
44 |
45 | - name: Set up the cache
46 | uses: actions/cache@v3
47 | with:
48 | path: .poetry_cache
49 | key: tests-poetry-cache-v12-${{ matrix.os }}-py${{ matrix.python-version }}
50 |
51 | - name: Install project dependencies
52 | run: poetry install -vv || { rm -rf .poetry_cache/virtualenvs/*; poetry install -vv; }
53 |
54 | - name: Run tests with Poetry
55 | run: poetry run pytest
56 |
--------------------------------------------------------------------------------
/.github/workflows/dockerhub.yml:
--------------------------------------------------------------------------------
1 | name: dockerhub
2 |
3 | on:
4 | release:
5 | types: [published]
6 |
7 | jobs:
8 | docker:
9 | runs-on: ubuntu-latest
10 | steps:
11 | -
12 | name: Set up QEMU
13 | uses: docker/setup-qemu-action@v1
14 | -
15 | name: Set up Docker Buildx
16 | uses: docker/setup-buildx-action@v1
17 | -
18 | name: Login to DockerHub
19 | uses: docker/login-action@v1
20 | with:
21 | username: ${{ secrets.MCMICRO_USERNAME }}
22 | password: ${{ secrets.MCMICRO_TOKEN }}
23 | -
24 | name: Build and push
25 | id: docker_build
26 | uses: docker/build-push-action@v2
27 | with:
28 | push: true
29 | tags: labsyspharm/scimap:${{ github.event.release.tag_name }}
30 | -
31 | name: Image digest
32 | run: echo ${{ steps.docker_build.outputs.digest }}
33 |
--------------------------------------------------------------------------------
/.github/workflows/docs.yml:
--------------------------------------------------------------------------------
1 | name: docs
2 | on:
3 | push:
4 | branches:
5 | - master
6 |
7 | jobs:
8 | deploy:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v3
12 | - uses: actions/setup-python@v4
13 | with:
14 | python-version: 3.8
15 | architecture: x64
16 | #- run: pip install scimap mkdocs-material mkdocstrings
17 | - run: pip install mkdocs-material mkdocstrings mkdocstrings-python
18 | - run: mkdocs gh-deploy --force
19 |
--------------------------------------------------------------------------------
/.github/workflows/draft-pdf.yml:
--------------------------------------------------------------------------------
1 | on: [push]
2 |
3 | jobs:
4 | paper:
5 | runs-on: ubuntu-latest
6 | name: Paper Draft
7 | steps:
8 | - name: Checkout
9 | uses: actions/checkout@v4
10 | - name: Build draft PDF
11 | uses: openjournals/openjournals-draft-action@master
12 | with:
13 | journal: joss
14 | # This should be the path to the paper within your repo.
15 | paper-path: paper/paper.md
16 | - name: Upload
17 | uses: actions/upload-artifact@v4
18 | with:
19 | name: paper
20 | # This is the output path where Pandoc will write the compiled
21 | # PDF. Note, this should be the same directory as the input
22 | # paper.md
23 | path: paper/paper.pdf
24 |
--------------------------------------------------------------------------------
/.github/workflows/nbtomd.yml:
--------------------------------------------------------------------------------
1 | name: nbtomd
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | pull_request:
8 | branches:
9 | - master
10 |
11 | permissions:
12 | contents: write
13 |
14 | jobs:
15 | deploy:
16 | runs-on: ubuntu-latest
17 | env:
18 | CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts
19 | CI_COMMIT_AUTHOR: Continuous Integration
20 | steps:
21 | - uses: actions/checkout@v3
22 | - uses: actions/setup-python@v4
23 | with:
24 | python-version: 3.x
25 | - uses: actions/cache@v3
26 | with:
27 | key: ${{ github.ref }}
28 | path: .cache
29 | - run: pip install jupyter
30 | - run: pip install nbconvert
31 | - run: jupyter nbconvert --to markdown docs/tutorials/nbs/*.ipynb
32 | #- run: mv docs/Tutorials/notebooks/*.md docs/Tutorials/
33 | - run: |
34 | for file in docs/tutorials/nbs/*; do
35 | if [[ ! "$file" =~ \.ipynb$ ]]; then
36 | rsync -av --remove-source-files "$file" docs/tutorials/md/
37 | fi
38 | done
39 | - run: ls docs/tutorials/
40 |
41 | - name: GIT Commit
42 | # Only run on main branch push (e.g. after pull request merge).
43 | if: github.event_name == 'push'
44 | run: |
45 | git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
46 | git config --global user.email "ajitjohnson@users.noreply.github.com"
47 | git add docs/tutorials/md/*
48 | if [ -z "$(git status --porcelain)" ]; then
49 | echo "Nothing to commit, working tree is clean."
50 | exit 0
51 | fi
52 | git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
53 | git push
54 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Temporary Python files
2 | *.pyc
3 | *.egg-info
4 | __pycache__
5 | .ipynb_checkpoints
6 | setup.py
7 | pip-wheel-metadata/
8 |
9 | # Temporary OS files
10 | Icon*
11 | .DS_Store
12 |
13 | #VS code
14 | .vscode/
15 |
16 | # Temporary virtual environment files
17 | /.cache/
18 | /.venv/
19 |
20 | # Temporary server files
21 | .env
22 | *.pid
23 |
24 | # Generated documentation
25 | /docs/gen/
26 | /docs/apidocs/
27 | /site/
28 | /*.html
29 | /docs/*.png
30 |
31 | # Google Drive
32 | *.gdoc
33 | *.gsheet
34 | *.gslides
35 | *.gdraw
36 |
37 | # Testing and coverage results
38 | /.coverage
39 | /.coverage.*
40 | /htmlcov/
41 |
42 | # Build and release directories
43 | /build/
44 | /dist/
45 | *.spec
46 |
47 | # Sublime Text
48 | *.sublime-workspace
49 |
50 | # Eclipse
51 | .settings
52 |
53 |
--------------------------------------------------------------------------------
/.isort.cfg:
--------------------------------------------------------------------------------
1 | [settings]
2 |
3 | not_skip = __init__.py
4 |
5 | multi_line_output = 3
6 |
7 | known_standard_library = dataclasses,typing_extensions
8 | known_third_party = click,log
9 | known_first_party = scimap
10 |
11 | combine_as_imports = true
12 | force_grid_wrap = false
13 | include_trailing_comma = true
14 |
15 | lines_after_imports = 2
16 | line_length = 88
17 |
--------------------------------------------------------------------------------
/.mypy.ini:
--------------------------------------------------------------------------------
1 | [mypy]
2 |
3 | ignore_missing_imports = true
4 | no_implicit_optional = true
5 | check_untyped_defs = true
6 |
7 | cache_dir = .cache/mypy/
8 |
--------------------------------------------------------------------------------
/.pydocstyle.ini:
--------------------------------------------------------------------------------
1 | [pydocstyle]
2 |
3 | # D211: No blank lines allowed before class docstring
4 | add_select = D211
5 |
6 | # D100: Missing docstring in public module
7 | # D101: Missing docstring in public class
8 | # D102: Missing docstring in public method
9 | # D103: Missing docstring in public function
10 | # D104: Missing docstring in public package
11 | # D105: Missing docstring in magic method
12 | # D107: Missing docstring in __init__
13 | # D202: No blank lines allowed after function docstring
14 | add_ignore = D100,D101,D102,D103,D104,D105,D107,D202
15 |
--------------------------------------------------------------------------------
/.verchew.ini:
--------------------------------------------------------------------------------
1 | [Make]
2 |
3 | cli = make
4 | version = GNU Make
5 |
6 | [Python]
7 |
8 | cli = python
9 | version = 0.0
10 |
11 | [Poetry]
12 |
13 | cli = poetry
14 | version = 1
15 |
16 | [Graphviz]
17 |
18 | cli = dot
19 | cli_version_arg = -V
20 | version = 2
21 | optional = true
22 | message = This is only needed to generate UML diagrams for documentation.
23 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.8
2 |
3 | RUN pip install --no-cache-dir scimap --upgrade
4 |
5 | COPY . /app/
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Laboratory of Systems Pharmacology @ Harvard
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SCIMAP: A Python Toolkit for Integrated Spatial Analysis of Multiplexed Imaging Data
2 |
3 |
4 | [](https://github.com/labsyspharm/scimap/actions/workflows/build-unix-mac-win.yml)
5 | [](https://github.com/labsyspharm/scimap/actions/workflows/docs.yml)
6 | [](https://pepy.tech/project/scimap)
7 | [](https://pypi.org/project/scimap)
8 | [](https://pypi.org/project/scimap)
9 | [](https://doi.org/10.21105/joss.06604)
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | *Scimap* is a scalable toolkit for analyzing spatial molecular data. The underlying framework is generalizable to spatial datasets mapped to XY coordinates. The package uses the [anndata](https://anndata.readthedocs.io/en/stable/anndata.AnnData.html) framework making it easy to integrate with other popular single-cell analysis toolkits. It includes preprocessing, phenotyping, visualization, clustering, spatial analysis and differential spatial testing. The Python-based implementation efficiently deals with large datasets of millions of cells.
18 |
19 | ## Citing scimap
20 | Nirmal et al., (2024). SCIMAP: A Python Toolkit for Integrated Spatial Analysis of Multiplexed Imaging Data. *Journal of Open Source Software*, 9(97), 6604, [https://doi.org/10.21105/joss.06604](https://joss.theoj.org/papers/10.21105/joss.06604#)
21 |
22 | ## Installation
23 |
24 | We strongly recommend installing `scimap` in a fresh virtual environment.
25 |
26 | ```
27 | # If you have conda installed
28 | conda create --name scimap python=3.10
29 | conda activate scimap
30 | ```
31 |
32 | Install `scimap` directly into an activated virtual environment:
33 |
34 | **Firstly, we suggest installing `scimap` and `napari` together to enable visualization out of the box. Keep in mind, `napari` needs a GUI toolkit, such as PyQt. If you run into any issues because of your computer's operating system, install `scimap` and `napari` separately by following the guidance in `napari's` documentation.**
35 |
36 | Here's how you can install both using pip:
37 |
38 | ```python
39 | pip install "scimap[napari]"
40 | ```
41 |
42 | **If you encounter a problem with PyQt6 during the installation, you can install `scimap` alone first. Later on, if you find you need `napari`, you can go ahead and install it by itself.**
43 |
44 | To install just `scimap`:
45 |
46 | ```python
47 | pip install scimap
48 | ```
49 |
50 | After installation, the package can be imported as:
51 |
52 | ```python
53 | $ python
54 | >>> import scimap as sm
55 | ```
56 |
57 |
58 | ## Get Started
59 |
60 | #### Detailed documentation of `scimap` functions and tutorials are available [here](http://scimap.xyz/).
61 |
62 | *Scimap* development was led by [Ajit Johnson Nirmal](https://ajitjohnson.com/), Harvard Medical School.
63 | Check out other tools from the [Nirmal Lab](https://nirmallab.com/tools/).
64 |
65 |
66 | ## Contibute
67 | Interested in contributing to the package? Check out our guidelines at [https://scimap.xyz/contribute/](https://scimap.xyz/contribute/) for detailed instructions.
68 |
69 |
70 | ## Funding
71 | This work was supported by the following NIH grant K99-CA256497
72 |
73 |
--------------------------------------------------------------------------------
/archive/_gmm_gate.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | # Created on Tue May 12 19:06:40 2020
4 | # @author: Ajit Johnson Nirmal
5 | """ abstract "Short Description"
6 | Manual Gate finder
7 | """
8 |
9 | import pandas as pd
10 | import numpy as np
11 | from sklearn.mixture import GaussianMixture
12 | from scipy import stats
13 | import seaborn as sns; sns.set(color_codes=True)
14 | import matplotlib.pyplot as plt
15 |
16 |
17 | def gmm_gate (adata, marker_of_interest):
18 | """
19 | Parameters:
20 |
21 | adata : Ann Data Object
22 | marker_of_interest : string
23 | Marker of interest.
24 |
25 | Returns:
26 | Distribution plot of the marker of interest along with GMM overlaid.
27 |
28 | Example:
29 | ```python
30 | sm.pl.gmm_dist_plot (adata, marker_of_interest='CD45')
31 | ```
32 | """
33 |
34 | # If no raw data is available make a copy
35 | if adata.raw is None:
36 | adata.raw = adata
37 |
38 | # Copy of the raw data if it exisits
39 | if adata.raw is not None:
40 | adata.X = adata.raw.X
41 |
42 | # Make a copy of the data with the marker of interest
43 | data = pd.DataFrame(np.log1p(adata.X), columns = adata.var.index, index= adata.obs.index)[[marker_of_interest]]
44 |
45 | # Clip of the top and bottom outliers before applying the model
46 | data = data.clip(lower =np.percentile(data,1), upper=np.percentile(data,99))
47 |
48 | # Apply Gaussian mixture model
49 | m = data[marker_of_interest].values
50 | data_gm = m.reshape(-1, 1)
51 | gmm = GaussianMixture(n_components=2)
52 | gmm.fit(data_gm)
53 | gate = np.mean(gmm.means_)
54 |
55 | mean = gmm.means_
56 | cov = gmm.covariances_
57 | std = [ np.sqrt( np.trace(cov[i])/2) for i in range(0,2) ]
58 | #std = np.sqrt(np.trace(cov)/2)
59 |
60 |
61 | # Merge with image ID
62 | if len(adata.obs['ImageId'].unique()) > 1:
63 | # Identify the most and least positivity of the given marker of interest
64 | # Generate a dataframe with various gates
65 | dd = data.values
66 | dd = np.where(dd < gate, np.nan, dd)
67 | np.warnings.filterwarnings('ignore')
68 | dd = np.where(dd > gate, 1, dd)
69 | dd = pd.DataFrame(dd, index = data.index, columns = ['gate'])
70 | dd = dd.merge(pd.DataFrame(adata.obs['ImageId']), how='outer', left_index=True, right_index=True)
71 | dd = dd[dd['gate'] == 1]
72 | image_positivity = dd.groupby('ImageId').count().sort_values('gate')
73 | # Create a string for overlaying on image
74 | low = list(image_positivity.head(3).index)
75 | low = ','.join(low)
76 | high = list(image_positivity.tail(3).index)
77 | high = ','.join(high)
78 | # Dor image
79 | textstr = '\n'.join((
80 | ("Most positive in: ",
81 | high,
82 | "Least positive in ",
83 | low
84 | )))
85 |
86 | # Plot
87 | sns.set_style("white")
88 | fig, ax = plt.subplots()
89 | x = np.linspace(mean[0] - 3*std[0], mean[0] + 3*std[0], 1000)
90 | y = np.linspace(mean[1] - 3*std[1], mean[1] + 3*std[1], 1000)
91 | sns.distplot(data[marker_of_interest], color = 'grey')
92 | plt.axvline(x= mean[0], c='#000000', linestyle='dotted')
93 | plt.axvline(x= mean[1], c='#000000', linestyle='dotted')
94 | plt.plot(x, stats.norm.pdf(x, mean[0], std[0]), linestyle='dashed')
95 | plt.plot(y, stats.norm.pdf(y, mean[1], std[1]), linestyle='dashed')
96 | plt.xticks(np.arange(min(data[marker_of_interest])-1, max(data[marker_of_interest])+1, 0.5))
97 | plt.title(marker_of_interest, fontsize=20)
98 | if len(adata.obs['ImageId'].unique()) > 1:
99 | ax.text(0.05, 0.95, textstr, fontsize=14, transform=ax.transAxes,
100 | verticalalignment='top')
101 |
102 |
103 |
--------------------------------------------------------------------------------
/archive/_image_viewer.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | """
4 | Created on Wed Apr 1 21:57:54 2020
5 | @author: Ajit Johnson Nirmal
6 | Using Napari to Visualize images overlayed with phenotypes or any categorical column
7 | """
8 |
9 | #%gui qt
10 | import napari
11 | import pandas as pd
12 | import random
13 | import tifffile as tiff
14 |
15 | def image_viewer (image_path, adata, overlay=None,
16 | overlay_category=None,markers=None,channel_names='default',
17 | x_coordinate='X_centroid',y_coordinate='Y_centroid',point_size=10,
18 | point_color=None,subset=None,imageid='imageid',seg_mask=None):
19 | """
20 | Parameters
21 | ----------
22 | image_path : string
23 | Location to the image file.
24 | seg_mask: string (The default is None)
25 | Location to the segmentation mask file.
26 | adata : AnnData Object
27 | overlay : string, optional (The default is None)
28 | Name of the column with any categorical data such as phenotypes or clusters.
29 | overlay_category : list, optional (The default is None)
30 | If only specfic categories within the overlay column is needed, pass their names as a list.
31 | If None, all categories will be used.
32 | markers : list, optional (The default is None)
33 | Markers to be included. If none, all markers will be displayed.
34 | channel_names : list, optional (The default is `adata.uns['all_markers']`)
35 | List of channels in the image in the exact order as image.
36 | x_coordinate : string, optional (The default is 'X_centroid')
37 | X axis coordinate column name in AnnData object.
38 | y_coordinate : string, optional (The default is 'Y_centroid')
39 | Y axis coordinate column name in AnnData object.
40 | point_size : int, optional (The default is 10)
41 | point size in the napari plot.
42 | imageid : string, optional *(The default is `imageid`)*
43 | Column name of the column containing the image id.
44 | subset : string, optional *(The default is None)*
45 | imageid of a single image to be subsetted for analyis. Only useful when multiple images are being analyzed together.
46 |
47 | Returns
48 | -------
49 | None.
50 |
51 | Example
52 | -------
53 | image_path = '/Users/aj/Desktop/ptcl_tma/image.tif'
54 | sm.pl.image_viewer (image_path, adata, overlay='phenotype',overlay_category=None,
55 | markers=['CD31', "CD3D","DNA11",'CD19','CD45','CD163','FOXP3'],
56 | point_size=7,point_color='white')
57 |
58 | """
59 | # Plot only the Image that is requested
60 | if subset is not None:
61 | adata = adata[adata.obs[imageid] == subset]
62 |
63 | # Recover the channel names from adata
64 | if channel_names is 'default':
65 | channel_names = adata.uns['all_markers']
66 | else:
67 | channel_names = channel_names
68 |
69 | # Index of the marker of interest and corresponding names
70 | if markers is None:
71 | idx = list(range(len(channel_names)))
72 | channel_names = channel_names
73 | else:
74 | idx = []
75 | for i in markers:
76 | idx.append(list(channel_names).index(i))
77 | channel_names = markers
78 |
79 |
80 | # Load the image
81 | image = tiff.imread(image_path, key = idx)
82 |
83 | # Load the segmentation mask
84 | if seg_mask is not None:
85 | seg_m = tiff.imread(seg_mask)
86 |
87 | # Load the viewer
88 | viewer = napari.view_image(
89 | image,
90 | #is_pyramid=False,
91 | channel_axis=0,
92 | name = None if channel_names is None else channel_names,
93 | visible = False)
94 |
95 | # Add the seg mask
96 | if seg_mask is not None:
97 | viewer.add_labels(seg_m, name='segmentation mask')
98 |
99 | # Add phenotype layer function
100 | def add_phenotype_layer (adata, overlay, phenotype_layer,x,y,viewer,point_size,point_color):
101 | coordinates = adata[adata.obs[overlay] == phenotype_layer]
102 | coordinates = pd.DataFrame({'y': coordinates.obs[y],'x': coordinates.obs[x]})
103 | points = coordinates.values.tolist()
104 | if point_color is None:
105 | r = lambda: random.randint(0,255) # random color generator
106 | point_color = '#%02X%02X%02X' % (r(),r(),r()) # random color generator
107 | viewer.add_points(points, size=point_size,face_color=point_color,visible=False,name=phenotype_layer)
108 |
109 | if overlay is not None:
110 | # categories under investigation
111 | if overlay_category is None:
112 | available_phenotypes = list(adata.obs[overlay].unique())
113 | else:
114 | available_phenotypes = overlay_category
115 |
116 | # Run the function on all phenotypes
117 | for i in available_phenotypes:
118 | add_phenotype_layer (adata=adata, overlay=overlay,
119 | phenotype_layer=i, x=x_coordinate, y=y_coordinate, viewer=viewer,
120 | point_size=point_size,point_color=point_color)
121 |
--------------------------------------------------------------------------------
/archive/dev.py:
--------------------------------------------------------------------------------
1 | # %%
2 | import anndata as ad
3 | import scimap as sm
4 |
5 | adata = ad.read_h5ad(
6 | '/Users/aj/Partners HealthCare Dropbox/Ajit Nirmal/nirmal lab/resources/exemplarData/scimapExampleData/scimapExampleData.h5ad'
7 | )
8 | adata
9 | # %%
10 |
11 | # %%
12 | image_path = '/Users/aj/Partners HealthCare Dropbox/Ajit Nirmal/nirmal lab/resources/exemplarData/scimapExampleData/registration/exemplar-001.ome.tif'
13 | image_viewer(
14 | adata=adata,
15 | image_path=image_path,
16 | overlay='phenotype',
17 | embed_notebook=False,
18 | point_color='white',
19 | )
20 | # %%
21 |
22 | # %%
23 | image_viewer(
24 | adata=adata,
25 | image_path=image_path,
26 | # overlay='phenotype',
27 | embed_notebook=True,
28 | # point_color='white',
29 | backend='vitessce',
30 | )
31 | # %%
32 |
33 |
34 | # %%
35 | from vitessce import (
36 | VitessceConfig,
37 | CoordinationLevel as CL,
38 | get_initial_coordination_scope_prefix,
39 | )
40 | from os.path import join
41 | import ipywidgets
42 |
43 | # %%
44 |
45 | # %%
46 | vc = VitessceConfig(schema_version="1.0.16", name="BioMedVis Challenge")
47 | dataset = vc.add_dataset(name="Blood Vessel", uid="bv").add_file(
48 | url="/Users/aj/Partners HealthCare Dropbox/Ajit Nirmal/nirmal lab/resources/exemplarData/scimapExampleData/registration/exemplar-001.ome.tif",
49 | file_type="image",
50 | )
51 |
52 | # spatial = vc.add_view("spatialBeta", dataset=dataset)
53 | # lc = vc.add_view("layerControllerBeta", dataset=dataset)
54 |
55 | # vc.layout(spatial | lc)
56 | vw = vc.widget(js_package_version="3.4.5", remount_on_uid_change=False)
57 | vw
58 | # %%
59 |
60 |
61 | # %%
62 | import vizarr
63 | import zarr
64 |
65 | image_path = '/Users/aj/Partners HealthCare Dropbox/Ajit Nirmal/nirmal lab/resources/exemplarData/scimapExampleData/registration/exemplar-001.ome.tif'
66 | image = tiff.TiffFile(image_path, is_ome=False) # is_ome=False
67 | store = zarr.open(image.aszarr()) # convert image to Zarr array
68 | viewer = vizarr.Viewer()
69 | viewer.add_image(store)
70 | viewer
71 | # %%
72 |
--------------------------------------------------------------------------------
/archive/lasso_selector.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | Created on Tue Nov 5 14:17:09 2019
4 | @author: Ajit Johnson Nirmal
5 | Program: Lasso Selector for selecting regions of interest
6 | """
7 |
8 | # Load packages
9 | from __future__ import print_function
10 | #from six.moves import input
11 | import numpy as np
12 | from matplotlib.widgets import LassoSelector
13 | from matplotlib.path import Path
14 | from IPython import get_ipython
15 | get_ipython().run_line_magic('matplotlib', 'auto')
16 | import matplotlib.pyplot as plt
17 |
18 | class SelectFromCollection(object):
19 | """Select indices from a matplotlib collection using `LassoSelector`.
20 |
21 | Selected indices are saved in the `ind` attribute. This tool highlights
22 | selected points by fading them out (i.e., reducing their alpha values).
23 | If your collection has alpha < 1, this tool will permanently alter them.
24 |
25 | Note that this tool selects collection objects based on their *origins*
26 | (i.e., `offsets`).
27 |
28 | Parameters
29 | ----------
30 | ax : :class:`~matplotlib.axes.Axes`
31 | Axes to interact with.
32 |
33 | collection : :class:`matplotlib.collections.Collection` subclass
34 | Collection you want to select from.
35 |
36 | alpha_other : 0 <= float <= 1
37 | To highlight a selection, this tool sets all selected points to an
38 | alpha value of 1 and non-selected points to `alpha_other`.
39 |
40 | Example:
41 | marker = 'CD45'
42 | x = adata.obs['X_position']
43 | y = adata.obs['Y_position']
44 |
45 | m_idx = adata.var.index.tolist().index(marker) # Get the index of marker of interest
46 | tmp_dataframe = pd.DataFrame(adata.X)
47 | hue = np.array(tmp_dataframe[m_idx])
48 |
49 | # Plotting
50 | fig, ax = plt.subplots()
51 | pts = ax.scatter(x, y, s=1,c=hue,cmap='viridis')
52 | ax.invert_yaxis()
53 |
54 | # Function call to do the Lasso selection
55 | selector = SelectFromCollection(ax, pts)
56 | # Return indeces of the selected points
57 | tumor_idx= selector.ind
58 | len(tumor_idx)
59 |
60 | # Update adata
61 | adata.obs.loc[adata.obs.index[tumor_idx], 'roi-1'] = "roi-1"
62 | adata.obs['roi-1'].value_counts() # Checking
63 |
64 | """
65 |
66 | def __init__(self, ax, collection,alpha_other=0.3):
67 | self.canvas = ax.figure.canvas
68 | self.collection = collection
69 | self.alpha_other = alpha_other
70 |
71 | self.xys = collection.get_offsets()
72 | self.Npts = len(self.xys)
73 |
74 | # Ensure that we have separate colors for each object
75 | self.fc = collection.get_facecolors()
76 | if len(self.fc) == 0:
77 | raise ValueError('Collection must have a facecolor')
78 | elif len(self.fc) == 1:
79 | self.fc = np.tile(self.fc, self.Npts).reshape(self.Npts, -1)
80 |
81 | self.lasso = LassoSelector(ax, onselect=self.onselect)
82 | self.ind = []
83 |
84 | def onselect(self, verts):
85 | path = Path(verts)
86 | self.ind = np.nonzero([path.contains_point(xy) for xy in self.xys])[0]
87 | self.fc[:, -1] = self.alpha_other
88 | self.fc[self.ind, -1] = 1
89 | self.collection.set_facecolors(self.fc)
90 | self.canvas.draw_idle()
91 |
92 | def disconnect(self):
93 | self.lasso.disconnect_events()
94 | self.fc[:, -1] = 1
95 | self.collection.set_facecolors(self.fc)
96 | self.canvas.draw_idle()
--------------------------------------------------------------------------------
/bin/checksum:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | import hashlib
5 | import sys
6 |
7 |
8 | def run(paths):
9 | sha = hashlib.sha1()
10 |
11 | for path in paths:
12 | try:
13 | with open(path, 'rb') as f:
14 | for chunk in iter(lambda: f.read(4096), b''):
15 | sha.update(chunk)
16 | except IOError:
17 | sha.update(path.encode())
18 |
19 | print(sha.hexdigest())
20 |
21 |
22 | if __name__ == '__main__':
23 | run(sys.argv[1:])
24 |
--------------------------------------------------------------------------------
/bin/open:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | import os
5 | import sys
6 |
7 |
8 | COMMANDS = {
9 | 'linux': "open",
10 | 'win32': "cmd /c start",
11 | 'cygwin': "cygstart",
12 | 'darwin': "open",
13 | }
14 |
15 |
16 | def run(path):
17 | command = COMMANDS.get(sys.platform, "open")
18 | os.system(command + ' ' + path)
19 |
20 |
21 | if __name__ == '__main__':
22 | run(sys.argv[-1])
23 |
--------------------------------------------------------------------------------
/bin/update:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | import os
5 | import importlib
6 | import tempfile
7 | import shutil
8 | import subprocess
9 | import sys
10 |
11 | CWD = os.getcwd()
12 | TMP = tempfile.gettempdir()
13 | CONFIG = {
14 | "full_name": "Ajit Johnson Nirmal",
15 | "email": "ajitjohnson.n@gmail.com",
16 | "github_username": "ajitjohnson",
17 | "github_repo": "scimap",
18 | "default_branch": "master",
19 | "project_name": "scimap",
20 | "package_name": "scimap",
21 | "project_short_description": "Single-Cell Image Analysis Package",
22 | "python_major_version": 0,
23 | "python_minor_version": 0,
24 | }
25 |
26 |
27 | def install(package='cookiecutter'):
28 | try:
29 | importlib.import_module(package)
30 | except ImportError:
31 | print("Installing cookiecutter")
32 | subprocess.check_call([sys.executable, '-m', 'pip', 'install', package])
33 |
34 |
35 | def run():
36 | print("Generating project")
37 |
38 | from cookiecutter.main import cookiecutter
39 |
40 | os.chdir(TMP)
41 | cookiecutter(
42 | 'https://github.com/jacebrowning/template-python.git',
43 | no_input=True,
44 | overwrite_if_exists=True,
45 | extra_context=CONFIG,
46 | )
47 |
48 |
49 | def copy():
50 | for filename in [
51 | '.appveyor.yml',
52 | '.coveragerc',
53 | '.gitattributes',
54 | '.gitignore',
55 | '.isort.cfg',
56 | '.mypy.ini',
57 | '.pydocstyle.ini',
58 | '.pylint.ini',
59 | '.scrutinizer.yml',
60 | '.travis.yml',
61 | '.verchew.ini',
62 | 'CONTRIBUTING.md',
63 | 'Makefile',
64 | os.path.join('bin', 'checksum'),
65 | os.path.join('bin', 'open'),
66 | os.path.join('bin', 'update'),
67 | os.path.join('bin', 'verchew'),
68 | 'pytest.ini',
69 | 'scent.py',
70 | ]:
71 | src = os.path.join(TMP, CONFIG['project_name'], filename)
72 | dst = os.path.join(CWD, filename)
73 | print("Updating " + filename)
74 | shutil.copy(src, dst)
75 |
76 |
77 | if __name__ == '__main__':
78 | install()
79 | run()
80 | copy()
81 |
--------------------------------------------------------------------------------
/docs/.Rhistory:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/.Rhistory
--------------------------------------------------------------------------------
/docs/CNAME:
--------------------------------------------------------------------------------
1 | scimap.xyz
--------------------------------------------------------------------------------
/docs/Functions/hl/addROI_omero.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.helpers.addROI_omero
--------------------------------------------------------------------------------
/docs/Functions/hl/animate.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.helpers.animate
--------------------------------------------------------------------------------
/docs/Functions/hl/classify.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.helpers.classify
--------------------------------------------------------------------------------
/docs/Functions/hl/dropFeatures.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.helpers.dropFeatures
--------------------------------------------------------------------------------
/docs/Functions/hl/merge_adata_obs.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.helpers.merge_adata_obs
--------------------------------------------------------------------------------
/docs/Functions/hl/rename.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.helpers.rename
--------------------------------------------------------------------------------
/docs/Functions/hl/scimap_to_csv.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.helpers.scimap_to_csv
--------------------------------------------------------------------------------
/docs/Functions/pl/addROI_image.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.addROI_image
--------------------------------------------------------------------------------
/docs/Functions/pl/cluster_plots.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.cluster_plots
--------------------------------------------------------------------------------
/docs/Functions/pl/densityPlot2D.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.densityPlot2D
--------------------------------------------------------------------------------
/docs/Functions/pl/distPlot.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.distPlot
--------------------------------------------------------------------------------
/docs/Functions/pl/foldchange.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.foldchange
--------------------------------------------------------------------------------
/docs/Functions/pl/gate_finder.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.gate_finder
--------------------------------------------------------------------------------
/docs/Functions/pl/groupCorrelation.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.groupCorrelation
--------------------------------------------------------------------------------
/docs/Functions/pl/heatmap.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.heatmap
--------------------------------------------------------------------------------
/docs/Functions/pl/image_viewer.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.image_viewer
--------------------------------------------------------------------------------
/docs/Functions/pl/markerCorrelation.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.markerCorrelation
--------------------------------------------------------------------------------
/docs/Functions/pl/napariGater.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.napariGater
--------------------------------------------------------------------------------
/docs/Functions/pl/pie.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.pie
--------------------------------------------------------------------------------
/docs/Functions/pl/spatialInteractionNetwork.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.spatialInteractionNetwork
--------------------------------------------------------------------------------
/docs/Functions/pl/spatial_distance.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.spatial_distance
--------------------------------------------------------------------------------
/docs/Functions/pl/spatial_interaction.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.spatial_interaction
--------------------------------------------------------------------------------
/docs/Functions/pl/spatial_pscore.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.spatial_pscore
--------------------------------------------------------------------------------
/docs/Functions/pl/spatial_scatterPlot.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.spatial_scatterPlot
--------------------------------------------------------------------------------
/docs/Functions/pl/stacked_barplot.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.stacked_barplot
--------------------------------------------------------------------------------
/docs/Functions/pl/umap.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.umap
--------------------------------------------------------------------------------
/docs/Functions/pl/voronoi.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.plotting.voronoi
--------------------------------------------------------------------------------
/docs/Functions/pp/combat.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.preprocessing.combat
--------------------------------------------------------------------------------
/docs/Functions/pp/log1p.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.preprocessing.log1p
--------------------------------------------------------------------------------
/docs/Functions/pp/mcmicro_to_scimap.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.preprocessing.mcmicro_to_scimap
--------------------------------------------------------------------------------
/docs/Functions/pp/rescale.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.preprocessing.rescale
--------------------------------------------------------------------------------
/docs/Functions/tl/.Rhistory:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/Functions/tl/.Rhistory
--------------------------------------------------------------------------------
/docs/Functions/tl/cluster.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.cluster
--------------------------------------------------------------------------------
/docs/Functions/tl/foldchange.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.foldchange
--------------------------------------------------------------------------------
/docs/Functions/tl/phenotype_cells.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.phenotype_cells
--------------------------------------------------------------------------------
/docs/Functions/tl/spatial_aggregate.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.spatial_aggregate
--------------------------------------------------------------------------------
/docs/Functions/tl/spatial_cluster.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.spatial_cluster
--------------------------------------------------------------------------------
/docs/Functions/tl/spatial_count.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.spatial_count
--------------------------------------------------------------------------------
/docs/Functions/tl/spatial_distance.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.spatial_distance
--------------------------------------------------------------------------------
/docs/Functions/tl/spatial_expression.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.spatial_expression
--------------------------------------------------------------------------------
/docs/Functions/tl/spatial_interaction.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.spatial_interaction
--------------------------------------------------------------------------------
/docs/Functions/tl/spatial_lda.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.spatial_lda
--------------------------------------------------------------------------------
/docs/Functions/tl/spatial_pscore.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.spatial_pscore
--------------------------------------------------------------------------------
/docs/Functions/tl/spatial_similarity_search.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.spatial_similarity_search
--------------------------------------------------------------------------------
/docs/Functions/tl/umap.md:
--------------------------------------------------------------------------------
1 | ---
2 | hide:
3 | - toc # Hide table of contents
4 | ---
5 | ::: scimap.tools.umap
--------------------------------------------------------------------------------
/docs/assets/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/assets/favicon.png
--------------------------------------------------------------------------------
/docs/assets/scimap_logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/assets/scimap_logo.jpg
--------------------------------------------------------------------------------
/docs/assets/scimap_logo_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/assets/scimap_logo_b.png
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: SCIMAP
3 | description: Spatial Single-Cell Analysis Toolkit
4 | hide:
5 | - toc # Hide table of contents
6 | - navigation
7 | ---
8 |
9 | # Home
10 |
11 | [](https://github.com/labsyspharm/scimap/actions/workflows/build-unix-mac-win.yml)
12 | [](https://github.com/labsyspharm/scimap/actions/workflows/docs.yml)
13 | [](https://pepy.tech/project/scimap)
14 | [](https://pypi.org/project/scimap)
15 | [](https://pypi.org/project/scimap)
16 | [](https://doi.org/10.21105/joss.06604)
17 |
18 |
19 |
20 |
21 |
22 | *Scimap* is a scalable toolkit for analyzing spatial molecular data. The underlying framework is generalizable to spatial datasets mapped to XY coordinates. The package uses the [anndata](https://anndata.readthedocs.io/en/stable/anndata.AnnData.html) framework making it easy to integrate with other popular single-cell analysis toolkits. It includes preprocessing, phenotyping, visualization, clustering, spatial analysis and differential spatial testing. The Python-based implementation efficiently deals with large datasets of millions of cells.
23 |
24 | *Scimap* operates on segmented single-cell data derived from imaging data using tools such as cellpose or MCMICRO. The essential inputs for SCIMAP are: (a) a single-cell expression matrix and (b) the X and Y coordinates for each cell. Additionally, multi-stack OME-TIFF or TIFF images can be optionally provided to enable visualization of the data analysis on the original raw images.
25 |
26 |
27 | *Scimap* development was led by [Ajit Johnson Nirmal](https://ajitjohnson.com/), Harvard Medical School.
28 | Check out other tools from the [Nirmal Lab](https://nirmallab.com/tools/).
29 |
30 | ### Citing scimap
31 | Nirmal et al., (2024). SCIMAP: A Python Toolkit for Integrated Spatial Analysis of Multiplexed Imaging Data. *Journal of Open Source Software*, 9(97), 6604, [https://doi.org/10.21105/joss.06604](https://joss.theoj.org/papers/10.21105/joss.06604#)
32 |
33 |
34 | ### Funding
35 | This work was supported by the following NIH grant K99-CA256497
36 |
37 |
38 |
--------------------------------------------------------------------------------
/docs/stylesheets/.Rhistory:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/.Rhistory
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Black.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Black.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Black.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Black.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Black.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Black.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Black.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-BlackOblique.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-BlackOblique.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-BlackOblique.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-BlackOblique.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-BlackOblique.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-BlackOblique.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-BlackOblique.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-BlackOblique.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Book.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Book.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Book.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Book.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Book.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Book.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Book.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Book.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-BookOblique.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-BookOblique.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-BookOblique.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-BookOblique.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-BookOblique.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-BookOblique.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-BookOblique.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-BookOblique.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Heavy.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Heavy.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Heavy.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Heavy.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Heavy.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Heavy.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Heavy.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Heavy.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-HeavyOblique.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-HeavyOblique.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-HeavyOblique.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-HeavyOblique.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-HeavyOblique.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-HeavyOblique.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-HeavyOblique.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-HeavyOblique.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Light.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Light.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Light.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Light.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Light.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-LightOblique.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-LightOblique.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-LightOblique.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-LightOblique.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-LightOblique.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-LightOblique.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-LightOblique.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-LightOblique.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Medium.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Medium.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Medium.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Medium.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Medium.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-MediumOblique.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-MediumOblique.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-MediumOblique.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-MediumOblique.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-MediumOblique.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-MediumOblique.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-MediumOblique.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-MediumOblique.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Oblique.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Oblique.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Oblique.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Oblique.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Oblique.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Oblique.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Oblique.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Oblique.woff2
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Roman.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Roman.eot
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Roman.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Roman.ttf
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Roman.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Roman.woff
--------------------------------------------------------------------------------
/docs/stylesheets/font/Avenir-Roman.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/stylesheets/font/Avenir-Roman.woff2
--------------------------------------------------------------------------------
/docs/tutorials/Releases/CHANGELOG.md:
--------------------------------------------------------------------------------
1 |
2 | # 1.3.14 (2024-03-20)
3 |
4 | - Added tutorials
5 |
6 | # 0.21.0 (2022-05-29)
7 |
8 | - Added `sm.hl.animate` and `sm.pl.umap`
9 |
10 | # 0.20.16 (2022-05-28)
11 |
12 | - Added `sm.tl.umap` and `sm.tl.spatial_similarity_search`
13 |
14 | # 0.19.0 (2022-04-03)
15 |
16 | - Included support for `Apple M1` machines
17 | - Included support for native rendering of Zarr stored images using Napari: `pl.image_viewer` and `pl.gate_finder`
18 |
19 | # 0.14.0 (2021-04-10)
20 |
21 | - Included `sm.tl.foldchange` function. Also calculated p-val by Fisher exact test
22 |
23 | # 0.12.0 (2021-02-12)
24 |
25 | - Included `sm.pl.voronoi` function. Now possible to draw voronoi diagram of the images using X/Y coordinates
26 |
27 | # 0.11.0 (2021-01-30)
28 |
29 | - Included `spatial_pscore` function
30 |
31 | # 0.10.0 (2020-11-27)
32 |
33 | - Included `stacked_barplot` function to generate a stacked barplot from any two cloumns
34 |
35 | # 0.9.0 (2020-11-21)
36 |
37 | - Updated `pl.image_viewer` and `pl.gate_finder` functions -
38 | Implemeted Zarr functionality for napari viz.
39 |
40 | # 0.8.7 (2020-11-18)
41 |
42 | - Updated `pl.spatial_interaction` function to include two additional parameters -
43 | `subset_phenotype` and `subset_neighbour_phenotype`.
44 |
45 | # 0.8.3 (2020-11-16)
46 |
47 | - Added `hl.add_roi` function. Used to incorporate ROI's extracted from Omero into the scimap object.
48 |
49 |
50 | # 0.8.0 (2020-11-09)
51 |
52 | - Updated `pp.mcmicro_to_scimap` function. Added a new parameter `unique_CellId`
53 | - Added a helper function `scimap_to_csv` to save the andata object as a CSV.
54 | - Added documentation and tests for `scimap_to_csv`
55 |
56 | # 0.7.10 (2020-10-30)
57 |
58 | - Updated `pp.rescale` function. If a gate is included in the `manual_gate.csv`
59 | file but no gate value is provided, the algorithm simply scales the data between
60 | 0-1 without changing the undelying structure.
61 |
62 | # 0.7.6 (2020-10-27)
63 |
64 | - Updated `hl.spatial_distance` to include option to convert to
65 | log scale and also pass multiple `distance_to` parameter.
66 |
67 | # 0.7.5 (2020-10-27)
68 |
69 | - Updated `hl.classify` to improve speed
70 |
71 | # 0.7.3 (2020-10-27)
72 |
73 | - Addition of binary view in `pl.spatial_interaction`
74 |
75 |
76 | # 0.7.2 (2020-10-26)
77 |
78 | - Addition of `hl.classify` function.
79 | - Documentation for `hl.classify` function.
80 | - Readme file modification
81 |
--------------------------------------------------------------------------------
/docs/tutorials/Releases/license.md:
--------------------------------------------------------------------------------
1 | **The MIT License (MIT)**
2 |
3 | Copyright © 2020, Ajit Johnson Nirmal
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/docs/tutorials/archive/3-Cell_Type_calling_and_adding_ROIs_files/3-Cell_Type_calling_and_adding_ROIs_23_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/3-Cell_Type_calling_and_adding_ROIs_files/3-Cell_Type_calling_and_adding_ROIs_23_2.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/3-Cell_Type_calling_and_adding_ROIs_files/3-Cell_Type_calling_and_adding_ROIs_25_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/3-Cell_Type_calling_and_adding_ROIs_files/3-Cell_Type_calling_and_adding_ROIs_25_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/3-Cell_Type_calling_and_adding_ROIs_files/3-Cell_Type_calling_and_adding_ROIs_27_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/3-Cell_Type_calling_and_adding_ROIs_files/3-Cell_Type_calling_and_adding_ROIs_27_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/3-Cell_Type_calling_and_adding_ROIs_files/3-Cell_Type_calling_and_adding_ROIs_35_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/3-Cell_Type_calling_and_adding_ROIs_files/3-Cell_Type_calling_and_adding_ROIs_35_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_10_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_10_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_16_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_16_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_17_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_17_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_7_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_7_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_8_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/4-CellType_Proportion_Exploration_files/4-CellType_Proportion_Exploration_8_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_10_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_10_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_11_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_11_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_12_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_12_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_13_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_13_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_14_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_14_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_15_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_15_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_16_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_16_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_17_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_17_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_23_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_23_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_24_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_24_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_26_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_26_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_27_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_27_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_32_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_32_1.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_33_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_33_1.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_34_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/5-Simple_Spatial_Analysis_files/5-Simple_Spatial_Analysis_34_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/6_animate_with_scimap_files/6_animate_with_scimap_18_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/6_animate_with_scimap_files/6_animate_with_scimap_18_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/6_animate_with_scimap_files/6_animate_with_scimap_20_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/6_animate_with_scimap_files/6_animate_with_scimap_20_1.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/6_animate_with_scimap_files/6_animate_with_scimap_22_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/6_animate_with_scimap_files/6_animate_with_scimap_22_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/6_animate_with_scimap_files/6_animate_with_scimap_24_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/6_animate_with_scimap_files/6_animate_with_scimap_24_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_13_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_13_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_16_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_16_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_18_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_18_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_40_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_40_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_41_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_41_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_42_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_42_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_43_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-cell-phenotyping_files/scimap-tutorial-cell-phenotyping_43_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-getting-started_files/scimap-tutorial-getting-started_26_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-getting-started_files/scimap-tutorial-getting-started_26_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-getting-started_files/scimap-tutorial-getting-started_27_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-getting-started_files/scimap-tutorial-getting-started_27_0.png
--------------------------------------------------------------------------------
/docs/tutorials/archive/scimap-tutorial-getting-started_files/scimap-tutorial-getting-started_28_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/archive/scimap-tutorial-getting-started_files/scimap-tutorial-getting-started_28_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/add_rois_scimap.md:
--------------------------------------------------------------------------------
1 | # 🙌 Add Region of Interest (ROIs) for Comparitive Analysis
2 |
3 | Frequently, adding Regions of Interest (ROIs) to an image is crucial for conducting comparative analysis, such as identifying distinct histological sites, tumor regions, or boundaries. To incorporate ROIs into scimap, there are two approaches:
4 |
5 | 1. Directly drawing on the image using napari.
6 | 2. For images stored on OMERO, ROIs can be added, exported, and then imported into scimap.
7 |
8 |
9 | ```python
10 | # import packages
11 | import scimap as sm
12 | import anndata as ad
13 | ```
14 |
15 | Running SCIMAP 1.3.14
16 |
17 |
18 |
19 | ```python
20 | # Load the data that we saved in the last tutorial (cell phenotyping)
21 | adata = ad.read_h5ad('/Users/aj/Dropbox (Partners HealthCare)/nirmal lab/resources/exemplarData/scimapExampleData/scimapExampleData.h5ad')
22 | ```
23 |
24 | ### 1. Add ROIs via Napari
25 |
26 | When you open napari, a new layer named "ROI" is automatically added by default. To create Regions of Interest, select the "Add Polygons" tool and draw your desired ROIs, which can include multiple polygons. You also have the option to rename this layer to something more specific, such as "Tumor Regions." For different classes of ROIs, like stromal regions, simply create a new layer and repeat the process.
27 |
28 | **It's important to note that ROIs should not overlap, since each cell can only be assigned to one unique ROI.**
29 |
30 | To save the ROIs, simply close the napari window.
31 |
32 |
33 | ```python
34 | %gui qt
35 | image_path = '/Users/aj/Dropbox (Partners HealthCare)/nirmal lab/resources/exemplarData/scimapExampleData/registration/exemplar-001.ome.tif'
36 | ```
37 |
38 |
39 | ```python
40 | adata = sm.pl.addROI_image(image_path, adata)
41 | ```
42 |
43 |
44 | Opening Napari;
45 | Add shape layers (on left) to draw ROI's.
46 | Rename the shape layer to give a name to your ROI
47 | Multiple shape layers are supported
48 | ROI's should not overlap
49 | Close Napari to save ROI's.
50 |
51 | Identifying cells within selected ROI's
52 | ROIs saved under adata.obs['ROI']
53 |
54 |
55 |
56 | ```python
57 |
58 | ```
59 |
60 | I've created three layers, "ROI1", "ROI2" and "ROI3" with each layer containing several designated areas.
61 |
62 |
63 | ```python
64 | # print the number of cells within the assigned ROIs
65 | adata.obs['ROI'].value_counts()
66 | ```
67 |
68 |
69 |
70 |
71 | ROI
72 | Other 9132
73 | ROI3 1513
74 | ROI2 497
75 | ROI1 59
76 | Name: count, dtype: int64
77 |
78 |
79 |
80 |
81 | ```python
82 | # check the added ROIs
83 | sm.pl.spatial_scatterPlot (adata, colorBy = ['ROI'],figsize=(3,3), s=0.7, fontsize=5, catCmap='Set1')
84 | ```
85 |
86 |
87 |
88 | 
89 |
90 |
91 |
92 |
93 | ```python
94 | # We can now do any downstream analysis for example let's look at the distribution of cell types within these ROIs
95 | sm.pl.stacked_barplot (adata, x_axis='ROI', y_axis='phenotype')
96 | ```
97 |
98 |
99 |
100 | 
101 |
102 |
103 |
104 |
105 | ```python
106 | # or look at the correaltion of cell types between ROIs
107 | sm.pl.groupCorrelation(adata, groupBy='phenotype', condition='ROI', figsize=(6,4))
108 | ```
109 |
110 | /Users/aj/miniconda3/envs/scimap/lib/python3.10/site-packages/scimap/plotting/groupCorrelation.py:127: FutureWarning:
111 |
112 | The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.
113 |
114 |
115 |
116 |
117 |
118 | 
119 |
120 |
121 |
122 |
123 | ```python
124 |
125 | ```
126 |
127 | ### 2. Add ROIs via Omero
128 |
129 | `sm.hl.add_roi_omero` function seamlessly integrates Regions of Interest ( ROIs) extracted from Omero into AnnData object.
130 |
131 | The function allows users to add annotations that have been extracted from Omero using the following **[script](https://gist.github.com/Yu-AnChen/58754f960ccd540e307ed991bc6901b0)**
132 |
133 | The script will download a CSV file. The same conditions apply as before. No ROI should overlap.
134 |
135 | ```python
136 | roi_df = pd.read_csv('path/to/roi.csv')
137 |
138 | # Add ROIs to a single image dataset
139 | adata = sm.hl.addROI_omero(adata, roi=roi_df, label='Omero_ROI')
140 | ```
141 |
142 |
143 | ```python
144 |
145 | ```
146 |
147 | ### Save Results
148 |
149 |
150 | ```python
151 | # Save the results
152 | adata.write('/Users/aj/Dropbox (Partners HealthCare)/nirmal lab/resources/exemplarData/scimapExampleData/scimapExampleData.h5ad')
153 | ```
154 |
155 |
156 | ```python
157 |
158 | ```
159 |
--------------------------------------------------------------------------------
/docs/tutorials/md/add_rois_scimap_files/add_rois_scimap_11_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/add_rois_scimap_files/add_rois_scimap_11_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/add_rois_scimap_files/add_rois_scimap_12_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/add_rois_scimap_files/add_rois_scimap_12_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/add_rois_scimap_files/add_rois_scimap_13_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/add_rois_scimap_files/add_rois_scimap_13_1.png
--------------------------------------------------------------------------------
/docs/tutorials/md/animate_scimap_files/animate_scimap_11_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/animate_scimap_files/animate_scimap_11_1.png
--------------------------------------------------------------------------------
/docs/tutorials/md/animate_scimap_files/animate_scimap_13_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/animate_scimap_files/animate_scimap_13_2.png
--------------------------------------------------------------------------------
/docs/tutorials/md/animate_scimap_files/animate_scimap_17_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/animate_scimap_files/animate_scimap_17_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/animate_scimap_files/animate_scimap_19_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/animate_scimap_files/animate_scimap_19_1.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_11_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_11_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_13_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_13_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_17_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_17_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_19_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_19_1.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_7_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_interaction_scimap_files/cell_interaction_scimap_7_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_10_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_10_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_13_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_13_1.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_15_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_15_1.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_17_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_17_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_19_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_19_1.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_4_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_4_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_5_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_5_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_9_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/cell_proportion_scimap_files/cell_proportion_scimap_9_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/clustering_scimap.md:
--------------------------------------------------------------------------------
1 | # 🤹🏼♂️ Cell phenotyping by unsupervised clustering of the single cell data
2 |
3 |
4 | ```python
5 | # import packages
6 | import scimap as sm
7 | import anndata as ad
8 | ```
9 |
10 | Running SCIMAP 1.3.12
11 |
12 |
13 |
14 | ```python
15 | # Load the data that we saved in the last tutorial - (Prepare data for SCIMAP)
16 | adata = ad.read_h5ad('/Users/aj/Dropbox (Partners HealthCare)/nirmal lab/resources/exemplarData/scimapExampleData/scimapExampleData.h5ad')
17 | ```
18 |
19 | `sm.tl.cluster` function can be used for clustering cells within the dataset. It supports three popular clustering algorithms:
20 |
21 | - kmeans
22 | - phenograph
23 | - leiden
24 |
25 | Users are encouraged to select the clustering algorithm that best matches their data's nature and their analytical goals.
26 |
27 |
28 | ```python
29 | adata = sm.tl.cluster(adata, method='leiden', resolution=0.3, use_raw=False, log=False)
30 | ```
31 |
32 | Leiden clustering
33 |
34 |
35 | /Users/aj/miniconda3/envs/scimap/lib/python3.10/site-packages/scanpy/preprocessing/_pca.py:229: ImplicitModificationWarning:
36 |
37 | Setting element `.obsm['X_pca']` of view, initializing view as actual.
38 |
39 |
40 |
41 |
42 | ```python
43 | # view the results
44 | adata.obs['leiden'].value_counts()
45 | ```
46 |
47 |
48 |
49 |
50 | leiden
51 | 0 3895
52 | 1 2661
53 | 2 1563
54 | 3 1223
55 | 4 820
56 | 5 496
57 | 6 462
58 | 7 81
59 | Name: count, dtype: int64
60 |
61 |
62 |
63 |
64 | ```python
65 |
66 | ```
67 |
68 | Now, let us construct a heatmap to examine the expression levels of specific markers across each identified cluster.
69 |
70 |
71 | ```python
72 | sm.pl.heatmap(adata, groupBy='leiden', standardScale='column', figsize=(5,4), showPrevalence=True)
73 | ```
74 |
75 | /Users/aj/miniconda3/envs/scimap/lib/python3.10/site-packages/scimap/plotting/heatmap.py:312: UserWarning:
76 |
77 | This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
78 |
79 |
80 |
81 |
82 |
83 | 
84 |
85 |
86 |
87 |
88 | ```python
89 |
90 | ```
91 |
92 | Based on the expression profile of markers, we shall assign a cell type to each cluster. Utilize the `rename` function for this purpose.
93 |
94 |
95 | ```python
96 | rename_dict = {'Tumor': ['5','1'],
97 | 'Myeloid': ['2'],
98 | 'Treg': ['6'],
99 | 'Vessels': ['4'],
100 | 'Artifacts': ['7'],
101 | 'Immune': ['3','0']}
102 |
103 | adata = sm.hl.rename(adata, rename=rename_dict, from_column='leiden', to_column='leiden_phenotype')
104 | ```
105 |
106 | Renaming 5 to Tumor
107 | Renaming 1 to Tumor
108 | Renaming 2 to Myeloid
109 | Renaming 6 to Treg
110 | Renaming 4 to Vessels
111 | Renaming 7 to Artifacts
112 | Renaming 3 to Immune
113 | Renaming 0 to Immune
114 |
115 |
116 |
117 | ```python
118 | # now rebuild the heatmap to verify the expression pattern of markers within each cell type
119 | sm.pl.heatmap(adata, groupBy='leiden_phenotype', standardScale='column', figsize=(5,4), showPrevalence=True)
120 | ```
121 |
122 | /Users/aj/miniconda3/envs/scimap/lib/python3.10/site-packages/scimap/plotting/heatmap.py:312: UserWarning:
123 |
124 | This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
125 |
126 |
127 |
128 |
129 |
130 | 
131 |
132 |
133 |
134 |
135 | ```python
136 |
137 | ```
138 |
139 | I often overlay the defined cell types on a spatial scatterplot too, just to see if they match up with the tissue's histology.
140 |
141 |
142 | ```python
143 | sm.pl.spatial_scatterPlot (adata, colorBy = ['leiden_phenotype'],figsize=(3,3), s=0.7, fontsize=5, catCmap='Set1')
144 | ```
145 |
146 |
147 |
148 | 
149 |
150 |
151 |
152 |
153 | ```python
154 | %gui qt
155 | ```
156 |
157 | While useful, to ensure accurate cell type assignment, you'd want to overlay the cell types on the actual image. By examining marker combinations, confirm the assignments are correct. If not, adjust the clustering parameters and refine the cell types.
158 |
159 |
160 | ```python
161 | # pass in the path to the image
162 | image_path = '/Users/aj/Dropbox (Partners HealthCare)/nirmal lab/resources/exemplarData/scimapExampleData/registration/exemplar-001.ome.tif'
163 |
164 | # view in napari
165 | sm.pl.image_viewer(image_path=image_path,
166 | adata=adata,
167 | overlay='leiden_phenotype',
168 | point_size=10,
169 | point_color='white')
170 |
171 | # Note that if your AnnotatedData object (adata) includes multiple images,
172 | # you can use the `subset` parameter to specify the image name found in the `imageid` column,
173 | # enabling the loading of just that particular image.
174 | ```
175 |
176 | ### Save Results
177 |
178 |
179 | ```python
180 | # Save the results
181 | adata.write('/Users/aj/Dropbox (Partners HealthCare)/nirmal lab/resources/exemplarData/scimapExampleData/scimapExampleData.h5ad')
182 | ```
183 |
184 |
185 | ```python
186 |
187 | ```
188 |
--------------------------------------------------------------------------------
/docs/tutorials/md/clustering_scimap_files/clustering_scimap_12_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/clustering_scimap_files/clustering_scimap_12_1.png
--------------------------------------------------------------------------------
/docs/tutorials/md/clustering_scimap_files/clustering_scimap_15_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/clustering_scimap_files/clustering_scimap_15_0.png
--------------------------------------------------------------------------------
/docs/tutorials/md/clustering_scimap_files/clustering_scimap_8_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/labsyspharm/scimap/4b7e1bcd1b46744235b2ffb8016b964b2a7675ca/docs/tutorials/md/clustering_scimap_files/clustering_scimap_8_1.png
--------------------------------------------------------------------------------
/docs/tutorials/md/demo_data_scimap.md:
--------------------------------------------------------------------------------
1 | # 📥 SCIMAP Demo Data
2 |
3 | A short guide to downloading our demo data for trying out the **scimap toolbox**.
4 |
5 | **You can download the data in two methods:**
6 |
7 | 1. Utilize the built-in download function of scimap.
8 | 2. Visit the website through your browser and manually download the data.
9 |
10 | ### 1. Built in function
11 |
12 |
13 | ```python
14 | import scimap as sm
15 | ```
16 |
17 | Running SCIMAP 1.3.16
18 |
19 |
20 |
21 | ```python
22 | # Provide a download directory
23 | download_directory = '/Users/aj/Downloads'
24 | sm.hl.downloadDemoData (download_directory)
25 | ```
26 |
27 | Downloading scimapExampleData.zip...
28 |
29 |
30 | scimapExampleData.zip: 100%|███████████████████████████████████████████████████████████| 287M/287M [04:35<00:00, 1.09MiB/s]
31 |
32 | Downloaded scimapExampleData.zip to /Users/aj/Downloads/scimapExampleData.zip
33 |
34 |
35 |
36 |
37 |
38 | A zipped data folder will appear in the specified directory. Simply unzip it, and you'll be all set to start.
39 |
40 | ### 2. Download from Zonodo
41 |
42 | - Go to [Zonodo](https://zenodo.org/records/10845625)
43 | - Click on the download button
44 | - unzip the downloaded file
45 |
46 | DOI: [10.5281/zenodo.10845624](https://zenodo.org/records/10845625)
47 |
48 | If you have any questions or encounter any issues while following the tutorial, please don't hesitate to contact us for assistance.
49 |
--------------------------------------------------------------------------------
/docs/tutorials/md/export_scimap.md:
--------------------------------------------------------------------------------
1 | # ⬇️ Export data from SCIMAP into csv
2 |
3 | After completing some analysis and when you're ready to export the data, you can utilize the specified function for this purpose. However, it's important to note that if you plan to return and continue your analysis later, you should rely on the `.h5ad` file you've saved. While exporting to a CSV file can be handy, only a subset of the data—specifically, what's contained in `adata.obs` and `adata.X`—is exported. Be aware that all other compartments of the data are not preserved during the CSV export process.
4 |
5 |
6 | ```python
7 | # import packages
8 | import scimap as sm
9 | import anndata as ad
10 | ```
11 |
12 | Running SCIMAP 1.3.14
13 |
14 |
15 |
16 | ```python
17 | # Load the data that we saved in the last tutorial (with ROIs added)
18 | adata = ad.read_h5ad('/Users/aj/Dropbox (Partners HealthCare)/nirmal lab/resources/exemplarData/scimapExampleData/scimapExampleData.h5ad')
19 | ```
20 |
21 |
22 | ```python
23 | # by default the raw data is exported
24 | output_dir= '/Users/aj/Dropbox (Partners HealthCare)/nirmal lab/resources/exemplarData/scimapExampleData'
25 | sm.hl.scimap_to_csv(adata, output_dir=output_dir, file_name='scimapProcessed.csv')
26 | ```
27 |
28 | Refer to the documentation to learn how to export additional layers beyond just the raw data.
29 |
30 |
31 | ```python
32 |
33 | ```
34 |
--------------------------------------------------------------------------------
/docs/tutorials/md/install_scimap.md:
--------------------------------------------------------------------------------
1 | # 📁 Setting up SCIMAP
2 |
3 | Before we set up *SCIMAP*, we highly recommend using an environment manager like Conda. Using an environment manager like Conda allows you to create and manage isolated environments with specific package versions and dependencies.
4 |
5 | Download and Install the right [conda](https://docs.anaconda.com/free/miniconda/) based on the opertating system that you are using
6 |
7 |