Selaa lähdekoodia

first commit

master
LUYAO REN 4 vuotta sitten
commit
32ce8a51a5
7 muutettua tiedostoa jossa 256 lisäystä ja 0 poistoa
  1. +0
    -0
      README.md
  2. +16
    -0
      inputs
  3. BIN
      tasks/.DS_Store
  4. +49
    -0
      tasks/bcf2vcf.wdl
  5. +68
    -0
      tasks/delly.wdl
  6. +34
    -0
      tasks/mapping.wdl
  7. +89
    -0
      workflow.wdl

+ 0
- 0
README.md Näytä tiedosto


+ 16
- 0
inputs Näytä tiedosto

@@ -0,0 +1,16 @@
{
"{{ project_name }}.SENTIEON_INSTALL_DIR": "/opt/sentieon-genomics",
"{{ project_name }}.fasta": "GRCh38.d1.vd1.fa",
"{{ project_name }}.normal_read2": "{{ normal_read2 }}",
"{{ project_name }}.tumor_read2": "{{ tumor_read2 }}",
"{{ project_name }}.DELLYdocker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/delly:v0.8.1",
"{{ project_name }}.disk_size": "500",
"{{ project_name }}.tumor_read1": "{{ tumor_read1 }}",
"{{ project_name }}.sample_name": "{{ sample_name }}",
"{{ project_name }}.SMALLcluster_config": "OnDemand bcs.a2.xlarge img-ubuntu-vpc",
"{{ project_name }}.BCFdocker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/bcftools:v1.9",
"{{ project_name }}.BIGcluster_config": "OnDemand bcs.a2.7xlarge img-ubuntu-vpc",
"{{ project_name }}.normal_read1": "{{ normal_read1 }}",
"{{ project_name }}.SENTIEONdocker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/sentieon-genomics:v2018.08.01",
"{{ project_name }}.ref_dir": "oss://chinese-quartet/quartet-storage-data/reference_data/"
}

BIN
tasks/.DS_Store Näytä tiedosto


+ 49
- 0
tasks/bcf2vcf.wdl Näytä tiedosto

@@ -0,0 +1,49 @@
task bcf2vcf {
File ins_bcf
File ins_bcf_index
File del_bcf
File del_bcf_index
File dup_bcf
File dup_bcf_index
File inv_bcf
File inv_bcf_index
File bnd_bcf
File bnd_bcf_index

String sample_name
String docker
String disk_size
String cluster_config

command <<<

set -o pipefail
set -e
/opt/hall-lab/bcftools-1.9/bin/bcftools view ${ins_bcf} > ${sample_name}.ins.vcf
/opt/hall-lab/bcftools-1.9/bin/bcftools view ${del_bcf} > ${sample_name}.del.vcf
/opt/hall-lab/bcftools-1.9/bin/bcftools view ${dup_bcf} > ${sample_name}.dup.vcf
/opt/hall-lab/bcftools-1.9/bin/bcftools view ${inv_bcf} > ${sample_name}.inv.vcf
/opt/hall-lab/bcftools-1.9/bin/bcftools view ${bnd_bcf} > ${sample_name}.bnd.vcf
>>>

runtime {
docker:docker
cluster:cluster_config
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}

output {
File ins_vcf = "${sample_name}.ins.vcf"
File del_vcf = "${sample_name}.del.vcf"
File dup_vcf = "${sample_name}.dup.vcf"
File inv_vcf = "${sample_name}.inv.vcf"
File bnd_vcf = "${sample_name}.bnd.vcf"
}
}





+ 68
- 0
tasks/delly.wdl Näytä tiedosto

@@ -0,0 +1,68 @@
task delly {

File tumor_bam
File tumor_bam_idx
File normal_bam
File normal_bam_idx
File ref_dir
String fasta
String sample_name
String docker
String disk_size
String cluster_config

command <<<

set -o pipefail
set -e
echo -e "${sample_name}.tumor\ttumor\n${sample_name}.normal\tnormal" > samples.tsv

nt=$(nproc)
export OMP_NUM_THREADS=$nt

/opt/delly/src/delly call -n -t DEL -g ${ref_dir}/${fasta} -o ${sample_name}.delly.del.somatic.bcf -x /opt/delly/excludeTemplates/human.hg38.excl.tsv ${tumor_bam} ${normal_bam}

/opt/delly/src/delly filter -t DEL -f somatic -o ${sample_name}.delly.del.somatic.filtered.bcf -s samples.tsv ${sample_name}.delly.del.somatic.bcf

/opt/delly/src/delly call -n -t DUP -g ${ref_dir}/${fasta} -o ${sample_name}.delly.dup.somatic.bcf -x /opt/delly/excludeTemplates/human.hg38.excl.tsv ${tumor_bam} ${normal_bam}

/opt/delly/src/delly filter -t DUP -f somatic -o ${sample_name}.delly.dup.somatic.filtered.bcf -s samples.tsv ${sample_name}.delly.dup.somatic.bcf

/opt/delly/src/delly call -n -t INS -g ${ref_dir}/${fasta} -o ${sample_name}.delly.ins.somatic.bcf -x /opt/delly/excludeTemplates/human.hg38.excl.tsv ${tumor_bam} ${normal_bam}

/opt/delly/src/delly filter -t INS -f somatic -o ${sample_name}.delly.ins.somatic.filtered.bcf -s samples.tsv ${sample_name}.delly.ins.somatic.bcf

/opt/delly/src/delly call -n -t INV -g ${ref_dir}/${fasta} -o ${sample_name}.delly.inv.somatic.bcf -x /opt/delly/excludeTemplates/human.hg38.excl.tsv ${tumor_bam} ${normal_bam}

/opt/delly/src/delly filter -t INV -f somatic -o ${sample_name}.delly.inv.somatic.filtered.bcf -s samples.tsv ${sample_name}.delly.inv.somatic.bcf

/opt/delly/src/delly call -n -t BND -g ${ref_dir}/${fasta} -o ${sample_name}.delly.bnd.somatic.bcf -x /opt/delly/excludeTemplates/human.hg38.excl.tsv ${tumor_bam} ${normal_bam}

/opt/delly/src/delly filter -t BND -f somatic -o ${sample_name}.delly.bnd.somatic.filtered.bcf -s samples.tsv ${sample_name}.delly.bnd.somatic.bcf

>>>

runtime {
docker:docker
cluster:cluster_config
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}

output {
File del_bcf = "${sample_name}.delly.del.somatic.filtered.bcf"
File del_bcf_index = "${sample_name}.delly.del.somatic.filtered.bcf.csi"
File dup_bcf = "${sample_name}.delly.dup.somatic.filtered.bcf"
File dup_bcf_index = "${sample_name}.delly.dup.somatic.filtered.bcf.csi"
File ins_bcf = "${sample_name}.delly.ins.somatic.filtered.bcf"
File ins_bcf_index = "${sample_name}.delly.ins.somatic.filtered.bcf.csi"
File inv_bcf = "${sample_name}.delly.inv.somatic.filtered.bcf"
File inv_bcf_index = "${sample_name}.delly.inv.somatic.filtered.bcf.csi"
File bnd_bcf = "${sample_name}.delly.bnd.somatic.filtered.bcf"
File bnd_bcf_index = "${sample_name}.delly.bnd.somatic.filtered.bcf.csi"
}
}





