Skip to content

A Julia package for single cell and spatial data analysis

License

Notifications You must be signed in to change notification settings

HaojiaWu/CellScopes.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CellScopes.jl


Important

Please install the development version if you are using Julia v1.10.4

CellScopes.jl is a toolkit built using the Julia programming language, designed for the analysis of single cell and spatial transcriptomic data. It offers a range of functionalities including data normalization, dimensional reduction, cell clustering and visualization, all tailored to various types of data generated by scRNA-seq, scATAC-seq, Visium, Xenium, Slide-seq, MERFISH, seqFISH, STARmap and Cartana. The current version of CellScopes.jl is structured as follows:


1. Installation

Note

We are currently working on making CellScopes.jl compartible with Julia v1.10.4. Please install the dev branch if you want to test it on your server: https://github.com/HaojiaWu/CellScopes.jl/tree/dev

1.1. Julia

1.1.1. Install Julia 1.7.3

To install CellScopes.jl, you will need to have Julia 1.6 or higher installed. It is recommended to use Julia 1.7.3 or higher to avoid issues with dependencies. Here we will show how to install Julia in the Linux system.

Assume you have access to the directory /home/users/doe. Here is how to install Julia 1.7.3.

cd /home/users/doe/
wget https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.3-linux-x86_64.tar.gz
tar xvf julia-1.7.3-linux-x86_64.tar.gz

Then add Julia to PATH. Assume you have a ~/.bashrc file, then append the following code to the end of the ~/.bashrc file.

export PATH=/home/users/doe/julia-1.7.3/bin:$PATH

To implement your changes, either open a new login session or reload the .bashrc via

source ~/.bashrc

Note: If your operating system is Ubuntu 24.04, we recommend installing CellScopes with Julia 1.8.4. Earlier versions of Julia may not detect the 'libR.so' file when installing the RCall dependency.

1.1.2. Install CellScopes and dependencies

To install all of the necessary dependencies, run the following command line in Julia. Note that this will not install the unregisterd package Leiden.jl, which you may need to install manually from the GitHub repository first.

using Pkg;
Pkg.add(url="https://github.com/bicycle1885/Leiden.jl") # Install the unregistered dependency Leiden.jl
Pkg.add(url="https://github.com/TheHumphreysLab/CellScopes.jl") # Install CellScopes.jl

1.2. Docker

Alternatively, you can use Docker. It contains executable cellscopes to run CellScopes from CLI, as well as IJulia installation to use CellScopes with Jupyter. The repo will be updated if newer versions are ready.

docker pull thehumphreyslab/cellscopes
docker run -it --rm thehumphreyslab/cellscopes

The container's Port ID for cellscopes is 5237. A tutorial for connecting to Docker Jupyter Notebook on the remote server from a local terminal can be found here.

2. Tutorials

CellScopes supports analysis for single-cell RNA sequencing (scRNA-seq), single-cell ATAC-seq (scATAC-seq), Visium, Slide-seq, Cartana, MERFISH, seqFISH, STARmap and Xenium datasets. For more information, please refer to the tutorials provided below.
a. dRNA HybISS by Cartana: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/cartana_tutorial
b. scRNA-seq: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/scRNA_tutorial
c. scATAC-seq: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/scATAC_tutorial
d. 10x Visium: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/visium_tutorial
e. 10x Xenium: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/xenium_tutorial
f. MERFISH: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/MERFISH_tutorial
g. Slide-seq: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/SlideSeq_tutorial
h. seqFISH: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/seqfish_tutorial
i. STARmap: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/starmap_tutorial
j. Visium HD: https://github.com/HaojiaWu/CellScopes.jl/blob/main/docs/VisiumHD_tutorial

In addition to these standalone CellScopes analyses, we also provide tutorials how CellScopes can interact with other popular tools such as Seurat, Scanpy and tools for gene imputation and spot deconvolution.
k. Conversion of Scanpy AnnData to CellScopes Objects: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/scanpy_conversion
l. Conversion of Seurat Objects to CellScopes Objects: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/seurat_conversion
m. Gene imputation using SpaGE, tangram and gimVI: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/gene_imputation

Finally, we also provide tutorials for incorporating high-resolution H&E and nuclei staining images for Visium and Xenium data visualization.
n. Visium data visualization with a high-resolution H&E image: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/Visium_more_viz
o. Xenium data visualization with a high-resolution H&E/DAPI image: https://github.com/HaojiaWu/CellScopes.jl/tree/main/docs/Xenium_more_viz

3. Citation

If the tool is helpful to your study, please consider citing our paper:
https://www.nature.com/articles/s41467-024-45752-8
Nature Communications. 2024 Feb 15;15(1):1396.
Wu H, Dixon EE, Xuanyuan Q, Guo J, Yoshimura Y, Debashish C, Niesnerova A, Xu H, Rouault M, Humphreys BD.
High resolution spatial profiling of kidney injury and repair using RNA hybridization-based in situ sequencing.

4. Contact

For more information, please contact The Humphreys Lab or follow our Twitter account @HumphreysLab