Skip to content

Commit

Permalink
Simplify number of biobox feature tests run
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbarton committed Jul 28, 2016
1 parent cae86c6 commit 5f8bd68
Showing 1 changed file with 41 additions and 23 deletions.
64 changes: 41 additions & 23 deletions features/biobox.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: A CLI to run biobox-compatible Docker containers
| --version |
| -v |


Scenario Outline: Getting help documentation
When I run the command:
"""
Expand All @@ -31,6 +32,7 @@ Feature: A CLI to run biobox-compatible Docker containers
| --help |
| -h |


Scenario: Getting help documentation for a biobox type
When I run the command:
"""
Expand All @@ -44,6 +46,28 @@ Feature: A CLI to run biobox-compatible Docker containers
"""
And the exit code should be 0


Scenario: Using absolute paths when passing command line arguments
Given I copy the example data files:
| source | dest |
| short_read_assembler/genome_paired_reads.fq.gz | reads.fq.gz |
When I run the command:
"""
biobox \
run \
short_read_assembler \
bioboxes/velvet \
--no-rm \
--input=$(realpath reads.fq.gz) \
--output=$(realpath .)/contigs.fa
"""
Then the stdout should be empty
And the stderr should be empty
And the exit code should be 0
And the file "contigs.fa" should exist
And the file "contigs.fa" should not be empty


Scenario Outline: Running a biobox short read assembler container
Given I copy the example data files:
| source | dest |
Expand All @@ -54,10 +78,10 @@ Feature: A CLI to run biobox-compatible Docker containers
run \
short_read_assembler \
<assembler> \
<ressources> \
<resources> \
--no-rm \
--input=<input> \
--output=<output>
--input=reads.fq.gz \
--output=contigs.fa
"""
Then the stdout should be empty
And the stderr should be empty
Expand All @@ -66,12 +90,10 @@ Feature: A CLI to run biobox-compatible Docker containers
And the file "contigs.fa" should not be empty

Examples:
| assembler | ressources | input | output |
| bioboxes/velvet | | reads.fq.gz | contigs.fa |
| bioboxes/velvet | | $(realpath reads.fq.gz) | contigs.fa |
| bioboxes/velvet | | reads.fq.gz | $(realpath .)/contigs.fa |
| bioboxes/velvet | --memory=1g --cpu-shares=512 | reads.fq.gz | $(realpath .)/contigs.fa |
| bioboxes/velvet | -m 1g -c 512 | $(realpath reads.fq.gz) | contigs.fa |
| assembler | resources |
| bioboxes/velvet | --memory=1g |
| bioboxes/velvet | --cpu-shares=512 |


Scenario Outline: Running a biobox assembler benchmark container
Given I create the directory "input"
Expand All @@ -87,23 +109,19 @@ Feature: A CLI to run biobox-compatible Docker containers
biobox \
run \
assembler_benchmark \
<benchmark> \
<ressources> \
bioboxes/quast \
<resources> \
--no-rm \
--input-fasta=<input-fasta> \
<input-ref> \
--output=<output>
--input-fasta=input/assembly.fasta \
--output=output
"""
Then the stdout should be empty
And the stderr should be empty
And the exit code should be 0
And the file "output/biobox.yaml" should exist
And the file "output/biobox.yaml" should not be empty
And the file "output/report.tsv" should exist
And the file "output/report.tsv" should not be empty

Examples:
| benchmark | ressources | input-fasta | input-ref | output |
| bioboxes/quast | | $(realpath input/assembly.fasta) | --input-ref=$(realpath input/references) | $(realpath output) |
| bioboxes/quast | | input/assembly.fasta | --input-ref=input/references | output |
| bioboxes/quast | | input/assembly.fasta | | output |
| bioboxes/quast | --memory=1g --cpu-shares=512 | $(realpath input/assembly.fasta) | --input-ref=$(realpath input/references) | $(realpath output) |
| bioboxes/quast | -m 1g -c 512 | input/assembly.fasta | --input-ref=input/references | output |
| bioboxes/quast | -m 1g -c 512 | input/assembly.fasta | | output |
| resources | input-ref |
| --cpu-shares=512 | |
| --memory=1g | --input-ref=input/references |

0 comments on commit 5f8bd68

Please sign in to comment.