"{{ project_name }}.FASTQCdocker": "{{ FASTQCdocker }}", | "{{ project_name }}.FASTQCdocker": "{{ FASTQCdocker }}", | ||||
"{{ project_name }}.MULTIQCdocker": "{{ MULTIQCdocker }}", | "{{ project_name }}.MULTIQCdocker": "{{ MULTIQCdocker }}", | ||||
"{{ project_name }}.fastq_2_M8": "{{ fastq_2_M8 }}", | "{{ project_name }}.fastq_2_M8": "{{ fastq_2_M8 }}", | ||||
"{{ project_name }}.project": "{{ project }}", | |||||
"{{ project_name }}.project": "{{ project_name }}", | |||||
"{{ project_name }}.fastq_1_M8": "{{ fastq_1_M8 }}", | "{{ project_name }}.fastq_1_M8": "{{ fastq_1_M8 }}", | ||||
"{{ project_name }}.SMALLcluster_config": "{{ SMALLcluster_config }}", | "{{ project_name }}.SMALLcluster_config": "{{ SMALLcluster_config }}", | ||||
"{{ project_name }}.screen_ref_dir": "{{ screen_ref_dir }}", | "{{ project_name }}.screen_ref_dir": "{{ screen_ref_dir }}", |
{ | |||||
"name": "WGS QC for Quartet", | |||||
"short_name": "quartet_dna_quality_control_wgs_big_pipeline", | |||||
"description": "Quality control of germline variants calling results using a Chinese Quartet family", | |||||
"home": "http://apps.clinico-omics.org/renluyao/quartet_dna_quality_control_wgs_big_pipeline", | |||||
"hidden": false, | |||||
"icons": [ | |||||
{ | |||||
"src": "", | |||||
"type": "image/png", | |||||
"sizes": "192x192" | |||||
}, | |||||
{ | |||||
"src": "", | |||||
"type": "image/png", | |||||
"sizes": "192x192" | |||||
} | |||||
], | |||||
"category": "Pipeline", | |||||
"source": "PGx" | |||||
} |
{ | |||||
"formMode": "batch", | |||||
"fields": [ | |||||
{ | |||||
"tmplType": "sample_id", | |||||
"type": "number", | |||||
"label": "Sample ID", | |||||
"name": "sample_id", | |||||
"question": "How many samples? For auto generating sample id.", | |||||
"placeholder": "How many samples? For auto generating sample id.", | |||||
"model": "sample_id", | |||||
"disabled": false, | |||||
"min": 1, | |||||
"max": 100, | |||||
"config": { | |||||
"initialValue": 1, | |||||
"rules": [ | |||||
{ | |||||
"type": "number", | |||||
"required": true, | |||||
"message": "Please input a number." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "radio", | |||||
"label": "FASTQ/VCF File?", | |||||
"model": "fastq_or_vcf", | |||||
"options": [ | |||||
{ | |||||
"label": "FASTQ", | |||||
"value": "fastq" | |||||
}, | |||||
{ | |||||
"label": "VCF", | |||||
"value": "vcf" | |||||
} | |||||
], | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "string", | |||||
"required": true, | |||||
"message": "Please select a file type." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "D5 VCF Files", | |||||
"model": "vcf_D5", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "vcf", | |||||
"filterType": "vcf", | |||||
"placeholder": "Select files for D5 vcf.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for D5 vcf." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "D5 Read1 Files", | |||||
"model": "fastq_1_D5", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "fastq", | |||||
"filterType": "fastq|fastq.gz|fq|fq.gz", | |||||
"placeholder": "Select files for D5 read1.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for D5 read1." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "D5 Read2 Files", | |||||
"model": "fastq_2_D5", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "fastq", | |||||
"filterType": "fastq|fastq.gz|fq|fq.gz", | |||||
"placeholder": "Select files for D5 read2.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for D5 read2." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "D6 VCF Files", | |||||
"model": "vcf_D6", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "vcf", | |||||
"filterType": "vcf", | |||||
"placeholder": "Select files for D6 vcf.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for D6 vcf." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "D6 Read1 Files", | |||||
"model": "fastq_1_D6", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "fastq", | |||||
"filterType": "fastq|fastq.gz|fq|fq.gz", | |||||
"placeholder": "Select files for D6 read1.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for D6 read1." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "D6 Read2 Files", | |||||
"model": "fastq_2_D6", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "fastq", | |||||
"filterType": "fastq|fastq.gz|fq|fq.gz", | |||||
"placeholder": "Select files for D6 read2.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for D6 read2." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "F7 VCF Files", | |||||
"model": "vcf_F7", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "vcf", | |||||
"filterType": "vcf", | |||||
"placeholder": "Select files for F7 vcf.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for F7 vcf." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "F7 Read1 Files", | |||||
"model": "fastq_1_F7", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "fastq", | |||||
"filterType": "fastq|fastq.gz|fq|fq.gz", | |||||
"placeholder": "Select files for F7 read1.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for F7 read1." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "F7 Read2 Files", | |||||
"model": "fastq_2_F7", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "fastq", | |||||
"filterType": "fastq|fastq.gz|fq|fq.gz", | |||||
"placeholder": "Select files for F7 read2.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for F7 read2." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "M8 VCF Files", | |||||
"model": "vcf_M8", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "vcf", | |||||
"filterType": "vcf", | |||||
"placeholder": "Select files for M8 vcf.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for M8 vcf." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "M8 Read1 Files", | |||||
"model": "fastq_1_M8", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "fastq", | |||||
"filterType": "fastq|fastq.gz|fq|fq.gz", | |||||
"placeholder": "Select files for M8 read1.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for M8 read1." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "file", | |||||
"label": "M8 Read2 Files", | |||||
"model": "fastq_2_M8", | |||||
"readOnly": false, | |||||
"multiple": true, | |||||
"visibleVariable": "fastq_or_vcf", | |||||
"expectedValue": "fastq", | |||||
"filterType": "fastq|fastq.gz|fq|fq.gz", | |||||
"placeholder": "Select files for M8 read2.", | |||||
"config": { | |||||
"rules": [ | |||||
{ | |||||
"type": "array", | |||||
"required": true, | |||||
"message": "Please select files for M8 read2." | |||||
} | |||||
] | |||||
} | |||||
}, | |||||
{ | |||||
"tmplType": "actions", | |||||
"buttons": [ | |||||
{ | |||||
"type": "cancel", | |||||
"buttonType": "default", | |||||
"buttonLabel": "Previous Step" | |||||
}, | |||||
{ | |||||
"type": "submit", | |||||
"buttonType": "primary", | |||||
"buttonLabel": "Next Step", | |||||
"validate": true | |||||
} | |||||
] | |||||
} | |||||
] | |||||
} |
echo -e "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tLCL8" > LCL8_name | echo -e "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tLCL8" > LCL8_name | ||||
if [[ ${sample} =~ "LCL5" ]];then | |||||
if [[ ${sample} =~ "D5" ]];then | |||||
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL5.high.confidence.calls.vcf ${filtered_vcf} -f /cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta} | /opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL5.high.confidence.calls.vcf ${filtered_vcf} -f /cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta} | ||||
cat ${filtered_vcf} | grep '##' > header | cat ${filtered_vcf} | grep '##' > header | ||||
cat ${filtered_vcf} | grep -v '#' > body | cat ${filtered_vcf} | grep -v '#' > body | ||||
cat header LCL5_name body > LCL5.vcf | cat header LCL5_name body > LCL5.vcf | ||||
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL5.vcf -c > ${sample}.reformed.vcf.gz | /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL5.vcf -c > ${sample}.reformed.vcf.gz | ||||
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz | /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz | ||||
elif [[ ${sample} =~ "LCL6" ]]; then | |||||
elif [[ ${sample} =~ "D6" ]]; then | |||||
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL6.high.confidence.calls.vcf ${filtered_vcf} -f /cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta} | /opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL6.high.confidence.calls.vcf ${filtered_vcf} -f /cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta} | ||||
cat ${filtered_vcf} | grep '##' > header | cat ${filtered_vcf} | grep '##' > header | ||||
cat ${filtered_vcf} | grep -v '#' > body | cat ${filtered_vcf} | grep -v '#' > body | ||||
cat header LCL6_name body > LCL6.vcf | cat header LCL6_name body > LCL6.vcf | ||||
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL6.vcf -c > ${sample}.reformed.vcf.gz | /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL6.vcf -c > ${sample}.reformed.vcf.gz | ||||
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz | /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz | ||||
elif [[ ${sample} =~ "LCL7" ]]; then | |||||
elif [[ ${sample} =~ "F7" ]]; then | |||||
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL7.high.confidence.calls.vcf ${filtered_vcf} -f /cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta} | /opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL7.high.confidence.calls.vcf ${filtered_vcf} -f /cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta} | ||||
cat ${filtered_vcf} | grep '##' > header | cat ${filtered_vcf} | grep '##' > header | ||||
cat ${filtered_vcf} | grep -v '#' > body | cat ${filtered_vcf} | grep -v '#' > body | ||||
cat header LCL7_name body > LCL7.vcf | cat header LCL7_name body > LCL7.vcf | ||||
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL7.vcf -c > ${sample}.reformed.vcf.gz | /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL7.vcf -c > ${sample}.reformed.vcf.gz | ||||
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz | /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz | ||||
elif [[ ${sample} =~ "LCL8" ]]; then | |||||
elif [[ ${sample} =~ "M8" ]]; then | |||||
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL8.high.confidence.calls.vcf ${filtered_vcf} -f /cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta} | /opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL8.high.confidence.calls.vcf ${filtered_vcf} -f /cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta} | ||||
cat ${filtered_vcf} | grep '##' > header | cat ${filtered_vcf} | grep '##' > header | ||||
cat ${filtered_vcf} | grep -v '#' > body | cat ${filtered_vcf} | grep -v '#' > body |
File read2 | File read2 | ||||
File screen_ref_dir | File screen_ref_dir | ||||
File fastq_screen_conf | File fastq_screen_conf | ||||
String read1name = basename(read1,".fastq.gz") | |||||
String read2name = basename(read2,".fastq.gz") | |||||
String docker | String docker | ||||
String cluster_config | String cluster_config | ||||
String disk_size | String disk_size | ||||
nt=$(nproc) | nt=$(nproc) | ||||
mkdir -p /cromwell_root/tmp | mkdir -p /cromwell_root/tmp | ||||
cp -r ${screen_ref_dir} /cromwell_root/tmp/ | cp -r ${screen_ref_dir} /cromwell_root/tmp/ | ||||
fastq_screen --aligner bowtie2 --conf ${fastq_screen_conf} --top 100000 --threads $nt ${read1} | |||||
fastq_screen --aligner bowtie2 --conf ${fastq_screen_conf} --top 100000 --threads $nt ${read2} | |||||
fastq_screen --aligner bowtie2 --conf ${fastq_screen_conf} --subset 1000000 --threads $nt ${read1} | |||||
fastq_screen --aligner bowtie2 --conf ${fastq_screen_conf} --subset 1000000 --threads $nt ${read2} | |||||
>>> | >>> | ||||
runtime { | runtime { | ||||
docker:docker | docker:docker | ||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | } | ||||
output { | output { | ||||
File png1 = "${read1name}_screen.png" | |||||
File txt1 = "${read1name}_screen.txt" | |||||
File html1 = "${read1name}_screen.html" | |||||
File png2 = "${read2name}_screen.png" | |||||
File txt2 = "${read2name}_screen.txt" | |||||
File html2 = "${read2name}_screen.html" | |||||
File png1 = sub(basename(read1), "\\.(fastq|fq)\\.gz$", "_screen.png") | |||||
File txt1 = sub(basename(read1), "\\.(fastq|fq)\\.gz$", "_screen.txt") | |||||
File html1 = sub(basename(read1), "\\.(fastq|fq)\\.gz$", "_screen.html") | |||||
File png2 = sub(basename(read2), "\\.(fastq|fq)\\.gz$", "_screen.png") | |||||
File txt2 = sub(basename(read2), "\\.(fastq|fq)\\.gz$", "_screen.txt") | |||||
File html2 = sub(basename(read2), "\\.(fastq|fq)\\.gz$", "_screen.html") | |||||
} | } | ||||
} | } |