单细胞ATAC实战01: CellRanger-ATAC定量

2023-09-26 20:19:47 浏览数 (1)

原理

It enables profiling of the open chromatin landscape at single cell resolution.

安装cellranger-atac

https://support.10xgenomics.com/single-cell-atac/software/downloads/latest?

代码语言:javascript复制
mkdir -p APP/bin
cd ~/APP
curl -o cellranger-atac-2.1.0.tar.gz "https://cf.10xgenomics.com/releases/cell-atac/cellranger-atac-2.1.0.tar.gz?Expires=1679232379&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZi4xMHhnZW5vbWljcy5jb20vcmVsZWFzZXMvY2VsbC1hdGFjL2NlbGxyYW5nZXItYXRhYy0yLjEuMC50YXIuZ3oiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2NzkyMzIzNzl9fX1dfQ__&Signature=Nsc4TJ5H0XyVlPDTmVZjZGnWO0rfU7TNB~SM7f4JbP2pGgOp~vWcLj1wPA6o8w~Pvm3yOO8eqiA5s72PpdeR~WG1KEIS6Rx9aYR-0GkQLlGfxLXG1aJ3SdXg8PJ8jz2cqS2DUMS4Jrh2sNIDp7r7rPcf3Znq34HP9d-x-6W8Ct53ybSNuvz12EMeeJemCEldFKYSUy1Q6GPPp8Ufg5CQLzfXKx4DQ5DqMBQD-aaKJ6PAGx6jFTOGwio76i~24AQEzR2fNJgOtKSI6gyA3I9c-2oyrzMrt0J3zakhOzyej0M8~zmXp5gbtxV6GbWioZj5MwRvLKWLHmkkDQJqczzxjg__&Key-Pair-Id=APKAI7S6A5RYOXBWRPDA"# 软连接 ~/APP/bin已加入path
md5sum *gz
tar -xf *gz
rm -f *gz
ln -s ~/APP/cellranger-atac-2.1.0/bin/cellranger-atac ~/APP/bin/cellranger-atac
export PATH=$HOME/APP/bin:$PATH
# 测试
nohup cellranger-atac testrun --id=tiny &> testrun.txt &

下载fastq数据

下载10X官网提供的10K和5K PBMC数据集

https://www.10xgenomics.com/resources/datasets/5-k-peripheral-blood-mononuclear-cells-pbm-cs-from-a-healthy-donor-next-gem-v-1-1-1-1-standard-2-0-0

https://www.10xgenomics.com/resources/datasets/10-k-peripheral-blood-mononuclear-cells-pbm-cs-from-a-healthy-donor-next-gem-v-1-1-1-1-standard-2-0-0

代码语言:javascript复制
cd ~/Project/ATAC
mkdir fastqs quantify 
cd fastqs
curl -O https://s3-us-west-2.amazonaws.com/10x.files/samples/cell-atac/2.0.0/atac_pbmc_10k_nextgem/atac_pbmc_10k_nextgem_fastqs.tar
curl -O https://cf.10xgenomics.com/samples/cell-atac/2.0.0/atac_pbmc_5k_nextgem/atac_pbmc_5k_nextgem_fastqs.tar


tar -xf *tar
rm -f *tar
cd atac_pbmc_10k_nextgem_fastqs
mv * ..
cd ..
cd atac_pbmc_5k_nextgem_fastqs
mv * ..
cd ..
rm -rf atac_pbmc_10k_nextgem_fastqs/ atac_pbmc_5k_nextgem_fastqs/

Sequenced on Illumina NovaSeq with approximately 39/41k read pairs per cell

  • 50 bp Read 1
  • 8 bp i7 index (sample index)
  • 16 bp i5 (10x Barcode)
  • 49 bp Read 2
