下載SRR
點擊Send to芋浮,選擇File,F(xiàn)ormat選擇Accession List,點擊Create File际跪,下載自己要下載的SRR號列表
cat SRR_Acc_List_scATAC.txt |while read id;do (prefetch -X 100G $id &);done #后臺下載
參考:
https://zhuanlan.zhihu.com/p/563699865
SRR轉(zhuǎn)fastq
# 單樣本
nohup fasterq-dump --split-3 SRR6382584 & #將雙端測序文件拆分為兩個reads
# 循環(huán)跑多樣本
for folder in SRR*; do
nohup fasterq-dump --split-files -e 20 "$folder" --include-technical -O fastq &
done
參考:
https://www.omicsclass.com/article/1917
https://zhuanlan.zhihu.com/p/563699865
安裝cellranger-atac
參考:
https://support.10xgenomics.com/single-cell-atac/software/pipelines/latest/installation
重命名fastq
for file in *.fastq; do
if [[ $file == *"_1.fastq" ]]; then
mv "$file" "${file/_1.fastq/_S1_L001_I1_001.fastq}"
elif [[ $file == *"_2.fastq" ]]; then
mv "$file" "${file/_2.fastq/_S1_L001_R1_001.fastq}"
elif [[ $file == *"_3.fastq" ]]; then
mv "$file" "${file/_3.fastq/_S1_L001_R2_001.fastq}"
elif [[ $file == *"_4.fastq" ]]; then
mv "$file" "${file/_4.fastq/_S1_L001_R3_001.fastq}"
fi
done
cellranger-atac count
# 單個樣本
cellranger-atac count --id=$sample \
--localcores=40 \
--reference=/home/txm/genome/cellranger_atac/refdata-cellranger-arc-GRCh38-2020-A-2.0.0 \
--fastqs=/home/txm/project/GBM/data/elife_GBM_ATAC/ATAC_raw/fastq/$sample \
--sample=$sample
# 所有樣本循環(huán)
for sample in sample*; do
cd /home/txm/project/AD/raw_data/2021_NG_scRNA_scATAC/scATAC/fastq/$sample/
nohup cellranger-atac count --id=$sample \
--localcores=10 \
--reference=/home/txm/genome/cellranger_atac/refdata-cellranger-arc-GRCh38-2020-A-2.0.0 \
--fastqs=/home/txm/project/AD/raw_data/2021_NG_scRNA_scATAC/scATAC/fastq/$sample/ \
--sample=$sample \
--localmem=100 &
done
參考:
https://zhuanlan.zhihu.com/p/563699865
https://cloud.tencent.com/developer/article/2245873
擴展閱讀
https://www.biostars.org/p/9549547/
http://www.reibang.com/p/ab98dd332368
http://www.reibang.com/p/25692cb89505
https://mp.weixin.qq.com/s/efYr4AV_vZeh_ihiZ9Poyg