diff --git a/bandage/bandage-image.cwl b/bandage/bandage-image.cwl index 7ab34cf2..438657f5 100755 --- a/bandage/bandage-image.cwl +++ b/bandage/bandage-image.cwl @@ -1,96 +1,129 @@ #!/usr/bin/env cwl-runner cwlVersion: v1.0 class: CommandLineTool - -hints: - DockerRequirement: - dockerPull: biocontainers/bandage:v0.8.1-1-deb_cv1 - -requirements: - EnvVarRequirement: - envDef: - XDG_RUNTIME_DIR: $(runtime.tmpdir) - QT_QPA_PLATFORM: minimal - -label: Bandage image -doc: | - an hybrid assembly pipeline for bacterial genomes - *Bandage Overview** - Bandage is a GUI program that allows users to interact with the assembly graphs made by de novo assemblers - such as Velvet, SPAdes, MEGAHIT and others. - De novo assembly graphs contain not only assembled contigs but also the connections between those contigs, - which were previously not easily accessible. Bandage visualises assembly graphs, with connections, using graph layout algorithms. - Nodes in the drawn graph, which represent contigs, can be automatically labelled with their ID, length or depth. Users can interact - with the graph by moving, labelling and colouring nodes. Sequence information can also be extracted directly from the graph viewer. - By displaying connections between contigs, Bandage opens up new possibilities for analysing and improving de novo assemblies - that are not possible by looking at contigs alone. - Bandage works with Graphical Fragment Assembly (GFA) files. - For more information about this file format, see https://gfa-spec.github.io/GFA-spec/GFA2.html - -baseCommand: [ Bandage, image ] - +id: bandage-image inputs: - graph: + + - id: graph type: File doc: | Graphical Fragment Assembly Supports multiple assembly graph formats: LastGraph (Velvet), FASTG (SPAdes), Trinity.fasta, ASQG and GFA. - inputBinding: - position: 1 - - format: - type: - - 'null' - - type: enum - symbols: - - jpg - - png - - svg + + + - id: format + type: string default: jpg - inputBinding: - position: 2 - valueFrom: $(inputs.graph.nameroot).$(self) doc: | Produce jpg, png or svg file - height: - type: int + + - id: height + type: int default: 1000 - inputBinding: - prefix: --height doc: | Image height.If only height or width is set, the other will be determined automatically. If both are set, the image will be exactly that size. - width: - inputBinding: - prefix: --width + + - id: width type: int? doc: | Image width. If only height or width is set, the other will be determined automatically. If both are set, the image will be exactly that size. - node_name: + + - id: node_name type: boolean default: true doc: | If true, define Node labels as name - node_length: + - id: node_length type: boolean default: true - inputBinding: - prefix: --names - valueFrom: --length doc: | If true, define Node labels as length outputs: - image: + + +# - id: all_script +# type: +# - type: array +# items: File +# outputBinding: +# glob: "*.sh" +# doc: "generated script to run bandage. for learning purpose" + + + - id: image type: File outputBinding: - glob: $(inputs.graph.nameroot).$(inputs.format) + glob: "*.$(inputs.format)" doc: "Assembly Graph Image" + + + + +baseCommand: bash + +arguments: [bandage_image_launch.sh] + +hints: + DockerRequirement: + dockerPull: "fjrmore/bandage" + + +requirements: + - class: InlineJavascriptRequirement + - class: InitialWorkDirRequirement + listing: + - entryname: bandage_image_launch.sh + entry: | + #!/bin/bash + ########################### + # Bandage image wrapper + export QT_QPA_PLATFORM=minimal + TMPDIR=$PWD"/tmp_runtime-bandage" + mkdir -p $TMPDIR + export XDG_RUNTIME_DIR=$TMPDIR + GRAPH="$(inputs.graph.path)" + IMAGE="$(inputs.graph.nameroot).$(inputs.format)" + Bandage image $GRAPH $IMAGE \\ + ${ + var opt="" + if(inputs.height!=null){ + opt+=" --height "+inputs.height+ " " + } + if(inputs.width!=null){ + opt+=" --width "+inputs.width +" " + } + if(inputs.node_length==true){ + opt+=" --names " + } + if(inputs.node_length==true){ + opt+=" --lengths " + } + return opt + } + + +doc: | + CWL tool for Bandage-info. + an hybrid assembly pipeline for bacterial genomes + *Bandage Overview** + Bandage is a GUI program that allows users to interact with the assembly graphs made by de novo assemblers + such as Velvet, SPAdes, MEGAHIT and others. + De novo assembly graphs contain not only assembled contigs but also the connections between those contigs, + which were previously not easily accessible. Bandage visualises assembly graphs, with connections, using graph layout algorithms. + Nodes in the drawn graph, which represent contigs, can be automatically labelled with their ID, length or depth. Users can interact + with the graph by moving, labelling and colouring nodes. Sequence information can also be extracted directly from the graph viewer. + By displaying connections between contigs, Bandage opens up new possibilities for analysing and improving de novo assemblies + that are not possible by looking at contigs alone. + Bandage works with Graphical Fragment Assembly (GFA) files. + For more information about this file format, see https://gfa-spec.github.io/GFA-spec/GFA2.html + diff --git a/bandage/bandage-info.cwl b/bandage/bandage-info.cwl index 53cd07ea..747073c5 100755 --- a/bandage/bandage-info.cwl +++ b/bandage/bandage-info.cwl @@ -1,19 +1,83 @@ #!/usr/bin/env cwl-runner cwlVersion: v1.0 class: CommandLineTool +id: bandage-info +inputs: + + - id: graph + type: File + doc: | + Graphical Fragment Assembly. + Supports multiple + assembly graph formats: + LastGraph (Velvet), FASTG (SPAdes), Trinity.fasta, ASQG and GFA. + + + - id: tsv + type: boolean + default: false + doc: | + If true, output the information in a single tab-delimited line + starting with the graph file + + + + + +outputs: + +# - id: all_script +# type: +# - type: array +# items: File +# outputBinding: +# glob: "*.sh" +# doc: "generated script to run bandage. for learning purpose" + + - id: assembly_graph_info + type: File + outputBinding: + glob: "assembly_graph_info.txt" + doc: "Assembly Graph Information" + + + + +baseCommand: bash + +arguments: [bandage_info_launch.sh] hints: DockerRequirement: - dockerPull: biocontainers/bandage:v0.8.1-1-deb_cv1 + dockerPull: "fjrmore/bandage" + requirements: - EnvVarRequirement: - envDef: - XDG_RUNTIME_DIR: $(runtime.tmpdir) - QT_QPA_PLATFORM: minimal + - class: InlineJavascriptRequirement + - class: InitialWorkDirRequirement + listing: + - entryname: bandage_info_launch.sh + entry: | + #!/bin/bash + ########################### + # Bandage info wrapper + export QT_QPA_PLATFORM=minimal + TMPDIR=$PWD"/tmp_runtime-bandage" + mkdir -p $TMPDIR + export XDG_RUNTIME_DIR=$TMPDIR + Bandage info '$(inputs.graph.path)' \\ + ${ + var opt="" + if(inputs.tsv==true){ + opt+=" --tsv " + } + return opt + } \\ + > assembly_graph_info.txt + -label: Bandage info doc: | + CWL tool for Bandage-info. an hybrid assembly pipeline for bacterial genomes *Bandage Overview** Bandage is a GUI program that allows users to interact with the assembly graphs made by de novo assemblers @@ -27,30 +91,3 @@ doc: | Bandage works with Graphical Fragment Assembly (GFA) files. For more information about this file format, see https://gfa-spec.github.io/GFA-spec/GFA2.html -baseCommand: [ Bandage, info ] - -inputs: - graph: - type: File - doc: | - Graphical Fragment Assembly - Supports multiple assembly graph formats: - LastGraph (Velvet), FASTG (SPAdes), Trinity.fasta, ASQG and GFA. - inputBinding: - position: 1 - - tsv: - type: boolean - inputBinding: - prefix: --tsv - doc: | - If true, output the information in a single tab-delimited line - starting with the graph file - -stdout: assembly_graph_info.txt - -outputs: - assembly_graph_info: - type: stdout - doc: "Assembly Graph Information" -