Chipseq alignment with qc and creating homer tag directory
type: Workflow
inputs: chipseq sequence
outputs: gc bias metrics summary
outputs: wgs metrics
inputs: per target intervals
inputs: per base intervals
workflow/steps: alignment
outputs: flagstats
outputs: bam
inputs: bqsr known sites
outputs: gc bias metrics chart
outputs: alignment summary metrics
inputs: reference
outputs: verify bam id metrics
workflow/steps: bam to sam
cwl version: v1.2
original cwl version: v1.0
inputs: picard metric accumulation level
outputs: per base hs metrics
inputs: summary intervals
outputs: tag directory
outputs: summary hs metrics
inputs: intervals
outputs: mark duplicates metrics
outputs: gc bias metrics
requirements: StepInputExpressionRequirement
hints: NetworkAccess
inputs: bqsr intervals
outputs: per target hs metrics
workflow/steps: homer tag directory
inputs: minimum mapping quality
requirements: SubworkflowFeatureRequirement
outputs: per target coverage metrics
inputs: minimum base quality
workflow/steps: qc
inputs: final name
outputs: insert size histogram
outputs: verify bam id depth
inputs: omni vcf
requirements: SchemaDefRequirement
  schema def requirement/types: sequence data with readgroup information
  schema def requirement/types: a file with a label
outputs: per base coverage metrics
outputs: insert size metrics
hints: LoadListingRequirement

sequence data with readgroup information
type: record
fields: sequence data/readgroup
fields: sequence data/sequence

a file with a label
type: record
fields: labelled file/file
fields: labelled file/label

Raw sequence data to BQSR
type: Workflow
workflow/steps: apply bqsr
outputs: final bam
outputs: mark duplicates metrics file
inputs: bqsr intervals
cwl version: v1.2
workflow/steps: name sort
requirements: SubworkflowFeatureRequirement
inputs: trimming
hints: LoadListingRequirement
workflow/steps: mark duplicates and sort
workflow/steps: merge
inputs: final name
hints: NetworkAccess
inputs: unaligned
inputs: reference
inputs: bqsr known sites
original cwl version: v1.0
requirements: ScatterFeatureRequirement
workflow/steps: bqsr
workflow/steps: index bam
requirements: SchemaDefRequirement
  schema def requirement/types: sequence data with readgroup information
  schema def requirement/types: trimming adapter file and parameters
requirements: MultipleInputFeatureRequirement
workflow/steps: align

apply BQSR
type: CommandLineTool
requirements: DockerRequirement
  docker requirement/docker pull: broadinstitute/gatk:4.1.8.1
outputs: bqsr bam
arguments: -O
arguments:
  value from: $(runtime.outdir)/$(inputs.output_name).bam
arguments: --static-quantized-quals
arguments: 10
arguments: 20
arguments: 30
requirements: ResourceRequirement
  resource requirement/ram min: 18000
inputs: bam
inputs: bqsr table
hints: NetworkAccess
original cwl version: v1.0
inputs: output name
inputs: reference
hints: LoadListingRequirement
base command: /gatk/gatk
base command: --java-options
base command: -Xmx16g
base command: ApplyBQSR
cwl version: v1.2

bqsr bam
type: File
output binding:
  command output binding/glob: $(inputs.output_name).bam

bam
type: File
input binding:
  command line binding/prefix: -I
  command line binding/position: 2

bqsr table
type: File
input binding:
  command line binding/prefix: -bqsr
  command line binding/position: 3

output name
type: string
type: null
default: final

reference
type: File
type: string
input binding:
  command line binding/prefix: -R
  command line binding/position: 1

final name
type: string
default: final

sort BAM by name
type: CommandLineTool
cwl version: v1.2
hints: NetworkAccess
original cwl version: v1.0
requirements: ResourceRequirement
  resource requirement/ram min: 26000
  resource requirement/cores min: 8
base command: /usr/bin/sambamba
base command: sort
hints: LoadListingRequirement
arguments: -t
arguments:
  value from: $(runtime.cores)
arguments: -m
arguments: 22G
arguments: -n
arguments: -o
inputs: bam
requirements: DockerRequirement
  docker requirement/docker pull: mgibio/sambamba-cwl:0.6.4
outputs: name sorted bam

bam
type: File
input binding:
  command line binding/position: 1

name sorted bam
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).NameSorted.bam

trimming adapter file and parameters
type: record
fields: trimming options/adapters
fields: trimming options/min overlap

trimming options/adapters
type: File
comment: Fasta file with adapters for removal that may contain N.

