1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/9d152ed50547/
Changeset: 9d152ed50547
User: jgoecks
Date: 2014-08-29 23:17:44
Summary: HDA/LDDA models: synchronize them with 'data_type' and
'file_ext', properly fill data_type with Galaxy data types, and use file_ext in
place of data_type throughput client code.
Affected #: 10 files
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -2004,7 +2004,7 @@
history_content_type=hda.history_content_type,
file_size = int( hda.get_size() ),
update_time = hda.update_time.isoformat(),
- data_type = hda.ext,
+ data_type = hda.datatype.__class__.__module__ + '.' +
hda.datatype.__class__.__name__,
genome_build = hda.dbkey,
misc_info = hda.info.strip() if isinstance( hda.info, basestring )
else hda.info,
misc_blurb = hda.blurb )
@@ -2316,7 +2316,8 @@
message = ldda.message,
date_uploaded = ldda.create_time.isoformat(),
file_size = int( ldda.get_size() ),
- data_type = ldda.ext,
+ file_ext = ldda.ext,
+ data_type = ldda.datatype.__class__.__module__ + '.' +
ldda.datatype.__class__.__name__,
genome_build = ldda.dbkey,
misc_info = ldda.info,
misc_blurb = ldda.blurb,
@@ -2432,6 +2433,7 @@
file_size = int( ldda.get_size() )
except OSError:
file_size = 0
+
rval = dict( id = ldda.id,
hda_ldda = 'ldda',
model_class = self.__class__.__name__,
@@ -2443,7 +2445,8 @@
file_size = file_size,
file_name = ldda.file_name,
update_time = ldda.update_time.isoformat(),
- data_type = ldda.ext,
+ file_ext = ldda.ext,
+ data_type = ldda.datatype.__class__.__module__ + '.' +
ldda.datatype.__class__.__name__,
genome_build = ldda.dbkey,
misc_info = ldda.info,
misc_blurb = ldda.blurb )
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce lib/galaxy/webapps/galaxy/api/folder_contents.py
--- a/lib/galaxy/webapps/galaxy/api/folder_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/folder_contents.py
@@ -136,7 +136,7 @@
library_dataset_dict = content_item.to_dict()
- return_item.update( dict( data_type=library_dataset_dict[
'data_type' ],
+ return_item.update( dict( file_ext=library_dataset_dict[
'file_ext' ],
date_uploaded=library_dataset_dict[
'date_uploaded' ],
is_unrestricted=is_unrestricted,
is_private=is_private,
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce static/scripts/mvc/data.js
--- a/static/scripts/mvc/data.js
+++ b/static/scripts/mvc/data.js
@@ -344,7 +344,7 @@
genome_build: null,
// data type
- data_type : null,
+ file_ext : null,
// backbone initialize
initialize: function (options) {
@@ -371,15 +371,15 @@
var metadata = model.get('metadata');
// check for datatype
- if (!model.get('data_type')) {
+ if (!model.get('file_ext')) {
return;
}
// get data type
- this.data_type = model.get('data_type');
+ this.file_ext = model.get('file_ext');
// check for bed-file format
- if (this.data_type == 'bed')
+ if (this.file_ext == 'bed')
{
// verify that metadata exists
if (metadata.get('chromCol') &&
metadata.get('startCol') && metadata.get('endCol'))
@@ -395,7 +395,7 @@
}
// check for vcf-file format
- if (this.data_type == 'vcf')
+ if (this.file_ext == 'vcf')
{
// search array
function search (str, array) {
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce static/scripts/mvc/dataset/dataset-choice.js
--- a/static/scripts/mvc/dataset/dataset-choice.js
+++ b/static/scripts/mvc/dataset/dataset-choice.js
@@ -75,7 +75,7 @@
* // returns a jQuery promise (that 'fail's only if no datasets are found
matching 'where' below)
* var choice = new DatasetChoiceModal( datasetJSON, {
* datasetsOnly : false,
- * where : { state: 'ok', data_type: 'bed', ... },
+ * where : { state: 'ok', file_ext: 'bed', ... },
* multiselect : true,
* selected : [ 'df7a1f0c02a5b08e', 'abcdef0123456789' ]
*
@@ -191,7 +191,7 @@
* Options:
* datasetJSON: array of plain json objects representing allowed choices
* datasetsOnly: T: only show datasets in the allowed choices, F: datasets +
collections
- * where: map of attributes to filter datasetJSON by (e.g. { data_type:
'bed' })
+ * where: map of attributes to filter datasetJSON by (e.g. { file_ext:
'bed' })
* label: the label/prompt displayed
* selected: array of dataset ids that will show as already selected in the
control
*
@@ -263,7 +263,7 @@
'<span class="title"><%= selected.hid %>:
<%= selected.name %></span>',
'<span class="subtitle">',
'<i><%= selected.misc_blurb %></i>',
- '<i>', _l( 'format' ) + ': ',
'<%= selected.data_type %></i>',
+ '<i>', _l( 'format' ) + ': ',
'<%= selected.file_ext %></i>',
'<i><%= selected.misc_info %></i>',
'</span>',
'</div>'
@@ -355,7 +355,7 @@
* Additional options:
* showHeaders: T: show headers for selected dataset attributes in the display
table
* cells: map of attribute keys -> Human readable/localized column
headers
- * (e.g. { data_type: _l( 'Format' ) }) - defaults are listed below
+ * (e.g. { file_ext: _l( 'Format' ) }) - defaults are listed below
*/
var MultiDatasetChoice = DatasetChoice.extend({
@@ -366,7 +366,7 @@
hid : _l( 'History #' ),
name : _l( 'Name' ),
misc_blurb : _l( 'Summary' ),
- data_type : _l( 'Format' ),
+ file_ext : _l( 'Format' ),
genome_build : _l( 'Genome' ),
tags : _l( 'Tags' ),
annotation : _l( 'Annotation' )
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce static/scripts/mvc/dataset/dataset-li.js
--- a/static/scripts/mvc/dataset/dataset-li.js
+++ b/static/scripts/mvc/dataset/dataset-li.js
@@ -413,10 +413,10 @@
'</div>',
'<% } %>',
- '<% if( dataset.data_type ){ %>',
+ '<% if( dataset.file_ext ){ %>',
'<div class="datatype">',
'<label class="prompt">', _l( 'format' ),
'</label>',
- '<span class="value"><%- dataset.data_type
%></span>',
+ '<span class="value"><%- dataset.file_ext
%></span>',
'</div>',
'<% } %>',
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce
static/scripts/mvc/library/library-dataset-view.js
--- a/static/scripts/mvc/library/library-dataset-view.js
+++ b/static/scripts/mvc/library/library-dataset-view.js
@@ -541,10 +541,10 @@
tmpl_array.push(' <td><%= _.escape(item.get("name"))
%></td>');
tmpl_array.push(' </tr>');
- tmpl_array.push(' <% if (item.get("data_type")) { %>');
+ tmpl_array.push(' <% if (item.get("file_ext")) { %>');
tmpl_array.push(' <tr>');
tmpl_array.push(' <th scope="row">Data
type</th>');
- tmpl_array.push(' <td><%=
_.escape(item.get("data_type")) %></td>');
+ tmpl_array.push(' <td><%=
_.escape(item.get("file_ext")) %></td>');
tmpl_array.push(' </tr>');
tmpl_array.push(' <% } %>');
@@ -681,10 +681,10 @@
tmpl_array.push(' <td><%= _.escape(ldda.get("name"))
%></td>');
tmpl_array.push(' </tr>');
- tmpl_array.push(' <% if (ldda.get("data_type")) { %>');
+ tmpl_array.push(' <% if (ldda.get("file_ext")) { %>');
tmpl_array.push(' <tr>');
tmpl_array.push(' <th scope="row">Data
type</th>');
- tmpl_array.push(' <td><%=
_.escape(ldda.get("data_type")) %></td>');
+ tmpl_array.push(' <td><%=
_.escape(ldda.get("file_ext")) %></td>');
tmpl_array.push(' </tr>');
tmpl_array.push(' <% } %>');
@@ -811,7 +811,7 @@
tmpl_array.push(' </tr>');
tmpl_array.push(' <tr>');
tmpl_array.push(' <th scope="row">Data
type</th>');
- tmpl_array.push(' <td><%=
_.escape(item.get("data_type")) %></td>');
+ tmpl_array.push(' <td><%=
_.escape(item.get("file_ext")) %></td>');
tmpl_array.push(' </tr>');
tmpl_array.push(' <tr>');
tmpl_array.push(' <th scope="row">Genome
build</th>');
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce
static/scripts/mvc/library/library-folder-view.js
--- a/static/scripts/mvc/library/library-folder-view.js
+++ b/static/scripts/mvc/library/library-folder-view.js
@@ -232,10 +232,10 @@
tmpl_array.push(' <td><%= _.escape(item.get("name"))
%></td>');
tmpl_array.push(' </tr>');
- tmpl_array.push(' <% if (item.get("data_type")) { %>');
+ tmpl_array.push(' <% if (item.get("file_ext")) { %>');
tmpl_array.push(' <tr>');
tmpl_array.push(' <th scope="row">Data
type</th>');
- tmpl_array.push(' <td><%=
_.escape(item.get("data_type")) %></td>');
+ tmpl_array.push(' <td><%=
_.escape(item.get("file_ext")) %></td>');
tmpl_array.push(' </tr>');
tmpl_array.push(' <% } %>');
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce
static/scripts/mvc/library/library-folderrow-view.js
--- a/static/scripts/mvc/library/library-folderrow-view.js
+++ b/static/scripts/mvc/library/library-folderrow-view.js
@@ -106,7 +106,7 @@
tmpl_array.push(' </td>');
tmpl_array.push(' <td style="text-align: center; "><input
style="margin: 0;" type="checkbox"></td>');
tmpl_array.push(' <td><a href="#folders/<%-
content_item.get("folder_id") %>/datasets/<%- content_item.id %>"
class="library-dataset"><%- content_item.get("name")
%><a></td>'); // dataset
- tmpl_array.push(' <td><%=
_.escape(content_item.get("data_type")) %></td>'); // data type
+ tmpl_array.push(' <td><%=
_.escape(content_item.get("file_ext")) %></td>'); // data type
tmpl_array.push(' <td><%=
_.escape(content_item.get("file_size")) %></td>'); // size
tmpl_array.push(' <td><%=
_.escape(content_item.get("update_time")) %></td>'); // time
updated
tmpl_array.push(' <td>');
@@ -129,7 +129,7 @@
tmpl_array.push(' </td>');
tmpl_array.push(' <td></td>');
tmpl_array.push(' <td style="color:grey;"><%-
content_item.get("name") %></td>'); // dataset
- tmpl_array.push(' <td><%=
_.escape(content_item.get("data_type")) %></td>'); // data type
+ tmpl_array.push(' <td><%=
_.escape(content_item.get("file_ext")) %></td>'); // data type
tmpl_array.push(' <td><%=
_.escape(content_item.get("file_size")) %></td>'); // size
tmpl_array.push(' <td><%=
_.escape(content_item.get("update_time")) %></td>'); // time
updated
tmpl_array.push(' <td><span data-toggle="tooltip"
data-placement="top" title="Marked deleted"
style="color:grey;" class="fa fa-ban fa-lg"></span><button
data-toggle="tooltip" data-placement="top" title="Undelete <%-
content_item.get("name") %>" class="primary-button btn-xs
undelete_dataset_btn show_on_hover" type="button" style="display:none;
margin-left:1em;"><span class="fa fa-unlock">
Undelete</span></button></td>');
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce
static/scripts/mvc/library/library-library-view.js
--- a/static/scripts/mvc/library/library-library-view.js
+++ b/static/scripts/mvc/library/library-library-view.js
@@ -266,10 +266,10 @@
tmpl_array.push(' <td><%= _.escape(item.get("name"))
%></td>');
tmpl_array.push(' </tr>');
- tmpl_array.push(' <% if (item.get("data_type")) { %>');
+ tmpl_array.push(' <% if (item.get("file_ext")) { %>');
tmpl_array.push(' <tr>');
tmpl_array.push(' <th scope="row">Data
type</th>');
- tmpl_array.push(' <td><%=
_.escape(item.get("data_type")) %></td>');
+ tmpl_array.push(' <td><%=
_.escape(item.get("file_ext")) %></td>');
tmpl_array.push(' </tr>');
tmpl_array.push(' <% } %>');
diff -r d44794f40ca5c4cb265f0c648b2a11622cf4c144 -r
9d152ed50547ced4aa961542a1c45cc14a974dce static/scripts/mvc/tools/tools-datasets.js
--- a/static/scripts/mvc/tools/tools-datasets.js
+++ b/static/scripts/mvc/tools/tools-datasets.js
@@ -30,7 +30,7 @@
return this.currHistoryContents.filter( function( content ){
// link details
var history_content_type = content.get( 'history_content_type'
);
- var data_type = content.get( 'data_type');
+ var data_type = content.get( 'file_ext');
// apply filter
return history_content_type === 'dataset';// &&
(data_type === filter_type || filter_type === '');
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.