From d191d38297e3eeef81eafabd69ea504802fe3884 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Wed, 17 Feb 2016 22:09:07 -0500 Subject: [PATCH] shuffle UT --- c/reg_test/expected/out | 36 ++++++++++++++++++++++++++++++++++++ c/reg_test/run | 4 ++++ c/todo.txt | 36 ------------------------------------ 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/c/reg_test/expected/out b/c/reg_test/expected/out index d65f097ec..93f889b63 100644 --- a/c/reg_test/expected/out +++ b/c/reg_test/expected/out @@ -702,6 +702,42 @@ a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694 a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006 a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 +mlr --seed 12345 shuffle ./reg_test/input/abixy-het +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 +a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729 +a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006 +aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 + +mlr --seed 23456 shuffle ./reg_test/input/abixy-het +a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729 +a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694 +aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 + +mlr --seed 34567 shuffle ./reg_test/input/abixy-het +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694 +aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729 +a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006 +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 + mlr uniq -g a ./reg_test/input/abixy-het a=pan a=eks diff --git a/c/reg_test/run b/c/reg_test/run index 33cfb48ec..6695038e9 100755 --- a/c/reg_test/run +++ b/c/reg_test/run @@ -187,6 +187,10 @@ run_mlr --seed 12345 sample -k 2 $indir/abixy-het run_mlr --seed 12345 sample -k 2 -g a $indir/abixy-het run_mlr --seed 12345 sample -k 2 -g a,b $indir/abixy-het +run_mlr --seed 12345 shuffle $indir/abixy-het +run_mlr --seed 23456 shuffle $indir/abixy-het +run_mlr --seed 34567 shuffle $indir/abixy-het + run_mlr uniq -g a $indir/abixy-het run_mlr uniq -g a,b $indir/abixy-het diff --git a/c/todo.txt b/c/todo.txt index 1013e347b..aa65d3984 100644 --- a/c/todo.txt +++ b/c/todo.txt @@ -8,7 +8,6 @@ TOP-OF-LIST SUMMARY * rh/fedora/centos mlr-3.4.0 -! nest x 8 ? json arrays -> nested w/ some delimiter? only if all array elements are terminals. * shuffle: needs UT & mld:ref:shuffle ! 64-bit lengths for containers. test with 5-billion-integer-seq data. @@ -37,41 +36,6 @@ TOP-OF-LIST SUMMARY - nest - shuffle -================================================================ -NEST: - -! UT cases varying fs/ps - -wolen: - - Being able to deal with replicates in both directions would be really useful. - Here's a real-world example I was working on today, which contains two different measures of association between pairs of - genetic markers (rs*): - - rs10 rs2237570,0.3,-0.72;rs117465896,0.75,-0.88 - rs10041592 rs1628466,0.21,0.92;rs1729036,0.24,1;rs79177551,0.2,0.85 - rs10033329 rs4835294,0.2,0.46 - - There are two fields, tab-delimited. Records in the second field provide the association results for all markers - relevant to the marker in the first field. Converting this format into a "long" format requires two operators. First, - the unnesting step I described above, which spreads the semicolon-separated replicates across new records (explode-values): - - rs10 rs2237570,0.3,-0.72 - rs10 rs117465896,0.75,-0.88 - rs10041592 rs1628466,0.21,0.92 - rs10041592 rs1729036,0.24,1 - rs10041592 rs79177551,0.2,0.85 - rs10033329 rs4835294,0.2,0.46 - - followed by a separating step (as described by @komosa) to spread the comma-separated replicates across new fields: - - rs10 rs2237570 0.3 -0.72 - rs10 rs117465896 0.75 -0.88 - rs10041592 rs1628466 0.21 0.92 - rs10041592 rs1729036 0.24 1 - rs10041592 rs79177551 0.2 0.85 - rs10033329 rs4835294 0.2 0.46 - ================================================================ TRI-SPLIT NULL