| 1 |
@cli |
| 2 |
Feature: Command-line interface (CLI) |
| 3 |
|
| 4 |
bio-vcf has a powerful command line interface. Here we regression test features. |
| 5 |
|
| 6 |
Scenario: Test the info filter using dp |
| 7 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 8 |
When I execute "./bin/bio-vcf -i --filter 'r.info.dp>100'" |
| 9 |
Then I expect the named output to match the named output "r.info.dp" |
| 10 |
|
| 11 |
Scenario: Test the info filter using dp and threads |
| 12 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 13 |
When I execute "./bin/bio-vcf -i --num-threads 4 --filter 'r.info.dp>2'" |
| 14 |
Then I expect the named output to match the named output "thread4" in under 30 seconds |
| 15 |
|
| 16 |
Scenario: Test the info filter using dp and threads with lines |
| 17 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 18 |
When I execute "./bin/bio-vcf -i --num-threads 4 --thread-lines 4 --filter 'r.info.dp>2'" |
| 19 |
Then I expect the named output to match the named output "thread4_4" in under 30 seconds |
| 20 |
|
| 21 |
Scenario: Test the sample filter using dp |
| 22 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 23 |
When I execute "./bin/bio-vcf -i --sfilter 's.dp>20'" |
| 24 |
Then I expect the named output to match the named output "s.dp" |
| 25 |
|
| 26 |
Scenario: Test the include sample filter using dp |
| 27 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 28 |
When I execute "./bin/bio-vcf -i --ifilter 's.dp>100' --seval s.dp" |
| 29 |
Then I expect the named output to match the named output "ifilter_s.dp" |
| 30 |
|
| 31 |
Scenario: Test the info eval using dp |
| 32 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 33 |
When I execute "./bin/bio-vcf -i --eval 'r.info.dp'" |
| 34 |
Then I expect the named output to match the named output "eval_r.info.dp" |
| 35 |
|
| 36 |
Scenario: Test the sample eval using dp |
| 37 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 38 |
When I execute "./bin/bio-vcf -i --seval 's.dp'" |
| 39 |
Then I expect the named output to match the named output "seval_s.dp" |
| 40 |
|
| 41 |
Scenario: Test the sample filter + eval using dp |
| 42 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 43 |
When I execute "./bin/bio-vcf -i --sfilter 's.dp>10' --seval 's.dp'" |
| 44 |
Then I expect the named output to match the named output "sfilter_seval_s.dp" |
| 45 |
|
| 46 |
Scenario: Rewrite an info field |
| 47 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 48 |
When I execute "./bin/bio-vcf --rewrite rec.info[\'sample\']=\'XXXXX\'" |
| 49 |
Then I expect the named output to match the named output "rewrite.info.sample" |
| 50 |
|
| 51 |
Scenario: Test eval-once |
| 52 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 53 |
When I execute "./bin/bio-vcf --eval-once header.meta[\'GATKCommandLine\']" |
| 54 |
Then I expect the named output to match the named output "eval_once" |
| 55 |
|
| 56 |
Scenario: Test JSON output with header meta data |
| 57 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 58 |
When I execute "./bin/bio-vcf --template template/vcf2json_full_header.erb" |
| 59 |
Then I expect the named output to match the named output "vcf2json_full_header" |
| 60 |
|
| 61 |
Scenario: Test JSON output with header meta data and query samples |
| 62 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 63 |
When I execute "./bin/bio-vcf --template template/vcf2json_use_meta.erb" |
| 64 |
Then I expect the named output to match the named output "vcf2json_use_meta" |
| 65 |
|
| 66 |
Scenario: Test deadlock on failed filter with threads |
| 67 |
Given I have input file(s) named "test/data/input/multisample.vcf" |
| 68 |
When I execute "./bin/bio-vcf -q --timeout 4 --num-threads 4 --thread-lines 4 --filter 't.info.dp>2'" |
| 69 |
Then I expect an error and the named output to match the named output "thread4_4_failed_filter" in under 30 seconds |
| 70 |
|
| 71 |
Scenario: Test VCF with no records |
| 72 |
Given I have input file(s) named "test/data/input/empty.vcf" |
| 73 |
When I execute "./bin/bio-vcf --timeout=5" |
| 74 |
Then I expect no errors |