BMKMANU DG1000數(shù)據(jù)準(zhǔn)備有2種分析策略,從原始FQ文件到Seurat讀入的矩陣文件,
第一種;直接使用提供的BSCMatrixx進(jìn)行運(yùn)行;
第二種;如果習(xí)慣使用cellranger,可以使用提供的FQ_BMKMANU_to_10X 模塊將BMKMANU DG1000的數(shù)據(jù)轉(zhuǎn)換為10X格式直接使用cellranger分析
策略一
直接使用BSCMatrix進(jìn)行分析
1、軟件依賴與安裝
1).Python: 3.8及以上,需要安裝模塊: plotly lz4 numpy Cython h5py scipy pandas pytables sklearn
2).R: 4.0及以上,需要安裝包: Seurat dplyr tibble ggplot2 plotly htmlwidgets kableExtra htmltools shiny knitr rmarkdown optparse
3).Cell Ranger: 7.0及以上
4).Seqkit (https://bioinf.shenwei.me/seqkit/download/)
依賴的軟件需要使用export添加到環(huán)境變量中,以實(shí)現(xiàn)流程的調(diào)用。
2、數(shù)據(jù)準(zhǔn)備
1).測序數(shù)據(jù),雙端FASTQ數(shù)據(jù)
2).參考基因組數(shù)據(jù),基因組序列文件和gtf文件(配置文件使用的注釋文件需要包含gene和exon)
3、配置文件填寫
### Globle parameters
## data 測序數(shù)據(jù)
FQ1 /path/to/read_1.fastq
FQ2 /path/to/read_2.fastq
## Ref genome 參考基因組和gtf文件
FA /path/to/ref/file
GFF /path/to/gtf/file
## out put 輸出路徑以及輸出結(jié)果前綴
OUTDIR /path/to/result/dir/
PREFIX outfile-prefix
##other parameters 其它配置參數(shù)(期望細(xì)胞數(shù)、線程數(shù)目、內(nèi)存上限100Gb,Nobam?設(shè)置為0代表不輸出bam,設(shè)置其它字符代表輸出)
EC 3000
Threads 8
RAM 100
Nobam? 1
ENV ###R和python解釋器路徑(可選,如果不提供,則放到環(huán)境變量中)
Rscript /path/to/R/bin/
PYTHON /path/to/python/bin/
4、流程運(yùn)行
1).流程說明
流程分為4個(gè)步驟,功能如下:
1.1步驟1,運(yùn)行fastq2BcUmiSC_v1.1,識(shí)別fastq數(shù)據(jù)中的barcode、umi
1.2步驟2,調(diào)用Cell Ranger程序,獲取基因表達(dá)矩陣
1.3步驟3,運(yùn)行QC,進(jìn)行umap和tsne分析
1.4步驟4,運(yùn)行WebReport,得到網(wǎng)頁版報(bào)告
2).流程參數(shù)
-c config.txt 配置文件
-s 步驟選擇,0為運(yùn)行1-4所有步驟,也可選擇個(gè)別步驟單獨(dú)運(yùn)行,多個(gè)步驟中間使用”,”分割。
3).參考命令
./BSCMatrix -c config.txt -s 0
./BSCMatrix -c config.txt -s 1,2,3,4
./BSCMatrix -c config.txt -s 1,2
5、結(jié)果說明
01.fastq2BcUmiSC ##步驟1運(yùn)行結(jié)果目錄
├── prefix.bc_stat ##不同barcode統(tǒng)計(jì)
├── prefix.filter ##barcode 過濾信息
├── prefix.qual.stat ##Reads 統(tǒng)計(jì)
├── prefix.stat ##barcode檢測統(tǒng)計(jì)
└── prefix.umi ##Reads barcode umi信息
02.cellranger/ ##步驟2 運(yùn)行結(jié)果目錄
├── bmk_10x_barcode.xls ## barcode對(duì)照表
├── data/ ##數(shù)據(jù)存放目錄
├── INDEX/ ##參考基因組索引文件夾
├── Log.out ##索引構(gòu)建日志文件
├── R1.fq.gz ## R1端數(shù)據(jù)
├── R2.fq.gz ## R2 端數(shù)據(jù)
├── ReadID.xls ##ReadID 信息
└── prefix/ ##調(diào)用Cell Ranger 軟件分析結(jié)果目錄
03.cluster/ ## 步驟3 運(yùn)行結(jié)果目錄
├── cluster.csv ##細(xì)胞聚類結(jié)果
├── marker_gene.csv ##marker gene
├── tsne_df.xls ##tsne聚類結(jié)果
├── tsne_files/ ##tsne html附錄文件
├── tsne.html ##tsne html 格式圖片
├── tsne.pdf ##tsne pdf格式圖片
├── umap_df.xls ##umap 聚類結(jié)果
├── umap_files/ ##umap html附錄文件
├── umap.html ##umap html格式圖片
└── umap.pdf ##umap pdf格式圖片
04.WebReport/ ##步驟4 運(yùn)行結(jié)果目錄
├── 10x ##調(diào)用Cell Ranger程序執(zhí)行的結(jié)果
└── bmk ##網(wǎng)頁報(bào)告
##############BSCMatrix 環(huán)境依賴######################################
1、conda 安裝
#下載
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh
#下載完成之后運(yùn)行(按提示安裝)
sh Miniconda3-py39_4.12.0-Linux-x86_64.sh
#安裝完成后執(zhí)行以下命令
source ~/.bashrc
2、conda 環(huán)境配置
conda create -n (環(huán)境名) python=3.9
#激活創(chuàng)建的環(huán)境
conda activate (環(huán)境名)
#添加鏡像源
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-sources
3、安裝python模塊
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple plotly
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple lz4
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple Cython
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple h5py
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple scipy
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple tables
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple sklearn
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas
4、安裝指定R版本(v4.2)
conda install -c conda-forge r-base=4.2
5、安裝R包
conda install -c conda-forge r-seurat=4.3.0
conda install -c conda-forge r-dplyr=1.1.0
conda install -c conda-forge r-tibble=3.1.8
conda install -c conda-forge r-plotly=4.10.1
conda install -c conda-forge r-htmlwidgets=1.6.1
conda install -c conda-forge r-kableextra=1.3.4
conda install -c conda-forge r-htmltools=0.5.4
conda install -c conda-forge r-shiny=1.7.4
conda install -c conda-forge r-knitr=1.42
conda install -c conda-forge r-rmarkdown=2.20
conda install -c conda-forge r-optparse=1.7.3
6、Cell Ranger安裝
#下載
wget -O cellranger-7.1.0.tar.gz “https://cf.10xgenomics.com/releases/cell-exp/cellranger-7.1.0.tar.gz?Expires=1675964753&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZi4xMHhnZW5vbWljcy5jb20vcmVsZWFzZXMvY2VsbC1leHAvY2VsbHJhbmdlci03LjEuMC50YXIuZ3oiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2NzU5NjQ3NTN9fX1dfQ__&Signature=IFr7ONDqEkZRR6QpU~A6719a9Mc2SD2tI1z6RrGldFFTCiY6Z7VR0x0Gr90jtvTUmYTJ2S0NyuK6SVmdeIZUCcbjz9elG1ImGx7AprTCRD3m~0se-xha2lFr87bEsbAa-7uoyW14wXRlj17b0oG9WomNvVSNNKJSzSSfCkqX3Ev9B82b~DMD-7-Hlb8lAsorv18R8y41T4UihIRdY-LE-I5Gk3fTodmBUjvSEuI3VEalsrVsrN5AdBDpwiCPqSiExODVM0RIsUDV158ceAYFiu5Y9wgbwQVOFMZGYI0d-6tO1VPo4RwwWl0X7c2q21im6BNSQrhQzoDv5cj5COesmQ__&Key-Pair-Id=APKAI7S6A5RYOXBWRPDA”
##下載完成之后解壓
tar -zxvf cellranger-7.1.0.tar.gz
##配置環(huán)境變量
echo “PATH=安裝路徑/cellranger/7.1.0/bin:$PATH” >~/.bashrc
7、安裝seqkit
conda install -c bioconda seqkit
策略二
使用FQ_BMKMANU_to_10X 對(duì)原始數(shù)據(jù)進(jìn)行轉(zhuǎn)換,然后使用cellranger進(jìn)行分析
#########################軟件說明#########################################
./dealFQ
Description:
Version:v1.0
Usage:
-r1 Read1 Fastq must be given #########R1端數(shù)據(jù)
-r2 Read2 Fastq must be given #########R2端數(shù)據(jù)
-o outdir optional [./] ########輸出路徑
-k keyword optional [bmk] #########關(guān)鍵字
-t threads optional [4] ##########線程數(shù)目
-h help document
Example:
dealFQ -r1 R1.fq.gz -r2 R2.fq.gz -o analysis -k bmk -t 8
#########################結(jié)果說明##########################################
├── 01.fastq2BcUmiSC
│?? ├── *.bc_stat ##不同barcode統(tǒng)計(jì)
│?? ├── *.filter ##barcode 過濾信息
│?? ├── *.qual.stat ##Reads 統(tǒng)計(jì)
│?? ├── *.stat ##barcode檢測統(tǒng)計(jì)
│?? └── *.umi ##Reads barcode umi信息
└── 02.data
├── bmk_10x_barcode.xls ## barcode對(duì)照表
├── data
│?? ├── *_S1_L001_R1_001.fastq.gz ##cellranger分析所需數(shù)據(jù) (R1.fq.gz的硬鏈接)
│?? └── *_S1_L001_R2_001.fastq.gz ##cellranger分析所需數(shù)據(jù)(R2.fq.gz的硬鏈接)
├── R1.fq.gz
├── R2.fq.gz
└── ReadID.xls ##ReadID 信息
######################################
可以使用軟件dealFQ 將DG1000數(shù)據(jù)轉(zhuǎn)換成10x cellranger兼容數(shù)據(jù),然后用cellranger進(jìn)行下游分析,文件夾內(nèi)02.data/data數(shù)據(jù)即是cellranger分析所需數(shù)據(jù)。