From 505c894c843831722c42357e195d5809f5d6d7ef Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Fri, 18 Aug 2017 06:27:14 -0700 Subject: [PATCH] random edits, don't merge --- CWL/Tools/bowtie2.tool.cwl | 9 +++-- CWL/Tools/cutadapt.tool.cwl | 18 ++++------ CWL/Workflows/create_primer.workflow.cwl | 32 +++++++++++------ .../decompress_mate_pair.workflow.cwl | 26 ++++++-------- CWL/Workflows/primer.job.cwl | 5 ++- .../remove_euk_prok_primer.workflow.cwl | 34 ++++++------------- CWL/Workflows/tap.dev.job.cwl | 22 ++++++++---- CWL/mate_pair.yml | 5 +++ CWL/primer_pair.yml | 5 +++ 9 files changed, 82 insertions(+), 74 deletions(-) create mode 100644 CWL/mate_pair.yml create mode 100644 CWL/primer_pair.yml diff --git a/CWL/Tools/bowtie2.tool.cwl b/CWL/Tools/bowtie2.tool.cwl index e54c1f1..286bc92 100644 --- a/CWL/Tools/bowtie2.tool.cwl +++ b/CWL/Tools/bowtie2.tool.cwl @@ -24,9 +24,8 @@ requirements: var re = new RegExp("^" + inputs.index , "i"); var files = inputs.indexDir.listing ; for (var f in files) { - var file = files[f] ; + var file = files[f] ; if ( re.test(file.basename) ){ list.push(file) } - else { list.push(inputs.index)} } return list; @@ -85,7 +84,7 @@ outputs: type: stderr -$namespaces: - Formats: FileFormats.cv.yaml +# $namespaces: +# Formats: FileFormats.cv.yaml # s:license: "https://www.apache.org/licenses/LICENSE-2.0" -# s:copyrightHolder: "MG-RAST" \ No newline at end of file +# s:copyrightHolder: "MG-RAST" diff --git a/CWL/Tools/cutadapt.tool.cwl b/CWL/Tools/cutadapt.tool.cwl index cb03c33..bed164a 100644 --- a/CWL/Tools/cutadapt.tool.cwl +++ b/CWL/Tools/cutadapt.tool.cwl @@ -29,50 +29,44 @@ stderr: cutadapt.error # -o db/SILVA.${prok_forward}.${prok_reverse} inputs: - g: + five_prime_adapter: label: prok_forward doc: 5’ adapter type: string inputBinding: prefix: -g - a: + three_prime_adapter: label: prok_reverse doc: 3’ adapter type: string inputBinding: prefix: -a format: - label: format - doc: + doc: # candidate for becoming an enum type: string inputBinding: prefix: -f error: - label: error_rate - doc: Maximum allowed error rate - type: string + label: Maximum allowed error rate + type: string # really? inputBinding: prefix: -e discard-untrimmed: - label: discard-untrimmed doc: Discard reads that do not contain the adapter type: boolean? inputBinding: prefix: --discard-untrimmed trimmed-only: - label: trimmed-only - doc: . + doc: FIXME type: boolean? inputBinding: prefix: --trimmed-only output: - label: output doc: Write reads to OUTPUT type: string inputBinding: prefix: -o sequences: - label: doc: input sequences type: File inputBinding: diff --git a/CWL/Workflows/create_primer.workflow.cwl b/CWL/Workflows/create_primer.workflow.cwl index 60a7eae..4cbf4be 100644 --- a/CWL/Workflows/create_primer.workflow.cwl +++ b/CWL/Workflows/create_primer.workflow.cwl @@ -5,25 +5,23 @@ label: Create ePCR version for primers doc: prepare UNITE and SIVLA fasta database files and taxonomy tables using cutadapt requirements: - - class: StepInputExpressionRequirement - - class: InlineJavascriptRequirement - - class: ScatterFeatureRequirement - - class: MultipleInputFeatureRequirement + StepInputExpressionRequirement: {} + InlineJavascriptRequirement: {} + ScatterFeatureRequirement: {} + MultipleInputFeatureRequirement: {} inputs: euka_sequences: - # /usr/local/share/db/UNITE*.fasta + # /usr/local/share/db/UNITE*.fasta # MRC: One, or many files? type: File - format: - - fasta + format: edam:format_1929 # FASTA euka_forward: string euka_reverse: string prok_sequences: - # /usr/local/share/db/SILVA*.fasta + # /usr/local/share/db/SILVA*.fasta # MRC: One, or many files? type: File - format: - - fasta - prok_forward: string + format: edam:format_1929 # FASTA + prok_forward: string # Is this barcode? prok_reverse: string error: type: string? @@ -34,9 +32,11 @@ outputs: classified_euk: type: File outputSource: euk/processed + # format: # ??? classified_prok: type: File outputSource: prok/processed + # format: # ??? @@ -84,3 +84,13 @@ steps: source: [prok_sequences , prok_forward , prok_reverse] valueFrom: $(self[0].basename).$(self[1]).$(self[2]) out: [processed] + +$namespaces: + - edam: http://edamontology.org/ + - s: http://schema.org/ +$schemas: + - http://edamontology.org/EDAM_1.18.owl + - https://schema.org/docs/schema_org_rdfa.html + +# s:license: "https://www.apache.org/licenses/LICENSE-2.0" +# s:copyrightHolder: "FIXME" diff --git a/CWL/Workflows/decompress_mate_pair.workflow.cwl b/CWL/Workflows/decompress_mate_pair.workflow.cwl index 821f8c6..c6c8aa3 100644 --- a/CWL/Workflows/decompress_mate_pair.workflow.cwl +++ b/CWL/Workflows/decompress_mate_pair.workflow.cwl @@ -5,21 +5,17 @@ label: Decompress doc: Decompress mate pair fastq files requirements: - - class: StepInputExpressionRequirement - - class: InlineJavascriptRequirement - - class: ScatterFeatureRequirement - - class: MultipleInputFeatureRequirement + StepInputExpressionRequirement: {} + InlineJavascriptRequirement: {} + ScatterFeatureRequirement: {} + MultipleInputFeatureRequirement: {} + SchemaDefRequirement: + types: + - $import: ../mate_pair.yml + inputs: - mate_pair: - type: - type: record - label: mate_pair - fields: - forward: - type: File - reverse: - type: File + mate_pair: mate_pair stage: type: string default: "0010" @@ -32,7 +28,7 @@ outputs: outputSource: [decompress_forward/decompressed , decompress_reverse/decompressed] mate_pair_decompressed: outputSource: make_return/mate_pair - type: Any + type: ../mate_pair.yml#mate_pair steps: @@ -96,7 +92,7 @@ steps: type: File outputs: mate_pair: - type: Any + type: ../mate_paire.yml#mate_pair expression: | ${ var mate_pair = { diff --git a/CWL/Workflows/primer.job.cwl b/CWL/Workflows/primer.job.cwl index 237b1f4..8d2a130 100644 --- a/CWL/Workflows/primer.job.cwl +++ b/CWL/Workflows/primer.job.cwl @@ -2,7 +2,7 @@ sequences: class: File path: ../Data/Inputs/sequences.all.fasta # /usr/local/share/db/UNITE*.fasta - format: fasta + format: edam:format_1929 # FASTA primer: eukaryote: @@ -12,3 +12,6 @@ primer: forward: CCTAYGGGDBGCWSCAG reverse: ATTAGADACCCBNGTAGTCC +$namespaces: + edam: http://edamontology.org/ + diff --git a/CWL/Workflows/remove_euk_prok_primer.workflow.cwl b/CWL/Workflows/remove_euk_prok_primer.workflow.cwl index 72df7ed..bfcc629 100644 --- a/CWL/Workflows/remove_euk_prok_primer.workflow.cwl +++ b/CWL/Workflows/remove_euk_prok_primer.workflow.cwl @@ -5,16 +5,18 @@ label: Remove primers doc: remove specified primer in input sequences using cutadpt requirements: - - class: StepInputExpressionRequirement - - class: InlineJavascriptRequirement - - class: ScatterFeatureRequirement - - class: MultipleInputFeatureRequirement + StepInputExpressionRequirement: {} + InlineJavascriptRequirement: {} + ScatterFeatureRequirement: {} + MultipleInputFeatureRequirement: {} + SchemaDefRequirement: + types: + - $import: ../primer-pair.yml inputs: sequences: type: File - format: - - fasta + format: edam:formate_1929 # FASTA primer: doc: Euk and Prokaryote primer type: @@ -23,24 +25,10 @@ inputs: fields: - name: eukaryote doc: Eukaryote primer pair - type: - type: record - name: direction - fields: - - name: forward - type: string - - name: reverse - type: string + type: ../primer_pair.yml#primer_pair - name: prokaryote doc: Prokaryote primer pair - type: - name: direction - type: record - fields: - - name: forward - type: string - - name: reverse - type: string + type: ../primer_pair.yml#primer_pair error: type: string? default: "0.06" @@ -70,7 +58,7 @@ steps: valueFrom: ^$(self.eukaryote.forward) a: source: primer - valueFrom: $(self.eukaryote.reverse + '$') + valueFrom: $(self.eukaryote.reverse)'$' trimmed-only: default: true error: error diff --git a/CWL/Workflows/tap.dev.job.cwl b/CWL/Workflows/tap.dev.job.cwl index 6dae297..18b99af 100644 --- a/CWL/Workflows/tap.dev.job.cwl +++ b/CWL/Workflows/tap.dev.job.cwl @@ -3,18 +3,26 @@ unite: path: /usr/local/share/db/UNITEv6_sh_dynamic_s.fasta # ../Data/Inputs/sequences.all.fasta # /usr/local/share/db/UNITE*.fasta - format: fasta + format: edam:format_1929 # fasta silva: class: File path: /usr/local/share/db/SILVA_128_SSURef_Nr99_tax_silva_trunc.fasta # ../Data/Inputs/sequences.all.fasta # /usr/local/share/db/SILVA*.fasta - format: fasta + format: edam:format_1929 # fasta files: - - forward: ../Data/Inputs/samples_R1.fastq.gz - reverse: ../Data/Inputs/samples_R2.fastq.gz - - forward: ../Data/Inputs/samples_R1.fastq.gz - reverse: ../Data/Inputs/samples_R2.fastq.gz + - forward: + class: File + path: ../Data/Inputs/samples_R1.fastq.gz + reverse: + class: File + path: ../Data/Inputs/samples_R2.fastq.gz + - forward: + class: File + path: ../Data/Inputs/samples_R1.fastq.gz + reverse: + class: File + path: ../Data/Inputs/samples_R2.fastq.gz primer: eukaryote: @@ -28,7 +36,7 @@ mate_pair: forward: class: File path: ../Data/Inputs/samples_R1.fastq.gz - format: fastq/gz + format: fastq.gz reverse: class: File path: ../Data/Inputs/samples_R2.fastq.gz diff --git a/CWL/mate_pair.yml b/CWL/mate_pair.yml new file mode 100644 index 0000000..8643b9b --- /dev/null +++ b/CWL/mate_pair.yml @@ -0,0 +1,5 @@ +type: record +name: mate_pair +fields: + forward: File + reverse: File diff --git a/CWL/primer_pair.yml b/CWL/primer_pair.yml new file mode 100644 index 0000000..6f9c95c --- /dev/null +++ b/CWL/primer_pair.yml @@ -0,0 +1,5 @@ +type: record +name: primer_pair +fields: + forward: string + reverse: string