下载SRR
点击Send to,选择File,Format选择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转fastq
# 单样本
nohup fasterq-dump --split-3 SRR6382584 & #将双端测序文件拆分为两个reads
# 循环跑多样本
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
# 所有样本循环
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/
https://www.jianshu.com/p/ab98dd332368
https://www.jianshu.com/p/25692cb89505
https://mp.weixin.qq.com/s/efYr4AV_vZeh_ihiZ9Poyg