Browse Source

......

master
Zhihui 5 years ago
parent
commit
14481eaa96
2 changed files with 14 additions and 13 deletions
  1. +1
    -1
      defaults
  2. +13
    -12
      tasks/fastp.wdl

+ 1
- 1
defaults View File

@@ -42,5 +42,5 @@
"umi_len": "0",
"umi_loc": "umi_loc",
"qualified_quality_phred": "20",
"disable_quality_filtering": "0"
"disable_quality_filtering": "1"
}

+ 13
- 12
tasks/fastp.wdl View File

@@ -22,22 +22,23 @@ task fastp {
Int disable_quality_filtering
command <<<
mkdir -p /cromwell_root/tmp/fastp/
##1.Disable_quality_filtering
if [ ${disable_quality_filtering} -gt 0 ]
then
mv ${read1} {sample_id}_R1.fastq.tmp1.gz
mv ${read2} {sample_id}_R2.fastq.tmp1.gz
cp ${read1} /cromwell_root/tmp/fastp/{sample_id}_R1.fastq.tmp1.gz
cp ${read2} /cromwell_root/tmp/fastp/{sample_id}_R2.fastq.tmp1.gz
else
fastp --thread 4 --trim_front1 ${trim_front1} --trim_tail1 ${trim_tail1} --max_len1 ${max_len1} --trim_front2 ${trim_front2} --trim_tail2 ${trim_tail2} --max_len2 ${max_len2} -i ${read1} -I ${read2} -o ${sample_id}_R1.fastq.tmp1.gz -O ${sample_id}_R2.fastq.tmp1.gz -j ${sample_id}.json -h ${sample_id}.html
fastp --thread 4 --trim_front1 ${trim_front1} --trim_tail1 ${trim_tail1} --max_len1 ${max_len1} --trim_front2 ${trim_front2} --trim_tail2 ${trim_tail2} --max_len2 ${max_len2} -i ${read1} -I ${read2} -o /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp1.gz -O /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp1.gz -j ${sample_id}.json -h ${sample_id}.html
fi
##2.UMI
if [ ${UMI} -gt 0 ]
then
mv ${sample_id}_R1.fastq.tmp1.gz ${sample_id}_R1.fastq.tmp2.gz
mv ${sample_id}_R2.fastq.tmp1.gz ${sample_id}_R2.fastq.tmp2.gz
cp /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp1.gz /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz
cp /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp1.gz /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz
else
fastp --thread 4 -U --umi_loc=${umi_loc} --umi_len=${umi_len} --trim_front1 ${trim_front1} --trim_tail1 ${trim_tail1} --max_len1 ${max_len1} --trim_front2 ${trim_front2} --trim_tail2 ${trim_tail2} --max_len2 ${max_len2} -i ${sample_id}_R1.fastq.tmp1.gz -I ${sample_id}_R2.fastq.tmp1.gz -o ${sample_id}_R1.fastq.tmp2.gz -O ${sample_id}_R2.fastq.tmp2.gz -j ${sample_id}.json -h ${sample_id}.html
fastp --thread 4 -U --umi_loc=${umi_loc} --umi_len=${umi_len} --trim_front1 ${trim_front1} --trim_tail1 ${trim_tail1} --max_len1 ${max_len1} --trim_front2 ${trim_front2} --trim_tail2 ${trim_tail2} --max_len2 ${max_len2} -i /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp1.gz -I /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp1.gz -o /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz -O /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz -j ${sample_id}.json -h ${sample_id}.html
fi

##3.Trim
@@ -49,12 +50,12 @@ task fastp {
--trim_front1 ${trim_front1} --trim_tail1 ${trim_tail1} /
--max_len1 ${max_len1} --trim_front2 ${trim_front2} /
--trim_tail2 ${trim_tail2} --max_len2 ${max_len2} /
-i ${sample_id}_R1.fastq.tmp2.gz -I ${sample_id}_R2.fastq.tmp2.gz /
-o ${sample_id}_R1.fastq.gz -O ${sample_id}_R2.fastq.gz /
-j ${sample_id}.json -h ${sample_id}.html
-i /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz -I /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz /
-o ${sample_id}_R1.fastq.gz -O ${sample_id}_R2.fastq.gz /
-j ${sample_id}.json -h ${sample_id}.html
else
mv ${sample_id}_R1.fastq.tmp2.gz ${sample_id}_R1.fastq.gz
mv ${sample_id}_R2.fastq.tmp2.gz ${sample_id}_R2.fastq.gz
cp /cromwell_root/tmp/fastp/${sample_id}_R1.fastq.tmp2.gz ${sample_id}_R1.fastq.gz
cp /cromwell_root/tmp/fastp/${sample_id}_R2.fastq.tmp2.gz ${sample_id}_R2.fastq.gz
fi
>>>

Loading…
Cancel
Save