trimming options/min overlap
type: int
comment: Minimum overlap for removal without pair overlap.

Mark duplicates and Sort
type: CommandLineTool
requirements: InitialWorkDirRequirement
  listing:
    entryname: markduplicates_helper.sh
    entry: set -o pipefail set -o errexit declare MD_BARCODE_TAG if [ ! -z "$6" ]; then MD_BARCODE_TAG="BARCODE_TAG=$6" /usr/bin/java -Xmx16g -jar /opt/picard/picard.jar MarkDuplicates I=$1 O=/dev/stdout ASSUME_SORT_ORDER=$5 METRICS_FILE=$4 QUIET=true COMPRESSION_LEVEL=0 VALIDATION_STRINGENCY=LENIENT "$MD_BARCODE_TAG" | /usr/bin/sambamba sort -t $2 -m 18G -o $3 /dev/stdin else /usr/bin/java -Xmx16g -jar /opt/picard/picard.jar MarkDuplicates I=$1 O=/dev/stdout ASSUME_SORT_ORDER=$5 METRICS_FILE=$4 QUIET=true COMPRESSION_LEVEL=0 VALIDATION_STRINGENCY=LENIENT | /usr/bin/sambamba sort -t $2 -m 18G -o $3 /dev/stdin fi
base command: /bin/bash
base command: markduplicates_helper.sh
hints: NetworkAccess
inputs: bam
outputs: sorted bam
cwl version: v1.2
outputs: metrics file
requirements: ResourceRequirement
  resource requirement/ram min: 40000
  resource requirement/cores min: 8
hints: LoadListingRequirement
inputs: input sort order
inputs: output name
requirements: DockerRequirement
  docker requirement/docker pull: mgibio/mark_duplicates-cwl:1.0.1
arguments:
  value from: $(runtime.cores)
  command line binding/position: 2
arguments:
  value from: $(inputs.bam.nameroot).mark_dups_metrics.txt
  command line binding/position: 4
original cwl version: v1.0

bam
type: File
input binding:
  command line binding/position: 1

sorted bam
type: File
output binding:
  command output binding/glob: $(inputs.output_name)

metrics file
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).mark_dups_metrics.txt

input sort order
type: string
input binding:
  command line binding/position: 5
default: queryname

output name
type: string
type: null
input binding:
  command line binding/position: 3
default: MarkedSorted.bam

Samtools: merge
type: CommandLineTool
cwl version: v1.2
inputs: name
requirements: DockerRequirement
  docker requirement/docker pull: quay.io/biocontainers/samtools:1.11--h6270b1f_0
original cwl version: v1.0
inputs: bams
arguments: $(inputs.name).merged.bam
outputs: merged bam
requirements: ResourceRequirement
  resource requirement/ram min: 8000
  resource requirement/cores min: 4
hints: NetworkAccess
hints: LoadListingRequirement
base command: /usr/local/bin/samtools
base command: merge

bams
type:
  type: array
  items: File
input binding:
  command line binding/position: 1

merged bam
type: File
output binding:
  command output binding/glob: $(inputs.name).merged.bam

bqsr known sites
type:
  type: array
  items: File
comment: One or more databases of known polymorphic sites used to exclude regions around known polymorphisms from analysis.

create BQSR table
type: CommandLineTool
requirements: DockerRequirement
  docker requirement/docker pull: broadinstitute/gatk:4.1.8.1
outputs: bqsr table
inputs: bam
inputs: known sites
original cwl version: v1.0
hints: NetworkAccess
arguments: -O
inputs: reference
requirements: ResourceRequirement
  resource requirement/ram min: 18000
base command: /gatk/gatk
base command: --java-options
base command: -Xmx16g
base command: BaseRecalibrator
inputs: intervals
cwl version: v1.2
hints: LoadListingRequirement

bqsr table
type: File
output binding:
  command output binding/glob: bqsr.table

bam
type: File
input binding:
  command line binding/prefix: -I
  command line binding/position: 3

known sites
type:
  type: array
  items: File
  input binding:
    command line binding/prefix: --known-sites
    command line binding/position: 4

reference
type: File
type: string
input binding:
  command line binding/prefix: -R
  command line binding/position: 2

intervals
default: chr20
default: chr17
default: chr12
default: chr1
default: chr8
default: chr21
default: chr13
default: chr9
type:
  type: array
  items: string
  input binding:
    command line binding/prefix: -L
default: chr15
default: chr4
default: chr6
default: chr11
default: chr5
default: chr7
default: chr2
default: chr22
default: chr3
input binding:
  command line binding/position: 1
