Browse Source

first commit

master
biochenglinliu 1 year ago
commit
a57323541c
5 changed files with 84 additions and 0 deletions
  1. +0
    -0
      README.md
  2. +5
    -0
      defaults
  3. +9
    -0
      inputs
  4. +46
    -0
      tasks/battenberg.wdl
  5. +24
    -0
      workflow.wdl

+ 0
- 0
README.md View File


+ 5
- 0
defaults View File

@@ -0,0 +1,5 @@
{
"battenberg_docker":"registry.cn-shanghai.aliyuncs.com/shaolab2023_docker/battenberg_lcl:2.8",
"battenberg_cluster":"OnDemand bcs.ps.r.8xlarge img-ubuntu-vpc",
"disk_size":"200"
}

+ 9
- 0
inputs View File

@@ -0,0 +1,9 @@
{
"{{ project_name }}.battenberg_docker": "{{ battenberg_docker }}",
"{{ project_name }}.tumor_id": "{{ tumor_id }}",
"{{ project_name }}.tumor_bam": "{{ tumor_bam }}",
"{{ project_name }}.normal_id": "{{ normal_id }}",
"{{ project_name }}.normal_bam": "{{ normal_bam }}",
"{{ project_name }}.battenberg_cluster": "{{ battenberg_cluster }}",
"{{ project_name }}.disk_size": "{{ disk_size }}"
}

+ 46
- 0
tasks/battenberg.wdl View File

@@ -0,0 +1,46 @@
task battenberg {
String tumor_id
File tumor_bam
String normal_id
File normal_bam

String docker
String cluster
String disk_size

command <<<

set -o pipefail
set -e
samtools view -h ${normal_bam} |sed 's/chr//g'|samtools view -bS > ./${normal_id}.sorted.deduped.nochr.bam
samtools view -h ${tumor_bam} |sed 's/chr//g'|samtools view -bS > ./${tumor_id}.sorted.deduped.nochr.bam
samtools index ./${normal_id}.sorted.deduped.nochr.bam
samtools index ./${tumor_id}.sorted.deduped.nochr.bam
cp /opt/battenberg_reference/battenberg_wgs.R ./
Rscript ./battenberg_wgs.R -t ${tumor_id} -n ${normal_id} --nb ${normal_id}.sorted.deduped.nochr.bam --tb ${tumor_id}.sorted.deduped.nochr.bam --cpu 1 --sex female -o ./
>>>

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

output {
File subclones = "${tumor_id}_subclones.txt"
File rho = "${tumor_id}_rho_and_psi.txt"
File average_png = "${tumor_id}_BattenbergProfile_average.png"
File subclones_png = "${tumor_id}_subclones.png"
File distance_png = "${tumor_id}_distance.png"
File tumor_png = "${tumor_id}.tumour.png"
File germline_png = "${tumor_id}.germline.png"
File coverage_png = "${tumor_id}_coverage.png"
File alleleratio_png = "${tumor_id}_alleleratio.png"
}

}



+ 24
- 0
workflow.wdl View File

@@ -0,0 +1,24 @@
import "./tasks/battenberg.wdl" as battenberg
workflow {{ project_name }} {
String tumor_id
File tumor_bam
String normal_id
File normal_bam

String battenberg_docker
String battenberg_cluster
String disk_size

call battenberg.battenberg as battenberg {
input:
tumor_id=tumor_id,
tumor_bam=tumor_bam,
normal_id=normal_id,
normal_bam=normal_bam,
docker=battenberg_docker,
cluster=battenberg_cluster,
disk_size=disk_size
}


}

Loading…
Cancel
Save