itmat / rum

RNA-Seq Unified Mapper
http://cbil.upenn.edu/RUM
MIT License
26 stars 4 forks source link

make test fails on several files due to "unsorted output" #186

Open amirkarger opened 9 years ago

amirkarger commented 9 years ago

I don't actually know enough about RUM to know whether this is a failure of RUM, or a failure in the tests.

v2.0.5_06, Perl 5.018001

I get a bunch of errors like:

t/get-inferred-internal-exons.t .. 1..3 ok 1 - use RUM::Script::GetInferredInternalExons; not ok 2 - Text format

Failed test 'Text format'

at /opt/apps/src/rum/rum-master/blib/lib/RUM/TestUtils.pm line 60.

not ok 3 - Bed format

Failed test 'Bed format'

at /opt/apps/src/rum/rum-master/blib/lib/RUM/TestUtils.pm line 60.

Looks like you failed 2 tests of 3.

Dubious, test returned 2 (wstat 512, 0x200) Failed 2/3 subtests


When I dug into the test files and did the diff myself, it turned out that the outuput bed and text files were identical, except they were sorted differently. For example:

==> t/expected/get-inferred-internal-exons/inferred_internal_exons.bed <== track name="Inferred Internal Exons" description="Inferred Internal Exons" visibility=3 itemRgb="On" 1 14831081 14831467 . 0 . 14831081 14831467 0,205,102 1 15083982 15084444 . 0 . 15083982 15084444 0,205,102 1 16596639 16596658 . 0 . 16596639 16596658 0,205,102 2 3615287 3615633 . 0 . 3615287 3615633 0,205,102 2 3615989 3616215 . 0 . 3615989 3616215 0,205,102 2 3617283 3617546 . 0 . 3617283 3617546 0,205,102 2 3617283 3617461 . 0 . 3617283 3617461 0,205,102 2 3617724 3618199 . 0 . 3617724 3618199 0,205,102 2 3618229 3618635 . 0 . 3618229 3618635 0,205,102

==> t/tmp/inferred-bed.wRiYNb <== track name="Inferred Internal Exons" description="Inferred Internal Exons" visibility=3 itemRgb="On" 1 14831081 14831467 . 0 . 14831081 14831467 0,205,102 1 15083982 15084444 . 0 . 15083982 15084444 0,205,102 1 16596639 16596658 . 0 . 16596639 16596658 0,205,102 2 3615287 3615633 . 0 . 3615287 3615633 0,205,102 2 3615989 3616215 . 0 . 3615989 3616215 0,205,102 2 3617283 3617461 . 0 . 3617283 3617461 0,205,102 2 3617283 3617546 . 0 . 3617283 3617546 0,205,102 2 3617724 3618199 . 0 . 3617724 3618199 0,205,102 2 3618229 3618635 . 0 . 3618229 3618635 0,205,102

Lines seven and eight of the two files are switched.

I hacked RUM::TestUtils to sort each file before doing the diff, and then the only file that failed was indexing.t "Make master file of genes" which again had a couple otherwise identical lines in different orders. It matches if you use join("\n", sort split /\n/, $out) with join("\n", sort split /\n/, $expected).

I didn't see an obvious match to this issue in the existing issues.

-Amir Karger