{ | { | ||||
"subsampling_rate": "0.3", | |||||
"cluster_config": "OnDemand bcs.a2.3xlarge img-ubuntu-vpc", | "cluster_config": "OnDemand bcs.a2.3xlarge img-ubuntu-vpc", | ||||
"disk_size": "100", | "disk_size": "100", | ||||
"docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/ngscheckmate:v1.0.0" | "docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/ngscheckmate:v1.0.0" |
{ | { | ||||
"{{ project_name }}.sample_id": "{{ sample_id }}", | "{{ project_name }}.sample_id": "{{ sample_id }}", | ||||
"{{ project_name }}.input_file": "{{ input_file }}", | |||||
"{{ project_name }}.fastq_dir": "{{ fastq_dir }}", | |||||
"{{ project_name }}.fastq1": "{{ fastq1 }}", | |||||
"{{ project_name }}.fastq2": "{{ fastq2 }}", | |||||
"{{ project_name }}.subsampling_rate": "{{ subsampling_rate }}", | |||||
"{{ project_name }}.docker": "{{ docker }}", | "{{ project_name }}.docker": "{{ docker }}", | ||||
"{{ project_name }}.disk_size": "{{ disk_size }}", | "{{ project_name }}.disk_size": "{{ disk_size }}", | ||||
"{{ project_name }}.cluster_config": "{{ cluster_config }}" | "{{ project_name }}.cluster_config": "{{ cluster_config }}" |
task ngscheckmate_fastq { | |||||
String sample_id | |||||
File fastq1 | |||||
File fastq1 | |||||
String subsampling_rate | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
nt=$(nproc) | |||||
export NCM_HOME=/opt/NGSCheckMate | |||||
python /opt/NGSCheckMate/ncm_fastq.py -1 ${fastq1} -2 ${fastq2} /opt/NGSCheckMate/SNP/SNP.pt -p $nt -s ${subsampling_rate} > ${sample_id}.vaf | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster:cluster_config | |||||
systemDisk:"cloud_ssd 40" | |||||
dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File vaf="${sample_id}.vaf" | |||||
} | |||||
} |
task NGScheckMates { | |||||
task ngscheckmate_fastq { | |||||
String sample_id | String sample_id | ||||
File fastq_dir | File fastq_dir | ||||
File input_file | File input_file |
import "./tasks/NGScheckMates.wdl" as NGScheckMates | |||||
import "./tasks/ngscheckmate_fastq.wdl" as ngscheckmate_fastq | |||||
workflow {{ project_name }} { | workflow {{ project_name }} { | ||||
String sample_id | String sample_id | ||||
File fastq_dir | |||||
File input_file | |||||
File fastq1 | |||||
File fastq2 | |||||
String subsampling_rate | |||||
String docker | String docker | ||||
String cluster_config | String cluster_config | ||||
String disk_size | String disk_size | ||||
call NGScheckMates.NGScheckMates as NGScheckMates { | |||||
input: | |||||
sample_id=sample_id, | |||||
fastq_dir=fastq_dir, | |||||
input_file=input_file, | |||||
docker=docker, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | |||||
Array[File] fastq1_arr = fastq1 | |||||
Array[File] fastq2_arr = fastq2 | |||||
scatter (idx in range(length(fastq1_arr))) { | |||||
call ngscheckmate_fastq.ngscheckmate_fastq as ngscheckmate_fastq { | |||||
input: | |||||
sample_id=sample_id, | |||||
fastq1=fastq1_arr[idx], | |||||
fastq2=fastq2_arr[idx], | |||||
subsampling_rate=subsampling_rate, | |||||
docker=docker, | |||||
disk_size=disk_size, | |||||
cluster_config=cluster_config | |||||
} | |||||
} | |||||
} | } |