default: chr10
default: chr18
default: chr19
default: chr14
default: chr16

samtools index
type: CommandLineTool
hints: NetworkAccess
hints: LoadListingRequirement
requirements: InlineJavascriptRequirement
cwl version: v1.2
arguments: /usr/local/bin/samtools
arguments: index
arguments: $(runtime.outdir)/$(inputs.bam.basename)
arguments: $(runtime.outdir)/$(inputs.bam.basename).bai
arguments:
  value from: &&
  command line binding/shell quote: false
arguments: cp
arguments: $(inputs.bam.basename).bai
arguments: $(runtime.outdir)/$(inputs.bam.nameroot).bai
inputs: bam
original cwl version: v1.0
requirements: ResourceRequirement
  resource requirement/ram min: 4000
requirements: ShellCommandRequirement
requirements: InitialWorkDirRequirement
  listing: ${ var f = inputs.bam; delete f.secondaryFiles; return f }
requirements: DockerRequirement
  docker requirement/docker pull: quay.io/biocontainers/samtools:1.11--h6270b1f_0
outputs: indexed bam

indexed bam
type: File
output binding:
  command output binding/glob: $(inputs.bam.basename)

adapter for sequence_align_and_tag
type: Workflow
inputs: reference
outputs: aligned bam
hints: LoadListingRequirement
inputs: trimming
inputs: unaligned
requirements: StepInputExpressionRequirement
cwl version: v1.2
requirements: SchemaDefRequirement
  schema def requirement/types: sequence data with readgroup information
  schema def requirement/types: trimming adapter file and parameters
requirements: SubworkflowFeatureRequirement
hints: NetworkAccess
workflow/steps: align and tag
comment: Some workflow engines won't stage files in our nested structure, so parse it out here
original cwl version: v1.0
requirements: InlineJavascriptRequirement

reference
type: File
type: string
comment: bwa-indexed reference file

unaligned
type: sequence data with readgroup information
comment: the unaligned sequence data with readgroup information

align with bwa_mem and tag
type: CommandLineTool
hints: NetworkAccess
outputs: aligned bam
inputs: fastq1
requirements: InlineJavascriptRequirement
comment: Due to workflow runner limitations, use sequence_align_and_tag_adapter.cwl subworkflow to call this
requirements: InitialWorkDirRequirement
  listing:
    entryname: sequence_alignment_helper.sh
entry: set -o pipefail set -o errexit set -o nounset RUN_TRIMMING="false" while getopts "b:?1:?2:?g:r:n:t:?o:?" opt; do case "$opt" in b) MODE=bam BAM="$OPTARG" ;; 1) MODE=fastq FASTQ1="$OPTARG" ;; 2) MODE=fastq FASTQ2="$OPTARG" ;; g) READGROUP="$OPTARG" ;; r) REFERENCE="$OPTARG" ;; n) NTHREADS="$OPTARG" ;; t) RUN_TRIMMING="true" TRIMMING_ADAPTERS="$OPTARG" ;; o) RUN_TRIMMING="true" TRIMMING_ADAPTER_MIN_OVERLAP="$OPTARG" ;; esac done if "$MODE" == 'fastq' ; then if "$RUN_TRIMMING" == 'false' ; then /usr/local/bin/bwa mem -K 100000000 -t "$NTHREADS" -Y -R "$READGROUP" "$REFERENCE" "$FASTQ1" "$FASTQ2" | /usr/local/bin/samblaster -a --addMateTags | /opt/samtools/bin/samtools view -b -S /dev/stdin else /opt/flexbar/flexbar --adapters "$TRIMMING_ADAPTERS" --reads "$FASTQ1" --reads2 "$FASTQ2" --adapter-trim-end LTAIL --adapter-min-overlap "$TRIMMING_ADAPTER_MIN_OVERLAP" --adapter-error-rate 0.1 --max-uncalled 300 --stdout-reads \ | /usr/local/bin/bwa mem -K 100000000 -t "$NTHREADS" -Y -p -R "$READGROUP" "$REFERENCE" /dev/stdin | /usr/local/bin/samblaster -a --addMateTags | /opt/samtools/bin/samtools view -b -S /dev/stdin fi fi if "$MODE" == 'bam' ; then if "$RUN_TRIMMING" == 'false' ; then /usr/bin/java -Xmx4g -jar /opt/picard/picard.jar SamToFastq I="$BAM" INTERLEAVE=true INCLUDE_NON_PF_READS=true FASTQ=/dev/stdout | /usr/local/bin/bwa mem -K 100000000 -t "$NTHREADS" -Y -p -R "$READGROUP" "$REFERENCE" /dev/stdin | /usr/local/bin/samblaster -a --addMateTags | /opt/samtools/bin/samtools view -b -S /dev/stdin else /usr/bin/java -Xmx4g -jar /opt/picard/picard.jar SamToFastq I="$BAM" INTERLEAVE=true INCLUDE_NON_PF_READS=true FASTQ=/dev/stdout \ | /opt/flexbar/flexbar --adapters "$TRIMMING_ADAPTERS" --reads - --interleaved --adapter-trim-end LTAIL --adapter-min-overlap "$TRIMMING_ADAPTER_MIN_OVERLAP" --adapter-error-rate 0.1 --max-uncalled 300 --stdout-reads \ | /usr/local/bin/bwa mem -K 100000000 -t "$NTHREADS" -Y -p -R "$READGROUP" "$REFERENCE" /dev/stdin | /usr…
cwl version: v1.2
hints: LoadListingRequirement
inputs: readgroup
inputs: reference
inputs: bam
requirements: ResourceRequirement
  resource requirement/ram min: 20000
  resource requirement/cores min: 8
