2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b69934e3fa69/
changeset: b69934e3fa69
user: dan
date: 2013-01-30 19:40:22
summary: Add a util.force_symlink() helper method.
affected #: 1 file
diff -r ea27314cf43c60a2a3f20220b9642cc254f6baa1 -r b69934e3fa691cd24785b3c4a02bb81a154a4856 lib/galaxy/util/__init__.py
--- a/lib/galaxy/util/__init__.py
+++ b/lib/galaxy/util/__init__.py
@@ -727,6 +727,16 @@
s.sendmail( frm, to, msg.as_string() )
s.quit()
+def force_symlink( source, link_name ):
+ try:
+ os.symlink( source, link_name )
+ except OSError, e:
+ if e.errno == errno.EEXIST:
+ os.remove( link_name )
+ os.symlink( source, link_name )
+ else:
+ raise e
+
galaxy_root_path = os.path.join(__path__[0], "..","..","..")
# The dbnames list is used in edit attributes and the upload tool
https://bitbucket.org/galaxy/galaxy-central/commits/a9cbfdfeff11/
changeset: a9cbfdfeff11
user: dan
date: 2013-01-30 19:40:23
summary: Allow DiskObjectStore.update_from_file() to optionally preserve symlinks.
affected #: 1 file
diff -r b69934e3fa691cd24785b3c4a02bb81a154a4856 -r a9cbfdfeff11e2e2595b37825584216441a7a6d1 lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -342,11 +342,17 @@
def update_from_file(self, obj, file_name=None, create=False, **kwargs):
""" `create` parameter is not used in this implementation """
+ preserve_symlinks = kwargs.pop( 'preserve_symlinks', False )
+ #FIXME: symlinks and the object store model may not play well together
+ #these should be handled better, e.g. registering the symlink'd file as an object
if create:
self.create(obj, **kwargs)
if file_name and self.exists(obj, **kwargs):
try:
- shutil.copy(file_name, self.get_filename(obj, **kwargs))
+ if preserve_symlinks and os.path.islink( file_name ):
+ util.force_symlink( os.readlink( file_name ), self.get_filename( obj, **kwargs ) )
+ else:
+ shutil.copy( file_name, self.get_filename( obj, **kwargs ) )
except IOError, ex:
log.critical('Error copying %s to %s: %s' % (file_name,
self._get_filename(obj, **kwargs), ex))
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 commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ea27314cf43c/
changeset: ea27314cf43c
user: dan
date: 2013-01-30 19:30:00
summary: Show Galaxy Tool Version (job.tool_version) in addition to Tool Version (hda.tool_version) in dataset show_params.
affected #: 1 file
diff -r 95e33df0ae0332e04f14646abbf77c02672ef23a -r ea27314cf43c60a2a3f20220b9642cc254f6baa1 templates/show_params.mako
--- a/templates/show_params.mako
+++ b/templates/show_params.mako
@@ -111,6 +111,7 @@
<tr><td>Filesize:</td><td>${nice_size(hda.dataset.file_size)}</td></tr><tr><td>Dbkey:</td><td>${hda.dbkey | h}</td></tr><tr><td>Format:</td><td>${hda.ext | h}</td></tr>
+ <tr><td>Galaxy Tool Version:</td><td>${job.tool_version | h}</td></tr><tr><td>Tool Version:</td><td>${hda.tool_version | h}</td></tr><tr><td>Tool Standard Output:</td><td><a href="${h.url_for( controller='dataset', action='stdout')}">stdout</a></td></tr><tr><td>Tool Standard Error:</td><td><a href="${h.url_for( controller='dataset', action='stderr')}">stderr</a></td></tr>
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 commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6a03e7197bdc/
changeset: 6a03e7197bdc
user: jgoecks
date: 2013-01-30 18:22:59
summary: Collect and output comments when reading unordered GTF. Handle comments when converting from GTF to FLI.
affected #: 2 files
diff -r f787a69139a284fe6c8fcaa52e506a6fa952c330 -r 6a03e7197bdc83512444d66bfd793e0c91596217 lib/galaxy/datatypes/converters/interval_to_fli.py
--- a/lib/galaxy/datatypes/converters/interval_to_fli.py
+++ b/lib/galaxy/datatypes/converters/interval_to_fli.py
@@ -16,6 +16,8 @@
import sys, optparse
from galaxy import eggs
+import pkg_resources; pkg_resources.require( "bx-python" )
+from bx.tabular.io import Comment
from galaxy.datatypes.util.gff_util import GFFReaderWrapper, read_unordered_gtf, convert_gff_coords_to_bed
def main():
@@ -38,6 +40,9 @@
in_reader = read_unordered_gtf( open( in_fname, 'r' ) )
for feature in in_reader:
+ if isinstance( feature, Comment ):
+ continue
+
for name in feature.attributes:
val = feature.attributes[ name ]
try:
diff -r f787a69139a284fe6c8fcaa52e506a6fa952c330 -r 6a03e7197bdc83512444d66bfd793e0c91596217 lib/galaxy/datatypes/util/gff_util.py
--- a/lib/galaxy/datatypes/util/gff_util.py
+++ b/lib/galaxy/datatypes/util/gff_util.py
@@ -384,9 +384,14 @@
key_fn = lambda fields: fields[0] + '_' + get_transcript_id( fields )
- # Aggregate intervals by transcript_id.
+ # Aggregate intervals by transcript_id and collect comments.
feature_intervals = odict()
+ comments = []
for count, line in enumerate( iterator ):
+ if line.startswith( '#' ):
+ comments.append( Comment( line ) )
+ continue
+
line_key = key_fn( line.split('\t') )
if line_key in feature_intervals:
feature = feature_intervals[ line_key ]
@@ -413,7 +418,13 @@
for features in chroms_features_sorted:
features.sort( lambda a,b: cmp( a.start, b.start ) )
- # Yield.
+ # Yield comments first, then features.
+ # FIXME: comments can appear anywhere in file, not just the beginning.
+ # Ideally, then comments would be associated with features and output
+ # just before feature/line.
+ for comment in comments:
+ yield comment
+
for chrom_features in chroms_features_sorted:
for feature in chrom_features:
yield feature
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 commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f49ce2c1883e/
changeset: f49ce2c1883e
user: jgoecks
date: 2013-01-30 15:03:27
summary: Add missing output file for new trimmer test.
affected #: 1 file
diff -r 2a43d292c0977e0fe82088ac106c119ffd866baa -r f49ce2c1883e3e323deb86d11f9cde90b941bd58 test-data/trimmer_a_f_c2_s2_e-2_i62.dat
--- /dev/null
+++ b/test-data/trimmer_a_f_c2_s2_e-2_i62.dat
@@ -0,0 +1,5 @@
+12345 bcd xyz
+67890 hj ghjt
+>assa lljlj ljlj
+sasas g hghg
+@dgf f gfgf
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 commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/2a43d292c097/
changeset: 2a43d292c097
user: joachimjacob
date: 2013-01-30 10:38:58
summary: Adjusted trimming tool to include negative positions. Modified help and test.
affected #: 2 files
diff -r 301d7447dd22fcfcbd7c4f5c5737fd0fdc82690b -r 2a43d292c0977e0fe82088ac106c119ffd866baa tools/filters/trimmer.py
--- a/tools/filters/trimmer.py
+++ b/tools/filters/trimmer.py
@@ -88,6 +88,9 @@
if col == 0:
if int( options.end ) > 0:
line = line[ int( options.start )-1 : int( options.end ) ]
+ elif int( options.end ) < 0:
+ endposition = len(line)+int( options.end )
+ line = line[ int( options.start )-1 : endposition ]
else:
line = line[ int( options.start )-1 : ]
else:
@@ -97,6 +100,9 @@
if int( options.end ) > 0:
fields[col - 1] = fields[col - 1][ int( options.start )-1 : int( options.end ) ]
+ elif int( options.end ) < 0:
+ endposition = len(fields[col - 1])+int( options.end )
+ fields[col - 1] = fields[col - 1][ int( options.start )-1 : endposition ]
else:
fields[col - 1] = fields[col - 1][ int( options.start )-1 : ]
line = '\t'.join(fields)
diff -r 301d7447dd22fcfcbd7c4f5c5737fd0fdc82690b -r 2a43d292c0977e0fe82088ac106c119ffd866baa tools/filters/trimmer.xml
--- a/tools/filters/trimmer.xml
+++ b/tools/filters/trimmer.xml
@@ -6,9 +6,9 @@
<inputs><param format="tabular,txt" name="input1" type="data" label="this dataset"/><param name="col" type="integer" value="0" label="Trim this column only" help="0 = process entire line" />
- <param name="start" type="integer" size="10" value="1" label="Trim from the beginning to this position" help="1 = do not trim the beginning"/>
- <param name="end" type="integer" size="10" value="0" label="Remove everything from this position to the end" help="0 = do not trim the end"/>
- <param name="fastq" type="select" label="Is input dataset in fastq format?" help="If set to YES, the tool will not trim evenly numbered lines (0, 2, 4, etc...)">
+ <param name="start" type="integer" size="10" value="1" label="Trim from the beginning up to this position" help="Only positive positions allowed. 1 = do not trim the beginning"/>
+ <param name="end" type="integer" size="10" value="0" label="Remove everything from this position to the end" help="Use negative position to indicate position starting from the end. 0 = do not trim the end"/>
+ <param name="fastq" type="select" label="Is input dataset in fastq format?" help="If set to YES, the tool will not trim evenly numbered lines (0, 2, 4, etc...). This allows for trimming the seq and qual lines, only if they are not spread over multiple lines (see warning below)."><option selected="true" value="">No</option><option value="-q">Yes</option></param>
@@ -53,7 +53,15 @@
<param name="fastq" value="No"/><output name="out_file1" file="trimmer_a_f_c2_s1_e2_i62.dat"/></test>
-
+ <test>
+ <param name="input1" value="trimmer_tab_delimited.dat"/>
+ <param name="col" value="2"/>
+ <param name="start" value="2"/>
+ <param name="end" value="-2"/>
+ <param name="ignore" value="62"/>
+ <param name="fastq" value="No"/>
+ <output name="out_file1" file="trimmer_a_f_c2_s2_e-2_i62.dat"/>
+ </test></tests><help>
@@ -72,7 +80,7 @@
1234567890
abcdefghijk
-by setting **Trim from the beginning to this position** to *2* and **Remove everything from this position to the end** to *6* will produce::
+by setting **Trim from the beginning up to this position** to *2* and **Remove everything from this position to the end** to *6* will produce::
23456
bcdef
@@ -86,13 +94,27 @@
abcde 12345 fghij 67890
fghij 67890 abcde 12345
-by setting **Trim content of this column only** to *2*, **Trim from the beginning to this position** to *2*, and **Remove everything from this position to the end** to *4* will produce::
+by setting **Trim content of this column only** to *2*, **Trim from the beginning up to this position** to *2*, and **Remove everything from this position to the end** to *4* will produce::
abcde 234 fghij 67890
fghij 789 abcde 12345
-----
+**Example 3**
+
+Trimming column 2 of this dataset::
+
+ abcde 12345 fghij 67890
+ fghij 67890 abcde 12345
+
+by setting **Trim content of this column only** to *2*, **Trim from the beginning up to this position** to *2*, and **Remove everything from this position to the end** to *-2* will produce::
+
+ abcde 23 fghij 67890
+ fghij 78 abcde 12345
+
+----
+
**Trimming FASTQ datasets**
This tool can be used to trim sequences and quality strings in fastq datasets. This is done by selected *Yes* from the **Is input dataset in fastq format?** dropdown. If set to *Yes*, the tool will skip all even numbered lines (see warning below). For example, trimming last 5 bases of this dataset::
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 commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/2cfd745996f2/
changeset: 2cfd745996f2
user: jgoecks
date: 2013-01-29 22:40:04
summary: Fixes for packing metadata in HDA api values.
affected #: 1 file
diff -r 0c42ee613365a48220925982a67ee37e82bf66ff -r 2cfd745996f221d3819e31ac3ca2eb06c900738b lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -1529,8 +1529,9 @@
val = hda.metadata.get( name )
if isinstance( val, MetadataFile ):
val = val.file_name
- elif isinstance( val, list ):
- val = ', '.join( [str(v) for v in val] )
+ # If no value for metadata, look in datatype for metadata.
+ elif val == None and hasattr( hda.datatype, name ):
+ val = getattr( hda.datatype, name )
rval['metadata_' + name] = val
return rval
https://bitbucket.org/galaxy/galaxy-central/commits/01cbf01a2072/
changeset: 01cbf01a2072
user: jgoecks
date: 2013-01-29 22:41:04
summary: Add metadata support to JavaScript dataset objects.
affected #: 1 file
diff -r 2cfd745996f221d3819e31ac3ca2eb06c900738b -r 01cbf01a20724514cda66a7071f1ecf376434157 static/scripts/mvc/data.js
--- a/static/scripts/mvc/data.js
+++ b/static/scripts/mvc/data.js
@@ -1,6 +1,11 @@
define(["libs/backbone/backbone-relational"], function() {
/**
+ * Dataset metedata.
+ */
+var DatasetMetadata = Backbone.RelationalModel.extend({});
+
+/**
* A dataset. In Galaxy, datasets are associated with a history, so
* this object is also known as a HistoryDatasetAssociation.
*/
@@ -9,7 +14,33 @@
id: '',
type: '',
name: '',
- hda_ldda: 'hda'
+ hda_ldda: 'hda',
+ metadata: null
+ },
+
+ initialize: function() {
+ // -- Create and initialize metadata. --
+
+ var metadata = new DatasetMetadata();
+
+ // Move metadata from dataset attributes to metadata object.
+ _.each(_.keys(this.attributes), function(k) {
+ if (k.indexOf('metadata_') === 0) {
+ // Found metadata.
+ var new_key = k.split('metadata_')[1];
+ metadata.set(new_key, this.attributes[k]);
+ delete this.attributes[k];
+ }
+ }, this);
+
+ this.set('metadata', metadata);
+ },
+
+ /**
+ * Returns dataset metadata for a given attribute.
+ */
+ get_metadata: function(attribute) {
+ return this.attributes.metadata.get(attribute);
},
urlRoot: galaxy_paths.get('datasets_url')
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 commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0c42ee613365/
changeset: 0c42ee613365
user: jgoecks
date: 2013-01-29 20:34:42
summary: Documentation fix.
affected #: 1 file
diff -r a14006775b085be19454aa6d47655a6ebb68c8a1 -r 0c42ee613365a48220925982a67ee37e82bf66ff lib/galaxy/model/migrate/versions/0110_add_dataset_uuid.py
--- a/lib/galaxy/model/migrate/versions/0110_add_dataset_uuid.py
+++ b/lib/galaxy/model/migrate/versions/0110_add_dataset_uuid.py
@@ -39,7 +39,7 @@
def downgrade():
metadata.reflect()
- # Drop the Job table's exit_code column.
+ # Drop the dataset table's uuid column.
try:
dataset_table = Table( "dataset", metadata, autoload=True )
dataset_uuid = dataset_table.c.uuid
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.