安装SpaceRanger
https://support.10xgenomics.com/spatial-gene-expression/software/downloads/latest
代码语言:shell复制cd ~/APP
wget -O spaceranger-2.0.1.tar.gz "https://cf.10xgenomics.com/releases/spatial-exp/spaceranger-2.0.1.tar.gz?Expires=1676232276&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZi4xMHhnZW5vbWljcy5jb20vcmVsZWFzZXMvc3BhdGlhbC1leHAvc3BhY2VyYW5nZXItMi4wLjEudGFyLmd6IiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNjc2MjMyMjc2fX19XX0_&Signature=D6VyUgHG8R0b0pJyGSGmQn2HbRURCTTQxokVTg7ePFFzG55vFKlcc2G2RPWIHa9twQ9x85MJ1SpHcqDzaWpFwja6PanzBNWGJobyS3fAdQcl6AF6OQ3bUXyVzmGPwlq1CyTuX4ptAG4G7l2LS6jetavvK6qFhhWcwWw5tlDCfOV-2klkug2QIN9qd5rVgaZNs6lYx7O1uOhNcyDIxZjn2PXSgatcmmOE7wN2O1hGjtyhq-RWyqPUmVghSGnqIvoKH3loiQTLWUJdrl7m3VCKWlElyIjyNt2jLhZ0AEagmlxTfXL9Q7K0dSBfnnU7lDhaw4a-tavB27SBMl-zKMROwQ__&Key-Pair-Id=APKAI7S6A5RYOXBWRPDA"
tar -xf spaceranger-2.0.1.tar.gz
ln -s ~/APP/spaceranger-2.0.1/bin/spaceranger ~/APP/bin/spaceranger
export PATH=$HOME/APP/bin:$PATH
参考基因组索引
10X提供人和鼠的基因组参考index,其他物种可以是用cellranger自行构建
转录组的索引和普通的scRNA-seq的一样
代码语言:shell复制#>>>down10Xref.sh>>>
# Human reference (GRCh38) md5sum: dfd654de39bff23917471e7fcc7a00cd
wget https://cf.10xgenomics.com/supp/cell-exp/refdata-gex-GRCh38-2020-A.tar.gz
md5sum refdata-gex-GRCh38-2020-A.tar.gz
# Mouse reference md5sum: 886eeddde8731ffb58552d0bb81f533d
wget https://cf.10xgenomics.com/supp/cell-exp/refdata-gex-mm10-2020-A.tar.gz
md5sum refdata-gex-mm10-2020-A.tar.gz
#<<<down10Xref.sh<<<d
nohup zsh down10Xref.sh &> down10Xref.sh.log &
下载原始数据
大部分的文章只提供FASTQ文件,而不提供图片信息,因此使用10X官网的小鼠脑数据集。
不同的组织保存方式(fresh frozen刚冷冻的新鲜组织)和FFPE(石蜡包埋)的数据分析流程不同,H&E图片和荧光图片分析流程不同,因此需要参考10X官网的pipeline.
这里选择的是fresh frozen和HE染色的样本
- 官网介绍
https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/using/choosing-pipelines
https://www.10xgenomics.com/resources/datasets/mouse-brain-serial-section-1-sagittal-anterior-1-standard-1-1-0
https://www.10xgenomics.com/resources/datasets/mouse-brain-serial-section-1-sagittal-posterior-1-standard-1-1-0
- 数据下载
包括tiff图片和fastq文件
代码语言:shell复制curl -O https://s3-us-west-2.amazonaws.com/10x.files/samples/spatial-exp/1.1.0/V1_Mouse_Brain_Sagittal_Anterior/V1_Mouse_Brain_Sagittal_Anterior_fastqs.tar
curl -O https://cf.10xgenomics.com/samples/spatial-exp/1.1.0/V1_Mouse_Brain_Sagittal_Anterior/V1_Mouse_Brain_Sagittal_Anterior_image.tif
curl -O https://s3-us-west-2.amazonaws.com/10x.files/samples/spatial-exp/1.1.0/V1_Mouse_Brain_Sagittal_Posterior/V1_Mouse_Brain_Sagittal_Posterior_fastqs.tar
curl -O https://cf.10xgenomics.com/samples/spatial-exp/1.1.0/V1_Mouse_Brain_Sagittal_Posterior/V1_Mouse_Brain_Sagittal_Posterior_image.tif
- 解压
tar -xf V1_Mouse_Brain_Sagittal_Anterior_fastqs.tar
tar -xf V1_Mouse_Brain_Sagittal_Posterior_fastqs.tar
rm *tar
SpaceRanger count
对两个样本分别运行SpaceRanger count进行定量
参数介绍
- id
输出文件夹名字,两个样本的输出文件分别命名为A和P
- slide
Visium slide serial number. Refer to the Slide Parameters for information on supported slide versions. Required unless --unknown-slide
is passed.
- area
Visium capture area identifier. Required unless --unknown-slide
is passed. Options for Visium are A1, B1, C1, D1.
- loupe-alignment
spaceranger count运行时图片对其有两种方式,一种软件自动识别图片进行对齐,另外一种就是先用Loupe软件手动对齐,生成对于json文件提供给后面的软件并用loupe-alignment参数指定。
测序流程示意图
- Anterior样本定量
#>>>A.sh>>>
human_index_dir=~/DataHub/10X/refdata-gex-GRCh38-2020-A
mouse_index_dir=~/DataHub/10X/refdata-gex-mm10-2020-A
fastqs_dir=~/Project/ST/data/V1_Mouse_Brain_Sagittal_Anterior_Section_1_fastqs
image_path=~/Project/ST/data/V1_Mouse_Brain_Sagittal_Anterior_image.tif
output_dir=~/Project/ST/data
cd ${output_dir}
spaceranger count
--id A
--description Mouse_Brain_Sagittal_Anterior_Section_1
--transcriptome ${mouse_index_dir}
--fastqs ${fastqs_dir}
--image ${image_path}
--slide V19L29-035
--area B1
--localcores 20
--localmem 128
#<<<A.sh<<<
cd ~/Project/ST/data
nohup zsh A.sh &> A.sh.log &
- Posterior样本定量
#>>>P.sh>>>
human_index_dir=~/DataHub/10X/refdata-gex-GRCh38-2020-A
mouse_index_dir=~/DataHub/10X/refdata-gex-mm10-2020-A
fastqs_dir=~/Project/ST/data/V1_Mouse_Brain_Sagittal_Posterior_Section_1_fastqs
image_path=~/Project/ST/data/V1_Mouse_Brain_Sagittal_Posterior_image.tif
output_dir=~/Project/ST/data
cd ${output_dir}
spaceranger count
--id P
--description Mouse_Brain_Sagittal_Posterior_Section_1
--transcriptome ${mouse_index_dir}
--fastqs ${fastqs_dir}
--image ${image_path}
--slide V19L29-035
--area A1
--localcores 20
--localmem 128
#<<<P.sh<<<
cd ~/Project/ST/data
nohup zsh P.sh &> P.sh.log &
输出文件
部分关键输出结果
代码语言:text复制├── filtered_feature_bc_matrix.h5
├── spatial
│ ├── aligned_fiducials.jpg
│ ├── detected_tissue_image.jpg
│ ├── scalefactors_json.json
│ ├── spatial_enrichment.csv
│ ├── tissue_hires_image.png
│ ├── tissue_lowres_image.png
│ ├── tissue_positions.csv
└── web_summary.html
outs文件夹下需要查看的文件
- web_summary.html:这个是必须要看的,粗略浏览本次10x样本走SpaceRanger count流程的运行质量
- filtered_feature_bc_matrix.h5: Python读取表达量矩阵
- spatial:图像信息;文件夹内包括Visium-specific outs: QC images to check image processing pipeline, downsampled input images, and files that describe spot barcode locations in the images
其他输出文件描述可以查看官网介绍https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/output/overview
已经得到表达量矩阵和对应图片信息,下一步走scanpy和squidpy下游分析流程。
Reference
代码语言:shell复制https://mp.weixin.qq.com/s/VWUmJZnzT7m_7QDjxkbrJw
https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/using/count
https://zhuanlan.zhihu.com/p/335673562
# FFPE(石蜡包埋) 空转测序原理介绍
https://mp.weixin.qq.com/s/YlsuIC61K9fuDwOH9OcitQ
# 空转测序需要几个重复、怎么和scRNA-seq联合测序
https://mp.weixin.qq.com/s/jbPYJkF9dS15zJeanWoSEg