Skip to main content

The SAMap algorithm

Project description

SAMap -- version 2.0.0

Citation

Please cite the following paper if using SAMap: https://elifesciences.org/articles/66747

Tarashansky, Alexander J., et al. "Mapping single-cell atlases throughout Metazoa unravels cell type evolution." Elife 10 (2021): e66747.

Installation

pip

pip install sc-samap

Manual installation

Download Anacodna from here: https://www.anaconda.com/download/

Create and activate a new environment for SAMap as follows:

# Install SAMap dependencies availabe in conda
conda create -n SAMap -c conda-forge python=3.9 numpy=1.23.5 pip pybind11 h5py=3.8.0 leidenalg python-igraph texttable
conda activate SAMap

Having activated the environment, install SAMap like so:

git clone https://github.com/atarashansky/SAMap.git samap_directory
cd samap_directory
pip install .

NCBI BLAST must be installed for the commandline.

# Define NCBI BLAST version.
ncbi_blast_version='2.9.0'

# Download NCBI BLAST tarball.
wget "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${ncbi_blast_version}/ncbi-blast-${ncbi_blast_version}+-x64-linux.tar.gz"

# Extract NCBI BLAST binaries in current conda environment bin directory.
tar -xzvf "ncbi-blast-${ncbi_blast_version}+-x64-linux.tar.gz" \
    -C "${CONDA_PREFIX}/bin/" \
    --strip-components=2 \
    "ncbi-blast-${ncbi_blast_version}+/bin/"

Alternatively, add the NCBI BLAST binaries manually to the path:

# Define NCBI BLAST version.
ncbi_blast_version='2.9.0'

# Download NCBI BLAST tarball.
wget "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${ncbi_blast_version}/ncbi-blast-${ncbi_blast_version}+-x64-linux.tar.gz"

# Extract NCBI BLAST tarball.
tar -xzvf "ncbi-blast-${ncbi_blast_version}+-x64-linux.tar.gz"

# Add NCBI BLAST programs to PATH.
echo "export PATH=\"$PATH:/your/directory/ncbi-blast-${ncbi_blast_version}+/bin\"" >> ~/.bashrc
source ~/.bashrc

Installation time should take no more than 10 minutes.

Running BLAST

The BLAST mapping script can be run from the SAMap_vignette.ipynb Jupyter notebook.

Depending on the number of cores available on your machine and the size/type of the input fasta files, this step may take up to around 4 hours.

Running SAMap

To run SAMap, use the SAMAP function in samap/mapping.py. Please see its function documentation for a description of the inputs and outputs. Take a look at the provided Jupyter notebook to get started (SAMap_vignette.ipynb).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sc_samap-2.0.2.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sc_samap-2.0.2-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file sc_samap-2.0.2.tar.gz.

File metadata

  • Download URL: sc_samap-2.0.2.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for sc_samap-2.0.2.tar.gz
Algorithm Hash digest
SHA256 bc35b9ada5062eedaa54190454ce477564ff8b8ffbc05af08631b655993dceba
MD5 c111483f0eb5d65963edd76d22efd6c5
BLAKE2b-256 9d394e4aaddf0ea2b20c4ae8584c4a9f124e36f44a5b250d56b7899d026a946c

See more details on using hashes here.

File details

Details for the file sc_samap-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: sc_samap-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 41.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for sc_samap-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 95893d2fdbf39f016400ca016639993394a01728fc8253227bc94d6916d2ad1e
MD5 12e2e152d2f5da842c929d0c2706bca1
BLAKE2b-256 69fffc4da076480d82317497042b8dfda216b083bada5964c913afa422a44294

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page