name "BLSORT - Sort a BioLegato table" icon "$BIRCH/public_html/images/birch_black_ico.png" tip "Sort a BioLegato table using one or more columns as the sort key." var "in1" type tempfile direction in format tsv save true var "in2" type tempfile direction in format tsv save false var "out2" type tempfile direction out format tsv save true overwrite true var "s1" type combobox label "1st sort key" default 0 choices "column 1" "-cols 1" "column 2" "-cols 2" "column 3" "-cols 3" "column 4" "-cols 4" "column 5" "-cols 5" "column 6" "-cols 6" "column 7" "-cols 7" "column 8" "-cols 8" "column 9" "-cols 9" "column 10" "-cols 10" "column 11" "-cols 11" "column 12" "-cols 12" "column 13" "-cols 13" "column 14" "-cols 14" "column 15" "-cols 15" "column 16" "-cols 16" "column 17" "-cols 17" "column 18" "-cols 18" "column 19" "-cols 19" "column 20" "-cols 20" "column 21" "-cols 21" "column 22" "-cols 22" "column 23" "-cols 23" "column 24" "-cols 24" "column 25" "-cols 25" "column 26" "-cols 26" "column 27" "-cols 27" "column 28" "-cols 28" "column 29" "-cols 29" "column 30" "-cols 30" "column 31" "-cols 31" "column 32" "-cols 32" "column 33" "-cols 33" "column 34" "-cols 34" "column 35" "-cols 35" "column 36" "-cols 36" "column 37" "-cols 37" "column 38" "-cols 38" "column 39" "-cols 39" "column 40" "-cols 40" "column 41" "-cols 41" "column 42" "-cols 42" "column 43" "-cols 43" "column 44" "-cols 44" "column 45" "-cols 45" "column 46" "-cols 46" "column 47" "-cols 47" "column 48" "-cols 48" "column 49" "-cols 49" "column 50" "-cols 50" var "s2" type combobox label "2nd sort key" default 0 choices "off" "" "column 1" ",1" "column 2" ",2" "column 3" ",3" "column 4" ",4" "column 5" ",5" "column 6" ",6" "column 7" ",7" "column 8" ",8" "column 9" ",9" "column 10" ",10" "column 11" ",11" "column 12" ",12" "column 13" ",13" "column 14" ",14" "column 15" ",15" "column 16" ",16" "column 17" ",17" "column 18" ",18" "column 19" ",19" "column 20" ",20" "column 21" ",21" "column 22" ",22" "column 23" ",23" "column 24" ",24" "column 25" ",25" "column 26" ",26" "column 27" ",27" "column 28" ",28" "column 29" ",29" "column 30" ",30" "column 31" ",31" "column 32" ",32" "column 33" ",33" "column 34" ",34" "column 35" ",35" "column 36" ",36" "column 37" ",37" "column 38" ",38" "column 39" ",39" "column 40" ",40" "column 41" ",41" "column 42" ",42" "column 43" ",43" "column 44" ",44" "column 45" ",45" "column 46" ",46" "column 47" ",47" "column 48" ",48" "column 49" ",49" "column 50" ",50" var "s3" type combobox label "3rd sort key" default 0 choices "off" "" "column 1" ",1" "column 2" ",2" "column 3" ",3" "column 4" ",4" "column 5" ",5" "column 6" ",6" "column 7" ",7" "column 8" ",8" "column 9" ",9" "column 10" ",10" "column 11" ",11" "column 12" ",12" "column 13" ",13" "column 14" ",14" "column 15" ",15" "column 16" ",16" "column 17" ",17" "column 18" ",18" "column 19" ",19" "column 20" ",20" "column 21" ",21" "column 22" ",22" "column 23" ",23" "column 24" ",24" "column 25" ",25" "column 26" ",26" "column 27" ",27" "column 28" ",28" "column 29" ",29" "column 30" ",30" "column 31" ",31" "column 32" ",32" "column 33" ",33" "column 34" ",34" "column 35" ",35" "column 36" ",36" "column 37" ",37" "column 38" ",38" "column 39" ",39" "column 40" ",40" "column 41" ",41" "column 42" ",42" "column 43" ",43" "column 44" ",44" "column 45" ",45" "column 46" ",46" "column 47" ",47" "column 48" ",48" "column 49" ",49" "column 50" ",50" var "s4" type combobox label "4th sort key" default 0 choices "off" "" "column 1" ",1" "column 2" ",2" "column 3" ",3" "column 4" ",4" "column 5" ",5" "column 6" ",6" "column 7" ",7" "column 8" ",8" "column 9" ",9" "column 10" ",10" "column 11" ",11" "column 12" ",12" "column 13" ",13" "column 14" ",14" "column 15" ",15" "column 16" ",16" "column 17" ",17" "column 18" ",18" "column 19" ",19" "column 20" ",20" "column 21" ",21" "column 22" ",22" "column 23" ",23" "column 24" ",24" "column 25" ",25" "column 26" ",26" "column 27" ",27" "column 28" ",28" "column 29" ",29" "column 30" ",30" "column 31" ",31" "column 32" ",32" "column 33" ",33" "column 34" ",34" "column 35" ",35" "column 36" ",36" "column 37" ",37" "column 38" ",38" "column 39" ",39" "column 40" ",40" "column 41" ",41" "column 42" ",42" "column 43" ",43" "column 44" ",44" "column 45" ",45" "column 46" ",46" "column 47" ",47" "column 48" ",48" "column 49" ",49" "column 50" ",50" var "descending" type chooser label "Sort order" default 1 choices "Ascending" "" "Descending" "-descending" panel var "Run1" type button label "Run: Output to new window" shell "(python $BIRCH/script/blsort.py %in1% %in1%.tsv %S1%%S2%%S3%%S4% %DESCENDING%; bltable %in1%.tsv; rm %in1%.*)&" close true var "Run2" type button label "Run: Output to this window" shell "python $BIRCH/script/blsort.py %in2% %in2%.tsv %S1%%S2%%S3%%S4% %DESCENDING%; mv %in2%.tsv %out2%" close true var "Help" type button label "Help" shell "$BIRCH/script/chooseviewer.py $BIRCH/doc/bioLegato/blsort.html" close false