Skip to content
forked from atarashansky/SAMap

SAMap: Mapping single-cell RNA sequencing datasets from evolutionarily distant organisms.

License

Notifications You must be signed in to change notification settings

Bassi-git/SAMap

 
 

Repository files navigation

SAMap -- version 0.1.6

The SAMap algorithm.

Beta

Hello! If any of you have trouble getting SAMap up and running or want to know more about the various arguments, please do not hesitate to reach out to me by submitting an issue!

Citation

Please cite the following paper if using SAMap: https://www.biorxiv.org/content/10.1101/2020.09.28.317784v2

Tarashansky, Alexander Joel, et al. "Mapping single-cell atlases throughout Metazoa unravels cell type evolution." bioRxiv (2020).

Requirements

SAMap was developed and tested in an Anaconda python environment with the following dependencies:

  • sam-algorithm
  • scanpy
  • hnswlib

Installation

Docker - Easiest

Assumes Docker is installed on your computer.

Run bash run_image.sh to run the Docker image. The script will ask you for the container name (e.g. samap), volume mount path (e.g. ~/; this folder should contain your data to be analyzed as it will be mounted onto the Docker image filesystem), and Jupyter server port (e.g. 8888). If this is your first time running the image, it will be downloaded from the Docker repository.

Running the Docker image will spawn a jupyter notebook server on your specified port.

pip

pip install 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.7 pip pybind11 h5py=2.10.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_quickstart.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_quickstart.ipynb).

About

SAMap: Mapping single-cell RNA sequencing datasets from evolutionarily distant organisms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 69.9%
  • Python 28.5%
  • Shell 1.1%
  • Dockerfile 0.5%