浏览代码

first commit

master
YuanfengZhang 3 年前
当前提交
f09d9b5f1a
共有 4 个文件被更改,包括 81 次插入0 次删除
  1. +7
    -0
      defaults
  2. +9
    -0
      inputs
  3. +41
    -0
      tasks/pre.wdl
  4. +24
    -0
      workflow.wdl

+ 7
- 0
defaults 查看文件

@@ -0,0 +1,7 @@
{
"fasta": "GRCh38.d1.vd1.fa",
"disk_size": "500",
"cluster_config": "OnDemand bcs.b2.3xlarge img-ubuntu-vpc",
"docker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/rtg-hap:latest",
"ref_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/"
}

+ 9
- 0
inputs 查看文件

@@ -0,0 +1,9 @@
{
"{{ project_name }}.fasta": "{{ fasta }}",
"{{ project_name }}.disk_size": "{{ disk_size }}",
"{{ project_name }}.docker": "{{ docker }}",
"{{ project_name }}.cluster_config": "{{ cluster_config }}",
"{{ project_name }}.vcf": "{{ vcf }}",
"{{ project_name }}.sample": "{{ sample }}",
"{{ project_name }}.ref_dir": "{{ ref_dir }}"
}

+ 41
- 0
tasks/pre.wdl 查看文件

@@ -0,0 +1,41 @@
task pre {

File ref_dir
File fasta
File vcf
String sample
String docker
String cluster_config
String disk_size

command <<<

set -o pipefail
set -e
nt=$(nproc)
mkdir -p /cromwell_root/tmp
cp -r ${ref_dir} /cromwell_root/tmp/

export HGREF=/cromwell_root/tmp/reference_data/GRCh38.d1.vd1.fa

if [[ ${sample} =~ "LCL7" ]]; then
/opt/hap.py/bin/pre.py ${vcf} ${sample}vcf.gz \
-r ${ref_dir}/${fasta} -D -L --fixchr --gender male --threads $nt --logfile ${sample}.normalization.log
else
/opt/hap.py/bin/pre.py ${vcf} ${sample}vcf.gz \
-r ${ref_dir}/${fasta} -D -L --fixchr --gender female --threads $nt --logfile ${sample}.normalization.log
fi

>>>

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

+ 24
- 0
workflow.wdl 查看文件

@@ -0,0 +1,24 @@
import "./tasks/pre.wdl" as pre


workflow {{ project_name }} {

File ref_dir
File fasta
File vcf
String sample
String docker
String cluster_config
String disk_size

call pre.pre as pre {
input:
fasta=fasta,
ref_dir=ref_dir,
vcf=vcf,
sample=sample,
docker=docker,
cluster_config=cluster_config,
disk_size=disk_size
}
}

正在加载...
取消
保存