Browse Source

first commit

master
LUYAO REN 5 years ago
parent
commit
3ef9fc648d
6 changed files with 19 additions and 43 deletions
  1. +2
    -4
      inputs
  2. +4
    -1
      tasks/bamqc.wdl
  3. +10
    -7
      tasks/benchmark.wdl
  4. +2
    -0
      tasks/fastqscreen.wdl
  5. +0
    -23
      tasks/zipindexVCF.wdl
  6. +1
    -8
      workflow.wdl

+ 2
- 4
inputs View File

@@ -6,15 +6,13 @@
"{{ project_name }}.fastqscreen.cluster_config": "OnDemand ecs.sn1ne.4xlarge img-ubuntu-vpc",
"{{ project_name }}.fastqc.cluster_config": "OnDemand ecs.sn1ne.4xlarge img-ubuntu-vpc",
"{{ project_name }}.benchmark.disk_size": "150",
"{{ project_name }}.rtg.disk_size": "100",
"{{ project_name }}.fastqc.docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/fastqc:v0.11.5",
"{{ project_name }}.rtg.cluster_config": "OnDemand ecs.sn1ne.2xlarge img-ubuntu-vpc",
"{{ project_name }}.benchmark.docker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/hap.py:latest",
"{{ project_name }}.benchmark.docker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/rtg-hap:latest",
"{{ project_name }}.inputSamplesFile": "{{ inputSamplesFile }}",
"{{ project_name }}.fastqscreen.docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/fastqscreen:0.12.0",
"{{ project_name }}.screen_ref_dir": "oss://pgx-reference-data/fastq_screen_reference/",
"{{ project_name }}.rtg.docker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/rtg-tools:latest",
"{{ project_name }}.fastq_screen_conf": "oss://chinese-quartet/quartet-storage-data/reference_data/fastq_screen.conf",
"{{ project_name }}.fastq_screen_conf": "oss://pgx-reference-data/fastq_screen_reference/fastq_screen.conf",
"{{ project_name }}.bamqc.cluster_config": "OnDemand ecs.sn1ne.8xlarge img-ubuntu-vpc",
"{{ project_name }}.fastqscreen.disk_size": "100",
"{{ project_name }}.bamqc.disk_size": "500",

+ 4
- 1
tasks/bamqc.wdl View File

@@ -20,6 +20,9 @@ task bamqc {
}

output {
Array[File] qualimap = glob("result/*")
File genome_result = "result/genome_results.txt"
File pdf = "result/report.pdf"
Array[File] png = glob("reuslt/images_qualimapReport/*.png")
Array[File] txt = glob("result/raw_data_qualimapReport/*.txt")
}
}

+ 10
- 7
tasks/benchmark.wdl View File

@@ -1,9 +1,8 @@
task benchmark {
File gzvcf
File gzvcf_index
File vcf
File benchmarking_dir
File ref_dir
String sample = basename(gzvcf,".vcf.gz")
String sample = basename(vcf,".vcf")
String sample_mark
String fasta
String docker
@@ -16,14 +15,18 @@ task benchmark {
set -e
nt=$(nproc)
export HGREF=/cromwell_inputs/*/reference_data/GRCh38.d1.vd1.fa

/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip ${vcf} -c > ${sample}.rtg.vcf.gz
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.rtg.vcf.gz

if [ ${sample_mark} == "LCL5" ];then
/opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL5.vcf.gz ${gzvcf} -f ${benchmarking_dir}/LCL5.bed.gz --threads $nt -o ${sample}
/opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL5.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL5.bed.gz --threads $nt -o ${sample}
elif [ ${sample_mark} == "LCL6" ]; then
/opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL6.vcf.gz ${gzvcf} -f ${benchmarking_dir}/LCL6.bed.gz --threads $nt -o ${sample}
/opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL6.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL6.bed.gz --threads $nt -o ${sample}
elif [ ${sample_mark} == "LCL7" ]; then
/opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL7.vcf.gz ${gzvcf} -f ${benchmarking_dir}/LCL6.bed.gz --threads $nt -o ${sample}
/opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL7.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL6.bed.gz --threads $nt -o ${sample}
elif [ ${sample_mark} == "LCL8" ]; then
/opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL8.vcf.gz ${gzvcf} -f ${benchmarking_dir}/LCL6.bed.gz --threads $nt -o ${sample}
/opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL8.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL6.bed.gz --threads $nt -o ${sample}
else
echo "only for quartet samples"
fi

+ 2
- 0
tasks/fastqscreen.wdl View File

@@ -13,6 +13,8 @@ task fastq_screen {
set -o pipefail
set -e
nt=$(nproc)
mkdir -p /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}
>>>

+ 0
- 23
tasks/zipindexVCF.wdl View File

@@ -1,23 +0,0 @@
task rtg {
File vcf
String sample = basename(vcf,".vcf")
String docker
String cluster_config
String disk_size
command <<<
rtg bgzip ${vcf} -c > ${sample}.vcf.gz
rtg index -f vcf ${sample}.vcf.gz
>>>

runtime {
docker:docker
cluster: cluster_config
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
File vcf_gz = "${sample}.vcf.gz"
File vcf_index = "${sample}.vcf.gz.tbi"
}
}

+ 1
- 8
workflow.wdl View File

@@ -1,7 +1,6 @@
import "./tasks/fastqc.wdl" as fastqc
import "./tasks/fastqscreen.wdl" as fastqscreen
import "./tasks/bamqc.wdl" as bamqc
import "./tasks/zipindexVCF.wdl" as rtg
import "./tasks/benchmark.wdl" as benchmark

workflow {{ project_name }} {
@@ -35,15 +34,9 @@ workflow {{ project_name }} {
bai=sample[3]
}

call rtg.rtg as rtg {
input:
vcf=sample[4]
}

call benchmark.benchmark as benchmark {
input:
gzvcf=rtg.vcf_gz,
gzvcf_index=rtg.vcf_index,
vcf=sample[4],
benchmarking_dir=benchmarking_dir,
ref_dir=ref_dir,
sample_mark=sample[5],

Loading…
Cancel
Save