stdout: refAlign.bam
requirements: SchemaDefRequirement
  schema def requirement/types: sequence data with readgroup information
  schema def requirement/types: trimming adapter file and parameters
requirements: DockerRequirement
  docker requirement/docker pull: mgibio/alignment_helper-cwl:1.1.0
arguments:
  value from: $(runtime.cores)
  command line binding/prefix: -n
  command line binding/position: 5
original cwl version: v1.0
inputs: fastq2
inputs: trimming
base command: /bin/bash
base command: sequence_alignment_helper.sh

aligned bam
type: File
output binding:
  command output binding/glob: refAlign.bam

fastq1
type: File
type: null
input binding:
  command line binding/prefix: -1

readgroup
type: string
input binding:
  command line binding/prefix: -g

reference
type: File
type: string
input binding:
  command line binding/prefix: -r
  command line binding/position: 4
comment: bwa-indexed reference file

bam
type: File
type: null
input binding:
  command line binding/prefix: -b

fastq2
type: File
type: null
input binding:
  command line binding/prefix: -2

trimming
type: trimming adapter file and parameters
type: null
input binding:
  value from: $( ['-t', self.adapters.path, '-o', self.min_overlap] )

align and tag/fastq1
value from: $(self.sequence.hasOwnProperty('fastq1')? self.sequence.fastq1 : null)
source: unaligned

align and tag/fastq2
value from: $(self.sequence.hasOwnProperty('fastq2')? self.sequence.fastq2 : null)
source: unaligned

align and tag/readgroup
value from: $(self.readgroup)
source: unaligned

align and tag/bam
value from: $(self.sequence.hasOwnProperty('bam')? self.sequence.bam : null)
source: unaligned

bqsr known sites
type:
  type: array
  items: File
comment: One or more databases of known polymorphic sites used to exclude regions around known polymorphisms from analysis.

BAM to SAM conversion
type: CommandLineTool
original cwl version: v1.0
base command: /usr/local/bin/samtools
base command: view
base command: -h
base command: -o
requirements: ResourceRequirement
  resource requirement/ram min: 16000
hints: NetworkAccess
requirements: DockerRequirement
  docker requirement/docker pull: quay.io/biocontainers/samtools:1.11--h6270b1f_0
hints: LoadListingRequirement
inputs: bam
outputs: final sam
cwl version: v1.2
arguments: $(inputs.bam.nameroot).sam

bam
type: File
input binding:
  command line binding/position: 1

final sam
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).sam

Creating the homer tag directory
type: CommandLineTool
requirements: DockerRequirement
  docker requirement/docker pull: mgibio/homer:4.10
hints: LoadListingRequirement
inputs: sam
outputs: tag directory
requirements: ResourceRequirement
  resource requirement/ram min: 32000
original cwl version: v1.0
hints: NetworkAccess
requirements: InitialWorkDirRequirement
  listing:
    entryname: homer_tag_directory.sh
    entry: set -o pipefail set -o errexit name="homer_tag_directory" bam=$1 mkdir -p $name echo "creating tagDir" /opt/homer/bin/makeTagDirectory $name $bam
base command: /bin/bash
base command: homer_tag_directory.sh
cwl version: v1.2

sam
type: File
input binding:
  command line binding/position: 1

