bugs in r2301 test_uniq_seq

13 views
Skip to first unread message

congmao wang

unread,
Nov 21, 2014, 9:48:02 AM11/21/14
to biop...@googlegroups.com
when testing many times, you will find some times fail:
Testing uniq_seq -I $BP_DIR/bp_test/in/uniq_seq.in -c | sort_records -k SEQ -O $BP_TMP/congmao.uniq_seq.out ... FAIL

The command can run well, but it seems sort_records not works well

congmao wang

unread,
Nov 21, 2014, 9:50:37 AM11/21/14
to biop...@googlegroups.com
PS: When I test 10 times, seems 4 times fail, 6 times ok

Martin Asser Hansen

unread,
Nov 23, 2014, 3:13:11 AM11/23/14
to biop...@googlegroups.com
Yes, this is due to unordered perl hashes. It used to be unordered in the same way, but now (maybe newer perl version) it causes the test to fail. I need to come up with a way to sort the records internally for testing.


Martin

--
You received this message because you are subscribed to the Google Groups "biopieces" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biopieces+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

congmao wang

unread,
Nov 23, 2014, 10:04:14 AM11/23/14
to biop...@googlegroups.com, ma...@maasha.dk
I think it's not caused by newer perl version, I didn't update to a newer perl version for testing purpose

Martin Asser Hansen

unread,
Nov 24, 2014, 4:14:55 AM11/24/14
to biop...@googlegroups.com
On our server the result is stable and correct, but I can reproduce the issue on my Mac where I get this:

maasha@mel:~$ uniq_seq -I $BP_DIR/bp_test/in/uniq_seq.in -c
SEQ: ATGC
SEQ_LEN: 4
SEQ_COUNT: 3
---
maasha@mel:~$ uniq_seq -I $BP_DIR/bp_test/in/uniq_seq.in -c
SEQ: GCAT
SEQ_LEN: 4
SEQ_COUNT: 3
---

So it is not a problem with the testing suite (which is in fact handling unstable key order).

So now I have inserted a sort in the code of uniq_seq and the output is now stable

maasha@mel:~/biopieces/bp_test$ uniq_seq -I $BP_DIR/bp_test/in/uniq_seq.in -c
SEQ_LEN: 4
SEQ: GCAT
SEQ_COUNT: 3
---
maasha@mel:~/biopieces/bp_test$ uniq_seq -I $BP_DIR/bp_test/in/uniq_seq.in -c
SEQ_COUNT: 3
SEQ: GCAT
SEQ_LEN: 4
---

And with this the problem should be fixed, since the testing suite is handling the key order.


bp_update && bp_test


Nasty issue - thanks for pointing it out.

Cheers


Martin

congmao wang

unread,
Nov 24, 2014, 5:43:28 AM11/24/14
to biop...@googlegroups.com, ma...@maasha.dk
Yes, it should be fixed now, 10 times test, all pass:)

cheers,
Congmao
Reply all
Reply to author
Forward
0 new messages