[hg] galaxy 2828: Bug fixed in \"compare two queries\" tool. Spe...
details: http://www.bx.psu.edu/hg/galaxy/rev/ca273cc16b60 changeset: 2828:ca273cc16b60 user: guru date: Mon Oct 05 16:33:32 2009 -0400 description: Bug fixed in \"compare two queries\" tool. Specified tab as delimiter for sorting and joining. 2 file(s) affected in this change: tools/filters/compare.xml tools/filters/joinWrapper.py diffs (35 lines): diff -r f648d6dec544 -r ca273cc16b60 tools/filters/compare.xml --- a/tools/filters/compare.xml Mon Oct 05 15:07:20 2009 -0400 +++ b/tools/filters/compare.xml Mon Oct 05 16:33:32 2009 -0400 @@ -1,4 +1,4 @@ -<tool id="comp1" name="Compare two Queries"> +<tool id="comp1" name="Compare two Queries" version="1.0.1"> <description>to find common or distinct rows</description> <command interpreter="python">joinWrapper.py $input1 $input2 $field1 $field2 $mode $out_file1</command> <inputs> diff -r f648d6dec544 -r ca273cc16b60 tools/filters/joinWrapper.py --- a/tools/filters/joinWrapper.py Mon Oct 05 15:07:20 2009 -0400 +++ b/tools/filters/joinWrapper.py Mon Oct 05 16:33:32 2009 -0400 @@ -22,8 +22,8 @@ try: #Sort the two files based on specified fields - os.system("sort -k %d -o %s %s" %(field1, tmpfile1.name, infile1)) - os.system("sort -k %d -o %s %s" %(field2, tmpfile2.name, infile2)) + os.system("sort -t $'\t' -k %d -o %s %s" %(field1, tmpfile1.name, infile1)) + os.system("sort -t $'\t' -k %d -o %s %s" %(field2, tmpfile2.name, infile2)) except Exception, exc: stop_err( 'Initialization error -> %s' %str(exc) ) @@ -40,9 +40,9 @@ break if mode == "V": - cmdline = 'join -v 1 -o %s -1 %d -2 %d %s %s | tr " " "\t" > %s' %(option, field1, field2, tmpfile1.name, tmpfile2.name, outfile) + cmdline = "join -t $'\t' -v 1 -o %s -1 %d -2 %d %s %s > %s" %(option, field1, field2, tmpfile1.name, tmpfile2.name, outfile) else: - cmdline = 'join -o %s -1 %d -2 %d %s %s | tr " " "\t" > %s' %(option, field1, field2, tmpfile1.name, tmpfile2.name, outfile) + cmdline = "join -t $'\t' -o %s -1 %d -2 %d %s %s > %s" %(option, field1, field2, tmpfile1.name, tmpfile2.name, outfile) try: os.system(cmdline)
participants (1)
-
Greg Von Kuster