tag directory
type: Directory
output binding:
  command output binding/glob: homer_tag_directory

WGS QC workflow
type: Workflow
workflow/steps: collect alignment summary metrics
inputs: picard metric accumulation level
inputs: summary intervals
outputs: gc bias metrics
inputs: per base intervals
outputs: gc bias metrics chart
outputs: alignment summary metrics
requirements: SchemaDefRequirement
  schema def requirement/types: a file with a label
original cwl version: v1.0
workflow/steps: verify bam id
workflow/steps: collect gc bias metrics
workflow/steps: collect wgs metrics
hints: NetworkAccess
outputs: bamcoverage bigwig
inputs: bam
inputs: omni vcf
inputs: sample name
inputs: reference
outputs: verify bam id depth
inputs: intervals
outputs: per base coverage metrics
outputs: gc bias metrics summary
outputs: per target coverage metrics
inputs: minimum base quality
workflow/steps: collect insert size metrics
outputs: insert size metrics
cwl version: v1.2
outputs: wgs metrics
hints: LoadListingRequirement
outputs: flagstats
outputs: summary hs metrics
workflow/steps: collect hs metrics
outputs: insert size histogram
outputs: per target hs metrics
outputs: verify bam id metrics
workflow/steps: samtools flagstat
workflow/steps: cgpbigwig bamcoverage
inputs: per target intervals
inputs: minimum mapping quality
requirements: SubworkflowFeatureRequirement
outputs: per base hs metrics

collect alignment summary metrics
type: CommandLineTool
inputs: metric accumulation level
outputs: alignment summary metrics
base command: /usr/bin/java
base command: -Xmx16g
base command: -jar
base command: /usr/picard/picard.jar
base command: CollectAlignmentSummaryMetrics
original cwl version: v1.0
inputs: reference
requirements: DockerRequirement
  docker requirement/docker pull: broadinstitute/picard:2.23.6
hints: LoadListingRequirement
hints: NetworkAccess
requirements: ResourceRequirement
  resource requirement/ram min: 18000
cwl version: v1.2
inputs: bam
arguments: OUTPUT=

metric accumulation level
type: string
input binding:
  command line binding/prefix: METRIC_ACCUMULATION_LEVEL=

alignment summary metrics
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).AlignmentSummaryMetrics.txt

reference
type: File
type: string
input binding:
  command line binding/prefix: REFERENCE_SEQUENCE=

bam
type: File
input binding:
  command line binding/prefix: INPUT=

picard metric accumulation level
type: string
default: ALL_READS

verify BAM ID
type: CommandLineTool
outputs: verify bam id depth
inputs: vcf
original cwl version: v1.0
outputs: verify bam id metrics
requirements: ResourceRequirement
  resource requirement/ram min: 4000
base command: /usr/local/bin/verifyBamID
inputs: bam
arguments: --out
hints: NetworkAccess
cwl version: v1.2
requirements: DockerRequirement
  docker requirement/docker pull: mgibio/verify_bam_id-cwl:1.1.3
hints: LoadListingRequirement

verify bam id depth
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).VerifyBamId.depthSM

vcf
type: File
input binding:
  command line binding/prefix: --vcf

verify bam id metrics
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).VerifyBamId.selfSM

bam
type: File
input binding:
  command line binding/prefix: --bam

collect gc bias metrics
type: CommandLineTool
original cwl version: v1.0
requirements: ResourceRequirement
  resource requirement/ram min: 18000
arguments: O=
arguments:
  value from: $(runtime.outdir)/$(inputs.sample_name).GcBiasMetrics.txt
arguments: CHART=
arguments:
  value from: $(runtime.outdir)/$(inputs.sample_name).GcBiasMetricsChart.pdf
arguments: S=
inputs: metric accumulation level
outputs: gc bias metrics chart
cwl version: v1.2
inputs: sample name
outputs: gc bias metrics
inputs: reference
base command: /usr/bin/java
base command: -Xmx16g
base command: -jar
base command: /usr/picard/picard.jar
base command: CollectGcBiasMetrics
inputs: bam
hints: LoadListingRequirement
hints: NetworkAccess
outputs: gc bias metrics summary
requirements: DockerRequirement
  docker requirement/docker pull: broadinstitute/picard:2.23.6

metric accumulation level
type: string
input binding:
  command line binding/prefix: METRIC_ACCUMULATION_LEVEL=

gc bias metrics chart
type: File
output binding:
  command output binding/glob: $(inputs.sample_name).GcBiasMetricsChart.pdf

sample name
type: string
type: null
default: final

