Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update interval input #618

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions definitions/pipelines/simple_exome_alignment.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: Workflow
label: "simple xome alignment with qc"
requirements:
- class: SchemaDefRequirement
types:
- $import: ../types/labelled_file.yml
- class: SubworkflowFeatureRequirement
inputs:
reference: string
bams:
type: File[]
readgroups:
type: string[]
bait_intervals:
type: File
final_name:
type: string?
target_intervals:
type: File
per_base_intervals:
type: ../types/labelled_file.yml#labelled_file[]
per_target_intervals:
type: ../types/labelled_file.yml#labelled_file[]
summary_intervals:
type: ../types/labelled_file.yml#labelled_file[]
picard_metric_accumulation_level:
type: string
qc_minimum_mapping_quality:
type: int?
qc_minimum_base_quality:
type: int?
outputs:
cram:
type: File
outputSource: index_cram/indexed_cram
mark_duplicates_metrics:
type: File
outputSource: mark_duplicates_and_sort/metrics_file
insert_size_metrics:
type: File
outputSource: qc/insert_size_metrics
insert_size_histogram:
type: File
outputSource: qc/insert_size_histogram
alignment_summary_metrics:
type: File
outputSource: qc/alignment_summary_metrics
hs_metrics:
type: File
outputSource: qc/hs_metrics
per_target_coverage_metrics:
type: File[]
outputSource: qc/per_target_coverage_metrics
per_target_hs_metrics:
type: File[]
outputSource: qc/per_target_hs_metrics
per_base_coverage_metrics:
type: File[]
outputSource: qc/per_base_coverage_metrics
per_base_hs_metrics:
type: File[]
outputSource: qc/per_base_hs_metrics
summary_hs_metrics:
type: File[]
outputSource: qc/summary_hs_metrics
flagstats:
type: File
outputSource: qc/flagstats
steps:
align:
scatter: [bam, readgroup]
scatterMethod: dotproduct
run: align.cwl
in:
bam: bams
readgroup: readgroups
reference: reference
out:
[tagged_bam]
merge:
run: ../tools/merge_bams_samtools.cwl
in:
bams: align/tagged_bam
name: final_name
out:
[merged_bam]
name_sort:
run: ../tools/name_sort.cwl
in:
bam: merge/merged_bam
out:
[name_sorted_bam]
mark_duplicates_and_sort:
run: ../tools/mark_duplicates_and_sort.cwl
in:
bam: name_sort/name_sorted_bam
out:
[sorted_bam, metrics_file]
index_bam:
run: ../tools/index_bam.cwl
in:
bam: mark_duplicates_and_sort/sorted_bam
out:
[indexed_bam]
qc:
run: ../subworkflows/qc_exome_no_vbi.cwl
in:
bam: index_bam/indexed_bam
reference: reference
bait_intervals: bait_intervals
target_intervals: target_intervals
per_base_intervals: per_base_intervals
per_target_intervals: per_target_intervals
summary_intervals: summary_intervals
picard_metric_accumulation_level: picard_metric_accumulation_level
minimum_mapping_quality: qc_minimum_mapping_quality
minimum_base_quality: qc_minimum_base_quality
out: [insert_size_metrics, insert_size_histogram, alignment_summary_metrics, hs_metrics, per_target_coverage_metrics, per_target_hs_metrics, per_base_coverage_metrics, per_base_hs_metrics, summary_hs_metrics, flagstats]
bam_to_cram:
run: ../tools/bam_to_cram.cwl
in:
bam: index_bam/indexed_bam
reference: reference
out:
[cram]
index_cram:
run: ../tools/index_cram.cwl
in:
cram: bam_to_cram/cram
out:
[indexed_cram]
4 changes: 2 additions & 2 deletions definitions/pipelines/wgs_alignment.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ inputs:
omni_vcf:
type: File
secondaryFiles: [.tbi]
intervals:
qc_intervals:
type: File
picard_metric_accumulation_level:
type: string
Expand Down Expand Up @@ -115,7 +115,7 @@ steps:
bam: alignment/final_bam
reference: reference
omni_vcf: omni_vcf
intervals: intervals
intervals: qc_intervals
picard_metric_accumulation_level: picard_metric_accumulation_level
minimum_mapping_quality: minimum_mapping_quality
minimum_base_quality: minimum_base_quality
Expand Down
117 changes: 117 additions & 0 deletions definitions/subworkflows/qc_exome_no_vbi.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: Workflow
label: "Exome QC workflow without VerifyBamId"
requirements:
- class: SchemaDefRequirement
types:
- $import: ../types/labelled_file.yml
- class: SubworkflowFeatureRequirement
inputs:
bam:
type: File
secondaryFiles: [^.bai]
reference:
type: string
bait_intervals:
type: File
target_intervals:
type: File
picard_metric_accumulation_level:
type: string?
default: ALL_READS
minimum_mapping_quality:
type: int?
minimum_base_quality:
type: int?
per_base_intervals:
type: ../types/labelled_file.yml#labelled_file[]
per_target_intervals:
type: ../types/labelled_file.yml#labelled_file[]
summary_intervals:
type: ../types/labelled_file.yml#labelled_file[]
outputs:
insert_size_metrics:
type: File
outputSource: collect_insert_size_metrics/insert_size_metrics
insert_size_histogram:
type: File
outputSource: collect_insert_size_metrics/insert_size_histogram
alignment_summary_metrics:
type: File
outputSource: collect_alignment_summary_metrics/alignment_summary_metrics
hs_metrics:
type: File
outputSource: collect_roi_hs_metrics/hs_metrics
per_target_coverage_metrics:
type: File[]
outputSource: collect_detailed_hs_metrics/per_target_coverage_metrics
per_target_hs_metrics:
type: File[]
outputSource: collect_detailed_hs_metrics/per_target_hs_metrics
per_base_coverage_metrics:
type: File[]
outputSource: collect_detailed_hs_metrics/per_base_coverage_metrics
per_base_hs_metrics:
type: File[]
outputSource: collect_detailed_hs_metrics/per_base_hs_metrics
summary_hs_metrics:
type: File[]
outputSource: collect_detailed_hs_metrics/summary_hs_metrics
flagstats:
type: File
outputSource: samtools_flagstat/flagstats
steps:
collect_insert_size_metrics:
run: ../tools/collect_insert_size_metrics.cwl
in:
bam: bam
reference: reference
metric_accumulation_level: picard_metric_accumulation_level
out:
[insert_size_metrics, insert_size_histogram]
collect_alignment_summary_metrics:
run: ../tools/collect_alignment_summary_metrics.cwl
in:
bam: bam
reference: reference
metric_accumulation_level: picard_metric_accumulation_level
out:
[alignment_summary_metrics]
collect_roi_hs_metrics:
run: ../tools/collect_hs_metrics.cwl
in:
bam: bam
reference: reference
metric_accumulation_level:
valueFrom: "ALL_READS"
bait_intervals: bait_intervals
target_intervals: target_intervals
per_target_coverage:
default: false
per_base_coverage:
default: false
output_prefix:
valueFrom: "roi"
minimum_mapping_quality: minimum_mapping_quality
minimum_base_quality: minimum_base_quality
out:
[hs_metrics]
collect_detailed_hs_metrics:
run: hs_metrics.cwl
in:
bam: bam
minimum_mapping_quality: minimum_mapping_quality
minimum_base_quality: minimum_base_quality
per_base_intervals: per_base_intervals
per_target_intervals: per_target_intervals
reference: reference
summary_intervals: summary_intervals
out:
[per_base_coverage_metrics, per_base_hs_metrics, per_target_coverage_metrics, per_target_hs_metrics, summary_hs_metrics]
samtools_flagstat:
run: ../tools/samtools_flagstat.cwl
in:
bam: bam
out: [flagstats]