sequence data with readgroup information
Fasta file with adapters for removal that may contain N.
Minimum overlap for removal without pair overlap.
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
One or more databases of known polymorphic sites used to exclude regions around known polymorphisms from analysis.
${ var f = inputs.bam; delete f.secondaryFiles; return f }
the unaligned sequence data with readgroup information
Due to workflow runner limitations, use sequence_align_and_tag_adapter.cwl subworkflow to call this
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/local/bin/samblaster -a --addMateTags | /opt/samtools/bin/samtools view -b -S /dev/stdin fi fi
$( ['-t', self.adapters.path, '-o', self.min_overlap] )
$(self.sequence.hasOwnProperty('fastq1')? self.sequence.fastq1 : null)
$(self.sequence.hasOwnProperty('fastq2')? self.sequence.fastq2 : null)
$(self.sequence.hasOwnProperty('bam')? self.sequence.bam : null)
Some workflow engines won't stage files in our nested structure, so parse it out here
Chipseq alignment with qc and creating homer tag directory
set -o pipefail set -o errexit name="homer_tag_directory" bam=$1 mkdir -p $name echo "creating tagDir" /opt/homer/bin/makeTagDirectory $name $bam
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 for a read to contribute coverage.
${ if(self) { return inputs.bam.nameroot + "." + inputs.output_prefix + "-PerTargetCoverage.txt" } else { return false; } }
${ if(self) { return inputs.bam.nameroot + "." + inputs.output_prefix + "-PerBaseCoverage.txt" } else { return false; } }