gc bias metrics
type: File
output binding:
  command output binding/glob: $(inputs.sample_name).GcBiasMetrics.txt

reference
type: File
type: string
input binding:
  command line binding/prefix: R=

bam
type: File
input binding:
  command line binding/prefix: I=

gc bias metrics summary
type: File
output binding:
  command output binding/glob: $(inputs.sample_name).GcBiasMetricsSummary.txt

sample name
type: string
type: null
default: final

collect WGS metrics
type: CommandLineTool
outputs: wgs metrics
inputs: intervals
original cwl version: v1.0
arguments: O=
inputs: reference
hints: LoadListingRequirement
requirements: ResourceRequirement
  resource requirement/ram min: 18000
inputs: sample name
base command: /usr/bin/java
base command: -Xmx16g
base command: -jar
base command: /usr/picard/picard.jar
base command: CollectWgsMetrics
cwl version: v1.2
inputs: minimum base quality
requirements: DockerRequirement
  docker requirement/docker pull: broadinstitute/picard:2.23.6
hints: NetworkAccess
inputs: minimum mapping quality
inputs: bam

wgs metrics
type: File
output binding:
  command output binding/glob: $(inputs.sample_name).WgsMetrics.txt

intervals
type: File
type: null
input binding:
  command line binding/prefix: INTERVALS=

reference
type: File
type: string
input binding:
  command line binding/prefix: R=

sample name
type: string
type: null
default: final

minimum base quality
type: int
type: null
input binding:
  command line binding/prefix: MINIMUM_BASE_QUALITY=
comment: Minimum base quality for a base to contribute coverage. (N bases are considered to have negative infinite quality and will be excluded regardless of this value.)

minimum mapping quality
type: int
type: null
input binding:
  command line binding/prefix: MINIMUM_MAPPING_QUALITY=
comment: Minimum mapping quality for a read to contribute coverage.

bam
type: File
input binding:
  command line binding/prefix: I=

collect insert size metrics
type: CommandLineTool
hints: NetworkAccess
inputs: bam
outputs: insert size metrics
inputs: reference
inputs: metric accumulation level
cwl version: v1.2
base command: /usr/bin/java
base command: -Xmx16g
base command: -jar
base command: /usr/picard/picard.jar
base command: CollectInsertSizeMetrics
original cwl version: v1.0
outputs: insert size histogram
requirements: ResourceRequirement
  resource requirement/ram min: 18000
arguments: O=
arguments:
  value from: $(runtime.outdir)/$(inputs.bam.nameroot).InsertSizeMetrics.txt
arguments: H=
hints: LoadListingRequirement
requirements: DockerRequirement
  docker requirement/docker pull: broadinstitute/picard:2.23.6

bam
type: File
input binding:
  command line binding/prefix: I=

insert size metrics
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).InsertSizeMetrics.txt

reference
type: File
type: string
input binding:
  command line binding/prefix: REFERENCE_SEQUENCE=

metric accumulation level
type: string
input binding:
  command line binding/prefix: METRIC_ACCUMULATION_LEVEL=

insert size histogram
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).InsertSizeHistogram.pdf

HS Metrics workflow
type: Workflow
inputs: reference
inputs: minimum base quality
requirements: ScatterFeatureRequirement
outputs: per target hs metrics
outputs: summary hs metrics
cwl version: v1.2
workflow/steps: collect per base hs metrics
inputs: per target intervals
inputs: summary intervals
hints: NetworkAccess
requirements: SubworkflowFeatureRequirement
outputs: per base hs metrics
inputs: per base intervals
outputs: per base coverage metrics
inputs: minimum mapping quality
workflow/steps: collect per target hs metrics
requirements: SchemaDefRequirement
  schema def requirement/types: a file with a label
requirements: StepInputExpressionRequirement
outputs: per target coverage metrics
inputs: bam
workflow/steps: collect summary hs metrics
original cwl version: v1.0
hints: LoadListingRequirement

collect per base hs metrics/per base coverage
default: true

collect per base hs metrics/per target coverage
default: false

collect per base hs metrics/output prefix
value from: base-$(self.label)
source: per base intervals

collect per base hs metrics/bait intervals
value from: $(self.file)
source: per base intervals

collect per base hs metrics/target intervals
value from: $(self.file)
source: per base intervals

collect per base hs metrics/metric accumulation level
value from: ALL_READS

collect HS metrics
type: CommandLineTool
requirements: DockerRequirement
  docker requirement/docker pull: broadinstitute/picard:2.23.6
