登錄
ip: 192.168.0.33
1.生成fastq文件
cd /workdir/data
ll
mkdir result_190422data
cd result_190422data
cp /workdir/data/result_190422/run_bcl2fastq.sh .
mkdir fastq
vim run_bcl2fastq.sh (鼠標(biāo)無法操作)
按i
按 左上角的ESC shift+: wq 保存退出
按 左上角的ESC shift+: q 不保存退出
#編輯run_bcl2fastq.sh 文件,這里是要修改的
sample_sheet=030-190422.csv
bcl_name=190421_TPNB500301_0050_AHHVW2AFXY
ll /cifs/NextSeq/Runs/HIGIA/
#
nohup sh run_bcl2fastq.sh &
jobs
2. call SNP
cd /workdir/SNP_result/
mkdir newdir
cd newdir
vim list
新建 list 文件,以tab分割
image.png
-r /workdir/data/result_190422/fastq/ 是前一步的fastq文件
perl /workdir/SNPcall_GATK/SNPcall_samtools.pl -o . -l list -r /workdir/data/result_190422/fastq/
cd script
cp /workdir/SNP_result/zsl_samtools_20190422/1/script/run.sh .
不要修改
#檢查文件是否存在
for i in `cat */*/*filter* | grep cat | awk '{print $2}'`;do ll -h $i;done
#執(zhí)行腳本
nohup sh run.sh &
#查看腳本運(yùn)行狀態(tài)
jobs
running 正在運(yùn)行
done 運(yùn)行完成
3.QC
#查看深度
cd ../Coverage
grep 'Average depth(rmdup)' */*/coverage.report > coverage.txt
cat coverage.txt
#查看捕獲率
grep 'Fraction of Target Reads in mapped reads' */Coverage/*/*/*coverage.report
or
grep 'Fraction of Target Reads in mapped reads' */Coverage/*/*/*coverage.report | grep -v nan | awk '{sub(/%$/, " "); if ($10 <10) print}'
#查看位點(diǎn)
cd ../out
wc -l */*.txt
pwd
4.數(shù)據(jù)打包
zip -r file.zip */*.txt
5.分析
#進(jìn)入家目錄
cd
test 是自己隨意命名
mkdir test && cd test
cp -r ../mould_zhaosl/* .
cd sample
要修改
cp /workdir/SNP_result/zsl_samtools_20190422/1/out/file.zip .
unzip file.zip
rm file.zip
head -1 */*.txt
cd ../whole_test/
nohup ./run.sh &
cd ..
等待10~20分鐘
查看胎兒濃度
grep -A 5 'testing the pair' whole_test/nohup.out
grep -A 5 'testing the pair' whole_test/nohup.out | perl -ne 'print "$1\t" if/testing the pair of (\w+)/; print "$1\n" if/Fraction\(fetal\)= (\S+)/' | awk '{if( $2 != none)print }' |sort
查看雜質(zhì)
for i in {2..30};do cat genotype253.txt | awk '{print $1,$2,$3,$4,$5}' | grep -w $i;done
查看結(jié)果文件
cat whole_test/Result_testing.txt