1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/2a8cb9436c2b/
changeset: r4984:2a8cb9436c2b
user: dannon
date: 2011-02-03 19:12:46
summary: Interval now uses line estimates instead of '? regions' for the peek.
affected #: 2 files (116 bytes)
--- a/lib/galaxy/datatypes/data.py Thu Feb 03 09:34:39 2011 -0500
+++ b/lib/galaxy/datatypes/data.py Thu Feb 03 13:12:46 2011 -0500
@@ -397,6 +397,15 @@
if line and not line.startswith( '#' ):
data_lines += 1
dataset.metadata.data_lines = data_lines
+ def estimate_file_lines( self, dataset ):
+ # Perform a rough estimate by extrapolating number of lines from a small read.
+ sample_size = 1048576
+ dataset_fh = open( dataset.file_name )
+ dataset_read = dataset_fh.read(sample_size)
+ dataset_fh.close()
+ sample_lines = dataset_read.count('\n')
+ est_lines = int(sample_lines * (float(dataset.get_size()) / float(sample_size)))
+ return est_lines
def set_peek( self, dataset, line_count=None, is_multi_byte=False ):
if not dataset.dataset.purged:
# The file must exist on disk for the get_file_peek() method
@@ -409,13 +418,7 @@
# Number of lines is not known ( this should not happen ), and auto-detect is
# needed to set metadata
# This can happen when the file is larger than max_optional_metadata_filesize.
- # Perform a rough estimate by extrapolating number of lines from a small read.
- sample_size = 1048576
- dataset_fh = open( dataset.file_name )
- dataset_read = dataset_fh.read(sample_size)
- dataset_fh.close()
- sample_lines = dataset_read.count('\n')
- est_lines = int(sample_lines * (float(dataset.get_size()) / float(sample_size)))
+ est_lines = self.estimate_file_lines(dataset)
dataset.blurb = "~%s %s" % ( util.commaify(str(est_lines)), inflector.cond_plural(est_lines, "line") )
else:
dataset.blurb = "%s %s" % util.commaify( str(line_count) ), inflector.cond_plural(line_count, "line")
--- a/lib/galaxy/datatypes/interval.py Thu Feb 03 09:34:39 2011 -0500
+++ b/lib/galaxy/datatypes/interval.py Thu Feb 03 13:12:46 2011 -0500
@@ -71,7 +71,7 @@
else:
# Number of lines is not known ( this should not happen ), and auto-detect is
# needed to set metadata
- dataset.blurb = "? regions"
+ dataset.blurb = "~%s regions" % util.commaify( str( self.estimate_file_lines(dataset) ) )
else:
dataset.blurb = "%s regions" % util.commaify( str( line_count ) )
else:
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/b2b7be6597c6/
changeset: r4982:b2b7be6597c6
user: rc
date: 2011-02-02 22:21:23
summary: Fix to support older postgres versions (<8.3) which does not support 'alter sequence'.
affected #: 1 file (3 bytes)
--- a/lib/galaxy/model/migrate/versions/0068_rename_sequencer_to_external_services.py Wed Feb 02 15:07:14 2011 -0500
+++ b/lib/galaxy/model/migrate/versions/0068_rename_sequencer_to_external_services.py Wed Feb 02 16:21:23 2011 -0500
@@ -102,7 +102,7 @@
return
# if running postgres then rename the primary key sequence too
if migrate_engine.name == 'postgres':
- cmd = "ALTER SEQUENCE sequencer_id_seq RENAME TO external_service_id_seq"
+ cmd = "ALTER TABLE sequencer_id_seq RENAME TO external_service_id_seq"
db_session.execute( cmd )
# rename 'sequencer_type_id' column to 'external_service_type_id' in the table 'external_service'
# create the column as 'external_service_type_id'
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/0bfb73dea188/
changeset: r4981:0bfb73dea188
user: kanwei
date: 2011-02-02 21:07:14
summary: Fix adding datasets to trackster from history pane
affected #: 1 file (4 bytes)
--- a/templates/tracks/browser.mako Wed Feb 02 15:06:10 2011 -0500
+++ b/templates/tracks/browser.mako Wed Feb 02 15:07:14 2011 -0500
@@ -224,7 +224,7 @@
%if add_dataset is not None:
$.ajax( {
url: "${h.url_for( action='add_track_async' )}",
- data: { id: "${add_dataset}" },
+ data: { hda_id: "${add_dataset}" },
dataType: "json",
success: add_async_success
});
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/5709198bdc0a/
changeset: r4980:5709198bdc0a
user: kanwei
date: 2011-02-02 21:06:10
summary: Make tool.execute pass kwargs instead of new "set_output_history" parameter for backwards compat
affected #: 1 file (44 bytes)
--- a/lib/galaxy/tools/__init__.py Tue Feb 01 15:24:45 2011 +0000
+++ b/lib/galaxy/tools/__init__.py Wed Feb 02 15:06:10 2011 -0500
@@ -1215,14 +1215,14 @@
raise Exception( "Unexpected parameter type" )
return args
- def execute( self, trans, incoming={}, set_output_hid=True, set_output_history=True, history=None ):
+ def execute( self, trans, incoming={}, set_output_hid=True, history=None, **kwargs ):
"""
Execute the tool using parameter values in `incoming`. This just
dispatches to the `ToolAction` instance specified by
`self.tool_action`. In general this will create a `Job` that
when run will build the tool's outputs, e.g. `DefaultToolAction`.
"""
- return self.tool_action.execute( self, trans, incoming=incoming, set_output_hid=set_output_hid, set_output_history=set_output_history, history=history )
+ return self.tool_action.execute( self, trans, incoming=incoming, set_output_hid=set_output_hid, history=history, **kwargs )
def params_to_strings( self, params, app ):
return params_to_strings( self.inputs, params, app )
@@ -1233,7 +1233,7 @@
def check_and_update_param_values( self, values, trans ):
"""
Check that all parameters have values, and fill in with default
- values where neccesary. This could be called after loading values
+ values where necessary. This could be called after loading values
from a database in case new parameters have been added.
"""
messages = {}
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.
3 new changesets in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/c4c2e7dc5c02/
changeset: r4977:c4c2e7dc5c02
user: peterjc
date: 2011-01-31 18:13:13
summary: Access path field from BLAST loc file, and store ID in database instead
affected #: 5 files (1.1 KB)
--- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Tue Feb 01 20:07:17 2011 -0500
+++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_blastn_wrapper" name="NCBI BLAST+ blastn" version="0.0.7">
+<tool id="ncbi_blastn_wrapper" name="NCBI BLAST+ blastn" version="0.0.8"><description>Search nucleotide database with nucleotide query sequence(s)</description><command>
## The command is a Cheetah template which allows some Python based syntax.
@@ -6,7 +6,7 @@
blastn
-query "$query"
#if $db_opts.db_opts_selector == "db":
- -db "$db_opts.database"
+ -db "${db_opts.database.fields.path}"
#else:
-subject "$db_opts.subject"
#end if
@@ -40,13 +40,10 @@
</param><when value="db"><param name="database" type="select" label="Nucleotide BLAST database">
- <!-- The BLAST loc file has three columns:
- column 0 is an identifier (not used here, see legacy megablast wrapper),
- column 1 is the caption (show this to the user),
- column 2 is the database path (given to BLAST+) --><options from_file="blastdb.loc">
+ <column name="value" index="0"/><column name="name" index="1"/>
- <column name="value" index="2"/>
+ <column name="path" index="2"/></options></param><param name="subject" type="hidden" value="" />
--- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Tue Feb 01 20:07:17 2011 -0500
+++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="0.0.7">
+<tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="0.0.8"><description>Search protein database with protein query sequence(s)</description><command>
## The command is a Cheetah template which allows some Python based syntax.
@@ -6,7 +6,7 @@
blastp
-query "$query"
#if $db_opts.db_opts_selector == "db":
- -db "$db_opts.database"
+ -db "${db_opts.database.fields.path}"
#else:
-subject "$db_opts.subject"
#end if
@@ -41,13 +41,10 @@
</param><when value="db"><param name="database" type="select" label="Protein BLAST database">
- <!-- The BLAST loc file has three columns:
- column 0 is an identifier (not used),
- column 1 is the caption (show this to the user),
- column 2 is the database path (given to BLAST+) --><options from_file="blastdb_p.loc">
+ <column name="value" index="0"/><column name="name" index="1"/>
- <column name="value" index="2"/>
+ <column name="path" index="2"/></options></param><param name="subject" type="hidden" value="" />
--- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Tue Feb 01 20:07:17 2011 -0500
+++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_blastx_wrapper" name="NCBI BLAST+ blastx" version="0.0.7">
+<tool id="ncbi_blastx_wrapper" name="NCBI BLAST+ blastx" version="0.0.8"><description>Search protein database with translated nucleotide query sequence(s)</description><command>
## The command is a Cheetah template which allows some Python based syntax.
@@ -6,7 +6,7 @@
blastx
-query "$query"
#if $db_opts.db_opts_selector == "db":
- -db "$db_opts.database"
+ -db "${db_opts.database.fields.path}"
#else:
-subject "$db_opts.subject"
#end if
@@ -40,13 +40,10 @@
</param><when value="db"><param name="database" type="select" label="Protein BLAST database">
- <!-- The BLAST loc file has three columns:
- column 0 is an identifier (not used),
- column 1 is the caption (show this to the user),
- column 2 is the database path (given to BLAST+) --><options from_file="blastdb_p.loc">
+ <column name="value" index="0"/><column name="name" index="1"/>
- <column name="value" index="2"/>
+ <column name="path" index="2"/></options></param><param name="subject" type="hidden" value="" />
--- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Tue Feb 01 20:07:17 2011 -0500
+++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_tblastn_wrapper" name="NCBI BLAST+ tblastn" version="0.0.7">
+<tool id="ncbi_tblastn_wrapper" name="NCBI BLAST+ tblastn" version="0.0.8"><description>Search translated nucleotide database with protein query sequence(s)</description><command>
## The command is a Cheetah template which allows some Python based syntax.
@@ -6,7 +6,7 @@
tblastn
-query "$query"
#if $db_opts.db_opts_selector == "db":
- -db "$db_opts.database"
+ -db "${db_opts.database.fields.path}"
#else:
-subject "$db_opts.subject"
#end if
@@ -40,13 +40,10 @@
</param><when value="db"><param name="database" type="select" label="Nucleotide BLAST database">
- <!-- The BLAST loc file has three columns:
- column 0 is an identifier (not used here, see legacy megablast wrapper),
- column 1 is the caption (show this to the user),
- column 2 is the database path (given to BLAST+) --><options from_file="blastdb.loc">
+ <column name="value" index="0"/><column name="name" index="1"/>
- <column name="value" index="2"/>
+ <column name="path" index="2"/></options></param><param name="subject" type="hidden" value="" />
--- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Tue Feb 01 20:07:17 2011 -0500
+++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_tblastx_wrapper" name="NCBI BLAST+ tblastx" version="0.0.7">
+<tool id="ncbi_tblastx_wrapper" name="NCBI BLAST+ tblastx" version="0.0.8"><description>Search translated nucleotide database with translated nucleotide query sequence(s)</description><command>
## The command is a Cheetah template which allows some Python based syntax.
@@ -6,7 +6,7 @@
tblastx
-query "$query"
#if $db_opts.db_opts_selector == "db":
- -db "$db_opts.database"
+ -db "${db_opts.database.fields.path}"
#else:
-subject "$db_opts.subject"
#end if
@@ -39,13 +39,10 @@
</param><when value="db"><param name="database" type="select" label="Nucleotide BLAST database">
- <!-- The BLAST loc file has three columns:
- column 0 is an identifier (not used here, see legacy megablast wrapper),
- column 1 is the caption (show this to the user),
- column 2 is the database path (given to BLAST+) --><options from_file="blastdb.loc">
+ <column name="value" index="0"/><column name="name" index="1"/>
- <column name="value" index="2"/>
+ <column name="path" index="2"/></options></param><param name="subject" type="hidden" value="" />
http://bitbucket.org/galaxy/galaxy-central/changeset/17c2a47f67e3/
changeset: r4978:17c2a47f67e3
user: peterjc
date: 2011-02-01 11:52:50
summary: Use wrapper script to hide BLAST warnings on stderr (see issue 325)
affected #: 6 files (1.7 KB)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/ncbi_blast_plus/hide_stderr.py Tue Feb 01 10:52:50 2011 +0000
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+"""A simple script to redirect stderr to stdout when the return code is zero.
+
+See https://bitbucket.org/galaxy/galaxy-central/issue/325/
+
+Currently Galaxy ignores the return code from command line tools (even if it
+is non-zero which by convention indicates an error) and treats any output on
+stderr as an error (even though by convention stderr is used for errors or
+warnings).
+
+This script runs the given command line, capturing all stdout and stderr in
+memory, and gets the return code. For a zero return code, any stderr (which
+should be warnings only) is added to the stdout. That way Galaxy believes
+everything is fine. For a non-zero return code, we output stdout as is, and
+any stderr, plus the return code to ensure there is some output on stderr.
+That way Galaxy treats this as an error.
+
+Once issue 325 is fixed, this script will not be needed.
+"""
+import sys
+import subprocess
+
+#Sadly passing the list directly to subprocess didn't seem to work.
+words = []
+for w in sys.argv[1:]:
+ if " " in w:
+ words.append('"%s"' % w)
+ else:
+ words.append(w)
+cmd = " ".join(words)
+child = subprocess.Popen(cmd, shell=True,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+#Use .communicate as can get deadlocks with .wait(),
+stdout, stderr = child.communicate()
+return_code = child.returncode
+
+if return_code:
+ sys.stdout.write(stdout)
+ sys.stderr.write(stderr)
+ sys.stderr.write("Return error code %i from command:\n" % return_code)
+ sys.stderr.write("%s\n" % cmd)
+else:
+ sys.stdout.write(stdout)
+ sys.stdout.write(stderr)
--- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
+++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Tue Feb 01 10:52:50 2011 +0000
@@ -1,6 +1,6 @@
<tool id="ncbi_blastn_wrapper" name="NCBI BLAST+ blastn" version="0.0.8"><description>Search nucleotide database with nucleotide query sequence(s)</description>
- <command>
+ <command interpreter="python">hide_stderr.py
## The command is a Cheetah template which allows some Python based syntax.
## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
blastn
--- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
+++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Tue Feb 01 10:52:50 2011 +0000
@@ -1,6 +1,6 @@
<tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="0.0.8"><description>Search protein database with protein query sequence(s)</description>
- <command>
+ <command interpreter="python">hide_stderr.py
## The command is a Cheetah template which allows some Python based syntax.
## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
blastp
--- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
+++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Tue Feb 01 10:52:50 2011 +0000
@@ -1,6 +1,6 @@
<tool id="ncbi_blastx_wrapper" name="NCBI BLAST+ blastx" version="0.0.8"><description>Search protein database with translated nucleotide query sequence(s)</description>
- <command>
+ <command interpreter="python">hide_stderr.py
## The command is a Cheetah template which allows some Python based syntax.
## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
blastx
--- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
+++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Tue Feb 01 10:52:50 2011 +0000
@@ -1,7 +1,7 @@
<tool id="ncbi_tblastn_wrapper" name="NCBI BLAST+ tblastn" version="0.0.8"><description>Search translated nucleotide database with protein query sequence(s)</description>
- <command>
-## The command is a Cheetah template which allows some Python based syntax.
+ <command interpreter="python">hide_stderr.py
+# The command is a Cheetah template which allows some Python based syntax.
## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
tblastn
-query "$query"
--- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Mon Jan 31 17:13:13 2011 +0000
+++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Tue Feb 01 10:52:50 2011 +0000
@@ -1,6 +1,6 @@
<tool id="ncbi_tblastx_wrapper" name="NCBI BLAST+ tblastx" version="0.0.8"><description>Search translated nucleotide database with translated nucleotide query sequence(s)</description>
- <command>
+ <command interpreter="python">hide_stderr.py
## The command is a Cheetah template which allows some Python based syntax.
## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
tblastx
http://bitbucket.org/galaxy/galaxy-central/changeset/ca4a622b52ce/
changeset: r4979:ca4a622b52ce
user: peterjc
date: 2011-02-01 16:24:45
summary: Avoid using shell=True when we call subprocess to ensure if the Python script is killed, so too is the BLAST process
affected #: 1 file (34 bytes)
--- a/tools/ncbi_blast_plus/hide_stderr.py Tue Feb 01 10:52:50 2011 +0000
+++ b/tools/ncbi_blast_plus/hide_stderr.py Tue Feb 01 15:24:45 2011 +0000
@@ -20,16 +20,14 @@
import sys
import subprocess
-#Sadly passing the list directly to subprocess didn't seem to work.
-words = []
-for w in sys.argv[1:]:
- if " " in w:
- words.append('"%s"' % w)
- else:
- words.append(w)
-cmd = " ".join(words)
-child = subprocess.Popen(cmd, shell=True,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+#Avoid using shell=True when we call subprocess to ensure if the Python
+#script is killed, so too is the BLAST process.
+try:
+ child = subprocess.Popen(sys.argv[1:],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+except Exception, err:
+ sys.stderr.write("Error invoking command:\n%s\n\n%s\n" % (cmd, err))
+ sys.exit(1)
#Use .communicate as can get deadlocks with .wait(),
stdout, stderr = child.communicate()
return_code = child.returncode
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/32e6782161be/
changeset: r4975:32e6782161be
user: kanwei
date: 2011-02-02 01:56:05
summary: Add migration for ldda_parent_id field to implicitly_converted_dataset_association table
affected #: 1 file (0 bytes)
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/d65fb6e05729/
changeset: r4974:d65fb6e05729
user: dan
date: 2011-02-01 23:29:40
summary: Add YeastMine datasource tool. Site is still under development.
affected #: 2 files (46 bytes)
--- a/tool_conf.xml.sample Tue Feb 01 13:35:46 2011 -0500
+++ b/tool_conf.xml.sample Tue Feb 01 17:29:40 2011 -0500
@@ -16,6 +16,7 @@
<tool file="data_source/flymine_test.xml" /><tool file="data_source/modmine.xml" /><tool file="data_source/ratmine.xml" />
+ <tool file="data_source/yeastmine.xml" /><tool file="data_source/worm_modencode.xml" /><tool file="data_source/wormbase.xml" /><tool file="data_source/wormbase_test.xml" />
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.