1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/218ca2b7e446/
changeset: 218ca2b7e446
user: dan
date: 2011-10-06 18:27:48
summary: Some gatk_wrapper.py tweaks.
affected #: 1 file (-1 bytes)
--- a/tools/gatk/gatk_wrapper.py Thu Oct 06 12:16:48 2011 -0400
+++ b/tools/gatk/gatk_wrapper.py Thu Oct 06 12:27:48 2011 -0400
@@ -8,7 +8,7 @@
import sys, optparse, os, tempfile, subprocess, shutil
from string import Template
-GALAXY_EXT_TO_GATK_EXT = { 'gatk_interval':'intervals', 'bam_index':'bam.bai', 'gatk_dbsnp':'dbsnp', 'picard_interval_list':'interval_list' } #items not listed here, will use the galaxy extension as-is
+GALAXY_EXT_TO_GATK_EXT = { 'gatk_interval':'intervals', 'bam_index':'bam.bai', 'gatk_dbsnp':'dbSNP', 'picard_interval_list':'interval_list' } #items not listed here will use the galaxy extension as-is
GALAXY_EXT_TO_GATK_FILE_TYPE = GALAXY_EXT_TO_GATK_EXT #for now, these are the same, but could be different if needed
DEFAULT_GATK_PREFIX = "gatk_file"
CHUNK_SIZE = 2**20 #1mb
@@ -48,21 +48,21 @@
parser.add_option( '-p', '--pass_through', dest='pass_through_options', action='append', type="string", help='These options are passed through directly to GATK, without any modification.' )
parser.add_option( '-d', '--dataset', dest='datasets', action='append', type="string", nargs=4, help='"-argument" "original_filename" "galaxy_filetype" "name_prefix"' )
parser.add_option( '', '--max_jvm_heap', dest='max_jvm_heap', action='store', type="string", default=None, help='If specified, the maximum java virtual machine heap size will be set to the provide value.' )
- parser.add_option( '', '--max_jvm_heap_fraction', dest='max_jvm_heap_fraction', action='store', type="int", default=0, help='If specified, the maximum java virtual machine heap size will be set to the provide value as a fraction of total physical memory.' )
+ parser.add_option( '', '--max_jvm_heap_fraction', dest='max_jvm_heap_fraction', action='store', type="int", default=None, help='If specified, the maximum java virtual machine heap size will be set to the provide value as a fraction of total physical memory.' )
parser.add_option( '', '--stdout', dest='stdout', action='store', type="string", default=None, help='If specified, the output of stdout will be written to this file.' )
parser.add_option( '', '--stderr', dest='stderr', action='store', type="string", default=None, help='If specified, the output of stderr will be written to this file.' )
parser.add_option( '', '--html_report_from_directory', dest='html_report_from_directory', action='append', type="string", nargs=2, help='"Target HTML File" "Directory"')
(options, args) = parser.parse_args()
- tmp_dir = tempfile.mkdtemp()
+ tmp_dir = tempfile.mkdtemp( prefix='tmp-gatk-' )
if options.pass_through_options:
cmd = ' '.join( options.pass_through_options )
else:
cmd = ''
- if options.max_jvm_heap:
- cmd.replace( 'java ', 'java -Xmx%s ' % ( options.max_jvm_heap ), 1 )
- elif options.max_jvm_heap_fraction:
- cmd.replace( 'java ', 'java -XX:DefaultMaxRAMFraction=%s -XX:+UseParallelGC ' % ( options.max_jvm_heap_fraction ), 1 )
+ if options.max_jvm_heap is not None:
+ cmd = cmd.replace( 'java ', 'java -Xmx%s ' % ( options.max_jvm_heap ), 1 )
+ elif options.max_jvm_heap_fraction is not None:
+ cmd = cmd.replace( 'java ', 'java -XX:DefaultMaxRAMFraction=%s -XX:+UseParallelGC ' % ( options.max_jvm_heap_fraction ), 1 )
if options.datasets:
for ( dataset_arg, filename, galaxy_ext, prefix ) in options.datasets:
gatk_filename = gatk_filename_from_galaxy( filename, galaxy_ext, target_dir = tmp_dir, prefix = prefix )
@@ -73,9 +73,7 @@
stderr = open_file_from_option( options.stderr, mode = 'wb' )
#if no stderr file is specified, we'll use our own
if stderr is None:
- stderr = tempfile.NamedTemporaryFile( dir=tmp_dir )
- stderr.close()
- stderr = open( stderr.name, 'w+b' )
+ stderr = tempfile.NamedTemporaryFile( prefix="gatk-stderr-", dir=tmp_dir )
proc = subprocess.Popen( args=cmd, stdout=stdout, stderr=stderr, shell=True, cwd=tmp_dir )
return_code = proc.wait()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/9a6e1f17879a/
changeset: 9a6e1f17879a
user: dan
date: 2011-10-06 18:16:48
summary: HTML escape job stderr/stdout/info on dataset error page.
affected #: 1 file (-1 bytes)
--- a/templates/dataset/errors.mako Thu Oct 06 10:59:50 2011 -0400
+++ b/templates/dataset/errors.mako Thu Oct 06 12:16:48 2011 -0400
@@ -24,21 +24,21 @@
<% job = hda.creating_job_associations[0].job %>
%if job.traceback:
The Galaxy framework encountered the following error while attempting to run the tool:
- <pre>${job.traceback}</pre>
+ <pre>${job.traceback | h}</pre>
%endif
%if job.stderr or job.info:
Tool execution generated the following error message:
%if job.stderr:
- <pre>${job.stderr}</pre>
+ <pre>${job.stderr | h}</pre>
%elif job.info:
- <pre>${job.info}</pre>
+ <pre>${job.info | h}</pre>
%endif
%else:
Tool execution did not generate any error messages.
%endif
%if job.stdout:
The tool produced the following additional output:
- <pre>${job.stdout}</pre>
+ <pre>${job.stdout | h}</pre>
%endif
%else:
The tool did not create any additional job / error info.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/2f0dc1362384/
changeset: 2f0dc1362384
user: dan
date: 2011-10-06 16:59:50
summary: Add a link to allow the user to switch to the new history directly after cloning.
affected #: 1 file (-1 bytes)
--- a/lib/galaxy/web/controllers/history.py Thu Oct 06 09:34:51 2011 -0400
+++ b/lib/galaxy/web/controllers/history.py Thu Oct 06 10:59:50 2011 -0400
@@ -1214,7 +1214,7 @@
name += " (active items only)"
new_history = history.copy( name=name, target_user=user )
if len( histories ) == 1:
- msg = 'Clone with name "%s" is now included in your previously stored histories.' % new_history.name
+ msg = 'Clone with name "<a href="%s" target="_top">%s</a>" is now included in your previously stored histories.' % ( url_for( controller="history", action="switch_to_history", hist_id=trans.security.encode_id( new_history.id ) ) , new_history.name )
else:
msg = '%d cloned histories are now included in your previously stored histories.' % len( histories )
return trans.show_ok_message( msg )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/40eb8989312c/
changeset: 40eb8989312c
user: dan
date: 2011-10-06 15:24:05
summary: Fix for .wiki_url in tool_form.mako
affected #: 1 file (-1 bytes)
--- a/templates/tool_form.mako Wed Oct 05 00:18:15 2011 -0400
+++ b/templates/tool_form.mako Thu Oct 06 09:24:05 2011 -0400
@@ -242,7 +242,7 @@
If you're not familiar with Galaxy, please consider visiting the
<a href="${h.url_for( controller='root' )}" target="_top">welcome page</a>.
To learn more about what Galaxy is and what it can do for you, please visit
- the <a href="$add_frame.wiki_url" target="_top">Galaxy wiki</a>.
+ the <a href="${add_frame.wiki_url}" target="_top">Galaxy wiki</a>.
</div><br/>
%endif
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
2 new changesets in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/7f8103057a43/
changeset: 7f8103057a43
user: kanwei
date: 2011-10-05 06:15:37
summary: Typo
affected #: 1 file (-1 bytes)
--- a/lib/galaxy/util/__init__.py Tue Oct 04 23:29:08 2011 -0400
+++ b/lib/galaxy/util/__init__.py Wed Oct 05 00:15:37 2011 -0400
@@ -544,7 +544,7 @@
def size_to_bytes( size ):
"""
- Returns a number of bytes if given a reasably formatted string with the size
+ Returns a number of bytes if given a reasonably formatted string with the size
"""
# Assume input in bytes if we can convert directly to an int
try:
http://bitbucket.org/galaxy/galaxy-central/changeset/087a766b3eca/
changeset: 087a766b3eca
user: kanwei
date: 2011-10-05 06:18:15
summary: Cache bust using unix timestamp that server started on to force reloading of stylesheets and javascripts whenever server restarts
affected #: 1 file (-1 bytes)
--- a/lib/galaxy/web/framework/helpers/__init__.py Wed Oct 05 00:15:37 2011 -0400
+++ b/lib/galaxy/web/framework/helpers/__init__.py Wed Oct 05 00:18:15 2011 -0400
@@ -6,9 +6,12 @@
from galaxy.util.json import to_json_string
from galaxy.util import hash_util
from datetime import datetime, timedelta
+import time
from cgi import escape
+server_starttime = int(time.time())
+
# If the date is more than one week ago, then display the actual date instead of in words
def time_ago( x ):
delta = timedelta(weeks=1)
@@ -38,20 +41,18 @@
Take a list of stylesheet names (no extension) and return appropriate string
of link tags.
- TODO: This has a hardcoded "?v=X" to defeat caching. This should be done
- in a better way.
+ Cache-bust with time that server started running on
"""
- return "\n".join( [ stylesheet_link_tag( "/static/style/" + name + ".css?v=3" ) for name in args ] )
+ return "\n".join( [ stylesheet_link_tag( "/static/style/" + name + ".css?v=%s" % server_starttime ) for name in args ] )
def js( *args ):
"""
Take a list of javascript names (no extension) and return appropriate
string of script tags.
- TODO: This has a hardcoded "?v=X" to defeat caching. This should be done
- in a better way.
+ Cache-bust with time that server started running on
"""
- return "\n".join( [ javascript_include_tag( "/static/scripts/" + name + ".js?v=8" ) for name in args ] )
+ return "\n".join( [ javascript_include_tag( "/static/scripts/" + name + ".js?v=%s" % server_starttime ) for name in args ] )
# Hashes
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/fb6aa53bb113/
changeset: fb6aa53bb113
user: kanwei
date: 2011-10-05 05:11:23
summary: Grouping tool: make error clearer when a line doesn't have entry on grouped column
affected #: 1 file (-1 bytes)
--- a/tools/stats/grouping.py Tue Oct 04 22:25:08 2011 -0400
+++ b/tools/stats/grouping.py Tue Oct 04 23:11:23 2011 -0400
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# Guruprasad Ananda
-# Refactored 2011, Kanwei Li
-# Refactored to use numpy instead of rpy
+# Refactored 2011 to use numpy instead of rpy, Kanwei Li
"""
This tool provides the SQL "group by" functionality.
"""
@@ -83,7 +82,11 @@
fout = open(sys.argv[1], "w")
def is_new_item(line):
- item = line.strip().split("\t")[group_col]
+ try:
+ item = line.strip().split("\t")[group_col]
+ except IndexError:
+ stop_err( "The following line didn't have %s columns: %s" % (group_col+1, line) )
+
if ignorecase == 1:
return item.lower()
return item
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/83e024cee23d/
changeset: 83e024cee23d
user: kanwei
date: 2011-10-05 04:25:08
summary: Force octet-stream MIME only when downloading datasets to prevent Safari from appending MIME extension
affected #: 1 file (-1 bytes)
--- a/lib/galaxy/web/controllers/dataset.py Tue Oct 04 15:56:21 2011 -0400
+++ b/lib/galaxy/web/controllers/dataset.py Tue Oct 04 22:25:08 2011 -0400
@@ -218,7 +218,7 @@
outfname = data.name[0:150]
outfname = ''.join(c in valid_chars and c or '_' for c in outfname)
if (params.do_action == None):
- params.do_action = 'zip' # default
+ params.do_action = 'zip' # default
msg = util.restore_text( params.get( 'msg', '' ) )
messagetype = params.get( 'messagetype', 'done' )
if not data:
@@ -370,6 +370,7 @@
to_ext = data.extension
valid_chars = '.,^_-()[]0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
fname = ''.join(c in valid_chars and c or '_' for c in data.name)[0:150]
+ trans.response.set_content_type( "application/octet-stream" ) #force octet-stream so Safari doesn't append mime extensions to filename
trans.response.headers["Content-Disposition"] = "attachment; filename=Galaxy%s-[%s].%s" % (data.hid, fname, to_ext)
return open( data.file_name )
if not os.path.exists( data.file_name ):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.