Sfoglia il codice sorgente

Update: input is FASTQ

master
YaqingLiu 4 anni fa
parent
commit
8de429005d
5 ha cambiato i file con 165 aggiunte e 44 eliminazioni
  1. +4
    -0
      defaults
  2. +2
    -0
      inputs
  3. +41
    -0
      tasks/Dedup.wdl
  4. +35
    -0
      tasks/mapping.wdl
  5. +83
    -44
      workflow.wdl

+ 4
- 0
defaults Vedi File

@@ -1,4 +1,8 @@
{
"fastq_1": "",
"fastq_2": "",
"deduped_bam": "",
"deduped_bam_index": "",
"fasta": "GRCh38.d1.vd1.fa",
"ref_dir": "oss://pgx-reference-data/GRCh38.d1.vd1/",
"dbsnp": "dbsnp_146.hg38.vcf",

+ 2
- 0
inputs Vedi File

@@ -1,5 +1,7 @@
{
"{{ project_name }}.sample_id": "{{ sample_id }}",
"{{ project_name }}.fastq_1": "{{ fastq_1 }}",
"{{ project_name }}.fastq_2": "{{ fastq_2 }}",
"{{ project_name }}.deduped_bam": "{{ deduped_bam }}",
"{{ project_name }}.deduped_bam_index": "{{ deduped_bam_index }}",
"{{ project_name }}.fasta": "{{ fasta }}",

+ 41
- 0
tasks/Dedup.wdl Vedi File

@@ -0,0 +1,41 @@
task Dedup {
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String sample
File sorted_bam
File sorted_bam_index
String docker
String cluster_config
String disk_size
command <<<
set -o pipefail
set -e
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -i ${sorted_bam} --algo LocusCollector --fun score_info ${sample}_score.txt
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -i ${sorted_bam} --algo Dedup --rmdup --score_info ${sample}_score.txt --metrics ${sample}_dedup_metrics.txt ${sample}.sorted.deduped.bam
>>>
runtime {
docker: docker
cluster: cluster_config
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
File score = "${sample}_score.txt"
File dedup_metrics = "${sample}_dedup_metrics.txt"
File deduped_bam = "${sample}.sorted.deduped.bam"
File deduped_bam_index = "${sample}.sorted.deduped.bam.bai"
}
}

+ 35
- 0
tasks/mapping.wdl Vedi File

@@ -0,0 +1,35 @@
task mapping {
File ref_dir
String fasta
File fastq_1
File fastq_2
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String group
String sample
String pl
String docker
String cluster_config
String disk_size
command <<<
set -o pipefail
set -e
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
${SENTIEON_INSTALL_DIR}/bin/bwa mem -M -R "@RG\tID:${group}\tSM:${sample}\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"
}
}

+ 83
- 44
workflow.wdl Vedi File

@@ -1,3 +1,5 @@
import "./tasks/mapping.wdl" as mapping
import "./tasks/Dedup.wdl" as Dedup
import "./tasks/Realigner.wdl" as Realigner
import "./tasks/BQSR.wdl" as BQSR
import "./tasks/PoN.wdl" as PoN
@@ -5,10 +7,13 @@ import "./tasks/PoN.wdl" as PoN
workflow {{ project_name }} {
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE

String sample_id
File? fastq_1
File? fastq_2
File? deduped_bam
File? deduped_bam_index

File deduped_bam
File deduped_bam_index
File regions
File ref_dir
String fasta
@@ -21,50 +26,84 @@ workflow {{ project_name }} {
String cluster_config
String disk_size
call Realigner.Realigner as Realigner {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
deduped_bam=deduped_bam,
deduped_bam_index=deduped_bam_index,
db_mills=db_mills,
dbmills_dir=dbmills_dir,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}
if (fastq_1!= "") {
call mapping.mapping as mapping {
input:
group=sample_id,
sample=sample_id,
fastq_1=fastq_1,
fastq_2=fastq_2,
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
pl="ILLUMINAL",
fasta=fasta,
ref_dir=ref_dir,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call BQSR.BQSR as BQSR {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
realigned_bam=Realigner.realigner_bam,
realigned_bam_index=Realigner.realigner_bam_index,
db_mills=db_mills,
dbmills_dir=dbmills_dir,
dbsnp=dbsnp,
dbsnp_dir=dbsnp_dir,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
call Dedup.Dedup as Dedup {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
sorted_bam=mapping.sorted_bam,
sorted_bam_index=mapping.sorted_bam_index,
sample=sample_id,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

File deduped_bam=Dedup.deduped_bam
File deduped_bam_index=Dedup.deduped_bam_index
}

call PoN.PoN as PoN {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
regions=regions,
normal_bam=BQSR.recaled_bam,
normal_bam_index=BQSR.recaled_bam_index,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
if (deduped_bam!= "") {
call Realigner.Realigner as Realigner {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
deduped_bam=deduped_bam,
deduped_bam_index=deduped_bam_index,
db_mills=db_mills,
dbmills_dir=dbmills_dir,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call BQSR.BQSR as BQSR {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
realigned_bam=Realigner.realigner_bam,
realigned_bam_index=Realigner.realigner_bam_index,
db_mills=db_mills,
dbmills_dir=dbmills_dir,
dbsnp=dbsnp,
dbsnp_dir=dbsnp_dir,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call PoN.PoN as PoN {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
regions=regions,
normal_bam=BQSR.recaled_bam,
normal_bam_index=BQSR.recaled_bam_index,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}
}
}

Loading…
Annulla
Salva