原始数据质控
软件:fastqc,multiqc
先使用fastqc将多个样本逐个进行质控,再使用multiqc将所有的样本质控结果合并汇总,方便查看比较每个样本的测序数据情况。
```
#!/usr/bin/bash
start=$(date +%s)
echo "start time: $start";
echo $HOSTNAME
for i in *.fastq.gz; do fastqc -o $out_dir $i;done
end=$(date +%s)
echo "end time: $end";
runtime_s=$(echo $(( end - start )))
echo "Total run time(s): $runtime_s";
sec_per_min=60
sec_per_hr=3600
runtime_m=$(echo "scale=2; $runtime_s / $sec_per_min;" |bc)
echo "total run time(m): $runtime_m";
runtime_h=$(echo "scale=2;$runtime_s / $run_per_hr;" |bc)
echo "total run time(h) : $runtime_h";
```
```
multiqc -o $out_dir $in_dir
```
去除测序接头和低质量碱基,再重复一遍质控步骤
```
trim_galore --gzip --phred33 --illumina --output_dir $out_dir --paired ${sample}_R1.raw.fq.gz ${sample}_R2.raw.fq.gz
```