inputs: output prefix
hints: NetworkAccess
hints: LoadListingRequirement
outputs: per target coverage metrics
base command: /usr/bin/java
base command: -Xmx48g
base command: -jar
base command: /usr/picard/picard.jar
base command: CollectHsMetrics
inputs: per target coverage
requirements: DockerRequirement
  docker requirement/docker pull: broadinstitute/picard:2.23.6
original cwl version: v1.2
requirements: ResourceRequirement
  resource requirement/ram min: 52000
inputs: minimum mapping quality
arguments: O=
inputs: bam
inputs: bait intervals
inputs: target intervals
inputs: per base coverage
requirements: ResourceRequirement
  resource requirement/ram min: 52000
outputs: hs metrics
cwl version: v1.2
requirements: StepInputExpressionRequirement
outputs: per base coverage metrics
requirements: InlineJavascriptRequirement
requirements: DockerRequirement
  docker requirement/docker pull: broadinstitute/picard:2.23.6
inputs: minimum base quality
inputs: reference
inputs: metric accumulation level
requirements: ResourceRequirement
  resource requirement/ram min: 52000

output prefix
type: string
type: null
default: out

per target coverage metrics
type: File
type: null
output binding:
  command output binding/glob: $(inputs.bam.nameroot).$(inputs.output_prefix)-PerTargetCoverage.txt
output binding:
  command output binding/glob: $(inputs.bam.nameroot).$(inputs.output_prefix)-PerTargetCoverage.txt
output binding:
  command output binding/glob: $(inputs.bam.nameroot).$(inputs.output_prefix)-PerTargetCoverage.txt

per target coverage
type: boolean
type: null
input binding:
  value from: ${ if(self) { return inputs.bam.nameroot + "." + inputs.output_prefix + "-PerTargetCoverage.txt" } else { return false; } }
  command line binding/prefix: PER_TARGET_COVERAGE=
input binding:
  value from: ${ if(self) { return inputs.bam.nameroot + "." + inputs.output_prefix + "-PerTargetCoverage.txt" } else { return false; } }
  command line binding/prefix: PER_TARGET_COVERAGE=
input binding:
  value from: ${ if(self) { return inputs.bam.nameroot + "." + inputs.output_prefix + "-PerTargetCoverage.txt" } else { return false; } }
  command line binding/prefix: PER_TARGET_COVERAGE=

minimum mapping quality
type: int
type: null
input binding:
  command line binding/prefix: MINIMUM_MAPPING_QUALITY=
input binding:
  command line binding/prefix: MINIMUM_MAPPING_QUALITY=
input binding:
  command line binding/prefix: MINIMUM_MAPPING_QUALITY=
default: 1

bam
type: File
input binding:
  command line binding/prefix: I=
input binding:
  command line binding/prefix: I=
input binding:
  command line binding/prefix: I=

bait intervals
type: File
input binding:
  command line binding/prefix: BAIT_INTERVALS=
input binding:
  command line binding/prefix: BAIT_INTERVALS=
input binding:
  command line binding/prefix: BAIT_INTERVALS=

target intervals
type: File
input binding:
  command line binding/prefix: TARGET_INTERVALS=
input binding:
  command line binding/prefix: TARGET_INTERVALS=
input binding:
  command line binding/prefix: TARGET_INTERVALS=

per base coverage
type: boolean
type: null
input binding:
  value from: ${ if(self) { return inputs.bam.nameroot + "." + inputs.output_prefix + "-PerBaseCoverage.txt" } else { return false; } }
  command line binding/prefix: PER_BASE_COVERAGE=
input binding:
  value from: ${ if(self) { return inputs.bam.nameroot + "." + inputs.output_prefix + "-PerBaseCoverage.txt" } else { return false; } }
  command line binding/prefix: PER_BASE_COVERAGE=
input binding:
  value from: ${ if(self) { return inputs.bam.nameroot + "." + inputs.output_prefix + "-PerBaseCoverage.txt" } else { return false; } }
  command line binding/prefix: PER_BASE_COVERAGE=

hs metrics
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).$(inputs.output_prefix)-HsMetrics.txt
output binding:
  command output binding/glob: $(inputs.bam.nameroot).$(inputs.output_prefix)-HsMetrics.txt
output binding:
  command output binding/glob: $(inputs.bam.nameroot).$(inputs.output_prefix)-HsMetrics.txt

per base coverage metrics
type: File
type: null
output binding:
  command output binding/glob: $(inputs.bam.nameroot).$(inputs.output_prefix)-PerBaseCoverage.txt
