[hg] galaxy 1674: Enhancing incorrect_Gops_job script to output ...
details: http://www.bx.psu.edu/hg/galaxy/rev/006bfb42e335 changeset: 1674:006bfb42e335 user: guru date: Wed Dec 17 11:01:57 2008 -0500 description: Enhancing incorrect_Gops_job script to output only those jobs whose output has changed since the BitSetSafeReaderWrapper was fixed. 1 file(s) affected in this change: scripts/others/incorrect_gops_jobs.py diffs (45 lines): diff -r f61f2128c692 -r 006bfb42e335 scripts/others/incorrect_gops_jobs.py --- a/scripts/others/incorrect_gops_jobs.py Tue Dec 16 17:30:19 2008 -0500 +++ b/scripts/others/incorrect_gops_jobs.py Wed Dec 17 11:01:57 2008 -0500 @@ -5,7 +5,7 @@ """ from galaxy import eggs -import sys, os, ConfigParser +import sys, os, ConfigParser, tempfile import galaxy.app import galaxy.model.mapping import pkg_resources @@ -62,6 +62,23 @@ history = app.model.History.get( hda.history_id ) print "# ------> processing history id %s" % str( history.id ) if history.user_id: + cmd_line = str( job.command_line ) + new_output = tempfile.NamedTemporaryFile('w') + if (sa.or_( app.model.Job.table.c.tool_id == 'gops_intersect_1', + app.model.Job.table.c.tool_id == 'gops_subtract_1', + app.model.Job.table.c.tool_id == 'gops_coverage_1' + ) + ): + new_cmd_line = " ".join(map(str,cmd_line.split()[:4])) + " " + new_output.name + " " + " ".join(map(str,cmd_line.split()[5:])) + job_output = cmd_line.split()[4] + else: + new_cmd_line = " ".join(map(str,cmd_line.split()[:3])) + " " + new_output.name + " " + " ".join(map(str,cmd_line.split()[4:])) + job_output = cmd_line.split()[3] + os.system(new_cmd_line) + diff_status = os.system('diff %s %s >> /dev/null' %(new_output.name, job_output)) + if diff_status == 0: + continue + print "# --------> Outputs differ" user = app.model.User.get( history.user_id ) jobs[ job.id ] = {} jobs[ job.id ][ 'hda_id' ] = hda.id @@ -77,7 +94,7 @@ print "\n\n# Number of incorrect Jobs: %d\n\n" % ( len( jobs ) ) print "#job_id\thda_id\thda_name\thda_info\thistory_id\thistory_name\thistory_update_time\tuser_email" for jid in jobs: - print "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % \ + print '%s\t%s\t"%s"\t"%s"\t%s\t"%s"\t"%s"\t%s' % \ ( str( jid ), str( jobs[ jid ][ 'hda_id' ] ), jobs[ jid ][ 'hda_name' ],
participants (1)
-
Nate Coraor