#下载
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh
#下载完成之后运行(按提示安装)
sh Miniconda3-py39_4.12.0-Linux-x86_64.sh
#安装完成后执行以下命令
source ~/.bashrc
conda create -n (环境名) python=3.9
激活环境:
conda activate (环境名)
#添加镜像源
conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/
conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/
conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free/
conda config –add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/
#查看镜像源
conda config –show channels
conda install numpy=1.23.4
conda install opencv=4.7.0
conda install pandas=2.2.2
conda install matplotlib=3.8.4
conda install tqdm=4.66.4
conda install seaborn=0.12.2
conda install tifffile
conda install scanpy=1.9.8
conda install samtools=1.18 sambamba=1.0.1 bedtools=2.31.1
conda install macs2=2.2.7.1
conda install deeptools=3.5.5
conda install ucsc-bedgraphtobigwig=472
conda install bwa=0.7.17
conda install bioconda::cutadapt=5.0
conda install bioconda::ucsc-bedsort
conda install bioconda::ucsc-bedclip
conda install bioconda::perl-yaml
conda install -c conda-forge r-base=4.3.1
conda install -c conda-forge r-signac=1.14.0
conda install -c conda-forge r-seurat=4.3.0
conda install bioconda::bioconductor-rtracklayer=1.62.0
conda install -c conda-forge r-kableextra=1.4.0
conda install -c conda-forge r-optparse=1.7.5
conda install -c conda-forge r-this.path=2.7.0
conda install conda-forge::r-r.utils
conda install conda-forge::r-devtools=2.4.5
options(timeout = 9999999999999)
devtools::install_github(“davidsjoberg/ggsankey”)
install.packages(‘DT’)
参考基因组需要使用bwa进行建库(流程使用bwa比对)
gtf文件中需包含gene_id,gene_name,gene_biotype/gene_type
人和小鼠基因组推荐使用:
https://www.10xgenomics.com/support/software/cell-ranger-arc/latest/release-notes/reference-release-notes
refdata-cellranger-arc-GRCh38-2020-A-2.0.0
refdata-cellranger-arc-mm10-2020-A-2.0.0
其他基因组可自行选择版本。
配置文件可参考config.txt进行填写,内容说明如下:
## fq数据路径,FQ1为read1文件路径,FQ2为read2文件路径
FQ1 /path/to/read_1.fq.gz
FQ2 /path/to/read_2.fq.gz
## 芯片解码文件路径
FLU /path/to/flu_info.txt
## 组织明场图片路径
HE /path/to/HE.tif
## 组织荧光图片路径
#FL /path/to/FL.tif #组织荧光图,和HE图二选一
#FLC -1 #荧光图颜色通道,值为0,1或2,选择-1为自动判断
## 组织区域文件路径
JSON /path/to/roi.json #如不给定,则流程会自动使用上面的图片进行识别,自动识别建议使用荧光图
## 参考基因组文件
GenomeVer xxxx #版本信息,出现在报告中
Ref /path/to/ref/genome.fa #基因组fa文件
Gtf /path/to/ref/gene.gtf #基因组gtf文件
SPECIES human #物种文件,人和小鼠分别为human/mouse,其他物种自行给定
## 输出结果及输出文件前缀
OUTDIR /path/to/result/dir/
PREFIX outfile-prefix
## barcode 类型,S3000芯片无特殊情况为V2
BCType V2
## 线程数
Threads 8
## cs序列类型,无特殊情况为cs12
CSType cs12
在配置好的环境中,运行命令:
/path/to/BSATAC -c config.txt -s 0
其中 -c 是配置文件,-s 是所选择运行的步骤,0是全部运行
outdir/
├── 01.fastq2BcUmi # barcode识别目录
├── 02.LinkBcChip # 芯片barcode对应
├── 03.AllheStat # 多级分辨率和组织区域处理
├── 04.Cutadapt # 接头过滤
├── 05.Mapping # reads比对结果
├── 06.Fragment # Fragment分析
├── 07.WebReport # 网页版报告
└── PREFIX # 芯片原始barcode结果
注意说明,当前分析需要百创智造的空间RNA和空间ATAC分析流程输出的结果!!!空间RNA和空间ATAC的主要结果各自存储在BSTViewer_project文件下。
1.1:百创智造空间ATAC与空间转录组联合分析之切片对齐概述
https://zhuanlan.zhihu.com/p/1903040885328945604
1.2:百创智造空间ATAC与空间转录组联合分析之切片对齐前图像生成-01
https://zhuanlan.zhihu.com/p/1898370805919903880
1.3:百创智造空间ATAC与空间转录组联合分析之FIJI中手动对齐切片-02
https://zhuanlan.zhihu.com/p/1903079101796941928
1.4:百创智造空间ATAC与空间转录组联合分析之切片上点的映射-03
https://zhuanlan.zhihu.com/p/1903081341429452952
1.5:百创智造空间ATAC与空间转录组联合分析之Level1向其他level水平的点映射-04
https://zhuanlan.zhihu.com/p/1907854262597321846
其它: Fiji的下载与安装(windows 10)
https://zhuanlan.zhihu.com/p/18027378723
特殊说明:软文详细讲解了对齐的原理,脚本实现以及结果说明。其中,软文中涉及的脚本存在 [SpatialATAC/v1.0.2/fragment/ImageJ_FJ] 中。
配置文件可参考config.yaml [SpatialATAC/v1.0.2/fragment/Joint_analysis/] 进行填写,内容说明如下:
##ATAC和RNA项目号
ATAC_project_name: ATAC_project
RNA_project_name: RNA_project
##ATAC和RNA分析路径(一级目录下)
ATAC_analysis: path/BSTViewer_project/
RNA_analysis: path/BSTViewer_project/
######映射文件(通过Image Fiji获取)
Fiji:
L18: path/L18_ATAC-RNA_barcode_relations_ALL.csv
L9: path/L9_ATAC-RNA_barcode_relations_ALL.csv
L7: path/L7_ATAC-RNA_barcode_relations_ALL.csv
L5: path/L5_ATAC-RNA_barcode_relations_ALL.csv
Frag:
L18: path/L18.fragments.tsv.gz
L9: path/L9.fragments.tsv.gz
L7: path/L7.fragments.tsv.gz
L5: path/L5.fragments.tsv.gz
##输出路径
outdir: path/analysis
perl Joint_main_v1.0.pl -c config.yaml -s 0
其中 -c 是配置文件,-s 是所选择运行的步骤,0是全部运行
脚本参见 [SpatialATAC/v1.0.2/fragment/Joint_analysis/]
L_alignment/
├── L_Joint_marker_gene.csv ##联合分析marker基因
├── L_joint.rds ##rds文件
├── L_Sankey_plots.pdf ##桑基图
├── L_Sankey_plots.png
├── L_heatmap.pdf ##marker基因热图
├── L_heatmap.png
├── L_CoveragePlot.pdf ##基因组浏览器图
├── L_CoveragePlot.png
├── L_Spatial_ATAC.cluster.pdf ##ATAC聚类图
├── L_Spatial_ATAC.cluster.png
├── L_Spatial_Joint.cluster.pdf ##联合分析聚类图
├── L_Spatial_Joint.cluster.png
├── L_Spatial_RNA.cluster.pdf ##RNA聚类图
└── L*_Spatial_RNA.cluster.png
特殊说明
L*_joint.rds 中存在3个assay,分别是:ATAC(peak矩阵),Spatial(表达矩阵),RNA(活性矩阵)。