biochenglinliu преди 2 години
ревизия
29d37ee560
променени са 5 файла, в които са добавени 139 реда и са изтрити 0 реда
  1. +0
    -0
      README.md
  2. +10
    -0
      defaults
  3. +13
    -0
      inputs
  4. +79
    -0
      tasks/pathseq.wdl
  5. +37
    -0
      workflow.wdl

+ 0
- 0
README.md Целия файл


+ 10
- 0
defaults Целия файл

@@ -0,0 +1,10 @@
{
"host_image":"oss://database-shao/pathseq_database/pathseq_host.fa.img",
"host_kmer":"oss://database-shao/pathseq_database/pathseq_host.bfi",
"microbe_dict":"oss://database-shao/pathseq_database/pathseq_microbe.dict",
"microbe_bwa_image":"oss://database-shao/pathseq_database/pathseq_microbe.fa.img",
"microbe_taxonomy":"oss://database-shao/pathseq_database/pathseq_taxonomy.db",
"pathseq_docker":"registry.cn-shanghai.aliyuncs.com/shaolab_docker/gatk4:4.2.6.1",
"pathseq_cluster":"OnDemand bcs.es.r.6xlarge img-ubuntu-vpc",
"disk_size":"300"
}

+ 13
- 0
inputs Целия файл

@@ -0,0 +1,13 @@
{
"{{ project_name }}.sample_id": "{{ sample_id }}",
"{{ project_name }}.fastq1": "{{ fastq1 }}",
"{{ project_name }}.fastq2": "{{ fastq2 }}",
"{{ project_name }}.host_image": "{{ host_image }}",
"{{ project_name }}.host_kmer": "{{ host_kmer }}",
"{{ project_name }}.microbe_dict": "{{ microbe_dict }}",
"{{ project_name }}.microbe_bwa_image": "{{ microbe_bwa_image }}",
"{{ project_name }}.microbe_taxonomy": "{{ microbe_taxonomy }}",
"{{ project_name }}.pathseq_docker": "{{ pathseq_docker }}",
"{{ project_name }}.pathseq_cluster": "{{ pathseq_cluster }}",
"{{ project_name }}.disk_size": "{{ disk_size }}"
}

+ 79
- 0
tasks/pathseq.wdl Целия файл

@@ -0,0 +1,79 @@
task pathseq {
String sample_id
File fastq1
File fastq2
File host_image
File host_kmer
File microbe_dict
File microbe_bwa_image
File microbe_taxonomy

String disk_size
String docker
String cluster

command <<<
set -o pipefail
set -e

mkdir ubam
mkdir filter_log
mkdir clean_pair_bam
mkdir clean_unpaired_bam
mkdir pathseq_result
mkdir bwa_pair_bam
mkdir bwa_pair_unpair_bam

gatk FastqToSam \
-F1 ${fastq1} \
-F2 ${fastq2} \
-O ./ubam/${sample_id}.bam \
-SM ${sample_id}

time gatk --java-options "-Xmx185g" PathSeqFilterSpark \
--input ./ubam/${sample_id}.bam \
--paired-output ./clean_pair_bam/${sample_id}_paired.bam \
--unpaired-output ./clean_unpaired_bam/${sample_id}_unpaired.bam \
--min-clipped-read-length 70 \
--kmer-file ${host_kmer} \
--filter-bwa-image ${host_image} \
--filter-metrics filter_log/${sample_id}.log

time gatk --java-options "-Xmx185g" PathSeqBwaSpark \
--paired-input ./clean_pair_bam/${sample_id}_paired.bam \
--unpaired-input ./clean_unpaired_bam/${sample_id}_unpaired.bam \
--paired-output bwa_pair_bam/${sample_id}_bwa_paired.bam \
--unpaired-output bwa_unpair_bam/${sample_id}_bwa_unpaired.bam \
--microbe-bwa-image ${microbe_bwa_image} \
--microbe-dict ${microbe_dict}


time gatk --java-options "-Xmx185g" PathSeqScoreSpark \
--paired-input bwa_pair_bam/${sample_id}_bwa_paired.bam \
--unpaired-input bwa_unpair_bam/${sample_id}_bwa_unpaired.bam \
--taxonomy-file ${microbe_taxonomy} \
--scores-output pathseq_result/${sample_id}.pathseq.txt \
--output pathseq_result/${sample_id}.pathseq_reads.bam \
--min-score-identity 0.90 \
--identity-margin 0.02


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

output {
File pathseq_txt = "pathseq_result/${sample_id}.pathseq.txt"
File pathseq_bam = "pathseq_result/${sample_id}.pathseq_reads.bam"
File pathseq_sbi = "pathseq_result/${sample_id}.pathseq_reads.bam.sbi"
}

}


+ 37
- 0
workflow.wdl Целия файл

@@ -0,0 +1,37 @@
import "./tasks/pathseq.wdl" as pathseq

workflow {{ project_name }} {
String sample_id
File fastq1
File fastq2
String disk_size
File host_image
File host_kmer
File microbe_dict
File microbe_bwa_image
File microbe_taxonomy

String pathseq_docker
String pathseq_cluster



call pathseq.pathseq as pathseq {
input:
sample_id=sample_id,
fastq1=fastq1,
fastq2=fastq2,
host_image=host_image,
host_kmer=host_kmer,
microbe_dict=microbe_dict,
microbe_bwa_image=microbe_bwa_image,
microbe_taxonomy=microbe_taxonomy,
disk_size=disk_size,
docker=pathseq_docker,
cluster=pathseq_cluster
}



}

Loading…
Отказ
Запис