代码语言:javascript复制
1.4G atac_pbmc_10k_nextgem_S1_L001_I1_001.fastq.gz
5.7G atac_pbmc_10k_nextgem_S1_L001_R1_001.fastq.gz
3.2G atac_pbmc_10k_nextgem_S1_L001_R2_001.fastq.gz
5.7G atac_pbmc_10k_nextgem_S1_L001_R3_001.fastq.gz
1.4G atac_pbmc_10k_nextgem_S1_L002_I1_001.fastq.gz
5.7G atac_pbmc_10k_nextgem_S1_L002_R1_001.fastq.gz
3.2G atac_pbmc_10k_nextgem_S1_L002_R2_001.fastq.gz
5.7G atac_pbmc_10k_nextgem_S1_L002_R3_001.fastq.gz
787M atac_pbmc_5k_nextgem_S1_L001_I1_001.fastq.gz
3.2G atac_pbmc_5k_nextgem_S1_L001_R1_001.fastq.gz
1.8G atac_pbmc_5k_nextgem_S1_L001_R2_001.fastq.gz
3.1G atac_pbmc_5k_nextgem_S1_L001_R3_001.fastq.gz
788M atac_pbmc_5k_nextgem_S1_L002_I1_001.fastq.gz
3.2G atac_pbmc_5k_nextgem_S1_L002_R1_001.fastq.gz
1.8G atac_pbmc_5k_nextgem_S1_L002_R2_001.fastq.gz
3.1G atac_pbmc_5k_nextgem_S1_L002_R3_001.fastq.gz

Reference

10X官网提供了人和小鼠的参考索引,其他物种可以参考官网代码自行构建

https://support.10xgenomics.com/single-cell-atac/software/release-notes/references

https://support.10xgenomics.com/single-cell-atac/software/downloads/latest?

代码语言:javascript复制
cd ~/DataHub/Genomics/10X
# Human ATAC reference (GRCh38)  md5sum:2f12f6016197869e21e5559827002716
curl -O https://cf.10xgenomics.com/supp/cell-atac/refdata-cellranger-arc-GRCh38-2020-A-2.0.0.tar.gz
# Mouse ATAC reference md5sum: a2c1cc9b8dff2a2ef36971d7c31c8304
curl -O https://cf.10xgenomics.com/supp/cell-atac/refdata-cellranger-arc-mm10-2020-A-2.0.0.tar.gz
md5sum *gz
tar -xf *gz
rm -f *gz

count

代码语言:javascript复制
#>>>quantify.sh>>>
human_index_dir=~/DataHub/Genomics/10X/refdata-cellranger-arc-GRCh38-2020-A-2.0.0
mouse_index_dir=~/DataHub/Genomics/10X/refdata-cellranger-arc-mm10-2020-A-2.0.0
fastqs_dir=~/Project/ATAC/fastqs
output_dir=~/Project/ATAC/quantify

cd ${output_dir}

ls ${fastqs_dir} | cut -d '_' -f 1-4 | uniq | while read i
do
cellranger-atac count 
    --id $i 
    --reference ${human_index_dir} 
    --fastqs ${fastqs_dir} 
    --sample $i 
    --localcores 12 
    --localmem 128
done
#<<<quantify.sh<<<

nohup bash quantify.sh &> quantify.sh.log &

out

输出文件怎么看,可以参考这两个推文。

https://mp.weixin.qq.com/s/_l_uYQjjIVXlGCiic7FsYQ

https://mp.weixin.qq.com/s/C496e81tvw0Sjx9CAQ364w

File Name

Description

fragments.tsv.gz

Barcoded and aligned fragment file

web_summary.html

HTML file summarizing data & analysis

下游分析

  • ArchR,读取fragments.tsv.gz文件;
  • SnapATAC,推荐的方式是通过将bam文件进行转化为snap文件或者也可以通过fragments.tsv.gz文件产生snap文件;
  • SnapATAC2,读取fragments.tsv.gz文件;
  • Signac则是需要singlecell.csvfiltered_peak_bc_matrix.h5fragments.tsv.gz三个文件。

Reference

代码语言:javascript复制
https://www.10xgenomics.com/products/single-cell-atac
https://support.10xgenomics.com/single-cell-atac/software/overview/welcome
https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzI1Njk4ODE0MQ==&action=getalbum&album_id=2070153339039727619&scene=173&from_msgid=2247501065&from_itemidx=1&count=3&nolastread=1#wechat_redirect
https://support.10xgenomics.com/single-cell-atac/software/release-notes/references
https://support.10xgenomics.com/single-cell-atac/software/downloads/latest?

0 人点赞