Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
|
- task TrimAdapt {
- String sample_ID
- File in_fastq
-
- String adapter_seq
- Int randomBase_in_adapter
-
- String docker
- String cluster_config
- String disk_size
-
-
- command <<<
- set -o pipefail
- set -e
- nt=$(nproc)
-
- echo -e "Trim adapter's invariant part." > ${sample_ID}.trimAdapt.log
- fastp --thread $nt -Q -L\
- --adapter_sequence ${adapter_seq} \
- -i ${in_fastq} \
- -o ${sample_ID}.trimAdapt.fastq.tmp.gz \
- 2>> ${sample_ID}.trimAdapt.log
-
- if [ ${randomBase_in_adapter} -gt 0 ]
- then
- echo -e "\nTrim ${randomBase_in_adapter} random base from both sides\n" >> ${sample_ID}.trimAdapt.log
- fastp --thread $nt -A -Q -L \
- --trim_front1 ${randomBase_in_adapter} --trim_tail1 ${randomBase_in_adapter} \
- -i ${sample_ID}.trimAdapt.fastq.tmp.gz \
- -o ${sample_ID}.trimAdapt.fastq.gz \
- 2>> ${sample_ID}.trimAdapt.log
- else
- mv ${sample_ID}.trimAdapt.fastq.tmp.gz ${sample_ID}.trimAdapt.fastq.gz
- fi
-
- zcat ${sample_ID}.trimAdapt.fastq.gz | paste - - - - | cut -f 2 | \
- awk '{a[length($1)]++}END{for(i in a){print i,a[i]}}' | sort -n \
- > ${sample_ID}.trimAdapt.lengthDistribute
-
- >>>
-
- runtime {
- docker: docker
- cluster: cluster_config
- systemDisk: "cloud_ssd 40"
- dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
- }
-
- output {
- File out_fastq="${sample_ID}.trimAdapt.fastq.gz"
- File out_log="${sample_ID}.trimAdapt.log"
- File out_lengthDistribute="${sample_ID}.trimAdapt.lengthDistribute"
- }
- }
|