When making index, tabix only prints error message when it encounters a row with invalid (non numeric) value in index (-b/-s) column but still exit with code 0 (usually indicating a success). While it do exit with a non-zero code when querying data.
$ printf 'A\t1\t2\nA\ta\t3\nA\t3\t4\n' | bgzip > test.gz
$ tabix -p bed test.gz
[E::get_intv] Failed to parse TBX_GENERIC: was wrong -p [type] used?
The offending line was: "A a 3"
$ echo $?
0
$ echo A | tabix -R - test.gz
A 1 2
[E::get_intv] Failed to parse TBX_GENERIC: was wrong -p [type] used?
The offending line was: "A a 3"
Reading "test.gz" failed: No such file or directory
$ echo $?
1
It would be nice if it could exit with a non-zero code indicating the error. This will make it easier to interrupt a workflow if users provided a malformed file.
When making index,
tabixonly prints error message when it encounters a row with invalid (non numeric) value in index (-b/-s) column but still exit with code 0 (usually indicating a success). While it do exit with a non-zero code when querying data.It would be nice if it could exit with a non-zero code indicating the error. This will make it easier to interrupt a workflow if users provided a malformed file.