+ 34
- 0
tasks/mapping.wdl Näytä tiedosto

@@ -0,0 +1,34 @@
task mapping {

File ref_dir
String fasta
File fastq_1
File fastq_2
String type
String SENTIEON_INSTALL_DIR
String group
String sample
String pl
String docker
String cluster_config
String disk_size

command <<<
set -o pipefail
set -e
export SENTIEON_LICENSE=192.168.0.55:8990
nt=$(nproc)
${SENTIEON_INSTALL_DIR}/bin/bwa mem -M -R "@RG\tID:${group}.${type}\tSM:${sample}.${type}\tPL:${pl}" -t $nt -K 10000000 ${ref_dir}/${fasta} ${fastq_1} ${fastq_2} | ${SENTIEON_INSTALL_DIR}/bin/sentieon util sort -o ${sample}.sorted.bam -t $nt --sam2bam -i -
>>>

runtime {
docker:docker
cluster: cluster_config
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
File sorted_bam = "${sample}.sorted.bam"
File sorted_bam_index = "${sample}.sorted.bam.bai"
}
}

+ 89
- 0
workflow.wdl Näytä tiedosto

@@ -0,0 +1,89 @@
import "./tasks/mapping.wdl" as mapping
import "./tasks/delly.wdl" as delly
import "./tasks/bcf2vcf.wdl" as bcf2vcf

workflow {{ project_name }} {
String SENTIEON_INSTALL_DIR
String SENTIEONdocker
String DELLYdocker
String BCFdocker

File tumor_read1
File tumor_read2
File normal_read1
File normal_read2
File ref_dir
String fasta
String sample_name
String disk_size

String BIGcluster_config
String SMALLcluster_config

call mapping.mapping as tumor_mapping {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
group=sample_name,
sample=sample_name,
type="tumor",
pl="ILLUMINAL",
fasta=fasta,
ref_dir=ref_dir,
fastq_1=tumor_read1,
fastq_2=tumor_read2,
docker=SENTIEONdocker,
disk_size=disk_size,
cluster_config=BIGcluster_config
}

call mapping.mapping as normal_mapping {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
group=sample_name,
sample=sample_name,
type="normal",
pl="ILLUMINAL",
fasta=fasta,
ref_dir=ref_dir,
fastq_1=normal_read1,
fastq_2=normal_read2,
docker=SENTIEONdocker,
disk_size=disk_size,
cluster_config=BIGcluster_config
}

call delly.delly as delly {
input:
tumor_bam=tumor_mapping.sorted_bam,
tumor_bam_idx=tumor_mapping.sorted_bam_index,
normal_bam=normal_mapping.sorted_bam,
normal_bam_idx=normal_mapping.sorted_bam_index,
ref_dir=ref_dir,
fasta=fasta,
sample_name=sample_name,
docker=DELLYdocker,
disk_size=disk_size,
cluster_config=SMALLcluster_config
}

call bcf2vcf.bcf2vcf as bcf2vcf {
input:
ins_bcf=delly.ins_bcf,
ins_bcf_index=delly.ins_bcf_index,
del_bcf=delly.del_bcf,
del_bcf_index=delly.del_bcf_index,
dup_bcf=delly.dup_bcf,
dup_bcf_index=delly.dup_bcf_index,
inv_bcf=delly.inv_bcf,
inv_bcf_index=delly.inv_bcf_index,
bnd_bcf=delly.bnd_bcf,
bnd_bcf_index=delly.bnd_bcf_index,
docker=BCFdocker,
disk_size=disk_size,
cluster_config=SMALLcluster_config,
sample_name=sample_name
}
}


Loading…
Peruuta
Tallenna