output binding:
  command output binding/glob: $(inputs.bam.nameroot).$(inputs.output_prefix)-PerBaseCoverage.txt
output binding:
  command output binding/glob: $(inputs.bam.nameroot).$(inputs.output_prefix)-PerBaseCoverage.txt

minimum base quality
type: int
type: null
input binding:
  command line binding/prefix: MINIMUM_BASE_QUALITY=
input binding:
  command line binding/prefix: MINIMUM_BASE_QUALITY=
input binding:
  command line binding/prefix: MINIMUM_BASE_QUALITY=
default: 1

reference
type: string
input binding:
  command line binding/prefix: R=
input binding:
  command line binding/prefix: R=
type: File
input binding:
  command line binding/prefix: R=

metric accumulation level
type: string
input binding:
  command line binding/prefix: METRIC_ACCUMULATION_LEVEL=
input binding:
  command line binding/prefix: METRIC_ACCUMULATION_LEVEL=
input binding:
  command line binding/prefix: METRIC_ACCUMULATION_LEVEL=

collect per target hs metrics/bait intervals
value from: $(self.file)
source: per target intervals

collect per target hs metrics/target intervals
value from: $(self.file)
source: per target intervals

collect per target hs metrics/output prefix
value from: target-$(self.label)
source: per target intervals

collect per target hs metrics/metric accumulation level
value from: ALL_READS

collect per target hs metrics/per base coverage
default: false

collect per target hs metrics/per target coverage
default: true

collect summary hs metrics/bait intervals
value from: $(self.file)
source: summary intervals

collect summary hs metrics/metric accumulation level
value from: ALL_READS

collect summary hs metrics/per target coverage
default: false

collect summary hs metrics/output prefix
value from: summary-$(self.label)
source: summary intervals

collect summary hs metrics/target intervals
value from: $(self.file)
source: summary intervals

collect summary hs metrics/per base coverage
default: false

samtools flagstat
type: CommandLineTool
requirements: ResourceRequirement
  resource requirement/ram min: 4000
hints: LoadListingRequirement
base command: /usr/local/bin/samtools
base command: flagstat
original cwl version: v1.0
requirements: DockerRequirement
  docker requirement/docker pull: quay.io/biocontainers/samtools:1.11--h6270b1f_0
outputs: flagstats
cwl version: v1.2
inputs: bam
stdout: $(inputs.bam.basename).flagstat
hints: NetworkAccess

flagstats
type: File
output binding:
  command output binding/glob: $(inputs.bam.basename).flagstat

bam
type: File
input binding:
  command line binding/position: 1

cgpBigWig Converting BAM to BigWig
type: CommandLineTool
inputs: reference
cwl version: v1.2
original cwl version: v1.0
hints: LoadListingRequirement
base command: bam2bw
base command: -a -F
base command: 1024
outputs: outfile
requirements: ResourceRequirement
  resource requirement/ram min: 32000
requirements: DockerRequirement
  docker requirement/docker pull: quay.io/biocontainers/cgpbigwig:1.4.0--h93d22ca_0
hints: NetworkAccess
inputs: bam
arguments: -o

reference
type: File
type: string
input binding:
  command line binding/prefix: -r
  command line binding/position: 2

outfile
type: File
output binding:
  command output binding/glob: $(inputs.bam.nameroot).bw

bam
type: File
input binding:
  command line binding/prefix: -i
  command line binding/position: 1

value from: $(inputs.bam.nameroot).NameSorted.bam

value from: $(runtime.cores)
command line binding/prefix: --threads

value from: $(runtime.outdir)/bqsr.table

value from: $(runtime.outdir)/$(inputs.bam.nameroot).AlignmentSummaryMetrics.txt

value from: $(runtime.outdir)/$(inputs.bam.nameroot).VerifyBamId

value from: $(runtime.outdir)/$(inputs.sample_name).GcBiasMetricsSummary.txt

value from: $(runtime.outdir)/$(inputs.sample_name).WgsMetrics.txt

value from: $(runtime.outdir)/$(inputs.bam.nameroot).InsertSizeHistogram.pdf

value from: $(runtime.outdir)/$(inputs.bam.nameroot).$(inputs.output_prefix)-HsMetrics.txt

value from: $(runtime.outdir)/$(inputs.bam.nameroot).$(inputs.output_prefix)-HsMetrics.txt

value from: $(runtime.outdir)/$(inputs.bam.nameroot).$(inputs.output_prefix)-HsMetrics.txt

value from: $(inputs.bam.nameroot).bw