02/12/2024
For the code and demo data, please find the detials https://drive.google.com/drive/folders/1x8Ym5IOerBxhVefHORomx3pDuZUzNrf4?usp=sharing.
Copy the files to your own directory should work more smoothly because it might not involve the write permission to my Google Drive folder.
AtlasXomics Browser https://docs.atlasxomics.com/projects/AtlasXbrowser/en/latest/Overview.html
Credit to Dr. Yanxiang Deng: Jupyter notebook code https://github.com/dyxmvp/Spatial_ATAC-seq
Step-by-step instructions and demo files under 'Spatial_folder_generation' folder
- Overlay chip A and chip B scan in Adobe Illustrator and find the ROI;
- Draw any shape on each pixel and make sure not changing any property when dupicate it;
- Select the spots on tissue and change only one property of the object;
- Save the file at .svg file and make sure only spots info is kept.
- Save the ROI crop as tissue_lowres_image.png
- Run the jupyter notebook code to generate the spatial folder compatible with seurat and scanpy, etc
Credit to Dr. Mingyu Yang, https://github.com/MingyuYang-Yale/BENG469/tree/main/FA23/Lab7-Spatial%20transcriptomics/2023-11-02
Install Stpipeline and pre-process the data
module load miniconda
conda create -y -n st-pipeline python=3.7 Numpy Cython
conda activate st-pipeline
conda install -y -c bioconda star samtools
pip install 'pysam==0.15.4' taggd stpipeline
Test whether ST pipeline is installed successfully
st_pipeline_run.py -h
Please refer to https://github.com/Shuozhen/DBiT-Notes/blob/main/README.md for details.
sbatch stpipeline.sh
We can use Seurat, Scanpy, Squidpy, spatialDE, SpatialGLUE, NICHES, etc. to run the downstream analysis.
Using Cellranger to preprocess the raw data.
Credit to Dr. Di Zhang, Xing Lou
- Snakemake. snakemake is python3
- Biopython.
- Cell Ranger ATAC. v1.2
- BBMap.
- Replace the cellranger-atac-cs/1.2.0/lib/python/barcodes/737K-cratac-v1.txt with the new barcodes file in this fold.
- Configure Snakefile
- Configure cluster.json
- Configure Snakemake.sh
- Reformat raw Fastq file to Cell Ranger ATAC format (10x Genomics) Raw read 1 -> New Read 1 + New Read 2
- New Read 1: contains the genome sequences
- New Read 2: contains the spatial Barcode A and Barcode B Raw read 2 -> New Read 3
- Reformatting raw data was implemented by BC_process.py in the Data_preprocessing folder.
Sequence alignment and generation of fragments file
The reformated data was processed using Cell Ranger ATAC v1.2 with following references:
Mouse reference (mm10):
curl -O https://cf.10xgenomics.com/supp/cell-atac/refdata-cellranger-atac-mm10-1.2.0.tar.gz
Human reference (GRCh38):
curl -O https://cf.10xgenomics.com/supp/cell-atac/refdata-cellranger-atac-GRCh38-1.2.0.tar.gz
A preprocessing pipeline we developed using Snakemake workflow management system is in the Data_preprocessing folder. To run the pipeline, use the command:
sbatch Snakemake.sh
We can use ArchR, Signac, Scanpy, Squidpy, SpatialGLUE, etc. to run the downstream analysis.
Credit to Yao Lu
- From the fragments file of ATAC-seq, generate the peak matrix using SnapATAC2
- From the expression matrix of RNA-seq, generate the gene expression matrix using spatialGLUE or scanpy.
- Use spatialGLUE to analyze both modalities together following the script.