sc-3d

Spatial Single Cell transcriptomic library

https://github.com/guignardlab/sc3d

Science Score: 46.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: nature.com
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.1%) to scientific vocabulary
Last synced: 7 months ago · JSON representation

Repository

Spatial Single Cell transcriptomic library

Basic Info
  • Host: GitHub
  • Owner: GuignardLab
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 47.6 MB
Statistics
  • Stars: 18
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 4 years ago · Last pushed 10 months ago
Metadata Files
Readme License Citation

README.md

License MIT PyPI Python Version tests codecov Downloads

sc3D

sc3D is a Python library to handle 3D spatial transcriptomic datasets.

To access the 3D viewer for sc3D datasets, you can go to the following link: GuignardLab/napari-sc3D-viewer

You can find it on the Guignard Lab GitHub page: GuignardLab/sc3D. In there you will be able to find jupyter notebooks giving examples about how to use the datasets.

This code was developed in the context of the following study:

Spatial transcriptomic maps of whole mouse embryos. Abhishek Sampath Kumar, Luyi Tian, Adriano Bolondi et al.

The sc3D code is based on the anndata and Scanpy libraries and allows to read, register arrays and compute 3D differential expression.

The dataset necessary to run the tests and look at the results can be downloaded there for the unregistered dataset (and test the provided algorithms) and there for the already registered atlas to browse with our visualiser. You can find the visualiser there.

Description of the GitHub repository

  • data: a folder containing examples for the tissue color and tissue name files

  • src: a folder containing the source code

  • txt: a folder containing the text describing the method (LaTeX, pdf and docx formats are available)

  • README.md: this file

  • notebooks/Test-embryo.ipynb: Basic read and write examples (many different ways of writing)

  • notebooks/Spatial-differential-expression.ipynb: a jupyter notebook with some examples on how to perform the spatial differential expression

  • notebooks/Embryo-registration.ipynb: a jupyter notebook with an example on how to do the array registration

  • setup.py: Setup file to install the library

Installation

We strongly advise to use virtual environments to install this package. For example using conda or miniconda:

shell conda create -n sc-3D conda activate sc-3D

If necessary, install pip:

shell conda install pip

Then, to install the latest stable version:

shell pip install sc-3D

or to install the latest version from the GitHub repository:

shell git clone https://github.com/GuignardLab/sc3D.git cd sc3D pip install .

Troubleshooting for latest M1 MacOs chips

If working with an M1 chip, it is possible that all the necessary libraries are not yet available from the usual channels.

To overcome this issue we recommand to manually install the latest, GitHub version of sc3D using miniforge instead of anaconda or miniconda.

Once miniforge is installed and working, you can run the following commands:

shell conda create -n sc-3D conda activate sc-3D

to create your environment, then:

shell git clone https://github.com/GuignardLab/sc3D.git cd sc3D conda install pip scipy numpy matplotlib pandas seaborn anndata napari pip install .

If the previous commands are still not working, it is possible that you need to install the pkg-config package. You can find some information on how to do it there: install pkg-config

Basic usage

Once installed, the library can be called the following way:

python from sc3D import Embryo

To import some data:

Note: at the time being, the following conventions are expected:

  • the x-y coordinates are stored in data.obsm['X_spatial']
  • the array number should be stored in data.obs['orig.ident'] in the format ".*_[0-9]*" where the digits after the underscore (_) are the id of the array
  • the tissue type has to be stored in data.obs['predicted.id']
  • the gene names have to be stored as indices or in data.var['feature_name']

Since version 0.1.2, one can specify the name of the columns where the different necessary informations are stored using the following parameters:

  • tissue_id to inform the tissue id column
  • array_id to inform the array/puck/slice id column
  • pos_id to inform the position column (an x, y position is expected within this given column)
  • gene_name_id to inform the gene name column
  • pos_reg_id when to inform the registered position column (an x, y, z position is expected within this given column)

```python

To read the data

embryo = Embryo('path/to/data.h5ad')

To remove potential spatial outliers

embryo.removingspatialoutliers(th=outlier_threshold)

To register the arrays and compute the

spline interpolations

embryo.reconstructintermediate(embryo, thd=thd, genes=genesof_interest)

To save the dataset as a registered dataset (to then look at it in the 3D visualizer)

embryo.save_anndata('path/to/out/registered.h5ad')

To compute the 3D differential expression for selected tissues

tissuestoprocess = [5, 10, 12, 18, 21, 24, 30, 31, 33, 34, 39] thvol = .025 _ = embryo.get3Ddifferentialexpression(tissuestoprocess, th_vol) ```

The dataset used for the project this code is from can be downloaded there (under the name mouse_embryo_E8.5_merged_data)

Many other functions are available that can be found used in the two provided jupyter notebooks.

Running the notebooks

Two example notebooks are provided. To run them one wants to first install the jupyter notebook:

shell conda install jupyter

or

shell pip install jupyter

The notebooks can the be started from a terminal in the folder containing the .ipynb files with the following command:

shell jupyter notebook

The notebooks should be self content.

Note that the test dataset is not included in this repository put can be downloaded from there.

Owner

  • Name: Guignard Lab
  • Login: GuignardLab
  • Kind: organization
  • Email: leo.guignard@univ-amu.fr
  • Location: France

GitHub Events

Total
  • Watch event: 1
  • Push event: 4
Last Year
  • Watch event: 1
  • Push event: 4

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 226
  • Total Committers: 3
  • Avg Commits per committer: 75.333
  • Development Distribution Score (DDS): 0.363
Past Year
  • Commits: 69
  • Committers: 2
  • Avg Commits per committer: 34.5
  • Development Distribution Score (DDS): 0.014
Top Committers
Name Email Commits
leoguignard l****d@g****m 144
Léo Guignard l****d@u****r 73
Leo 3****d@u****m 9
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 minutes
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • leoguignard (3)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 101 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 20
  • Total maintainers: 1
pypi.org: sc-3d

Array alignment and 3D differential expression for 3D sc omics

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 101 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 16.6%
Average: 19.7%
Downloads: 20.4%
Dependent repos count: 21.6%
Forks count: 29.8%
Maintainers (1)
Last synced: 8 months ago
conda-forge.org: sc-3d
  • Versions: 2
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent packages count: 28.8%
Dependent repos count: 34.0%
Average: 46.0%
Stargazers count: 60.1%
Forks count: 61.1%
Last synced: 8 months ago

Dependencies

.github/workflows/test_and_deploy.yml actions
  • GabrielBB/xvfb-action v1 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v2 composite
pyproject.toml pypi