+++ /dev/null
-cwlVersion: v1.1
-class: Workflow
-$namespaces:
- arv: "http://arvados.org/cwl#"
- cwltool: "http://commonwl.org/cwltool#"
-
-requirements:
- ScatterFeatureRequirement: {}
-
-inputs:
- bamdir:
- type: Directory
- label: Directory of zipped bam files
-
-outputs:
- fastqs:
- type:
- type: array
- items:
- type: array
- items: File
- outputSource: convert-bams/fastqs
-
-steps:
- get-bams:
- run: getfiles.cwl
- in:
- bamdir: bamdir
- out: [tarzipbams,samplenames]
-
- convert-bams:
- run: createSingleBam.cwl
- scatter: [tarzipbam,samplename]
- scatterMethod: dotproduct
- in:
- tarzipbam: get-bams/tarzipbams
- samplename: get-bams/samplenames
- out: [fastqs]
+++ /dev/null
-cwlVersion: v1.1
-class: CommandLineTool
-$namespaces:
- arv: "http://arvados.org/cwl#"
- cwltool: "http://commonwl.org/cwltool#"
-
-requirements:
- - class: DockerRequirement
- dockerPull: curii/bam2fastq
- - class: ShellCommandRequirement
-
-hints:
- ResourceRequirement:
- ramMin: 4000
- coresMin: 1
- tmpdirMin: 150000
- arv:RuntimeConstraints:
- outputDirType: keep_output_dir
-
-inputs:
- tarzipbam: File
- samplename: string
-
-outputs:
- fastqs:
- type: File[]
- outputBinding:
- glob: "*fastq"
-
-arguments:
- - tar
- - prefix: "-xvf"
- valueFrom: $(inputs.tarzipbam.path)
- - prefix: "-C"
- valueFrom: $(runtime.tmpdir)
- - {valueFrom: '&&', shellQuote: false}
- - samtools
- - merge
- - {valueFrom: $(runtime.tmpdir)/$(inputs.samplename).bam, shellQuote: false}
- - {valueFrom: $(runtime.tmpdir)/*.bam, shellQuote: false}
- - {valueFrom: '&&', shellQuote: false}
- - /bam2fastq/bam2fastq
- - {valueFrom: $(runtime.tmpdir)/$(inputs.samplename).bam, shellQuote: false}
- - prefix: "-o"
- valueFrom: $(inputs.samplename)_R#.fastq
+++ /dev/null
-$namespaces:
- cwltool: "http://commonwl.org/cwltool#"
-class: ExpressionTool
-label: Create list of bams from directory
-cwlVersion: v1.1
-requirements:
- InlineJavascriptRequirement: {}
-
-inputs:
- bamdir:
- type: Directory
- label: Directory of input bams
- loadListing: shallow_listing
-
-outputs:
- tarzipbams:
- type: File[]
- label: Array of bams
- samplenames:
- type: string[]
- label: Array of sample names
-
-expression: |
- ${
- var tarzipbams = [];
- var samplenames = [];
-
- for (var i = 0; i < inputs.bamdir.listing.length; i++) {
- var file = inputs.bamdir.listing[i];
- if (file.nameext == '.tgz') {
- var main = file;
- var sample = file.nameroot;
- sample = sample.replace(".bam","")
- tarzipbams.push(main);
- samplenames.push(sample);
- }
- }
- return {"tarzipbams": tarzipbams, "samplenames": samplenames};
- }
-
+++ /dev/null
-tar -xvf ./keep/by_id/d25f1c7905d1b16ab8c799a37fc96d56+1805224/hu007B82_1YB27IM.bam.tgz
-
-samtools merge WGC071838D.bam WGC071838D_combined.chr*bam
-docker run -ti -v=/home/bcosca2/issues/15996/bam/7HL58AX:/7HL58AX curii/bam2fastq
-/bam2fastq/bam2fastq WGC071838D.bam
-
+++ /dev/null
-bamdir:
- class: Directory
- location: keep:d25f1c7905d1b16ab8c799a37fc96d56+1805224
+++ /dev/null
-tarzipbam:
- class: File
- location: keep:d25f1c7905d1b16ab8c799a37fc96d56+1805224/hu007B82_1YB27IM.bam.tgz
-
-samplename: hu007B82_1YB27IM
+++ /dev/null
-bamdir:
- class: Directory
- location: keep:d25f1c7905d1b16ab8c799a37fc96d56+1805224
+++ /dev/null
-#!/bin/bash
-
-xcov=$(echo "scale=4; $(samtools idxstats $1 | grep 'chrX[^_]' | cut -f 3)/$(samtools idxstats $1 | grep 'chrX[^_]' | cut -f 2)" | bc)
-echo $xcov
-ycov=$(echo "scale=4; $(samtools idxstats $1 | grep "chrY[^_]" | cut -f 3)/$(samtools idxstats $1 | grep "chrY[^_]" | cut -f 2)" | bc)
-echo $ycov
-
-rat=$(echo "scale=4; ${xcov}/${ycov}" | bc)
-
-echo $rat
+++ /dev/null
-ERR1726424.gatk.g.vcf.gz
-ERR1726424.gatk.g.vcf_2.gz
-
-~