mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Merge remote-tracking branch 'galaxyproject/dev' into gie-generic
Conflicts: static/maps/layout/menu.js.map static/scripts/bundled/libs.bundled.js static/scripts/bundled/libs.bundled.js.map static/scripts/layout/menu.js
This commit is contained in:
@@ -5,4 +5,4 @@ set -e
|
||||
flake8 --exclude `paste -sd, .ci/flake8_blacklist.txt` .
|
||||
|
||||
# Apply stricter rules for the directories shared with Pulsar
|
||||
flake8 --ignore= --max-line-length=150 lib/galaxy/jobs/runners/util/ lib/pulsar/
|
||||
flake8 --ignore= --max-line-length=150 lib/galaxy/jobs/runners/util/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
lib/galaxy/util/
|
||||
lib/galaxy/jobs/runners/util/
|
||||
lib/pulsar/
|
||||
lib/galaxy/tools/parser/
|
||||
lib/galaxy/tools/lint.py
|
||||
lib/galaxy/tools/lint_util.py
|
||||
|
||||
@@ -14,6 +14,7 @@ database/citations
|
||||
database/community_files
|
||||
database/compiled_templates
|
||||
database/files
|
||||
database/jobs_directory
|
||||
database/job_working_directory
|
||||
database/pbs
|
||||
database/tmp
|
||||
|
||||
@@ -5,12 +5,47 @@ RELEASE_NEXT:=16.04
|
||||
#RELEASE_NEXT_BRANCH:=release_$(RELEASE_NEXT)
|
||||
RELEASE_NEXT_BRANCH:=dev
|
||||
RELEASE_UPSTREAM:=upstream
|
||||
# Location of virtualenv used for development.
|
||||
VENV?=.venv
|
||||
# Source virtualenv to execute command (flake8, sphinx, twine, etc...)
|
||||
IN_VENV=if [ -f $(VENV)/bin/activate ]; then . $(VENV)/bin/activate; fi;
|
||||
PROJECT_URL?=https://github.com/galaxyproject/galaxy
|
||||
GRUNT_DOCKER_NAME:=galaxy/client-builder:16.01
|
||||
|
||||
all: help
|
||||
@echo "This makefile is primarily used for building Galaxy's JS client. A sensible all target is not yet implemented."
|
||||
|
||||
npm-deps:
|
||||
docs: ## generate Sphinx HTML documentation, including API docs
|
||||
$(IN_VENV) $(MAKE) -C doc clean
|
||||
$(IN_VENV) $(MAKE) -C doc html
|
||||
|
||||
_open-docs:
|
||||
open doc/_build/html/index.html || xdg-open doc/_build/html/index.html
|
||||
|
||||
open-docs: docs _open-docs ## generate Sphinx HTML documentation and open in browser
|
||||
|
||||
open-project: ## open project on github
|
||||
open $(PROJECT_URL) || xdg-open $(PROJECT_URL)
|
||||
|
||||
lint: ## check style using tox and flake8 for Python 2 and Python 3
|
||||
$(IN_VENV) tox -e py27-lint && tox -e py34-lint
|
||||
|
||||
release-issue: ## Create release issue on github
|
||||
$(IN_VENV) python scripts/bootstrap_history.py --create-release-issue $(RELEASE_CURR)
|
||||
|
||||
release-check-metadata: ## check github PR metadata for target release
|
||||
$(IN_VENV) python scripts/bootstrap_history.py --check-release $(RELEASE_CURR)
|
||||
|
||||
release-check-blocking-issues: ## Check github for release blocking issues
|
||||
$(IN_VENV) python scripts/bootstrap_history.py --check-blocking-issues $(RELEASE_CURR)
|
||||
|
||||
release-check-blocking-prs: ## Check github for release blocking PRs
|
||||
$(IN_VENV) python scripts/bootstrap_history.py --check-blocking-prs $(RELEASE_CURR)
|
||||
|
||||
release-bootstrap-history: ## bootstrap history for a new release
|
||||
$(IN_VENV) python scripts/bootstrap_history.py --release $(RELEASE_CURR)
|
||||
|
||||
npm-deps: ## Install NodeJS dependencies.
|
||||
cd client && npm install
|
||||
|
||||
grunt: npm-deps ## Calls out to Grunt to build client
|
||||
@@ -22,7 +57,7 @@ style: npm-deps ## Calls the style task of Grunt
|
||||
webpack: npm-deps ## Pack javascript
|
||||
cd client && node_modules/webpack/bin/webpack.js -p
|
||||
|
||||
client: grunt style webpack ## Process all client-side tasks
|
||||
client: grunt style webpack ## Rebuild all client-side artifacts
|
||||
|
||||
grunt-docker-image: ## Build docker image for running grunt
|
||||
docker build -t ${GRUNT_DOCKER_NAME} client
|
||||
@@ -35,7 +70,7 @@ clean-grunt-docker-image: ## Remove grunt docker image
|
||||
|
||||
|
||||
# Release Targets
|
||||
create_release_rc: ## Create a release-candidate branch
|
||||
release-create-rc: ## Create a release-candidate branch
|
||||
git checkout dev
|
||||
git pull --ff-only ${RELEASE_UPSTREAM} dev
|
||||
git push origin dev
|
||||
|
||||
@@ -56,3 +56,8 @@ Issues and Galaxy Development
|
||||
=============================
|
||||
|
||||
Please see `CONTRIBUTING.md <CONTRIBUTING.md>`_ .
|
||||
|
||||
Roadmap
|
||||
=============================
|
||||
|
||||
Interested in the next steps for Galaxy? Take a look here: https://github.com/galaxyproject/galaxy/issues/1928
|
||||
|
||||
@@ -29,7 +29,6 @@ var View = Backbone.View.extend({
|
||||
|
||||
// scratchbook
|
||||
Galaxy.frame = this.frame = new Scratchbook( { collection: this.collection } );
|
||||
$( 'body' ).append( this.frame.$el );
|
||||
|
||||
// set up the quota meter (And fetch the current user data from trans)
|
||||
// add quota meter to masthead
|
||||
|
||||
@@ -41,23 +41,19 @@ var Collection = Backbone.Collection.extend({
|
||||
url : 'library/index',
|
||||
tooltip : 'Access published resources',
|
||||
menu : [{
|
||||
title : 'Data Libraries deprecated',
|
||||
url : 'library/index'
|
||||
},{
|
||||
title : 'Data Libraries',
|
||||
url : 'library/list',
|
||||
divider : true
|
||||
url : 'library/list'
|
||||
},{
|
||||
title : 'Published Histories',
|
||||
title : 'Histories',
|
||||
url : 'history/list_published'
|
||||
},{
|
||||
title : 'Published Workflows',
|
||||
title : 'Workflows',
|
||||
url : 'workflow/list_published'
|
||||
},{
|
||||
title : 'Published Visualizations',
|
||||
title : 'Visualizations',
|
||||
url : 'visualization/list_published'
|
||||
},{
|
||||
title : 'Published Pages',
|
||||
title : 'Pages',
|
||||
url : 'page/list_published'
|
||||
}]
|
||||
});
|
||||
|
||||
@@ -32,7 +32,8 @@ var PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({
|
||||
Galaxy.modal = this.modal = new Modal.View();
|
||||
this.masthead = new Masthead.View( this.options.config );
|
||||
this.$el.attr( 'scroll', 'no' );
|
||||
this.$el.append( this._template() );
|
||||
this.$el.html( this._template() );
|
||||
this.$el.append( this.masthead.frame.$el );
|
||||
this.$el.append( this.masthead.$el );
|
||||
this.$el.append( this.modal.$el );
|
||||
this.$messagebox = this.$( '#messagebox' );
|
||||
@@ -72,11 +73,11 @@ var PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({
|
||||
renderInactivityBox : function() {
|
||||
if( this.options.show_inactivity_warning ){
|
||||
var content = this.options.inactivity_box_content || '';
|
||||
var verificationLink = $( '<a/>' ).attr( 'href', Galaxy.root + 'user/resend_verification' ).html( 'Resend verification.' );
|
||||
var verificationLink = $( '<a/>' ).attr( 'href', Galaxy.root + 'user/resend_verification' ).text( 'Resend verification' );
|
||||
this.$el.addClass( 'has-inactivity-box' );
|
||||
this.$inactivebox
|
||||
.html( content )
|
||||
.append( ' ' + verificationLink )
|
||||
.html( content + ' ' )
|
||||
.append( verificationLink )
|
||||
.toggle( !!content )
|
||||
.show();
|
||||
} else {
|
||||
@@ -93,10 +94,14 @@ var PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({
|
||||
if( _.has( page, panelId ) ){
|
||||
page[ panelId ].setElement( '#' + panelId );
|
||||
page[ panelId ].render();
|
||||
} else if ( panelId !== 'center' ) {
|
||||
page.center.$el.css( panelId, 0 );
|
||||
}
|
||||
});
|
||||
if( !this.left ){
|
||||
this.center.$el.css( 'left', 0 );
|
||||
}
|
||||
if( !this.right ){
|
||||
this.center.$el.css( 'right', 0 );
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
@@ -106,27 +111,26 @@ var PageLayoutView = Backbone.View.extend( BaseMVC.LoggableMixin ).extend({
|
||||
'<div id="everything">',
|
||||
'<div id="background"/>',
|
||||
'<div id="messagebox"/>',
|
||||
'<div id="inactivebox" class="panel-warning-message"/>',
|
||||
'<div id="left"/>',
|
||||
'<div id="center" class="inbound"/>',
|
||||
'<div id="right"/>',
|
||||
'<div id="inactivebox" class="panel-warning-message" />',
|
||||
this.left? '<div id="left" />' : '',
|
||||
this.center? '<div id="center" class="inbound" />' : '',
|
||||
this.right? '<div id="right" />' : '',
|
||||
'</div>',
|
||||
'<div id="dd-helper"/>',
|
||||
'<noscript>',
|
||||
'<div class="overlay overlay-background noscript-overlay">',
|
||||
'<div>',
|
||||
'<h3 class="title">Javascript Required for Galaxy</h3>',
|
||||
'<div>',
|
||||
'The Galaxy analysis interface requires a browser with Javascript enabled.<br>',
|
||||
'Please enable Javascript and refresh this page',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'</noscript>'
|
||||
'<div id="dd-helper" />',
|
||||
].join('');
|
||||
},
|
||||
|
||||
toString : function() { return 'PageLayoutView' }
|
||||
/** hide both side panels if previously shown */
|
||||
hideSidePanels : function(){
|
||||
if( this.left ){
|
||||
this.left.hide();
|
||||
}
|
||||
if( this.right ){
|
||||
this.right.hide();
|
||||
}
|
||||
},
|
||||
|
||||
toString : function() { return 'PageLayoutView'; }
|
||||
});
|
||||
|
||||
// ============================================================================
|
||||
|
||||
@@ -3,124 +3,124 @@
|
||||
*/
|
||||
define([], function() {
|
||||
return Backbone.View.extend({
|
||||
initialize: function(app, options) {
|
||||
initialize: function( app, options ) {
|
||||
this.app = app;
|
||||
this.field = options.field;
|
||||
this.app_options = app.options || {};
|
||||
this.field = options && options.field || new Backbone.View();
|
||||
this.model = options && options.model || new Backbone.Model({
|
||||
text_enable : this.app_options.text_enable || 'Enable',
|
||||
text_disable : this.app_options.text_disable || 'Disable',
|
||||
cls_enable : this.app_options.cls_enable || 'fa fa-caret-square-o-down',
|
||||
cls_disable : this.app_options.cls_disable || 'fa fa-caret-square-o-up'
|
||||
}).set( options );
|
||||
|
||||
// set text labels and icons for collapsible button
|
||||
this.text_enable = app.options.text_enable || 'Enable';
|
||||
this.text_disable = app.options.text_disable || 'Disable';
|
||||
this.cls_enable = app.options.cls_enable || 'fa fa-caret-square-o-down';
|
||||
this.cls_disable = app.options.cls_disable || 'fa fa-caret-square-o-up';
|
||||
|
||||
// set element
|
||||
this.setElement(this._template(options));
|
||||
|
||||
// link elements
|
||||
this.$field = this.$('.ui-form-field');
|
||||
this.$preview = this.$('.ui-form-preview');
|
||||
this.$collapsible = this.$('.ui-form-collapsible');
|
||||
this.$collapsible_icon = this.$('.ui-form-collapsible').find('.icon');
|
||||
this.$error_text = this.$('.ui-form-error-text');
|
||||
this.$error = this.$('.ui-form-error');
|
||||
this.$backdrop = this.$('.ui-form-backdrop');
|
||||
// set element and link components
|
||||
this.setElement( this._template() );
|
||||
this.$field = this.$( '.ui-form-field' );
|
||||
this.$info = this.$( '.ui-form-info' );
|
||||
this.$preview = this.$( '.ui-form-preview' );
|
||||
this.$collapsible = this.$( '.ui-form-collapsible' );
|
||||
this.$collapsible_text = this.$( '.ui-form-collapsible-text' );
|
||||
this.$collapsible_icon = this.$( '.ui-form-collapsible-icon' );
|
||||
this.$title = this.$( '.ui-form-title' );
|
||||
this.$title_text = this.$( '.ui-form-title-text' );
|
||||
this.$error_text = this.$( '.ui-form-error-text' );
|
||||
this.$error = this.$( '.ui-form-error' );
|
||||
this.$backdrop = this.$( '.ui-form-backdrop' );
|
||||
|
||||
// add field element
|
||||
this.$field.prepend(this.field.$el);
|
||||
this.$field.prepend( this.field.$el );
|
||||
|
||||
// decide wether to expand or collapse fields
|
||||
this.field.collapsed = options.collapsible_value !== undefined && JSON.stringify( options.value ) == JSON.stringify( options.collapsible_value );
|
||||
var collapsible_value = this.model.get( 'collapsible_value' );
|
||||
this.field.collapsed = collapsible_value !== undefined && JSON.stringify( this.model.get( 'value' ) ) == JSON.stringify( collapsible_value );
|
||||
this.listenTo( this.model, 'change', this.render, this );
|
||||
this.render();
|
||||
|
||||
// refresh view
|
||||
this._refresh();
|
||||
|
||||
// add collapsible hide/show
|
||||
// add click handler
|
||||
var self = this;
|
||||
this.$collapsible.on('click', function() {
|
||||
this.$collapsible.on( 'click', function() {
|
||||
self.field.collapsed = !self.field.collapsed;
|
||||
self._refresh();
|
||||
app.trigger && app.trigger( 'change' );
|
||||
self.render();
|
||||
});
|
||||
},
|
||||
|
||||
/** Disable input element
|
||||
*/
|
||||
disable: function( silent ) {
|
||||
this.$backdrop.show();
|
||||
silent && this.$backdrop.css({ 'opacity': 0, 'cursor': 'default' } );
|
||||
this.model.set( 'backdrop', silent ? 'silent' : 'default' );
|
||||
},
|
||||
|
||||
/** Set error text
|
||||
*/
|
||||
error: function(text) {
|
||||
this.$error_text.html(text);
|
||||
this.$error.show();
|
||||
this.$el.addClass('ui-error');
|
||||
error: function( text ) {
|
||||
this.model.set( 'error_text', text );
|
||||
},
|
||||
|
||||
/** Reset this view
|
||||
*/
|
||||
reset: function() {
|
||||
this.$error.hide();
|
||||
this.$el.removeClass('ui-error');
|
||||
this.model.set( 'error_text', null );
|
||||
},
|
||||
|
||||
/** Refresh element
|
||||
*/
|
||||
_refresh: function() {
|
||||
this.$collapsible_icon.removeClass().addClass('icon');
|
||||
if (!this.field.collapsed) {
|
||||
this.$field.fadeIn('fast');
|
||||
this.$preview.hide();
|
||||
this._tooltip(this.text_disable, this.cls_disable);
|
||||
render: function() {
|
||||
// render help
|
||||
$( '.tooltip' ).hide();
|
||||
var help_text = this.model.get( 'help', '' );
|
||||
var help_argument = this.model.get( 'argument' );
|
||||
if ( help_argument && help_text.indexOf( '(' + help_argument + ')' ) == -1 ) {
|
||||
help_text += ' (' + help_argument + ')';
|
||||
}
|
||||
this.$info.html( help_text );
|
||||
// render input field
|
||||
this.field.collapsed ? this.$field.hide() : this.$field.fadeIn( 'fast' );
|
||||
// render preview view for collapsed fields
|
||||
this.$preview[ this.field.collapsed && this.model.get( 'collapsible_preview' ) ? 'show' : 'hide' ]()
|
||||
.html( this.model.get( 'text_value' ) );
|
||||
// render error messages
|
||||
var error_text = this.model.get( 'error_text' );
|
||||
this.$error[ error_text ? 'show' : 'hide' ]();
|
||||
this.$el[ error_text ? 'addClass' : 'removeClass' ]( 'ui-error' );
|
||||
this.$error_text.html( error_text );
|
||||
// render backdrop to disable field
|
||||
this.$backdrop.removeClass()
|
||||
.addClass( 'ui-form-backdrop' )
|
||||
.addClass( 'ui-form-backdrop-' + this.model.get( 'backdrop' ) );
|
||||
// render collapsible state and title
|
||||
if ( !this.model.get( 'disabled' ) && this.model.get( 'collapsible_value' ) !== undefined ) {
|
||||
var collapsible_state = this.field.collapsed ? 'enable' : 'disable';
|
||||
this.$title_text.hide();
|
||||
this.$collapsible.show();
|
||||
this.$collapsible_text.text( this.model.get( 'label' ) );
|
||||
this.$collapsible_icon.removeClass().addClass( 'icon' )
|
||||
.addClass( this.model.get( 'cls_' + collapsible_state ) )
|
||||
.attr( 'data-original-title', this.model.get( 'text_' + collapsible_state ) )
|
||||
.tooltip( { placement: 'bottom' } );
|
||||
} else {
|
||||
this.$field.hide();
|
||||
this.$preview.show();
|
||||
this._tooltip(this.text_enable, this.cls_enable);
|
||||
this.$title_text.show().text( this.model.get( 'label' ) );
|
||||
this.$collapsible.hide();
|
||||
}
|
||||
this.app.trigger('change');
|
||||
},
|
||||
|
||||
/** Set tooltip text
|
||||
*/
|
||||
_tooltip: function(title, cls) {
|
||||
this.$collapsible_icon.addClass(cls)
|
||||
.tooltip({ placement: 'bottom' })
|
||||
.attr('data-original-title', title)
|
||||
.tooltip('fixTitle').tooltip('hide');
|
||||
},
|
||||
|
||||
/** Main Template
|
||||
*/
|
||||
_template: function(options) {
|
||||
var tmp = '<div class="ui-form-element">' +
|
||||
'<div class="ui-form-error ui-error">' +
|
||||
'<span class="fa fa-arrow-down"/><span class="ui-form-error-text"/>' +
|
||||
'</div>' +
|
||||
'<div class="ui-form-title">';
|
||||
if ( !options.disabled && options.collapsible_value !== undefined ) {
|
||||
tmp += '<div class="ui-form-collapsible">' +
|
||||
'<i class="icon"/>' + options.label +
|
||||
'</div>';
|
||||
} else {
|
||||
tmp += options.label;
|
||||
}
|
||||
tmp += '</div>' +
|
||||
'<div class="ui-form-field">';
|
||||
tmp += '<div class="ui-form-info">';
|
||||
if (options.help) {
|
||||
tmp += options.help;
|
||||
}
|
||||
if (options.argument && options.help.indexOf('(' + options.argument + ')') == -1) {
|
||||
tmp += ' (' + options.argument + ')';
|
||||
}
|
||||
tmp += '</div>' +
|
||||
'<div class="ui-form-backdrop"/>' +
|
||||
'</div>';
|
||||
if ( options.collapsible_preview ) {
|
||||
tmp += '<div class="ui-form-preview">' + options.text_value + '</div>';
|
||||
}
|
||||
tmp += '</div>';
|
||||
return tmp;
|
||||
_template: function() {
|
||||
return $( '<div/>' ).addClass( 'ui-form-element' )
|
||||
.append( $( '<div/>' ).addClass( 'ui-form-error ui-error' )
|
||||
.append( $( '<span/>' ).addClass( 'fa fa-arrow-down' ) )
|
||||
.append( $( '<span/>' ).addClass( 'ui-form-error-text' ) )
|
||||
)
|
||||
.append( $( '<div/>' ).addClass( 'ui-form-title' )
|
||||
.append( $( '<div/>' ).addClass( 'ui-form-collapsible' )
|
||||
.append( $( '<i/>' ).addClass( 'ui-form-collapsible-icon' ) )
|
||||
.append( $( '<span/>' ).addClass( 'ui-form-collapsible-text' ) )
|
||||
)
|
||||
.append( $( '<span/>' ).addClass( 'ui-form-title-text' ) )
|
||||
)
|
||||
.append( $( '<div/>' ).addClass( 'ui-form-field' )
|
||||
.append( $( '<span/>' ).addClass( 'ui-form-info' ) )
|
||||
.append( $( '<span/>' ).addClass( 'ui-form-backdrop' ) )
|
||||
)
|
||||
.append( $( '<div/>' ).addClass( 'ui-form-preview' ) );
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
define(['utils/utils',
|
||||
'mvc/ui/ui-misc',
|
||||
'mvc/form/form-select-content',
|
||||
'mvc/ui/ui-select-content',
|
||||
'mvc/ui/ui-select-library',
|
||||
'mvc/ui/ui-select-ftp',
|
||||
'mvc/ui/ui-color-picker'],
|
||||
@@ -54,7 +54,7 @@ define(['utils/utils',
|
||||
*/
|
||||
_fieldData: function( input_def ) {
|
||||
var self = this;
|
||||
return new SelectContent.View( this.app, {
|
||||
return new SelectContent.View({
|
||||
id : 'field-' + input_def.id,
|
||||
extensions : input_def.extensions,
|
||||
optional : input_def.optional,
|
||||
|
||||
@@ -1,347 +0,0 @@
|
||||
// dependencies
|
||||
define(['utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-tabs'], function(Utils, Ui, Tabs) {
|
||||
// hda/hdca content selector ui element
|
||||
var View = Backbone.View.extend({
|
||||
// initialize
|
||||
initialize : function(app, options) {
|
||||
// link app and options
|
||||
this.app = app;
|
||||
this.options = options;
|
||||
|
||||
// track current history elements
|
||||
this.history = {};
|
||||
|
||||
|
||||
// link this
|
||||
var self = this;
|
||||
|
||||
// add element
|
||||
this.setElement('<div class="ui-select-content"/>');
|
||||
|
||||
// list of select fieldsFormSection
|
||||
this.list = {};
|
||||
|
||||
// radio button options
|
||||
var radio_buttons = [];
|
||||
|
||||
// identify selector type
|
||||
if (options.type == 'data_collection') {
|
||||
this.mode = 'collection';
|
||||
} else {
|
||||
if (options.multiple) {
|
||||
this.mode = 'multiple';
|
||||
} else {
|
||||
this.mode = 'single';
|
||||
}
|
||||
}
|
||||
|
||||
// set initial state
|
||||
this.current = this.mode;
|
||||
this.list = {};
|
||||
|
||||
// error messages
|
||||
var extensions = Utils.textify(options.extensions);
|
||||
var hda_error = 'No dataset available.';
|
||||
if (extensions) {
|
||||
hda_error = 'No ' + extensions + ' dataset available.';
|
||||
}
|
||||
var hdca_error = 'No dataset list available.';
|
||||
if (extensions) {
|
||||
hdca_error = 'No ' + extensions + ' dataset collection available.';
|
||||
}
|
||||
|
||||
// add single dataset selector
|
||||
if (this.mode == 'single') {
|
||||
radio_buttons.push({
|
||||
icon : 'fa-file-o',
|
||||
value : 'single',
|
||||
tooltip : 'Single dataset'
|
||||
});
|
||||
this.select_single = new Ui.Select.View({
|
||||
optional : options.optional,
|
||||
error_text : hda_error,
|
||||
onchange : function() {
|
||||
self.trigger('change');
|
||||
}
|
||||
});
|
||||
this.list['single'] = {
|
||||
field: this.select_single,
|
||||
type : 'hda'
|
||||
};
|
||||
}
|
||||
|
||||
// add multiple dataset selector
|
||||
if (this.mode == 'single' || this.mode == 'multiple') {
|
||||
radio_buttons.push({
|
||||
icon : 'fa-files-o',
|
||||
value : 'multiple',
|
||||
tooltip : 'Multiple datasets'
|
||||
});
|
||||
this.select_multiple = new Ui.Select.View({
|
||||
multiple : true,
|
||||
searchable : false,
|
||||
optional : options.optional,
|
||||
error_text : hda_error,
|
||||
onchange : function() {
|
||||
self.trigger('change');
|
||||
}
|
||||
});
|
||||
this.list['multiple'] = {
|
||||
field: this.select_multiple,
|
||||
type : 'hda'
|
||||
};
|
||||
}
|
||||
|
||||
// add collection selector
|
||||
if (this.mode == 'single' || this.mode == 'multiple' || this.mode == 'collection') {
|
||||
radio_buttons.push({
|
||||
icon : 'fa-folder-o',
|
||||
value : 'collection',
|
||||
tooltip : 'Dataset collection'
|
||||
});
|
||||
var multiple = this.mode == 'multiple';
|
||||
this.select_collection = new Ui.Select.View({
|
||||
error_text : hdca_error,
|
||||
multiple : multiple,
|
||||
searchable : false,
|
||||
optional : options.optional,
|
||||
onchange : function() {
|
||||
self.trigger('change');
|
||||
}
|
||||
});
|
||||
this.list['collection'] = {
|
||||
field: this.select_collection,
|
||||
type : 'hdca'
|
||||
};
|
||||
}
|
||||
|
||||
// create button
|
||||
this.button_type = new Ui.RadioButton.View({
|
||||
value : this.current,
|
||||
data : radio_buttons,
|
||||
onchange: function(value) {
|
||||
self.current = value;
|
||||
self.refresh();
|
||||
self.trigger('change');
|
||||
}
|
||||
});
|
||||
|
||||
// add batch mode information
|
||||
this.$batch = $(this.template_batch());
|
||||
|
||||
// number of radio buttons
|
||||
var n_buttons = _.size(this.list);
|
||||
|
||||
// add button to dom
|
||||
var button_width = 0;
|
||||
if (n_buttons > 1) {
|
||||
this.$el.append(this.button_type.$el);
|
||||
button_width = Math.max(0, _.size(this.list) * 35) + 'px';
|
||||
}
|
||||
|
||||
// append field elements
|
||||
for (var i in this.list) {
|
||||
this.$el.append(this.list[i].field.$el.css({
|
||||
'margin-left': button_width
|
||||
}));
|
||||
}
|
||||
|
||||
// append batch message
|
||||
this.$el.append(this.$batch.css({
|
||||
'margin-left': button_width
|
||||
}));
|
||||
|
||||
// update options
|
||||
this.update(options.data);
|
||||
|
||||
// set initial value
|
||||
if (this.options.value !== undefined) {
|
||||
this.value(this.options.value);
|
||||
}
|
||||
|
||||
// refresh view
|
||||
this.refresh();
|
||||
|
||||
// add change event. fires on trigger
|
||||
this.on('change', function() {
|
||||
if (options.onchange) {
|
||||
options.onchange(self.value());
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** Indicate that select fields are being updated */
|
||||
wait: function() {
|
||||
for (var i in this.list) {
|
||||
this.list[i].field.wait();
|
||||
}
|
||||
},
|
||||
|
||||
/** Indicate that the options update has been completed */
|
||||
unwait: function() {
|
||||
for (var i in this.list) {
|
||||
this.list[i].field.unwait();
|
||||
}
|
||||
},
|
||||
|
||||
/** Update content selector */
|
||||
update: function(options) {
|
||||
// update a particular select field
|
||||
var self = this;
|
||||
function _update(field, options) {
|
||||
if (field) {
|
||||
// identify available options
|
||||
var select_options = [];
|
||||
for (var i in options) {
|
||||
var item = options[i];
|
||||
select_options.push({
|
||||
hid : item.hid,
|
||||
label: item.hid + ': ' + item.name,
|
||||
value: item.id
|
||||
});
|
||||
// backup to local history
|
||||
self.history[item.id + '_' + item.src] = item;
|
||||
}
|
||||
// update field
|
||||
field.add( select_options, function( a, b ) { return b.hid - a.hid } );
|
||||
}
|
||||
}
|
||||
|
||||
// update available options
|
||||
_update(this.select_single, options.hda);
|
||||
_update(this.select_multiple, options.hda);
|
||||
_update(this.select_collection, options.hdca);
|
||||
},
|
||||
|
||||
/** Return the currently selected dataset values */
|
||||
value : function (new_value) {
|
||||
// update current value
|
||||
if (new_value !== undefined) {
|
||||
if (new_value && new_value.values) {
|
||||
try {
|
||||
// create list with values
|
||||
var list = [];
|
||||
for (var i in new_value.values) {
|
||||
list.push(new_value.values[i].id);
|
||||
}
|
||||
|
||||
// identify suitable select field
|
||||
if (new_value && new_value.values.length > 0 && new_value.values[0].src == 'hdca') {
|
||||
this.current = 'collection';
|
||||
this.select_collection.value(list);
|
||||
} else {
|
||||
if (this.mode == 'multiple') {
|
||||
this.current = 'multiple';
|
||||
this.select_multiple.value(list);
|
||||
} else {
|
||||
this.current = 'single';
|
||||
this.select_single.value(list[0]);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
Galaxy.emit.debug('tools-select-content::value()', 'Skipped.');
|
||||
}
|
||||
} else {
|
||||
for (var i in this.list) {
|
||||
this.list[i].field.value(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// refresh view
|
||||
this.refresh();
|
||||
|
||||
// validate value
|
||||
var id_list = this._select().value();
|
||||
if (id_list === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// transform into an array
|
||||
if (!(id_list instanceof Array)) {
|
||||
id_list = [id_list];
|
||||
}
|
||||
|
||||
// check if value exists
|
||||
if (id_list.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// prepare result dict
|
||||
var result = {
|
||||
batch : this._batch(),
|
||||
values : []
|
||||
}
|
||||
|
||||
// append to dataset ids
|
||||
for (var i in id_list) {
|
||||
var details = this.history[id_list[i] + '_' + this.list[this.current].type];
|
||||
if (details) {
|
||||
result.values.push(details);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// sort by history ids
|
||||
result.values.sort(function(a, b){
|
||||
return a.hid - b.hid;
|
||||
});
|
||||
|
||||
// return
|
||||
return result;
|
||||
},
|
||||
|
||||
/** Refreshes data selection view */
|
||||
refresh: function() {
|
||||
this.button_type.value(this.current);
|
||||
for (var i in this.list) {
|
||||
var $el = this.list[i].field.$el;
|
||||
if (this.current == i) {
|
||||
$el.show();
|
||||
} else {
|
||||
$el.hide();
|
||||
}
|
||||
}
|
||||
if (this._batch()) {
|
||||
this.$batch.show();
|
||||
} else {
|
||||
this.$batch.hide();
|
||||
}
|
||||
},
|
||||
|
||||
/** Assists in selecting the current field */
|
||||
_select: function() {
|
||||
return this.list[this.current].field;
|
||||
},
|
||||
|
||||
/** Assists in identifying the batch mode */
|
||||
_batch: function() {
|
||||
if (this.current == 'collection') {
|
||||
var hdca = this.history[this._select().value() + '_hdca'];
|
||||
if (hdca && hdca.map_over_type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (this.current != 'single') {
|
||||
if (this.mode == 'single') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
/** Batch message template */
|
||||
template_batch: function() {
|
||||
return '<div class="ui-form-info">' +
|
||||
'<i class="fa fa-sitemap" style="font-size: 1.2em; padding: 2px 5px;"/>' +
|
||||
'This is a batch mode input field. A separate job will be triggered for each dataset.' +
|
||||
'</div>';
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
View: View
|
||||
}
|
||||
|
||||
});
|
||||
@@ -30,9 +30,7 @@ var LibraryDatasetView = Backbone.View.extend({
|
||||
"click .btn-make-private" : "makeDatasetPrivate",
|
||||
"click .btn-remove-restrictions" : "removeDatasetRestrictions",
|
||||
"click .toolbtn_save_permissions" : "savePermissions",
|
||||
|
||||
"click .toolbtn_save_modifications" : "comingSoon",
|
||||
// "click .btn-share-dataset" : "comingSoon"
|
||||
|
||||
},
|
||||
|
||||
@@ -217,7 +215,7 @@ var LibraryDatasetView = Backbone.View.extend({
|
||||
historyItem.save({ content : this.id, source : 'library' }, {
|
||||
success : function(){
|
||||
Galaxy.modal.hide();
|
||||
mod_toastr.success('Dataset imported. Click this to start analysing it.', '', {onclick: function() {window.location='/';}});
|
||||
mod_toastr.success('Dataset imported. Click this to start analyzing it.', '', {onclick: function() {window.location='/';}});
|
||||
},
|
||||
error : function(model, response){
|
||||
if (typeof response.responseJSON !== "undefined"){
|
||||
@@ -585,15 +583,26 @@ var LibraryDatasetView = Backbone.View.extend({
|
||||
'<div class="library_style_container">',
|
||||
'<div id="library_toolbar">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Download dataset" class="btn btn-default toolbtn-download-dataset primary-button toolbar-item" type="button">',
|
||||
'<span class="fa fa-download"> Download</span>',
|
||||
'<span class="fa fa-download"></span>',
|
||||
' Download',
|
||||
'</button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Import dataset into history" class="btn btn-default toolbtn-import-dataset primary-button toolbar-item" type="button">',
|
||||
'<span class="fa fa-book"></span>',
|
||||
' to History',
|
||||
'</button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Import dataset into history" class="btn btn-default toolbtn-import-dataset primary-button toolbar-item" type="button"><span class="fa fa-book"> to History</span></button>',
|
||||
'<% if (item.get("can_user_modify")) { %>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Modify library item" class="btn btn-default toolbtn_modify_dataset primary-button toolbar-item" type="button"><span class="fa fa-pencil"> Modify</span></button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Modify library item" class="btn btn-default toolbtn_modify_dataset primary-button toolbar-item" type="button">',
|
||||
'<span class="fa fa-pencil"></span>',
|
||||
' Modify',
|
||||
'</button>',
|
||||
'<% } %>',
|
||||
'<% if (item.get("can_user_manage")) { %>',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>/permissions"><button data-toggle="tooltip" data-placement="top" title="Manage permissions" class="btn btn-default toolbtn_change_permissions primary-button toolbar-item" type="button"><span class="fa fa-group"></span> Permissions</span></button></a>',
|
||||
// '<button data-toggle="tooltip" data-placement="top" title="Share dataset" class="btn btn-default toolbtn-share-dataset primary-button toolbar-item" type="button"><span class="fa fa-share"> Share</span></button>',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>/permissions">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Manage permissions" class="btn btn-default toolbtn_change_permissions primary-button toolbar-item" type="button">',
|
||||
'<span class="fa fa-group"></span>',
|
||||
' Permissions',
|
||||
'</button>',
|
||||
'</a>',
|
||||
'<% } %>',
|
||||
'</div>',
|
||||
|
||||
@@ -613,7 +622,8 @@ var LibraryDatasetView = Backbone.View.extend({
|
||||
'<div class="alert alert-info">',
|
||||
'This dataset is unrestricted so everybody can access it. Just share the URL of this page. ',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Copy to clipboard" class="btn btn-default btn-copy-link-to-clipboard primary-button" type="button">',
|
||||
'<span class="fa fa-clipboard"> To Clipboard</span>',
|
||||
'<span class="fa fa-clipboard"></span>',
|
||||
' To Clipboard',
|
||||
'</button> ',
|
||||
'</div>',
|
||||
'<% } %>',
|
||||
@@ -726,7 +736,12 @@ var LibraryDatasetView = Backbone.View.extend({
|
||||
// CONTAINER START
|
||||
'<div class="library_style_container">',
|
||||
'<div id="library_toolbar">',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>"><button data-toggle="tooltip" data-placement="top" title="Go to latest dataset" class="btn btn-default primary-button toolbar-item" type="button"><span class="fa fa-caret-left fa-lg"> Latest dataset</span></button><a>',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Go to latest dataset" class="btn btn-default primary-button toolbar-item" type="button">',
|
||||
'<span class="fa fa-caret-left fa-lg"></span>',
|
||||
' Latest dataset',
|
||||
'</button>',
|
||||
'<a>',
|
||||
'</div>',
|
||||
|
||||
// BREADCRUMBS
|
||||
@@ -838,8 +853,14 @@ var LibraryDatasetView = Backbone.View.extend({
|
||||
// CONTAINER START
|
||||
'<div class="library_style_container">',
|
||||
'<div id="library_toolbar">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Cancel modifications" class="btn btn-default toolbtn_cancel_modifications primary-button toolbar-item" type="button"><span class="fa fa-times"> Cancel</span></button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Save modifications" class="btn btn-default toolbtn_save_modifications primary-button toolbar-item" type="button"><span class="fa fa-floppy-o"> Save</span></button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Cancel modifications" class="btn btn-default toolbtn_cancel_modifications primary-button toolbar-item" type="button">',
|
||||
'<span class="fa fa-times"></span>',
|
||||
' Cancel',
|
||||
'</button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Save modifications" class="btn btn-default toolbtn_save_modifications primary-button toolbar-item" type="button">',
|
||||
'<span class="fa fa-floppy-o"></span>',
|
||||
' Save',
|
||||
'</button>',
|
||||
'</div>',
|
||||
|
||||
// BREADCRUMBS
|
||||
@@ -932,8 +953,18 @@ var LibraryDatasetView = Backbone.View.extend({
|
||||
// CONTAINER START
|
||||
'<div class="library_style_container">',
|
||||
'<div id="library_toolbar">',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>"><button data-toggle="tooltip" data-placement="top" title="Go back to containing folder" class="btn btn-default primary-button toolbar-item" type="button"><span class="fa fa-folder-open-o"> Containing Folder</span></button></a>',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>"><button data-toggle="tooltip" data-placement="top" title="Go back to dataset" class="btn btn-default primary-button toolbar-item" type="button"><span class="fa fa-file-o"> Dataset Details</span></button><a>',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Go back to containing folder" class="btn btn-default primary-button toolbar-item" type="button">',
|
||||
'<span class="fa fa-folder-open-o"></span>',
|
||||
' Containing Folder',
|
||||
'</button>',
|
||||
'</a>',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Go back to dataset" class="btn btn-default primary-button toolbar-item" type="button">',
|
||||
'<span class="fa fa-file-o"></span>',
|
||||
' Dataset Details',
|
||||
'</button>',
|
||||
'<a>',
|
||||
'</div>',
|
||||
|
||||
// BREADCRUMBS
|
||||
@@ -964,30 +995,42 @@ var LibraryDatasetView = Backbone.View.extend({
|
||||
'<hr/>',
|
||||
'<h2>Dataset-related permissions</h2>',
|
||||
'<div class="alert alert-warning">Changes made below will affect <strong>every</strong> library item that was created from this dataset and also every history this dataset is part of.</div>',
|
||||
|
||||
'<% if (!item.get("is_unrestricted")) { %>',
|
||||
'<p>You can remove all access restrictions on this dataset. ',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Everybody will be able to access the dataset." class="btn btn-default btn-remove-restrictions primary-button" type="button">',
|
||||
'<span class="fa fa-globe"> Remove restrictions</span>',
|
||||
'</button>',
|
||||
'</p>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Everybody will be able to access the dataset." class="btn btn-default btn-remove-restrictions primary-button" type="button">',
|
||||
'<span class="fa fa-globe"></span>',
|
||||
' Remove restrictions',
|
||||
'</button>',
|
||||
'</p>',
|
||||
'<% } else { %>',
|
||||
'This dataset is unrestricted so everybody can access it. Just share the URL of this page.',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Copy to clipboard" class="btn btn-default btn-copy-link-to-clipboard primary-button" type="button"><span class="fa fa-clipboard"> To Clipboard</span></button> ',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Copy to clipboard" class="btn btn-default btn-copy-link-to-clipboard primary-button" type="button">',
|
||||
'<span class="fa fa-clipboard"></span>',
|
||||
' To Clipboard',
|
||||
'</button>',
|
||||
'<p>You can make this dataset private to you. ',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Only you will be able to access the dataset." class="btn btn-default btn-make-private primary-button" type="button"><span class="fa fa-key"> Make Private</span></button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Only you will be able to access the dataset." class="btn btn-default btn-make-private primary-button" type="button">',
|
||||
'<span class="fa fa-key"></span>',
|
||||
' Make Private',
|
||||
'</button>',
|
||||
'</p>',
|
||||
// '<p>You can share this dataset privately with other Galaxy users. ',
|
||||
// '<button data-toggle="tooltip" data-placement="top" title="Only you and the suers you choose will be able to access the dataset." class="btn btn-default btn-share-dataset primary-button" type="button"><span class="fa fa-share"> Share Privately</span></button>',
|
||||
// '</p>',
|
||||
'<% } %>',
|
||||
'<h4>Roles that can access the dataset</h4>',
|
||||
'<div id="access_perm" class="access_perm roles-selection"></div>',
|
||||
'<div class="alert alert-info roles-selection">User has to have <strong>all these roles</strong> in order to access this dataset. Users without access permission <strong>cannot</strong> have other permissions on this dataset. If there are no access roles set on the dataset it is considered <strong>unrestricted</strong>.</div>',
|
||||
'<div class="alert alert-info roles-selection">',
|
||||
'User has to have <strong>all these roles</strong> in order to access this dataset.',
|
||||
' Users without access permission <strong>cannot</strong> have other permissions on this dataset.',
|
||||
' If there are no access roles set on the dataset it is considered <strong>unrestricted</strong>.',
|
||||
'</div>',
|
||||
'<h4>Roles that can manage permissions on the dataset</h4>',
|
||||
'<div id="manage_perm" class="manage_perm roles-selection"></div>',
|
||||
'<div class="alert alert-info roles-selection">User with <strong>any</strong> of these roles can manage permissions of this dataset. If you remove yourself you will loose the ability manage this dataset unless you are an admin.</div>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Save modifications made on this page" class="btn btn-default toolbtn_save_permissions primary-button" type="button"><span class="fa fa-floppy-o"> Save</span></button>',
|
||||
'<div class="alert alert-info roles-selection">',
|
||||
'User with <strong>any</strong> of these roles can manage permissions of this dataset. If you remove yourself you will loose the ability manage this dataset unless you are an admin.',
|
||||
'</div>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Save modifications made on this page" class="btn btn-default toolbtn_save_permissions primary-button" type="button">',
|
||||
'<span class="fa fa-floppy-o"></span>',
|
||||
' Save',
|
||||
'</button>',
|
||||
'</div>',
|
||||
// CONTAINER END
|
||||
'</div>'
|
||||
@@ -996,7 +1039,7 @@ var LibraryDatasetView = Backbone.View.extend({
|
||||
|
||||
templateBulkImportInModal: function(){
|
||||
return _.template([
|
||||
'<span id="history_modal_combo_bulk" style="width:90%; margin-left: 1em; margin-right: 1em; ">',
|
||||
'<span class="library-modal-item">',
|
||||
'Select history: ',
|
||||
'<select id="dataset_import_single" name="dataset_import_single" style="width:50%; margin-bottom: 1em; "> ',
|
||||
'<% _.each(histories, function(history) { %>', //history select btn
|
||||
|
||||
@@ -211,91 +211,107 @@ var FolderView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
templateFolder : function(){
|
||||
var tmpl_array = [];
|
||||
// CONTAINER START
|
||||
tmpl_array.push('<div class="library_style_container">');
|
||||
|
||||
tmpl_array.push(' <div id="library_toolbar">');
|
||||
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Modify library item" class="btn btn-default toolbtn_modify_dataset primary-button" type="button"><span class="fa fa-pencil"></span> Modify</span></button>');
|
||||
tmpl_array.push(' <a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>/permissions"><button data-toggle="tooltip" data-placement="top" title="Manage permissions" class="btn btn-default toolbtn_change_permissions primary-button" type="button"><span class="fa fa-group"></span> Permissions</span></button></a>');
|
||||
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Share dataset" class="btn btn-default toolbtn-share-dataset primary-button" type="button"><span class="fa fa-share"></span> Share</span></button>');
|
||||
tmpl_array.push(' </div>');
|
||||
|
||||
// tmpl_array.push('<% if (item.get("is_unrestricted")) { %>');
|
||||
tmpl_array.push(' <p>');
|
||||
tmpl_array.push(' This dataset is unrestricted so everybody can access it. Just share the URL of this page. ');
|
||||
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Copy to clipboard" class="btn btn-default btn-copy-link-to-clipboard primary-button" type="button"><span class="fa fa-clipboard"></span> To Clipboard</span></button> ');
|
||||
tmpl_array.push(' </p>');
|
||||
// tmpl_array.push('<% } %>');
|
||||
|
||||
tmpl_array.push('<div class="dataset_table">');
|
||||
|
||||
tmpl_array.push(' <table class="grid table table-striped table-condensed">');
|
||||
tmpl_array.push(' <tr>');
|
||||
tmpl_array.push(' <th scope="row" id="id_row" data-id="<%= _.escape(item.get("ldda_id")) %>">Name</th>');
|
||||
tmpl_array.push(' <td><%= _.escape(item.get("name")) %></td>');
|
||||
tmpl_array.push(' </tr>');
|
||||
|
||||
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("file_ext")) %></td>');
|
||||
tmpl_array.push(' </tr>');
|
||||
tmpl_array.push(' <% } %>');
|
||||
|
||||
tmpl_array.push(' </table>');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
// CONTAINER END
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div class="library_style_container">',
|
||||
'<div id="library_toolbar">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Modify library item" class="btn btn-default toolbtn_modify_dataset primary-button" type="button">',
|
||||
'<span class="fa fa-pencil"/>',
|
||||
' Modify',
|
||||
'</button>',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>/permissions">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Manage permissions" class="btn btn-default toolbtn_change_permissions primary-button" type="button">',
|
||||
'<span class="fa fa-group"/>',
|
||||
' Permissions',
|
||||
'</button>',
|
||||
'</a>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Share dataset" class="btn btn-default toolbtn-share-dataset primary-button" type="button">',
|
||||
'<span class="fa fa-share"/>',
|
||||
' Share',
|
||||
'</span>',
|
||||
'</button>',
|
||||
'</div>',
|
||||
'<p>',
|
||||
'This dataset is unrestricted so everybody can access it. Just share the URL of this page. ',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Copy to clipboard" class="btn btn-default btn-copy-link-to-clipboard primary-button" type="button">',
|
||||
'<span class="fa fa-clipboard"/>',
|
||||
' To Clipboard',
|
||||
'</button> ',
|
||||
'</p>',
|
||||
'<div class="dataset_table">',
|
||||
'<table class="grid table table-striped table-condensed">',
|
||||
'<tr>',
|
||||
'<th scope="row" id="id_row" data-id="<%= _.escape(item.get("ldda_id")) %>">',
|
||||
'Name',
|
||||
'</th>',
|
||||
'<td>',
|
||||
'<%= _.escape(item.get("name")) %>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<% if (item.get("file_ext")) { %>',
|
||||
'<tr>',
|
||||
'<th scope="row">Data type</th>',
|
||||
'<td>',
|
||||
'<%= _.escape(item.get("file_ext")) %>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<% } %>',
|
||||
'</table>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateFolderPermissions : function(){
|
||||
var tmpl_array = [];
|
||||
// CONTAINER START
|
||||
tmpl_array.push('<div class="library_style_container">');
|
||||
|
||||
|
||||
tmpl_array.push(' <div id="library_toolbar">');
|
||||
tmpl_array.push(' <a href="#/folders/<%= folder.get("parent_id") %>"><button data-toggle="tooltip" data-placement="top" title="Go back to the parent folder" class="btn btn-default primary-button" type="button"><span class="fa fa-caret-left fa-lg"></span> Parent folder</span></button></a>');
|
||||
tmpl_array.push(' </div>');
|
||||
|
||||
tmpl_array.push('<h1>Folder: <%= _.escape(folder.get("name")) %></h1>');
|
||||
|
||||
tmpl_array.push('<div class="alert alert-warning">');
|
||||
tmpl_array.push('<% if (is_admin) { %>');
|
||||
tmpl_array.push('You are logged in as an <strong>administrator</strong> therefore you can manage any folder on this Galaxy instance. Please make sure you understand the consequences.');
|
||||
tmpl_array.push('<% } else { %>');
|
||||
tmpl_array.push('You can assign any number of roles to any of the following permission types. However please read carefully the implications of such actions.');
|
||||
tmpl_array.push('<% }%>');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
tmpl_array.push('<div class="dataset_table">');
|
||||
|
||||
tmpl_array.push('<h2>Folder permissions</h2>');
|
||||
|
||||
tmpl_array.push('<h4>Roles that can manage permissions on this folder</h4>');
|
||||
tmpl_array.push('<div id="manage_perm" class="manage_perm roles-selection"></div>');
|
||||
tmpl_array.push('<div class="alert alert-info roles-selection">User with <strong>any</strong> of these roles can manage permissions on this folder.</div>');
|
||||
|
||||
tmpl_array.push('<h4>Roles that can add items to this folder</h4>');
|
||||
tmpl_array.push('<div id="add_perm" class="add_perm roles-selection"></div>');
|
||||
tmpl_array.push('<div class="alert alert-info roles-selection">User with <strong>any</strong> of these roles can add items to this folder (folders and datasets).</div>');
|
||||
|
||||
tmpl_array.push('<h4>Roles that can modify this folder</h4>');
|
||||
tmpl_array.push('<div id="modify_perm" class="modify_perm roles-selection"></div>');
|
||||
tmpl_array.push('<div class="alert alert-info roles-selection">User with <strong>any</strong> of these roles can modify this folder (name, etc.).</div>');
|
||||
|
||||
tmpl_array.push('<button data-toggle="tooltip" data-placement="top" title="Save modifications" class="btn btn-default toolbtn_save_permissions primary-button" type="button"><span class="fa fa-floppy-o"></span> Save</span></button>');
|
||||
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
// CONTAINER END
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div class="library_style_container">',
|
||||
'<div id="library_toolbar">',
|
||||
'<a href="#/folders/<%= folder.get("parent_id") %>">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Go back to the parent folder" class="btn btn-default primary-button" type="button">',
|
||||
'<span class="fa fa-caret-left fa-lg"/>',
|
||||
' Parent folder',
|
||||
'</button>',
|
||||
'</a>',
|
||||
'</div>',
|
||||
'<h1>',
|
||||
'Folder: <%= _.escape(folder.get("name")) %>',
|
||||
'</h1>',
|
||||
'<div class="alert alert-warning">',
|
||||
'<% if (is_admin) { %>',
|
||||
'You are logged in as an <strong>administrator</strong> therefore you can manage any folder on this Galaxy instance. Please make sure you understand the consequences.',
|
||||
'<% } else { %>',
|
||||
'You can assign any number of roles to any of the following permission types. However please read carefully the implications of such actions.',
|
||||
'<% }%>',
|
||||
'</div>',
|
||||
'<div class="dataset_table">',
|
||||
'<h2>Folder permissions</h2>',
|
||||
'<h4>',
|
||||
'Roles that can manage permissions on this folder',
|
||||
'</h4>',
|
||||
'<div id="manage_perm" class="manage_perm roles-selection"/>',
|
||||
'<div class="alert alert-info roles-selection">',
|
||||
'User with <strong>any</strong> of these roles can manage permissions on this folder.',
|
||||
'</div>',
|
||||
'<h4>',
|
||||
'Roles that can add items to this folder',
|
||||
'</h4>',
|
||||
'<div id="add_perm" class="add_perm roles-selection"/>',
|
||||
'<div class="alert alert-info roles-selection">',
|
||||
'User with <strong>any</strong> of these roles can add items to this folder (folders and datasets).',
|
||||
'</div>',
|
||||
'<h4>',
|
||||
'Roles that can modify this folder',
|
||||
'</h4>',
|
||||
'<div id="modify_perm" class="modify_perm roles-selection"/>',
|
||||
'<div class="alert alert-info roles-selection">',
|
||||
'User with <strong>any</strong> of these roles can modify this folder (name, etc.).',
|
||||
'</div>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Save modifications" class="btn btn-default toolbtn_save_permissions primary-button" type="button">',
|
||||
'<span class="fa fa-floppy-o"/>',
|
||||
' Save',
|
||||
'</button>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -254,7 +254,6 @@ var FolderListView = Backbone.View.extend({
|
||||
* Currently supports only sorting by name.
|
||||
*/
|
||||
sortFolder: function(sort_by, order){
|
||||
console.log('sorting');
|
||||
// default to asc sort by name
|
||||
if (sort_by === 'undefined' && order === 'undefined'){
|
||||
return this.collection.sortByNameAsc();
|
||||
@@ -345,49 +344,52 @@ var FolderListView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
templateFolder : function (){
|
||||
var tmpl_array = [];
|
||||
return _.template([
|
||||
// BREADCRUMBS
|
||||
'<ol class="breadcrumb">',
|
||||
'<li><a title="Return to the list of libraries" href="#">Libraries</a></li>',
|
||||
'<% _.each(path, function(path_item) { %>',
|
||||
'<% if (path_item[0] != id) { %>',
|
||||
'<li><a title="Return to this folder" href="#/folders/<%- path_item[0] %>"><%- path_item[1] %></a> </li> ',
|
||||
'<% } else { %>',
|
||||
'<li class="active"><span title="You are in this folder"><%- path_item[1] %></span></li>',
|
||||
'<% } %>',
|
||||
'<% }); %>',
|
||||
'</ol>',
|
||||
|
||||
// BREADCRUMBS
|
||||
tmpl_array.push('<ol class="breadcrumb">');
|
||||
tmpl_array.push(' <li><a title="Return to the list of libraries" href="#">Libraries</a></li>');
|
||||
tmpl_array.push(' <% _.each(path, function(path_item) { %>');
|
||||
tmpl_array.push(' <% if (path_item[0] != id) { %>');
|
||||
tmpl_array.push(' <li><a title="Return to this folder" href="#/folders/<%- path_item[0] %>"><%- path_item[1] %></a> </li> ');
|
||||
tmpl_array.push( '<% } else { %>');
|
||||
tmpl_array.push(' <li class="active"><span title="You are in this folder"><%- path_item[1] %></span></li>');
|
||||
tmpl_array.push(' <% } %>');
|
||||
tmpl_array.push(' <% }); %>');
|
||||
tmpl_array.push('</ol>');
|
||||
|
||||
// FOLDER CONTENT
|
||||
tmpl_array.push('<table data-library-id="<%- parent_library_id %>" id="folder_table" class="grid table table-condensed">');
|
||||
tmpl_array.push(' <thead>');
|
||||
tmpl_array.push(' <th class="button_heading"></th>');
|
||||
tmpl_array.push(' <th style="text-align: center; width: 20px; " title="Check to select all datasets"><input id="select-all-checkboxes" style="margin: 0;" type="checkbox"></th>');
|
||||
tmpl_array.push(' <th><a class="sort-folder-link" title="Click to reverse order" href="#">name</a> <span title="Sorted alphabetically" class="sort-icon fa fa-sort-alpha-<%- order %>"></span></th>');
|
||||
tmpl_array.push(' <th style="width:25%;">description</th>');
|
||||
tmpl_array.push(' <th style="width:5%;">data type</th>');
|
||||
tmpl_array.push(' <th style="width:10%;">size</th>');
|
||||
tmpl_array.push(' <th style="width:160px;">time updated (UTC)</th>');
|
||||
tmpl_array.push(' <th style="width:10%;"></th> ');
|
||||
tmpl_array.push(' </thead>');
|
||||
tmpl_array.push(' <tbody id="folder_list_body">');
|
||||
tmpl_array.push(' <tr id="first_folder_item">');
|
||||
tmpl_array.push(' <td><a href="#<% if (upper_folder_id !== 0){ print("folders/" + upper_folder_id)} %>" title="Go to parent folder" class="btn_open_folder btn btn-default btn-xs">..<a></td>');
|
||||
tmpl_array.push(' <td></td>');
|
||||
tmpl_array.push(' <td></td>');
|
||||
tmpl_array.push(' <td></td>');
|
||||
tmpl_array.push(' <td></td>');
|
||||
tmpl_array.push(' <td></td>');
|
||||
tmpl_array.push(' <td></td>');
|
||||
tmpl_array.push(' <td></td>');
|
||||
tmpl_array.push(' </tr>');
|
||||
|
||||
tmpl_array.push(' </tbody>');
|
||||
tmpl_array.push('</table>');
|
||||
tmpl_array.push('<div class="empty-folder-message" style="display:none;">This folder is either empty or you do not have proper access permissions to see the contents. If you expected something to show up please consult the <a href="https://wiki.galaxyproject.org/Admin/DataLibraries/LibrarySecurity" target="_blank">library security wikipage</a> or visit the <a href="https://biostar.usegalaxy.org/" target="_blank">Galaxy support site</a>.</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
// FOLDER CONTENT
|
||||
'<table data-library-id="<%- parent_library_id %>" id="folder_table" class="grid table table-condensed">',
|
||||
'<thead>',
|
||||
'<th class="button_heading"></th>',
|
||||
'<th style="text-align: center; width: 20px; " title="Check to select all datasets"><input id="select-all-checkboxes" style="margin: 0;" type="checkbox"></th>',
|
||||
'<th><a class="sort-folder-link" title="Click to reverse order" href="#">name</a> <span title="Sorted alphabetically" class="sort-icon fa fa-sort-alpha-<%- order %>"></span></th>',
|
||||
'<th style="width:25%;">description</th>',
|
||||
'<th style="width:5%;">data type</th>',
|
||||
'<th style="width:10%;">size</th>',
|
||||
'<th style="width:160px;">time updated (UTC)</th>',
|
||||
'<th style="width:10%;"></th> ',
|
||||
'</thead>',
|
||||
'<tbody id="folder_list_body">',
|
||||
'<tr id="first_folder_item">',
|
||||
'<td>',
|
||||
'<a href="#<% if (upper_folder_id !== 0){ print("folders/" + upper_folder_id)} %>" title="Go to parent folder" class="btn_open_folder btn btn-default btn-xs">..<a>',
|
||||
'</td>',
|
||||
'<td></td>',
|
||||
'<td></td>',
|
||||
'<td></td>',
|
||||
'<td></td>',
|
||||
'<td></td>',
|
||||
'<td></td>',
|
||||
'<td></td>',
|
||||
'</tr>',
|
||||
'</tbody>',
|
||||
'</table>',
|
||||
'<div class="empty-folder-message" style="display:none;">',
|
||||
'This folder is either empty or you do not have proper access permissions to see the contents. If you expected something to show up',
|
||||
' please consult the <a href="https://wiki.galaxyproject.org/Admin/DataLibraries/LibrarySecurity" target="_blank">library security wikipage</a>',
|
||||
' or visit the <a href="https://biostar.usegalaxy.org/" target="_blank">Galaxy support site</a>.',
|
||||
'</div>'
|
||||
].join(''));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -53,8 +53,8 @@ var FolderRowView = Backbone.View.extend({
|
||||
template = this.templateRowFile();
|
||||
}
|
||||
} else {
|
||||
console.error('Unknown library item type found.');
|
||||
console.error(folder_item.get('type') || folder_item.get('model_class'));
|
||||
Galaxy.emit.error('Unknown library item type found.');
|
||||
Galaxy.emit.error(folder_item.get('type') || folder_item.get('model_class'));
|
||||
}
|
||||
this.setElement(template({content_item: folder_item, edit_mode: this.options.edit_mode, button_config: this.options.visibility_config}));
|
||||
this.$el.show();
|
||||
@@ -224,7 +224,7 @@ var FolderRowView = Backbone.View.extend({
|
||||
return _.template([
|
||||
'<tr class="folder_row light library-row" data-id="<%- content_item.id %>">',
|
||||
'<td>',
|
||||
'<span title="Folder" class="fa fa-folder-o"></span>',
|
||||
'<span title="Folder" class="fa fa-folder-o"/>',
|
||||
'</td>',
|
||||
'<td style="text-align: center; "><input style="margin: 0;" type="checkbox"></td>',
|
||||
'<% if(!edit_mode) { %>',
|
||||
@@ -245,15 +245,21 @@ var FolderRowView = Backbone.View.extend({
|
||||
'</td>',
|
||||
'<td>',
|
||||
'<% if(edit_mode) { %>', // start edit mode
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Save changes" class="primary-button btn-xs save_folder_btn" type="button" style="<% if(button_config.save_folder_btn === false) { print("display:none;") } %>"><span class="fa fa-floppy-o"> Save</span></button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Discard changes" class="primary-button btn-xs cancel_folder_btn" type="button" style="<% if(button_config.cancel_folder_btn === false) { print("display:none;") } %>"><span class="fa fa-times"> Cancel</span></button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Save changes" class="primary-button btn-xs save_folder_btn" type="button" style="<% if(button_config.save_folder_btn === false) { print("display:none;") } %>">',
|
||||
'<span class="fa fa-floppy-o"/>',
|
||||
' Save',
|
||||
'</button>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Discard changes" class="primary-button btn-xs cancel_folder_btn" type="button" style="<% if(button_config.cancel_folder_btn === false) { print("display:none;") } %>">',
|
||||
'<span class="fa fa-times"/>',
|
||||
' Cancel',
|
||||
'</button>',
|
||||
'<% } else if (!edit_mode){%>', // start no edit mode
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Modify \'<%- content_item.get("name") %>\'" class="primary-button btn-xs edit_folder_btn" type="button" style="<% if(button_config.edit_folder_btn === false) { print("display:none;") } %>">',
|
||||
'<span class="fa fa-pencil"></span>',
|
||||
'<span class="fa fa-pencil"/>',
|
||||
'</button>',
|
||||
'<a href="#/folders/<%- content_item.id %>/permissions">',
|
||||
'<button data-toggle="tooltip" data-placement="top" class="primary-button btn-xs permission_folder_btn" title="Manage \'<%- content_item.get("name") %>\'" style="<% if(button_config.permission_folder_btn === false) { print("display:none;") } %>">',
|
||||
'<span class="fa fa-group"></span>',
|
||||
'<span class="fa fa-group"/>',
|
||||
'</button>',
|
||||
'</a>',
|
||||
'<% } %>', //end no edit mode
|
||||
@@ -263,67 +269,107 @@ var FolderRowView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
templateRowFile: function(){
|
||||
tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<tr class="dataset_row light library-row" data-id="<%- content_item.id %>">');
|
||||
tmpl_array.push(' <td>');
|
||||
tmpl_array.push(' <span title="Dataset" class="fa fa-file-o"></span>');
|
||||
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><%- content_item.get("message") %></td>');
|
||||
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>');
|
||||
tmpl_array.push(' <% if (content_item.get("is_unrestricted")) { %><span data-toggle="tooltip" data-placement="top" title="Unrestricted dataset" style="color:grey;" class="fa fa-globe fa-lg"></span><% } %>');
|
||||
tmpl_array.push(' <% if (content_item.get("is_private")) { %><span data-toggle="tooltip" data-placement="top" title="Private dataset" style="color:grey;" class="fa fa-key fa-lg"></span><% } %>');
|
||||
tmpl_array.push(' <% if ((content_item.get("is_unrestricted") === false) && (content_item.get("is_private") === false)) { %><span data-toggle="tooltip" data-placement="top" title="Restricted dataset" style="color:grey;" class="fa fa-shield fa-lg"></span><% } %>');
|
||||
tmpl_array.push(' <% if (content_item.get("can_manage")) { %><a href="#folders/<%- content_item.get("folder_id") %>/datasets/<%- content_item.id %>/permissions"><button data-toggle="tooltip" data-placement="top" class="primary-button btn-xs permissions-dataset-btn" title="Manage permissions"><span class="fa fa-group"></span></button></a><% } %>');
|
||||
tmpl_array.push(' </td>');
|
||||
tmpl_array.push('</tr>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<tr class="dataset_row light library-row" data-id="<%- content_item.id %>">',
|
||||
'<td>',
|
||||
'<span title="Dataset" class="fa fa-file-o"/>',
|
||||
'</td>',
|
||||
'<td style="text-align: center; ">',
|
||||
'<input style="margin: 0;" type="checkbox">',
|
||||
'</td>',
|
||||
'<td>',
|
||||
'<a href="#folders/<%- content_item.get("folder_id") %>/datasets/<%- content_item.id %>" class="library-dataset">',
|
||||
'<%- content_item.get("name") %>',
|
||||
'<a>',
|
||||
'</td>',
|
||||
'<td><%- content_item.get("message") %></td>',
|
||||
'<td><%= _.escape(content_item.get("file_ext")) %></td>',
|
||||
'<td><%= _.escape(content_item.get("file_size")) %></td>',
|
||||
'<td><%= _.escape(content_item.get("update_time")) %></td>',
|
||||
'<td>',
|
||||
'<% if (content_item.get("is_unrestricted")) { %>',
|
||||
'<span data-toggle="tooltip" data-placement="top" title="Unrestricted dataset" style="color:grey;" class="fa fa-globe fa-lg"/>',
|
||||
'<% } %>',
|
||||
'<% if (content_item.get("is_private")) { %>',
|
||||
'<span data-toggle="tooltip" data-placement="top" title="Private dataset" style="color:grey;" class="fa fa-key fa-lg"/>',
|
||||
'<% } %>',
|
||||
'<% if ((content_item.get("is_unrestricted") === false) && (content_item.get("is_private") === false)) { %>',
|
||||
'<span data-toggle="tooltip" data-placement="top" title="Restricted dataset" style="color:grey;" class="fa fa-shield fa-lg"/>',
|
||||
'<% } %>',
|
||||
'<% if (content_item.get("can_manage")) { %>',
|
||||
'<a href="#folders/<%- content_item.get("folder_id") %>/datasets/<%- content_item.id %>/permissions">',
|
||||
'<button data-toggle="tooltip" data-placement="top" class="primary-button btn-xs permissions-dataset-btn" title="Manage permissions">',
|
||||
'<span class="fa fa-group"/>',
|
||||
'</button>',
|
||||
'</a>',
|
||||
'<% } %>',
|
||||
'</td>',
|
||||
'</tr>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateRowDeletedFile: function(){
|
||||
tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<tr class="active deleted_dataset library-row" data-id="<%- content_item.id %>">');
|
||||
tmpl_array.push(' <td>');
|
||||
tmpl_array.push(' <span title="Dataset" class="fa fa-file-o"></span>');
|
||||
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><%- content_item.get("message") %></td>');
|
||||
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" type="button" style="margin-left:1em;"><span class="fa fa-unlock"> Undelete</span></button></td>');
|
||||
tmpl_array.push('</tr>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<tr class="active deleted_dataset library-row" data-id="<%- content_item.id %>">',
|
||||
'<td>',
|
||||
'<span title="Dataset" class="fa fa-file-o"/>',
|
||||
'</td>',
|
||||
'<td></td>',
|
||||
'<td style="color:grey;">',
|
||||
'<%- content_item.get("name") %>',
|
||||
'</td>',
|
||||
'<td>',
|
||||
'<%- content_item.get("message") %>',
|
||||
'</td>',
|
||||
'<td>',
|
||||
'<%= _.escape(content_item.get("file_ext")) %>',
|
||||
'</td>',
|
||||
'<td>',
|
||||
'<%= _.escape(content_item.get("file_size")) %>',
|
||||
'</td>',
|
||||
'<td>',
|
||||
'<%= _.escape(content_item.get("update_time")) %>',
|
||||
'</td>',
|
||||
'<td>',
|
||||
'<span data-toggle="tooltip" data-placement="top" title="Marked deleted" style="color:grey;" class="fa fa-ban fa-lg"/>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Undelete <%- content_item.get("name") %>" class="primary-button btn-xs undelete_dataset_btn" type="button" style="margin-left:1em;">',
|
||||
'<span class="fa fa-unlock"/>',
|
||||
' Undelete',
|
||||
'</button>',
|
||||
'</td>',
|
||||
'</tr>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateRowDeletedFolder: function(){
|
||||
tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<tr class="active deleted_folder light library-row" data-id="<%- content_item.id %>">');
|
||||
tmpl_array.push(' <td>');
|
||||
tmpl_array.push(' <span title="Folder" class="fa fa-folder-o"></span>');
|
||||
tmpl_array.push(' </td>');
|
||||
tmpl_array.push(' <td></td>');
|
||||
tmpl_array.push(' <td style="color:grey;">');
|
||||
tmpl_array.push(' <%- content_item.get("name") %>');
|
||||
tmpl_array.push(' </td>');
|
||||
tmpl_array.push(' <td><%- content_item.get("description") %></td>');
|
||||
tmpl_array.push(' <td>folder</td>');
|
||||
tmpl_array.push(' <td></td>');
|
||||
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_folder_btn" type="button" style="margin-left:1em;"><span class="fa fa-unlock"> Undelete</span></button></td>');
|
||||
tmpl_array.push('</tr>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<tr class="active deleted_folder light library-row" data-id="<%- content_item.id %>">',
|
||||
'<td>',
|
||||
'<span title="Folder" class="fa fa-folder-o"/>',
|
||||
'</td>',
|
||||
'<td></td>',
|
||||
'<td style="color:grey;">',
|
||||
'<%- content_item.get("name") %>',
|
||||
'</td>',
|
||||
'<td>',
|
||||
'<%- content_item.get("description") %>',
|
||||
'</td>',
|
||||
'<td>',
|
||||
'folder',
|
||||
'</td>',
|
||||
'<td></td>',
|
||||
'<td>',
|
||||
'<%= _.escape(content_item.get("update_time")) %>',
|
||||
'</td>',
|
||||
'<td>',
|
||||
'<span data-toggle="tooltip" data-placement="top" title="Marked deleted" style="color:grey;" class="fa fa-ban fa-lg"/>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Undelete <%- content_item.get("name") %>" class="primary-button btn-xs undelete_folder_btn" type="button" style="margin-left:1em;">',
|
||||
'<span class="fa fa-unlock"/>',
|
||||
' Undelete',
|
||||
'</button>',
|
||||
'</td>',
|
||||
'</tr>'
|
||||
].join(''));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -21,7 +21,7 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
'click #include_deleted_datasets_chk' : 'checkIncludeDeleted',
|
||||
'click #toolbtn_bulk_delete' : 'deleteSelectedItems',
|
||||
'click .toolbtn-show-locinfo' : 'showLocInfo',
|
||||
'click #page_size_prompt' : 'showPageSizePrompt'
|
||||
'click .page_size_prompt' : 'showPageSizePrompt'
|
||||
|
||||
},
|
||||
|
||||
@@ -99,7 +99,7 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
renderPaginator: function( options ){
|
||||
this.options = _.extend( this.options, options );
|
||||
var paginator_template = this.templatePaginator();
|
||||
this.$el.find( '#folder_paginator' ).html( paginator_template({
|
||||
$("body").find( '.folder-paginator' ).html( paginator_template({
|
||||
id: this.options.id,
|
||||
show_page: parseInt( this.options.show_page ),
|
||||
page_count: parseInt( this.options.page_count ),
|
||||
@@ -245,10 +245,30 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
*/
|
||||
importAllIntoHistory : function (){
|
||||
this.modal.disableButton('Import');
|
||||
var history_id = $("select[name=dataset_import_bulk] option:selected").val();
|
||||
var history_name = $("select[name=dataset_import_bulk] option:selected").text();
|
||||
// we can save last used history to pre-select it next time
|
||||
this.options.last_used_history_id = history_id;
|
||||
var new_history_name = this.modal.$('input[name=history_name]').val();
|
||||
var that = this;
|
||||
if (new_history_name !== ''){
|
||||
$.post( Galaxy.root + 'api/histories', {name: new_history_name})
|
||||
.done(function( new_history ) {
|
||||
that.options.last_used_history_id = new_history.id;
|
||||
that.processImportToHistory(new_history.id, new_history.name);
|
||||
})
|
||||
.fail(function( xhr, status, error ) {
|
||||
mod_toastr.error('An error ocurred.');
|
||||
})
|
||||
.always(function() {
|
||||
that.modal.enableButton('Import');
|
||||
});
|
||||
} else {
|
||||
var history_id = $("select[name=dataset_import_bulk] option:selected").val();
|
||||
this.options.last_used_history_id = history_id;
|
||||
var history_name = $("select[name=dataset_import_bulk] option:selected").text();
|
||||
this.processImportToHistory(history_id, history_name);
|
||||
this.modal.enableButton('Import');
|
||||
}
|
||||
},
|
||||
|
||||
processImportToHistory: function( history_id, history_name ){
|
||||
var dataset_ids = [];
|
||||
var folder_ids = [];
|
||||
$('#folder_table').find(':checked').each(function(){
|
||||
@@ -406,6 +426,7 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
mod_utils.get({
|
||||
url : Galaxy.root + "api/datatypes?extension_only=False",
|
||||
success : function( datatypes ) {
|
||||
that.list_extensions = [];
|
||||
for (key in datatypes) {
|
||||
that.list_extensions.push({
|
||||
id : datatypes[key].extension,
|
||||
@@ -418,11 +439,13 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
return a.id > b.id ? 1 : a.id < b.id ? -1 : 0;
|
||||
});
|
||||
that.list_extensions.unshift(that.auto);
|
||||
}
|
||||
},
|
||||
cache : true
|
||||
});
|
||||
mod_utils.get({
|
||||
url : Galaxy.root + "api/genomes",
|
||||
success : function( genomes ) {
|
||||
that.list_genomes = [];
|
||||
for ( key in genomes ) {
|
||||
that.list_genomes.push({
|
||||
id : genomes[key][1],
|
||||
@@ -432,7 +455,8 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
that.list_genomes.sort(function(a, b) {
|
||||
return a.id > b.id ? 1 : a.id < b.id ? -1 : 0;
|
||||
});
|
||||
}
|
||||
},
|
||||
cache : true
|
||||
});
|
||||
},
|
||||
|
||||
@@ -482,6 +506,13 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
}
|
||||
});
|
||||
|
||||
$('.libimport-select-all').bind("click", function(){
|
||||
$('#jstree_browser').jstree("check_all");
|
||||
});
|
||||
$('.libimport-select-none').bind("click", function(){
|
||||
$('#jstree_browser').jstree("uncheck_all");
|
||||
});
|
||||
|
||||
this.renderSelectBoxes();
|
||||
options.disabled_jstree_element = 'folders';
|
||||
this.renderJstree( options );
|
||||
@@ -608,7 +639,7 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
this.modal.$el.find( '.modal-body' ).html( template( { folder_name : this.options.folder_name } ) );
|
||||
break;
|
||||
case "deleting_datasets":
|
||||
template = this.templateDeletingDatasetsProgressBar();
|
||||
template = this.templateDeletingItemsProgressBar();
|
||||
this.modal.$el.find( '.modal-body' ).html( template() );
|
||||
break;
|
||||
case "to_history":
|
||||
@@ -616,7 +647,7 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
this.modal.$el.find( '.modal-body' ).html( template( { history_name : options.history_name } ) );
|
||||
break;
|
||||
default:
|
||||
console.error( 'Wrong action specified.')
|
||||
Galaxy.emit.error( 'Wrong action specified.', 'datalibs');
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -637,7 +668,9 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
* @see renderJstree
|
||||
*/
|
||||
importFromJstreePath: function ( that, options ){
|
||||
var selected_nodes = $( '#jstree_browser' ).jstree().get_selected( true );
|
||||
var all_nodes = $( '#jstree_browser' ).jstree().get_selected( true );
|
||||
// remove the disabled elements that could have been trigerred with the 'select all'
|
||||
selected_nodes = _.filter(all_nodes, function(node){ return node.state.disabled == false; })
|
||||
var preserve_dirs = this.modal.$el.find( '.preserve-checkbox' ).is( ':checked' );
|
||||
var link_data = this.modal.$el.find( '.link-checkbox' ).is( ':checked' );
|
||||
var file_type = this.select_extension.value();
|
||||
@@ -731,7 +764,7 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
var popped_item = history_item_set.pop();
|
||||
if ( typeof popped_item == "undefined" ) {
|
||||
if ( this.options.chain_call_control.failed_number === 0 ){
|
||||
mod_toastr.success( 'Selected datasets imported into history. Click this to start analysing it.', '', { onclick: function() { window.location='/' } } );
|
||||
mod_toastr.success( 'Selected datasets imported into history. Click this to start analyzing it.', '', { onclick: function() { window.location='/' } } );
|
||||
} else if ( this.options.chain_call_control.failed_number === this.options.chain_call_control.total_number ){
|
||||
mod_toastr.error( 'There was an error and no datasets were imported into history.' );
|
||||
} else if ( this.options.chain_call_control.failed_number < this.options.chain_call_control.total_number ){
|
||||
@@ -868,8 +901,6 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
* @param {array} lddas_set array of lddas to delete
|
||||
*/
|
||||
chainCallDeletingItems: function( items_to_delete ){
|
||||
console.log('chaincall');
|
||||
console.log(items_to_delete);
|
||||
var self = this;
|
||||
this.deleted_items = new mod_library_model.Folder();
|
||||
var popped_item = items_to_delete.pop();
|
||||
@@ -897,11 +928,9 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
} else if (item.type === 'file' || item.model_class === 'LibraryDataset'){
|
||||
updated_item = new mod_library_model.Item( item );
|
||||
} else {
|
||||
console.error('Unknown library item type found.');
|
||||
console.error(item.type || item.model_class);
|
||||
Galaxy.emit.error('Unknown library item type found.', 'datalibs');
|
||||
Galaxy.emit.error(item.type || item.model_class, 'datalibs');
|
||||
}
|
||||
console.log('updated item')
|
||||
console.log(updated_item);
|
||||
Galaxy.libraries.folderListView.collection.add( updated_item );
|
||||
}
|
||||
self.chainCallDeletingItems( items_to_delete );
|
||||
@@ -930,13 +959,13 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
deleteSelectedItems: function(){
|
||||
var checkedValues = $('#folder_table').find(':checked');
|
||||
if(checkedValues.length === 0){
|
||||
mod_toastr.info('You must select at least one dataset for deletion.');
|
||||
mod_toastr.info('You must select at least one item for deletion.');
|
||||
} else {
|
||||
var template = this.templateDeletingDatasetsProgressBar();
|
||||
var template = this.templateDeletingItemsProgressBar();
|
||||
this.modal = Galaxy.modal;
|
||||
this.modal.show({
|
||||
closing_events : true,
|
||||
title : 'Deleting selected datasets',
|
||||
title : 'Deleting selected items',
|
||||
body : template({}),
|
||||
buttons : {
|
||||
'Close' : function() {Galaxy.modal.hide();}
|
||||
@@ -949,7 +978,7 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
var dataset_ids = [];
|
||||
var folder_ids = [];
|
||||
checkedValues.each(function(){
|
||||
if ($(this.parentElement.parentElement).data('id') !== '') {
|
||||
if ($(this.parentElement.parentElement).data('id') !== undefined) {
|
||||
if ($(this.parentElement.parentElement).data('id').substring(0,1) == 'F'){
|
||||
folder_ids.push($(this.parentElement.parentElement).data('id'));
|
||||
} else {
|
||||
@@ -972,7 +1001,6 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
var folder = new mod_library_model.FolderAsModel({id:folder_ids[i]});
|
||||
items_to_delete.push(folder);
|
||||
}
|
||||
console.log(items_to_delete);
|
||||
|
||||
this.options.chain_call_control.total_number = items_total.length;
|
||||
// call the recursive function to call ajax one after each other (request FIFO queue)
|
||||
@@ -1010,7 +1038,7 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
this.modal = Galaxy.modal;
|
||||
this.modal.show({
|
||||
closing_events : true,
|
||||
title : 'Location Information',
|
||||
title : 'Location Details',
|
||||
body : template({library: library, options: that.options}),
|
||||
buttons : {
|
||||
'Close' : function() {Galaxy.modal.hide();}
|
||||
@@ -1051,77 +1079,88 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
templateToolBar: function(){
|
||||
tmpl_array = [];
|
||||
|
||||
// CONTAINER START
|
||||
tmpl_array.push('<div class="library_style_container">');
|
||||
// TOOLBAR START
|
||||
tmpl_array.push(' <div id="library_toolbar">');
|
||||
tmpl_array.push('<form class="form-inline" role="form">');
|
||||
tmpl_array.push(' <span><strong>DATA LIBRARIES</strong></span>');
|
||||
tmpl_array.push(' <span id="folder_paginator" class="library-paginator">');
|
||||
return _.template([
|
||||
// container start
|
||||
'<div class="library_style_container">',
|
||||
// toolbar start
|
||||
'<div id="library_toolbar">',
|
||||
'<form class="form-inline" role="form">',
|
||||
'<span><strong>DATA LIBRARIES</strong></span>',
|
||||
// paginator will append here
|
||||
'<span class="library-paginator folder-paginator"></span>',
|
||||
'<div class="checkbox toolbar-item logged-dataset-manipulation" style="height: 20px; display:none;">',
|
||||
'<label>',
|
||||
'<input id="include_deleted_datasets_chk" type="checkbox">include deleted</input>',
|
||||
'</label>',
|
||||
'</div>',
|
||||
'<button style="display:none;" data-toggle="tooltip" data-placement="top" title="Create New Folder" id="toolbtn_create_folder" class="btn btn-default primary-button add-library-items toolbar-item" type="button">',
|
||||
'<span class="fa fa-plus"></span><span class="fa fa-folder"></span>',
|
||||
'</button>',
|
||||
'<% if(mutiple_add_dataset_options) { %>',
|
||||
'<div class="btn-group add-library-items" style="display:none;">',
|
||||
'<button title="Add Datasets to Current Folder" id="" type="button" class="primary-button dropdown-toggle" data-toggle="dropdown">',
|
||||
'<span class="fa fa-plus"></span><span class="fa fa-file"></span><span class="caret"></span>',
|
||||
'</button>',
|
||||
'<ul class="dropdown-menu" role="menu">',
|
||||
'<li><a href="#folders/<%= id %>/import/history"> from History</a></li>',
|
||||
'<% if(Galaxy.config.user_library_import_dir !== null) { %>',
|
||||
'<li><a href="#folders/<%= id %>/import/userdir"> from User Directory</a></li>',
|
||||
'<% } %>',
|
||||
'<% if(Galaxy.config.allow_library_path_paste) { %>',
|
||||
'<li class="divider"></li>',
|
||||
'<li class="dropdown-header">Admins only</li>',
|
||||
'<% if(Galaxy.config.library_import_dir !== null) { %>',
|
||||
'<li><a href="#folders/<%= id %>/import/importdir">from Import Directory</a></li>',
|
||||
'<% } %>',
|
||||
'<% if(Galaxy.config.allow_library_path_paste) { %>',
|
||||
'<li><a href="#folders/<%= id %>/import/path">from Path</a></li>',
|
||||
'<% } %>',
|
||||
'<% } %>',
|
||||
'</ul>',
|
||||
'</div>',
|
||||
'<% } else { %>',
|
||||
'<a data-placement="top" title="Add Datasets to Current Folder" style="display:none;" class="btn btn-default add-library-items" href="#folders/<%= id %>/import/history" role="button">',
|
||||
'<span class="fa fa-plus"></span><span class="fa fa-file"></span>',
|
||||
'</a>',
|
||||
'<% } %>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Import selected datasets into history" id="toolbtn_bulk_import" class="primary-button dataset-manipulation" style="margin-left: 0.5em; display:none;" type="button">',
|
||||
'<span class="fa fa-book"></span>',
|
||||
' to History',
|
||||
'</button>',
|
||||
'<div class="btn-group dataset-manipulation" style="margin-left: 0.5em; display:none; ">',
|
||||
'<button title="Download selected items as archive" type="button" class="primary-button dropdown-toggle" data-toggle="dropdown">',
|
||||
'<span class="fa fa-download"></span> Download <span class="caret"></span>',
|
||||
'</button>',
|
||||
'<ul class="dropdown-menu" role="menu">',
|
||||
'<li><a href="#/folders/<%= id %>/download/tgz">.tar.gz</a></li>',
|
||||
'<li><a href="#/folders/<%= id %>/download/tbz">.tar.bz</a></li>',
|
||||
'<li><a href="#/folders/<%= id %>/download/zip">.zip</a></li>',
|
||||
'</ul>',
|
||||
'</div>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Mark selected items deleted" id="toolbtn_bulk_delete" class="primary-button logged-dataset-manipulation" style="margin-left: 0.5em; display:none; " type="button">',
|
||||
'<span class="fa fa-times"></span> Delete</button>',
|
||||
'<button data-id="<%- id %>" data-toggle="tooltip" data-placement="top" title="Show location details" class="primary-button toolbtn-show-locinfo" style="margin-left: 0.5em;" type="button">',
|
||||
'<span class="fa fa-info-circle"></span>',
|
||||
' Details',
|
||||
'</button>',
|
||||
'<span class="help-button" data-toggle="tooltip" data-placement="top" title="Visit Libraries Wiki">',
|
||||
'<a href="https://wiki.galaxyproject.org/DataLibraries/screen/FolderContents" target="_blank">',
|
||||
'<button class="primary-button" type="button">',
|
||||
'<span class="fa fa-question-circle"></span>',
|
||||
' Help',
|
||||
'</button>',
|
||||
'</a>',
|
||||
'</span>',
|
||||
'</div>',
|
||||
'</form>',
|
||||
// toolbar end
|
||||
'<div id="folder_items_element">',
|
||||
'</div>',
|
||||
// container end
|
||||
'</div>',
|
||||
// paginator will append here
|
||||
tmpl_array.push(' </span>');
|
||||
tmpl_array.push('<div class="checkbox toolbar-item logged-dataset-manipulation" style="height: 20px; display:none;">');
|
||||
tmpl_array.push('<label>');
|
||||
tmpl_array.push('<input id="include_deleted_datasets_chk" type="checkbox"> include deleted </input>');
|
||||
tmpl_array.push('</label>');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push(' <button style="display:none;" data-toggle="tooltip" data-placement="top" title="Create New Folder" id="toolbtn_create_folder" class="btn btn-default primary-button add-library-items" type="button"><span class="fa fa-plus"></span> <span class="fa fa-folder"></span></button>');
|
||||
|
||||
tmpl_array.push('<% if(mutiple_add_dataset_options) { %>');
|
||||
tmpl_array.push(' <div class="btn-group add-library-items" style="display:none;">');
|
||||
tmpl_array.push(' <button title="Add Datasets to Current Folder" id="" type="button" class="primary-button dropdown-toggle" data-toggle="dropdown">');
|
||||
tmpl_array.push(' <span class="fa fa-plus"></span> <span class="fa fa-file"></span> <span class="caret"></span>');
|
||||
tmpl_array.push(' </button>');
|
||||
tmpl_array.push(' <ul class="dropdown-menu" role="menu">');
|
||||
tmpl_array.push(' <li><a href="#folders/<%= id %>/import/history"> from History</a></li>');
|
||||
tmpl_array.push('<% if(Galaxy.config.user_library_import_dir !== null) { %>');
|
||||
tmpl_array.push(' <li><a href="#folders/<%= id %>/import/userdir"> from User Directory</a></li>');
|
||||
tmpl_array.push('<% } %>');
|
||||
tmpl_array.push('<% if(Galaxy.config.allow_library_path_paste) { %>');
|
||||
|
||||
tmpl_array.push(' <li class="divider"></li>');
|
||||
tmpl_array.push(' <li class="dropdown-header">Admins only</li>');
|
||||
|
||||
tmpl_array.push('<% if(Galaxy.config.library_import_dir !== null) { %>');
|
||||
tmpl_array.push(' <li><a href="#folders/<%= id %>/import/importdir">from Import Directory</a></li>');
|
||||
tmpl_array.push('<% } %>');
|
||||
|
||||
tmpl_array.push('<% if(Galaxy.config.allow_library_path_paste) { %>');
|
||||
tmpl_array.push(' <li><a href="#folders/<%= id %>/import/path">from Path</a></li>');
|
||||
tmpl_array.push('<% } %>');
|
||||
tmpl_array.push('<% } %>');
|
||||
tmpl_array.push(' </ul>');
|
||||
tmpl_array.push(' </div>');
|
||||
tmpl_array.push('<% } else { %>');
|
||||
tmpl_array.push(' <a data-placement="top" title="Add Datasets to Current Folder" style="display:none;" class="btn btn-default add-library-items" href="#folders/<%= id %>/import/history" role="button"><span class="fa fa-plus"></span> <span class="fa fa-file"></span></span></a>');
|
||||
tmpl_array.push('<% } %>');
|
||||
|
||||
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Import selected datasets into history" id="toolbtn_bulk_import" class="primary-button dataset-manipulation" style="margin-left: 0.5em; display:none;" type="button"><span class="fa fa-book"></span> to History</button>');
|
||||
tmpl_array.push(' <div id="toolbtn_dl" class="btn-group dataset-manipulation" style="margin-left: 0.5em; display:none; ">');
|
||||
tmpl_array.push(' <button title="Download selected datasets as archive" id="drop_toggle" type="button" class="primary-button dropdown-toggle" data-toggle="dropdown">');
|
||||
tmpl_array.push(' <span class="fa fa-download"></span> Download <span class="caret"></span>');
|
||||
tmpl_array.push(' </button>');
|
||||
tmpl_array.push(' <ul class="dropdown-menu" role="menu">');
|
||||
tmpl_array.push(' <li><a href="#/folders/<%= id %>/download/tgz">.tar.gz</a></li>');
|
||||
tmpl_array.push(' <li><a href="#/folders/<%= id %>/download/tbz">.tar.bz</a></li>');
|
||||
tmpl_array.push(' <li><a href="#/folders/<%= id %>/download/zip">.zip</a></li>');
|
||||
tmpl_array.push(' </ul>');
|
||||
tmpl_array.push(' </div>');
|
||||
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Mark selected items deleted" id="toolbtn_bulk_delete" class="primary-button logged-dataset-manipulation" style="margin-left: 0.5em; display:none; " type="button"><span class="fa fa-times"></span> Delete</button>');
|
||||
tmpl_array.push(' <button data-id="<%- id %>" data-toggle="tooltip" data-placement="top" title="Show location information" class="primary-button toolbtn-show-locinfo" style="margin-left: 0.5em;" type="button"><span class="fa fa-info-circle"></span> Location Info</button>');
|
||||
tmpl_array.push(' <span class="help-button" data-toggle="tooltip" data-placement="top" title="Visit Libraries Wiki"><a href="https://wiki.galaxyproject.org/DataLibraries/screen/FolderContents" target="_blank"><button class="primary-button" type="button"><span class="fa fa-question-circle"></span> Help</button></a></span>');
|
||||
tmpl_array.push(' </div>');
|
||||
tmpl_array.push('</form>');
|
||||
|
||||
// TOOLBAR END
|
||||
tmpl_array.push(' <div id="folder_items_element">');
|
||||
tmpl_array.push(' </div>');
|
||||
tmpl_array.push('</div>');
|
||||
// CONTAINER END
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
'<div class="folder-paginator paginator-bottom"></div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateLocInfoInModal: function(){
|
||||
@@ -1188,220 +1227,208 @@ var FolderToolbarView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
templateNewFolderInModal: function(){
|
||||
tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<div id="new_folder_modal">');
|
||||
tmpl_array.push('<form>');
|
||||
tmpl_array.push('<input type="text" name="Name" value="" placeholder="Name">');
|
||||
tmpl_array.push('<input type="text" name="Description" value="" placeholder="Description">');
|
||||
tmpl_array.push('</form>');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div id="new_folder_modal">',
|
||||
'<form>',
|
||||
'<input type="text" name="Name" value="" placeholder="Name" autofocus>',
|
||||
'<input type="text" name="Description" value="" placeholder="Description">',
|
||||
'</form>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
|
||||
templateBulkImportInModal : function(){
|
||||
var tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<span id="history_modal_combo_bulk" style="width:90%; margin-left: 1em; margin-right: 1em; ">');
|
||||
tmpl_array.push('Select history: ');
|
||||
tmpl_array.push('<select id="dataset_import_bulk" name="dataset_import_bulk" style="width:50%; margin-bottom: 1em; "> ');
|
||||
tmpl_array.push(' <% _.each(histories, function(history) { %>'); //history select box
|
||||
tmpl_array.push(' <option value="<%= _.escape(history.get("id")) %>"><%= _.escape(history.get("name")) %></option>');
|
||||
tmpl_array.push(' <% }); %>');
|
||||
tmpl_array.push('</select>');
|
||||
tmpl_array.push('</span>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div>',
|
||||
'<div class="library-modal-item">',
|
||||
'Select history: ',
|
||||
'<select id="dataset_import_bulk" name="dataset_import_bulk" style="width:50%; margin-bottom: 1em; " autofocus>',
|
||||
'<% _.each(histories, function(history) { %>',
|
||||
'<option value="<%= _.escape(history.get("id")) %>"><%= _.escape(history.get("name")) %></option>',
|
||||
'<% }); %>',
|
||||
'</select>',
|
||||
'</div>',
|
||||
'<div class="library-modal-item">',
|
||||
'or create new: ',
|
||||
'<input type="text" name="history_name" value="" placeholder="name of the new history" style="width:50%;">',
|
||||
'</input>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateImportIntoHistoryProgressBar : function (){
|
||||
var tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<div class="import_text">');
|
||||
tmpl_array.push('Importing selected datasets to history <b><%= _.escape(history_name) %></b>');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('<div class="progress">');
|
||||
tmpl_array.push(' <div class="progress-bar progress-bar-import" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 00%;">');
|
||||
tmpl_array.push(' <span class="completion_span">0% Complete</span>');
|
||||
tmpl_array.push(' </div>');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div class="import_text">',
|
||||
'Importing selected items to history <b><%= _.escape(history_name) %></b>',
|
||||
'</div>',
|
||||
'<div class="progress">',
|
||||
'<div class="progress-bar progress-bar-import" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 00%;">',
|
||||
'<span class="completion_span">0% Complete</span>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateAddingDatasetsProgressBar: function (){
|
||||
var tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<div class="import_text">');
|
||||
tmpl_array.push('Adding selected datasets to library folder <b><%= _.escape(folder_name) %></b>');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('<div class="progress">');
|
||||
tmpl_array.push(' <div class="progress-bar progress-bar-import" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 00%;">');
|
||||
tmpl_array.push(' <span class="completion_span">0% Complete</span>');
|
||||
tmpl_array.push(' </div>');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div class="import_text">',
|
||||
'Adding selected datasets to library folder <b><%= _.escape(folder_name) %></b>',
|
||||
'</div>',
|
||||
'<div class="progress">',
|
||||
'<div class="progress-bar progress-bar-import" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 00%;">',
|
||||
'<span class="completion_span">0% Complete</span>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateDeletingDatasetsProgressBar: function (){
|
||||
var tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<div class="import_text">');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('<div class="progress">');
|
||||
tmpl_array.push(' <div class="progress-bar progress-bar-import" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 00%;">');
|
||||
tmpl_array.push(' <span class="completion_span">0% Complete</span>');
|
||||
tmpl_array.push(' </div>');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
templateDeletingItemsProgressBar: function (){
|
||||
return _.template([
|
||||
'<div class="import_text">',
|
||||
'</div>',
|
||||
'<div class="progress">',
|
||||
'<div class="progress-bar progress-bar-import" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 00%;">',
|
||||
'<span class="completion_span">0% Complete</span>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateBrowserModal: function(){
|
||||
var tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<div id="file_browser_modal">');
|
||||
tmpl_array.push('<div class="alert alert-info jstree-files-message">All files you select will be imported into the current folder.</div>');
|
||||
tmpl_array.push('<div class="alert alert-info jstree-folders-message" style="display:none;">All files within the selected folders and their subfolders will be imported into the current folder.</div>');
|
||||
|
||||
|
||||
tmpl_array.push('<div style="margin-bottom:1em;">');
|
||||
tmpl_array.push('<label class="radio-inline">');
|
||||
tmpl_array.push(' <input title="Switch to selecting files" type="radio" name="jstree-radio" value="jstree-disable-folders" checked="checked"> Files');
|
||||
tmpl_array.push('</label>');
|
||||
tmpl_array.push('<label class="radio-inline">');
|
||||
tmpl_array.push(' <input title="Switch to selecting folders" type="radio" name="jstree-radio" value="jstree-disable-files"> Folders');
|
||||
tmpl_array.push('</label>');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('<div style="margin-bottom:1em;">');
|
||||
tmpl_array.push('<label class="checkbox-inline jstree-preserve-structure" style="display:none;">');
|
||||
tmpl_array.push(' <input class="preserve-checkbox" type="checkbox" value="preserve_directory_structure">');
|
||||
tmpl_array.push('Preserve directory structure');
|
||||
tmpl_array.push(' </label>');
|
||||
tmpl_array.push('<label class="checkbox-inline jstree-link-files" style="display:none;">');
|
||||
tmpl_array.push(' <input class="link-checkbox" type="checkbox" value="link_files">');
|
||||
tmpl_array.push('Link files instead of copying');
|
||||
tmpl_array.push(' </label>');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('<div id="jstree_browser">');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
tmpl_array.push('<hr />');
|
||||
tmpl_array.push('<p>You can set extension type and genome for all imported datasets at once:</p>');
|
||||
tmpl_array.push('<div>');
|
||||
tmpl_array.push('Type: <span id="library_extension_select" class="library-extension-select" />');
|
||||
tmpl_array.push(' Genome: <span id="library_genome_select" class="library-genome-select" />');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div id="file_browser_modal">',
|
||||
'<div class="alert alert-info jstree-files-message">All files you select will be imported into the current folder ignoring their folder structure.</div>',
|
||||
'<div class="alert alert-info jstree-folders-message" style="display:none;">All files within the selected folders and their subfolders will be imported into the current folder.</div>',
|
||||
'<div style="margin-bottom:1em;">',
|
||||
'<label title="Switch to selecting files" class="radio-inline import-type-switch">',
|
||||
'<input type="radio" name="jstree-radio" value="jstree-disable-folders" checked="checked"> Choose Files',
|
||||
'</label>',
|
||||
'<label title="Switch to selecting folders" class="radio-inline import-type-switch">',
|
||||
'<input type="radio" name="jstree-radio" value="jstree-disable-files"> Choose Folders',
|
||||
'</label>',
|
||||
'</div>',
|
||||
'<div style="margin-bottom:1em;">',
|
||||
'<label class="checkbox-inline jstree-preserve-structure" style="display:none;">',
|
||||
'<input class="preserve-checkbox" type="checkbox" value="preserve_directory_structure">',
|
||||
'Preserve directory structure',
|
||||
'</label>',
|
||||
'<label class="checkbox-inline jstree-link-files" style="display:none;">',
|
||||
'<input class="link-checkbox" type="checkbox" value="link_files">',
|
||||
'Link files instead of copying',
|
||||
'</label>',
|
||||
'</div>',
|
||||
'<button title="Select all files" type="button" class="button primary-button libimport-select-all">',
|
||||
'Select all',
|
||||
'</button>',
|
||||
'<button title="Select no files" type="button" class="button primary-button libimport-select-none">',
|
||||
'Select none',
|
||||
'</button>',
|
||||
'<hr />',
|
||||
// append jstree object here
|
||||
'<div id="jstree_browser">',
|
||||
'</div>',
|
||||
'<hr />',
|
||||
'<p>You can set extension type and genome for all imported datasets at once:</p>',
|
||||
'<div>',
|
||||
'Type: <span id="library_extension_select" class="library-extension-select" />',
|
||||
'Genome: <span id="library_genome_select" class="library-genome-select" />',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateImportPathModal: function(){
|
||||
var tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<div id="file_browser_modal">');
|
||||
tmpl_array.push('<div class="alert alert-info jstree-folders-message">All files within the given folders and their subfolders will be imported into the current folder.</div>');
|
||||
|
||||
tmpl_array.push('<div style="margin-bottom: 0.5em;">');
|
||||
tmpl_array.push('<label class="checkbox-inline jstree-preserve-structure">');
|
||||
tmpl_array.push(' <input class="preserve-checkbox" type="checkbox" value="preserve_directory_structure">');
|
||||
tmpl_array.push('Preserve directory structure');
|
||||
tmpl_array.push(' </label>');
|
||||
tmpl_array.push('<label class="checkbox-inline jstree-link-files">');
|
||||
tmpl_array.push(' <input class="link-checkbox" type="checkbox" value="link_files">');
|
||||
tmpl_array.push('Link files instead of copying');
|
||||
tmpl_array.push(' </label>');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
tmpl_array.push('<textarea id="import_paths" class="form-control" rows="5" placeholder="Absolute paths (or paths relative to Galaxy root) separated by newline"></textarea>');
|
||||
|
||||
tmpl_array.push('<hr />');
|
||||
tmpl_array.push('<p>You can set extension type and genome for all imported datasets at once:</p>');
|
||||
tmpl_array.push('<div>');
|
||||
tmpl_array.push('Type: <span id="library_extension_select" class="library-extension-select" />');
|
||||
tmpl_array.push(' Genome: <span id="library_genome_select" class="library-genome-select" />');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div id="file_browser_modal">',
|
||||
'<div class="alert alert-info jstree-folders-message">All files within the given folders and their subfolders will be imported into the current folder.</div>',
|
||||
'<div style="margin-bottom: 0.5em;">',
|
||||
'<label class="checkbox-inline jstree-preserve-structure">',
|
||||
'<input class="preserve-checkbox" type="checkbox" value="preserve_directory_structure">',
|
||||
'Preserve directory structure',
|
||||
'</label>',
|
||||
'<label class="checkbox-inline jstree-link-files">',
|
||||
'<input class="link-checkbox" type="checkbox" value="link_files">',
|
||||
'Link files instead of copying',
|
||||
'</label>',
|
||||
'</div>',
|
||||
'<textarea id="import_paths" class="form-control" rows="5" placeholder="Absolute paths (or paths relative to Galaxy root) separated by newline" autofocus></textarea>',
|
||||
'<hr />',
|
||||
'<p>You can set extension type and genome for all imported datasets at once:</p>',
|
||||
'<div>',
|
||||
'Type: <span id="library_extension_select" class="library-extension-select" />',
|
||||
'Genome: <span id="library_genome_select" class="library-genome-select" />',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateAddFilesFromHistory: function (){
|
||||
var tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<div id="add_files_modal">');
|
||||
tmpl_array.push('<div id="history_modal_combo_bulk">');
|
||||
tmpl_array.push('Select history: ');
|
||||
tmpl_array.push('<select id="dataset_add_bulk" name="dataset_add_bulk" style="width:66%; "> ');
|
||||
tmpl_array.push(' <% _.each(histories, function(history) { %>'); //history select box
|
||||
tmpl_array.push(' <option value="<%= _.escape(history.get("id")) %>"><%= _.escape(history.get("name")) %></option>');
|
||||
tmpl_array.push(' <% }); %>');
|
||||
tmpl_array.push('</select>');
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('<br/>');
|
||||
tmpl_array.push('<div id="selected_history_content">');
|
||||
|
||||
tmpl_array.push('</div>');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div id="add_files_modal">',
|
||||
'<div>',
|
||||
'Select history: ',
|
||||
'<select id="dataset_add_bulk" name="dataset_add_bulk" style="width:66%; "> ',
|
||||
'<% _.each(histories, function(history) { %>', //history select box
|
||||
'<option value="<%= _.escape(history.get("id")) %>"><%= _.escape(history.get("name")) %></option>',
|
||||
'<% }); %>',
|
||||
'</select>',
|
||||
'</div>',
|
||||
'<br/>',
|
||||
'<div id="selected_history_content">',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateHistoryContents: function (){
|
||||
var tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<strong>Choose the datasets to import:</strong>');
|
||||
tmpl_array.push('<ul>');
|
||||
tmpl_array.push(' <% _.each(history_contents, function(history_item) { %>');
|
||||
tmpl_array.push(' <li data-id="<%= _.escape(history_item.get("id")) %>">');
|
||||
tmpl_array.push(' <input style="margin: 0;" type="checkbox"> <%= _.escape(history_item.get("hid")) %>: <%= _.escape(history_item.get("name")) %>');
|
||||
tmpl_array.push(' </li>');
|
||||
tmpl_array.push(' <% }); %>');
|
||||
tmpl_array.push('</ul>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<strong>Choose the datasets to import:</strong>',
|
||||
'<ul>',
|
||||
'<% _.each(history_contents, function(history_item) { %>',
|
||||
'<li data-id="<%= _.escape(history_item.get("id")) %>">',
|
||||
'<input style="margin: 0;" type="checkbox"> <%= _.escape(history_item.get("hid")) %>: <%= _.escape(history_item.get("name")) %>',
|
||||
'</li>',
|
||||
'<% }); %>',
|
||||
'</ul>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templatePaginator: function(){
|
||||
tmpl_array = [];
|
||||
|
||||
tmpl_array.push(' <ul class="pagination pagination-sm">');
|
||||
tmpl_array.push(' <% if ( ( show_page - 1 ) > 0 ) { %>');
|
||||
tmpl_array.push(' <% if ( ( show_page - 1 ) > page_count ) { %>'); // we are on higher page than total page count
|
||||
tmpl_array.push(' <li><a href="#folders/<%= id %>/page/1"><span class="fa fa-angle-double-left"></span></a></li>');
|
||||
tmpl_array.push(' <li class="disabled"><a href="#folders/<%= id %>/page/<% print( show_page ) %>"><% print( show_page - 1 ) %></a></li>');
|
||||
tmpl_array.push(' <% } else { %>');
|
||||
tmpl_array.push(' <li><a href="#folders/<%= id %>/page/1"><span class="fa fa-angle-double-left"></span></a></li>');
|
||||
tmpl_array.push(' <li><a href="#folders/<%= id %>/page/<% print( show_page - 1 ) %>"><% print( show_page - 1 ) %></a></li>');
|
||||
tmpl_array.push(' <% } %>');
|
||||
tmpl_array.push(' <% } else { %>'); // we are on the first page
|
||||
tmpl_array.push(' <li class="disabled"><a href="#folders/<%= id %>/page/1"><span class="fa fa-angle-double-left"></span></a></li>');
|
||||
tmpl_array.push(' <li class="disabled"><a href="#folders/<%= id %>/page/<% print( show_page ) %>"><% print( show_page - 1 ) %></a></li>');
|
||||
tmpl_array.push(' <% } %>');
|
||||
tmpl_array.push(' <li class="active">');
|
||||
tmpl_array.push(' <a href="#folders/<%= id %>/page/<% print( show_page ) %>"><% print( show_page ) %></a>');
|
||||
tmpl_array.push(' </li>');
|
||||
tmpl_array.push(' <% if ( ( show_page ) < page_count ) { %>');
|
||||
tmpl_array.push(' <li><a href="#folders/<%= id %>/page/<% print( show_page + 1 ) %>"><% print( show_page + 1 ) %></a></li>');
|
||||
tmpl_array.push(' <li><a href="#folders/<%= id %>/page/<% print( page_count ) %>"><span class="fa fa-angle-double-right"></span></a></li>');
|
||||
tmpl_array.push(' <% } else { %>');
|
||||
tmpl_array.push(' <li class="disabled"><a href="#folders/<%= id %>/page/<% print( show_page ) %>"><% print( show_page + 1 ) %></a></li>');
|
||||
tmpl_array.push(' <li class="disabled"><a href="#folders/<%= id %>/page/<% print( page_count ) %>"><span class="fa fa-angle-double-right"></span></a></li>');
|
||||
tmpl_array.push(' <% } %>');
|
||||
tmpl_array.push(' </ul>');
|
||||
tmpl_array.push(' <span>');
|
||||
tmpl_array.push(' showing <a data-toggle="tooltip" data-placement="top" title="Click to change the number of items on page" id="page_size_prompt"><%- items_shown %></a> of <%- total_items_count %> items');
|
||||
tmpl_array.push(' </span>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<ul class="pagination pagination-sm">',
|
||||
'<% if ( ( show_page - 1 ) > 0 ) { %>',
|
||||
'<% if ( ( show_page - 1 ) > page_count ) { %>', // we are on higher page than total page count
|
||||
'<li><a href="#folders/<%= id %>/page/1"><span class="fa fa-angle-double-left"></span></a></li>',
|
||||
'<li class="disabled"><a href="#folders/<%= id %>/page/<% print( show_page ) %>"><% print( show_page - 1 ) %></a></li>',
|
||||
'<% } else { %>',
|
||||
'<li><a href="#folders/<%= id %>/page/1"><span class="fa fa-angle-double-left"></span></a></li>',
|
||||
'<li><a href="#folders/<%= id %>/page/<% print( show_page - 1 ) %>"><% print( show_page - 1 ) %></a></li>',
|
||||
'<% } %>',
|
||||
'<% } else { %>', // we are on the first page
|
||||
'<li class="disabled"><a href="#folders/<%= id %>/page/1"><span class="fa fa-angle-double-left"></span></a></li>',
|
||||
'<li class="disabled"><a href="#folders/<%= id %>/page/<% print( show_page ) %>"><% print( show_page - 1 ) %></a></li>',
|
||||
'<% } %>',
|
||||
'<li class="active">',
|
||||
'<a href="#folders/<%= id %>/page/<% print( show_page ) %>"><% print( show_page ) %></a>',
|
||||
'</li>',
|
||||
'<% if ( ( show_page ) < page_count ) { %>',
|
||||
'<li><a href="#folders/<%= id %>/page/<% print( show_page + 1 ) %>"><% print( show_page + 1 ) %></a></li>',
|
||||
'<li><a href="#folders/<%= id %>/page/<% print( page_count ) %>"><span class="fa fa-angle-double-right"></span></a></li>',
|
||||
'<% } else { %>',
|
||||
'<li class="disabled"><a href="#folders/<%= id %>/page/<% print( show_page ) %>"><% print( show_page + 1 ) %></a></li>',
|
||||
'<li class="disabled"><a href="#folders/<%= id %>/page/<% print( page_count ) %>"><span class="fa fa-angle-double-right"></span></a></li>',
|
||||
'<% } %>',
|
||||
'</ul>',
|
||||
'<span>',
|
||||
' showing ',
|
||||
'<a data-toggle="tooltip" data-placement="top" title="Click to change the number of items on page" class="page_size_prompt">',
|
||||
'<%- items_shown %>',
|
||||
'</a>',
|
||||
' of <%- total_items_count %> items',
|
||||
'</span>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
@@ -242,95 +242,105 @@ var LibraryView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
templateLibrary : function(){
|
||||
var tmpl_array = [];
|
||||
// CONTAINER START
|
||||
tmpl_array.push('<div class="library_style_container">');
|
||||
|
||||
tmpl_array.push(' <div id="library_toolbar">');
|
||||
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Modify library item" class="btn btn-default toolbtn_modify_dataset primary-button" type="button"><span class="fa fa-pencil"></span> Modify</span></button>');
|
||||
tmpl_array.push(' <a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>/permissions"><button data-toggle="tooltip" data-placement="top" title="Manage permissions" class="btn btn-default toolbtn_change_permissions primary-button" type="button"><span class="fa fa-group"></span> Permissions</span></button></a>');
|
||||
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Share dataset" class="btn btn-default toolbtn-share-dataset primary-button" type="button"><span class="fa fa-share"></span> Share</span></button>');
|
||||
tmpl_array.push(' </div>');
|
||||
|
||||
// tmpl_array.push('<% if (item.get("is_unrestricted")) { %>');
|
||||
tmpl_array.push(' <p>');
|
||||
tmpl_array.push(' This dataset is unrestricted so everybody can access it. Just share the URL of this page. ');
|
||||
tmpl_array.push(' <button data-toggle="tooltip" data-placement="top" title="Copy to clipboard" class="btn btn-default btn-copy-link-to-clipboard primary-button" type="button"><span class="fa fa-clipboard"></span> To Clipboard</span></button> ');
|
||||
tmpl_array.push(' </p>');
|
||||
// tmpl_array.push('<% } %>');
|
||||
|
||||
tmpl_array.push('<div class="dataset_table">');
|
||||
|
||||
tmpl_array.push(' <table class="grid table table-striped table-condensed">');
|
||||
tmpl_array.push(' <tr>');
|
||||
tmpl_array.push(' <th scope="row" id="id_row" data-id="<%= _.escape(item.get("ldda_id")) %>">Name</th>');
|
||||
tmpl_array.push(' <td><%= _.escape(item.get("name")) %></td>');
|
||||
tmpl_array.push(' </tr>');
|
||||
|
||||
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("file_ext")) %></td>');
|
||||
tmpl_array.push(' </tr>');
|
||||
tmpl_array.push(' <% } %>');
|
||||
|
||||
tmpl_array.push(' </table>');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
// CONTAINER END
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div class="library_style_container">',
|
||||
'<div id="library_toolbar">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Modify library item" class="btn btn-default toolbtn_modify_dataset primary-button" type="button">',
|
||||
'<span class="fa fa-pencil"/>',
|
||||
' Modify',
|
||||
'</button>',
|
||||
'<a href="#folders/<%- item.get("folder_id") %>/datasets/<%- item.id %>/permissions">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Manage permissions" class="btn btn-default toolbtn_change_permissions primary-button" type="button">',
|
||||
'<span class="fa fa-group"/>',
|
||||
' Permissions',
|
||||
'</button>',
|
||||
'</a>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Share dataset" class="btn btn-default toolbtn-share-dataset primary-button" type="button">',
|
||||
'<span class="fa fa-share"/>',
|
||||
' Share',
|
||||
'</button>',
|
||||
'</div>',
|
||||
'<p>',
|
||||
'This dataset is unrestricted so everybody can access it. Just share the URL of this page. ',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Copy to clipboard" class="btn btn-default btn-copy-link-to-clipboard primary-button" type="button">',
|
||||
'<span class="fa fa-clipboard"/>',
|
||||
' To Clipboard',
|
||||
'</button> ',
|
||||
'</p>',
|
||||
'<div class="dataset_table">',
|
||||
'<table class="grid table table-striped table-condensed">',
|
||||
'<tr>',
|
||||
'<th scope="row" id="id_row" data-id="<%= _.escape(item.get("ldda_id")) %>">',
|
||||
'Name',
|
||||
'</th>',
|
||||
'<td>',
|
||||
'<%= _.escape(item.get("name")) %>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<% if (item.get("file_ext")) { %>',
|
||||
'<tr>',
|
||||
'<th scope="row">Data type</th>',
|
||||
'<td>',
|
||||
'<%= _.escape(item.get("file_ext")) %>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<% } %>',
|
||||
'</table>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateLibraryPermissions : function(){
|
||||
var tmpl_array = [];
|
||||
// CONTAINER START
|
||||
tmpl_array.push('<div class="library_style_container">');
|
||||
|
||||
|
||||
tmpl_array.push(' <div id="library_toolbar">');
|
||||
tmpl_array.push(' <a href="#"><button data-toggle="tooltip" data-placement="top" title="Go back to the list of Libraries" class="btn btn-default primary-button" type="button"><span class="fa fa-list"></span> Libraries</span></button></a>');
|
||||
tmpl_array.push(' </div>');
|
||||
|
||||
tmpl_array.push('<h1>Library: <%= _.escape(library.get("name")) %></h1>');
|
||||
|
||||
tmpl_array.push('<div class="alert alert-warning">');
|
||||
tmpl_array.push('<% if (is_admin) { %>');
|
||||
tmpl_array.push('You are logged in as an <strong>administrator</strong> therefore you can manage any library on this Galaxy instance. Please make sure you understand the consequences.');
|
||||
tmpl_array.push('<% } else { %>');
|
||||
tmpl_array.push('You can assign any number of roles to any of the following permission types. However please read carefully the implications of such actions.');
|
||||
tmpl_array.push('<% }%>');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
tmpl_array.push('<div class="dataset_table">');
|
||||
|
||||
tmpl_array.push('<h2>Library permissions</h2>');
|
||||
|
||||
tmpl_array.push('<h4>Roles that can access the library</h4>');
|
||||
tmpl_array.push('<div id="access_perm" class="access_perm roles-selection"></div>');
|
||||
tmpl_array.push('<div class="alert alert-info roles-selection">User with <strong>any</strong> of these roles can access this library. If there are no access roles set on the library it is considered <strong>unrestricted</strong>.</div>');
|
||||
|
||||
tmpl_array.push('<h4>Roles that can manage permissions on this library</h4>');
|
||||
tmpl_array.push('<div id="manage_perm" class="manage_perm roles-selection"></div>');
|
||||
tmpl_array.push('<div class="alert alert-info roles-selection">User with <strong>any</strong> of these roles can manage permissions on this library (includes giving access).</div>');
|
||||
|
||||
tmpl_array.push('<h4>Roles that can add items to this library</h4>');
|
||||
tmpl_array.push('<div id="add_perm" class="add_perm roles-selection"></div>');
|
||||
tmpl_array.push('<div class="alert alert-info roles-selection">User with <strong>any</strong> of these roles can add items to this library (folders and datasets).</div>');
|
||||
|
||||
tmpl_array.push('<h4>Roles that can modify this library</h4>');
|
||||
tmpl_array.push('<div id="modify_perm" class="modify_perm roles-selection"></div>');
|
||||
tmpl_array.push('<div class="alert alert-info roles-selection">User with <strong>any</strong> of these roles can modify this library (name, synopsis, etc.).</div>');
|
||||
|
||||
tmpl_array.push('<button data-toggle="tooltip" data-placement="top" title="Save modifications made on this page" class="btn btn-default toolbtn_save_permissions primary-button" type="button"><span class="fa fa-floppy-o"></span> Save</span></button>');
|
||||
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
// CONTAINER END
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
return _.template([
|
||||
'<div class="library_style_container">',
|
||||
'<div id="library_toolbar">',
|
||||
'<a href="#">',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Go back to the list of Libraries" class="btn btn-default primary-button" type="button">',
|
||||
'<span class="fa fa-list"/>',
|
||||
' Libraries',
|
||||
'</button>',
|
||||
'</a>',
|
||||
'</div>',
|
||||
'<h1>',
|
||||
'Library: <%= _.escape(library.get("name")) %>',
|
||||
'</h1>',
|
||||
'<div class="alert alert-warning">',
|
||||
'<% if (is_admin) { %>',
|
||||
'You are logged in as an <strong>administrator</strong> therefore you can manage any library on this Galaxy instance. Please make sure you understand the consequences.',
|
||||
'<% } else { %>',
|
||||
'You can assign any number of roles to any of the following permission types. However please read carefully the implications of such actions.',
|
||||
'<% }%>',
|
||||
'</div>',
|
||||
'<div class="dataset_table">',
|
||||
'<h2>Library permissions</h2>',
|
||||
'<h4>Roles that can access the library</h4>',
|
||||
'<div id="access_perm" class="access_perm roles-selection"/>',
|
||||
'<div class="alert alert-info roles-selection">',
|
||||
'User with <strong>any</strong> of these roles can access this library. If there are no access roles set on the library it is considered <strong>unrestricted</strong>.',
|
||||
'</div>',
|
||||
'<h4>Roles that can manage permissions on this library</h4>',
|
||||
'<div id="manage_perm" class="manage_perm roles-selection"/>',
|
||||
'<div class="alert alert-info roles-selection">',
|
||||
'User with <strong>any</strong> of these roles can manage permissions on this library (includes giving access).',
|
||||
'</div>',
|
||||
'<h4>Roles that can add items to this library</h4>',
|
||||
'<div id="add_perm" class="add_perm roles-selection"/>',
|
||||
'<div class="alert alert-info roles-selection">',
|
||||
'User with <strong>any</strong> of these roles can add items to this library (folders and datasets).',
|
||||
'</div>',
|
||||
'<h4>Roles that can modify this library</h4>',
|
||||
'<div id="modify_perm" class="modify_perm roles-selection"/>',
|
||||
'<div class="alert alert-info roles-selection">',
|
||||
'User with <strong>any</strong> of these roles can modify this library (name, synopsis, etc.).',
|
||||
'</div>',
|
||||
'<button data-toggle="tooltip" data-placement="top" title="Save modifications made on this page" class="btn btn-default toolbtn_save_permissions primary-button" type="button">',
|
||||
'<span class="fa fa-floppy-o"/>',
|
||||
' Save',
|
||||
'</button>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
].join(''));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -25,7 +25,8 @@ var LibraryListView = Backbone.View.extend({
|
||||
|
||||
defaults: {
|
||||
page_count: null,
|
||||
show_page: null
|
||||
show_page: null,
|
||||
all_fetched: false
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -39,6 +40,7 @@ var LibraryListView = Backbone.View.extend({
|
||||
this.modal = null;
|
||||
// collection of {Item}s
|
||||
this.collection = new mod_library_model.Libraries();
|
||||
this.collection.url = this.collection.urlRoot + '?deleted=false';
|
||||
this.collection.fetch({
|
||||
success: function(){
|
||||
that.render();
|
||||
@@ -119,6 +121,29 @@ var LibraryListView = Backbone.View.extend({
|
||||
$( "#center" ).css( 'overflow','auto' );
|
||||
},
|
||||
|
||||
fetchDeleted: function(){
|
||||
if (this.options.all_fetched){
|
||||
this.render();
|
||||
} else{
|
||||
var that = this;
|
||||
this.collection.url = this.collection.urlRoot + '?deleted=true';
|
||||
this.collection.fetch({
|
||||
remove: false,
|
||||
success: function(){
|
||||
that.options.all_fetched = true;
|
||||
that.render();
|
||||
},
|
||||
error: function( model, response ){
|
||||
if ( typeof response.responseJSON !== "undefined" ){
|
||||
mod_toastr.error( response.responseJSON.err_msg );
|
||||
} else {
|
||||
mod_toastr.error( 'An error ocurred.' );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Render all given models as rows in the library list
|
||||
* @param {array} libraries_to_render array of library models to render
|
||||
@@ -197,32 +222,41 @@ var LibraryListView = Backbone.View.extend({
|
||||
// MMMMMMMMMMMMMMMMMM
|
||||
|
||||
templateLibraryList: function(){
|
||||
tmpl_array = [];
|
||||
|
||||
tmpl_array.push('<div class="library_container table-responsive">');
|
||||
tmpl_array.push('<% if(length === 0) { %>');
|
||||
tmpl_array.push('<% if(search_term.length > 0) { %>');
|
||||
tmpl_array.push('<div>There are no libraries matching your search. Try different keyword.</div>');
|
||||
tmpl_array.push('<% } else{ %>');
|
||||
tmpl_array.push('<div>There are no libraries visible to you here. If you expected some to show up please consult the <a href="https://wiki.galaxyproject.org/Admin/DataLibraries/LibrarySecurity" target="_blank">library security wikipage</a> or visit the <a href="https://biostar.usegalaxy.org/" target="_blank">Galaxy support site</a>.</div>');
|
||||
tmpl_array.push('<% }%>');
|
||||
tmpl_array.push('<% } else{ %>');
|
||||
tmpl_array.push('<table class="grid table table-condensed">');
|
||||
tmpl_array.push(' <thead>');
|
||||
tmpl_array.push(' <th style="width:30%;"><a class="sort-libraries-link" title="Click to reverse order" href="#">name</a> <span title="Sorted alphabetically" class="fa fa-sort-alpha-<%- order %>"></span></th>');
|
||||
tmpl_array.push(' <th style="width:22%;">description</th>');
|
||||
tmpl_array.push(' <th style="width:22%;">synopsis</th> ');
|
||||
tmpl_array.push(' <th style="width:26%;"></th>');
|
||||
tmpl_array.push(' </thead>');
|
||||
tmpl_array.push(' <tbody id="library_list_body">');
|
||||
// library item views will attach here
|
||||
tmpl_array.push(' </tbody>');
|
||||
tmpl_array.push('</table>');
|
||||
tmpl_array.push('<% }%>');
|
||||
tmpl_array.push('</div>');
|
||||
|
||||
return _.template(tmpl_array.join(''));
|
||||
},
|
||||
return _.template([
|
||||
'<div class="library_container table-responsive">',
|
||||
'<% if(length === 0) { %>',
|
||||
'<% if(search_term.length > 0) { %>',
|
||||
'<div>',
|
||||
'There are no libraries matching your search. Try different keyword.',
|
||||
'</div>',
|
||||
'<% } else{ %>',
|
||||
'<div>',
|
||||
'There are no libraries visible to you here. If you expected some to show up please consult the',
|
||||
' <a href="https://wiki.galaxyproject.org/Admin/DataLibraries/LibrarySecurity" target="_blank">library security wikipage</a>',
|
||||
' or visit the <a href="https://biostar.usegalaxy.org/" target="_blank">Galaxy support site</a>.',
|
||||
'</div>',
|
||||
'<% }%>',
|
||||
'<% } else{ %>',
|
||||
'<table class="grid table table-condensed">',
|
||||
'<thead>',
|
||||
'<th style="width:30%;">',
|
||||
'<a class="sort-libraries-link" title="Click to reverse order" href="#">',
|
||||
'name',
|
||||
'</a>',
|
||||
'<span title="Sorted alphabetically" class="fa fa-sort-alpha-<%- order %>"/>',
|
||||
'</th>',
|
||||
'<th style="width:22%;">description</th>',
|
||||
'<th style="width:22%;">synopsis</th> ',
|
||||
'<th style="width:26%;"></th>',
|
||||
'</thead>',
|
||||
'<tbody id="library_list_body">',
|
||||
// library item views will attach here
|
||||
'</tbody>',
|
||||
'</table>',
|
||||
'<% }%>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ var LibraryToolbarView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
events: {
|
||||
'click #create_new_library_btn' : 'showLibraryModal',
|
||||
'click #create_new_library_btn' : 'createLibraryFromModal',
|
||||
'click #include_deleted_chk' : 'includeDeletedChecked',
|
||||
'click #lib_page_size_prompt' : 'showPageSizePrompt',
|
||||
'keyup .library-search-input' : 'searchLibraries'
|
||||
@@ -58,7 +58,7 @@ var LibraryToolbarView = Backbone.View.extend({
|
||||
* User clicked on 'New library' button. Show modal to
|
||||
* satisfy the wish.
|
||||
*/
|
||||
showLibraryModal : function (event){
|
||||
createLibraryFromModal : function (event){
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var self = this;
|
||||
@@ -148,7 +148,7 @@ var LibraryToolbarView = Backbone.View.extend({
|
||||
includeDeletedChecked: function( event ){
|
||||
if (event.target.checked){
|
||||
Galaxy.libraries.preferences.set( { 'with_deleted': true } );
|
||||
Galaxy.libraries.libraryListView.render();
|
||||
Galaxy.libraries.libraryListView.fetchDeleted();
|
||||
} else{
|
||||
Galaxy.libraries.preferences.set( { 'with_deleted': false } );
|
||||
Galaxy.libraries.libraryListView.render();
|
||||
@@ -182,7 +182,9 @@ var LibraryToolbarView = Backbone.View.extend({
|
||||
'<% if(admin_user === true) { %>',
|
||||
'<div class="checkbox toolbar-item" style="height: 20px;">',
|
||||
'<label>',
|
||||
'<input id="include_deleted_chk" type="checkbox"> include deleted </input>',
|
||||
'<input id="include_deleted_chk" type="checkbox">',
|
||||
' include deleted ',
|
||||
'</input>',
|
||||
'</label>',
|
||||
'</div>',
|
||||
'<span class="toolbar-item" data-toggle="tooltip" data-placement="top" title="Create New Library">',
|
||||
@@ -240,7 +242,7 @@ var LibraryToolbarView = Backbone.View.extend({
|
||||
return _.template([
|
||||
'<div id="new_library_modal">',
|
||||
'<form>',
|
||||
'<input type="text" name="Name" value="" placeholder="Name">',
|
||||
'<input type="text" name="Name" value="" placeholder="Name" autofocus>',
|
||||
'<input type="text" name="Description" value="" placeholder="Description">',
|
||||
'<input type="text" name="Synopsis" value="" placeholder="Synopsis">',
|
||||
'</form>',
|
||||
|
||||
@@ -19,7 +19,7 @@ define([], function() {
|
||||
});
|
||||
|
||||
var Libraries = Backbone.Collection.extend({
|
||||
url: Galaxy.root + 'api/libraries',
|
||||
urlRoot: Galaxy.root + 'api/libraries',
|
||||
|
||||
model: Library,
|
||||
|
||||
@@ -182,7 +182,7 @@ define([], function() {
|
||||
var file_item = new Ldda(obj.folder_contents[i])
|
||||
this.get("folder").add(file_item);
|
||||
} else{
|
||||
console.error('Unknown folder item type encountered while parsing response.');
|
||||
Galaxy.emit.error('Unknown folder item type encountered while parsing response.');
|
||||
}
|
||||
};
|
||||
return obj;
|
||||
|
||||
@@ -79,7 +79,12 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view',
|
||||
url : build_url,
|
||||
data : build_data,
|
||||
success : function(new_model) {
|
||||
self._buildForm(new_model['tool_model'] || new_model);
|
||||
new_model = new_model.tool_model || new_model;
|
||||
if( !new_model.display ) {
|
||||
window.location = Galaxy.root;
|
||||
return;
|
||||
}
|
||||
self._buildForm(new_model);
|
||||
!hide_message && self.message.update({
|
||||
status : 'success',
|
||||
message : 'Now you are using \'' + self.options.name + '\' version ' + self.options.version + ', id \'' + self.options.id + '\'.',
|
||||
@@ -87,11 +92,12 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view',
|
||||
});
|
||||
Galaxy.emit.debug('tool-form-base::initialize()', 'Initial tool model ready.', new_model);
|
||||
process.resolve();
|
||||
|
||||
},
|
||||
error : function(response) {
|
||||
error : function(response, xhr) {
|
||||
var error_message = ( response && response.err_msg ) || 'Uncaught error.';
|
||||
if ( self.$el.is(':empty') ) {
|
||||
if ( xhr.status == 401 ) {
|
||||
window.location = Galaxy.root + 'user/login?' + $.param({ redirect : Galaxy.root + '?tool_id=' + self.options.id });
|
||||
} else if ( self.$el.is(':empty') ) {
|
||||
self.$el.prepend((new Ui.Message({
|
||||
message : error_message,
|
||||
status : 'danger',
|
||||
|
||||
@@ -98,7 +98,7 @@ define(['utils/utils', 'mvc/tool/tool-form-base'],
|
||||
type : 'boolean',
|
||||
value : String(Boolean(this.post_job_actions['EmailAction' + output_id])),
|
||||
ignore : 'false',
|
||||
help : 'An email notification will be send when the job has completed.',
|
||||
help : 'An email notification will be sent when the job has completed.',
|
||||
payload : {
|
||||
'host' : window.location.host
|
||||
}
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-select-default' ], function( Utils, Ui, Select ) {
|
||||
|
||||
/** List of available content selectors options */
|
||||
var Configurations = {
|
||||
'data': [
|
||||
{ src: 'hda', icon: 'fa-file-o', tooltip: 'Single dataset', batchmode: false, multiple: false },
|
||||
{ src: 'hda', icon: 'fa-files-o', tooltip: 'Multiple datasets', batchmode: true, multiple: true },
|
||||
{ src: 'hdca', icon: 'fa-folder-o', tooltip: 'Dataset collection', batchmode: true, multiple: false } ],
|
||||
'data_multiple': [
|
||||
{ src: 'hda', icon: 'fa-files-o', tooltip: 'Multiple datasets', batchmode: false, multiple: true },
|
||||
{ src: 'hdca', icon: 'fa-folder-o', tooltip: 'Dataset collection', batchmode: false, multiple: false } ],
|
||||
'data_collection': [
|
||||
{ src: 'hdca', icon: 'fa-folder-o', tooltip: 'Dataset collection', batchmode: false, multiple: false } ],
|
||||
'workflow_data': [
|
||||
{ src: 'hda', icon: 'fa-file-o', tooltip: 'Single dataset', batchmode: false, multiple: false },
|
||||
{ src: 'hda', icon: 'fa-files-o', tooltip: 'Multiple datasets', batchmode: true, multiple: true } ],
|
||||
'workflow_collection': [
|
||||
{ src: 'hdca', icon: 'fa-folder-o', tooltip: 'Dataset collection', batchmode: false, multiple: false },
|
||||
{ src: 'hdca', icon: 'fa-folder', tooltip: 'Multiple collections', batchmode: true, multiple: true } ]
|
||||
};
|
||||
|
||||
/** View for hda and hdca content selector ui elements */
|
||||
var View = Backbone.View.extend({
|
||||
initialize : function( options ) {
|
||||
var self = this;
|
||||
this.model = options && options.model || new Backbone.Model({
|
||||
src_labels: { 'hda' : 'dataset', 'hdca': 'dataset collection' }
|
||||
}).set( options );
|
||||
this.setElement( $( '<div/>' ).addClass( 'ui-select-content' ) );
|
||||
this.$batch = $( '<div/>' ).addClass( 'ui-form-info' )
|
||||
.append( $( '<i/>' ).addClass( 'fa fa-sitemap' ) )
|
||||
.append( $( '<span/>' ).html( 'This is a batch mode input field. A separate job will be triggered for each dataset.' ) );
|
||||
|
||||
// track current history elements
|
||||
this.history = {};
|
||||
|
||||
// add listeners
|
||||
this.listenTo( this.model, 'change:data', this._changeData, this );
|
||||
this.listenTo( this.model, 'change:wait', this._changeWait, this );
|
||||
this.listenTo( this.model, 'change:current', this._changeCurrent, this );
|
||||
this.listenTo( this.model, 'change:value', this._changeValue, this );
|
||||
this.listenTo( this.model, 'change:type change:optional change:multiple change:extensions', this._changeType, this );
|
||||
this.render();
|
||||
|
||||
// add change event
|
||||
this.on( 'change', function() { options.onchange && options.onchange( self.value() ) } );
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this._changeType();
|
||||
this._changeValue();
|
||||
this._changeWait();
|
||||
},
|
||||
|
||||
/** Indicate that select fields are being updated */
|
||||
wait: function() {
|
||||
this.model.set( 'wait', true );
|
||||
},
|
||||
|
||||
/** Indicate that the options update has been completed */
|
||||
unwait: function() {
|
||||
this.model.set( 'wait', false );
|
||||
},
|
||||
|
||||
/** Update data representing selectable options */
|
||||
update: function( options ) {
|
||||
this.model.set( 'data', options );
|
||||
},
|
||||
|
||||
/** Return the currently selected dataset values */
|
||||
value: function ( new_value ) {
|
||||
new_value !== undefined && this.model.set( 'value', new_value );
|
||||
var current = this.model.get( 'current' );
|
||||
if ( this.config[ current ] ) {
|
||||
var id_list = this.fields[ current ].value();
|
||||
if (id_list !== null) {
|
||||
id_list = $.isArray( id_list ) ? id_list : [ id_list ];
|
||||
if ( id_list.length > 0 ) {
|
||||
var result = { batch: this._batch(), values: [] };
|
||||
for ( var i in id_list ) {
|
||||
var details = this.history[ id_list[ i ] + '_' + this.config[ current ].src ];
|
||||
if ( details ) {
|
||||
result.values.push( details );
|
||||
} else {
|
||||
Galaxy.emit.debug( 'tools-select-content::value()', 'Requested details not found for \'' + id_list[ i ] + '\'.' );
|
||||
return null;
|
||||
}
|
||||
}
|
||||
result.values.sort( function( a, b ) { return a.hid - b.hid } );
|
||||
return result;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Galaxy.emit.debug( 'tools-select-content::value()', 'Invalid value/source \'' + new_value + '\'.' );
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
/** Change of current select field */
|
||||
_changeCurrent: function() {
|
||||
var self = this;
|
||||
_.each( this.fields, function( field, i ) {
|
||||
if ( self.model.get( 'current' ) == i ) {
|
||||
field.$el.show();
|
||||
self.$batch[ self.config[ i ].batchmode && 'show' || 'hide' ]();
|
||||
self.button_type.value( i );
|
||||
} else {
|
||||
field.$el.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** Change of type */
|
||||
_changeType: function() {
|
||||
var self = this;
|
||||
|
||||
// identify selector type
|
||||
var config_id = String( this.model.get( 'type' ) ) + ( this.model.get( 'multiple' ) ? '_multiple' : '' );
|
||||
if ( Configurations[ config_id ] ) {
|
||||
this.config = Configurations[ config_id ];
|
||||
} else {
|
||||
this.config = Configurations[ 'data' ];
|
||||
Galaxy.emit.debug( 'tools-select-content::_changeType()', 'Invalid configuration/type id \'' + config_id + '\'.' );
|
||||
}
|
||||
|
||||
// prepare extension component of error message
|
||||
var extensions = Utils.textify( this.model.get( 'extensions' ) );
|
||||
var src_labels = this.model.get( 'src_labels' );
|
||||
|
||||
// build views
|
||||
this.fields = [];
|
||||
this.button_data = [];
|
||||
_.each( this.config, function( c, i ) {
|
||||
self.button_data.push({
|
||||
value : i,
|
||||
icon : c.icon,
|
||||
tooltip : c.tooltip
|
||||
});
|
||||
self.fields.push(
|
||||
new Select.View({
|
||||
optional : self.model.get( 'optional' ),
|
||||
multiple : c.multiple,
|
||||
searchable : !c.multiple,
|
||||
error_text : 'No ' + ( extensions ? extensions + ' ' : '' ) + ( src_labels[ c.src ] || 'content' ) + ' available.',
|
||||
onchange : function() {
|
||||
self.trigger( 'change' );
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
this.button_type = new Ui.RadioButton.View({
|
||||
value : this.model.get( 'current' ),
|
||||
data : this.button_data,
|
||||
onchange: function( value ) {
|
||||
self.model.set( 'current', value );
|
||||
self.trigger( 'change' );
|
||||
}
|
||||
});
|
||||
|
||||
// append views
|
||||
this.$el.empty();
|
||||
var button_width = 0;
|
||||
if ( this.fields.length > 1 ) {
|
||||
this.$el.append( this.button_type.$el );
|
||||
button_width = Math.max( 0, this.fields.length * 35 ) + 'px';
|
||||
}
|
||||
_.each( this.fields, function( field ) {
|
||||
self.$el.append( field.$el.css( { 'margin-left': button_width } ) );
|
||||
});
|
||||
this.$el.append( this.$batch.css( { 'margin-left': button_width } ) );
|
||||
this.model.set( 'current', 0 );
|
||||
this._changeCurrent();
|
||||
this._changeData();
|
||||
},
|
||||
|
||||
/** Change of wait flag */
|
||||
_changeWait: function() {
|
||||
var self = this;
|
||||
_.each( this.fields, function( field ) { field[ self.model.get( 'wait' ) ? 'wait' : 'unwait' ]() } );
|
||||
},
|
||||
|
||||
/** Change of available options */
|
||||
_changeData: function() {
|
||||
var options = this.model.get( 'data' );
|
||||
var self = this;
|
||||
var select_options = {};
|
||||
_.each( options, function( items, src ) {
|
||||
select_options[ src ] = [];
|
||||
_.each( items, function( item ) {
|
||||
select_options[ src ].push({
|
||||
hid : item.hid,
|
||||
label: item.hid + ': ' + item.name,
|
||||
value: item.id
|
||||
});
|
||||
self.history[ item.id + '_' + src ] = item;
|
||||
});
|
||||
});
|
||||
_.each( this.config, function( c, i ) {
|
||||
select_options[ c.src ] && self.fields[ i ].add( select_options[ c.src ], function( a, b ) { return b.hid - a.hid } );
|
||||
});
|
||||
},
|
||||
|
||||
/** Change of incoming value */
|
||||
_changeValue: function () {
|
||||
var new_value = this.model.get( 'value' );
|
||||
if ( new_value && new_value.values && new_value.values.length > 0 ) {
|
||||
// create list with content ids
|
||||
var list = [];
|
||||
_.each( new_value.values, function( value ) {
|
||||
list.push( value.id );
|
||||
});
|
||||
// sniff first suitable field type from config list
|
||||
var src = new_value.values[ 0 ].src;
|
||||
var multiple = new_value.values.length > 1;
|
||||
for( var i = 0; i < this.config.length; i++ ) {
|
||||
var field = this.fields[ i ];
|
||||
var c = this.config[ i ];
|
||||
if ( c.src == src && [ multiple, true ].indexOf( c.multiple ) !== -1 ) {
|
||||
this.model.set( 'current', i );
|
||||
field.value( list );
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_.each( this.fields, function( field ) {
|
||||
field.value( null );
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/** Assists in identifying the batch mode */
|
||||
_batch: function() {
|
||||
var current = this.model.get( 'current' );
|
||||
var config = this.config[ current ];
|
||||
if ( config.src == 'hdca' && !config.multiple ) {
|
||||
var hdca = this.history[ this.fields[ current ].value() + '_hdca' ];
|
||||
if ( hdca && hdca.map_over_type ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return config.batchmode;
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
View: View
|
||||
}
|
||||
|
||||
});
|
||||
@@ -191,7 +191,7 @@ var View = Backbone.View.extend({
|
||||
_.each( this.model.get( 'options' ), function( v ) {
|
||||
!_.findWhere( options, v ) && options.push( v );
|
||||
});
|
||||
sorter && options.sort( sorter );
|
||||
sorter && options && options.sort( sorter );
|
||||
this.update( options );
|
||||
},
|
||||
update: function(options) {
|
||||
|
||||
@@ -64,13 +64,12 @@ function validate ( value ) {
|
||||
* Convert list to pretty string
|
||||
* @param{String} lst - List of strings to be converted in human readable list sentence
|
||||
*/
|
||||
function textify(lst) {
|
||||
var lst = lst.toString();
|
||||
if (lst) {
|
||||
lst = lst.replace(/,/g, ', ');
|
||||
var pos = lst.lastIndexOf(', ');
|
||||
if (pos != -1) {
|
||||
lst = lst.substr(0, pos) + ' or ' + lst.substr(pos+1);
|
||||
function textify( lst ) {
|
||||
if ( $.isArray( lst ) ) {
|
||||
var lst = lst.toString().replace( /,/g, ', ' );
|
||||
var pos = lst.lastIndexOf( ', ' );
|
||||
if ( pos != -1 ) {
|
||||
lst = lst.substr( 0, pos ) + ' or ' + lst.substr( pos + 2 );
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
|
||||
@@ -2507,7 +2507,7 @@ extend(Track.prototype, Drawable.prototype, {
|
||||
var data = result.data;
|
||||
|
||||
// Tracks may not have stat data either because there is no data or data is not yet ready.
|
||||
if (data !== undefined && data.min !== undefined && data.max !== undefined) {
|
||||
if (data && data.min !== undefined && data.max !== undefined) {
|
||||
// Compute default minimum and maximum values
|
||||
var min_value = data.min,
|
||||
max_value = data.max;
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
@import "galaxy_bootstrap/variables.less";
|
||||
@import "galaxy_variables.less";
|
||||
|
||||
.library_style_container .fa{
|
||||
font-size: 12px;
|
||||
}
|
||||
.library_style_container .fa-globe{
|
||||
font-size: initial;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
|
||||
.libraryRow {
|
||||
background-color: @table-heading-bg;
|
||||
}
|
||||
@@ -229,3 +237,21 @@ span.expandLink {
|
||||
.library-paginator {
|
||||
margin-left: 2em;
|
||||
}
|
||||
.paginator-bottom{
|
||||
width: 27em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 2em;
|
||||
}
|
||||
.import-type-switch{
|
||||
text-decoration: underline;
|
||||
}
|
||||
.libimport-select-none,
|
||||
.libimport-select-all{
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
.library-modal-item{
|
||||
width:90%;
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
@@ -263,14 +263,22 @@
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.2;
|
||||
background: @white;
|
||||
}
|
||||
.ui-form-backdrop-default {
|
||||
display: block;
|
||||
opacity: 0.2;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.ui-form-backdrop-silent {
|
||||
display: block;
|
||||
opacity: 0.0;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
.ui-form-preview {
|
||||
&:extend(.ui-input);
|
||||
margin-top: 5px;
|
||||
margin-top: @ui-margin-vertical;
|
||||
border-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
@@ -286,8 +294,12 @@
|
||||
}
|
||||
|
||||
.ui-form-info {
|
||||
&:extend(.toolParamHelp);
|
||||
clear: both !important;
|
||||
&:extend(.toolParamHelp);
|
||||
clear: both !important;
|
||||
i {
|
||||
font-size: 1.2em;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-form-footer-info {
|
||||
|
||||
@@ -440,9 +440,58 @@
|
||||
<datatype extension="vtkascii" type="galaxy.datatypes.constructive_solid_geometry:VtkAscii" display_in_upload="true" />
|
||||
<datatype extension="vtkbinary" type="galaxy.datatypes.constructive_solid_geometry:VtkBinary" display_in_upload="true" />
|
||||
<!-- Metagenomic Datatype -->
|
||||
<datatype extension="biom1" type="galaxy.datatypes.text:Biom1" display_in_upload="True" subclass="True" mimetype="application/json" />
|
||||
<datatype extension="biom1" type="galaxy.datatypes.text:Biom1" display_in_upload="True" subclass="True" mimetype="application/json">
|
||||
<display file="biom/biom_simple.xml" />
|
||||
</datatype>
|
||||
<!-- Strand-specific Coordinate Count Datatype used by the Center for Eukaryotic Gene Regulation labs at Penn State -->
|
||||
<datatype extension="scidx" type="galaxy.datatypes.interval:ScIdx" display_in_upload="true" />
|
||||
|
||||
<!--Cheminformatics Datatypes -->
|
||||
<datatype extension="smi" type="galaxy.datatypes.molecules:SMILES" display_in_upload="True">
|
||||
<!-- The ordering is important. The first one is considered as default converter in the build-in conversion function -> (as sdf)-->
|
||||
<converter file="smi_to_sdf_converter.xml" target_datatype="sdf"/>
|
||||
<converter file="smi_to_inchi_converter.xml" target_datatype="inchi"/>
|
||||
<converter file="smi_to_cml_converter.xml" target_datatype="cml"/>
|
||||
<converter file="smi_to_mol_converter.xml" target_datatype="mol"/>
|
||||
<converter file="smi_to_mol2_converter.xml" target_datatype="mol2"/>
|
||||
<converter file="smi_to_smi_converter.xml" target_datatype="smi"/>
|
||||
</datatype>
|
||||
<datatype extension="sdf" type="galaxy.datatypes.molecules:SDF" display_in_upload="True">
|
||||
<converter file="sdf_to_smi_converter.xml" target_datatype="smi"/>
|
||||
<converter file="sdf_to_inchi_converter.xml" target_datatype="inchi"/>
|
||||
<converter file="sdf_to_mol2_converter.xml" target_datatype="mol2"/>
|
||||
<converter file="sdf_to_cml_converter.xml" target_datatype="cml"/>
|
||||
</datatype>
|
||||
<datatype extension="inchi" type="galaxy.datatypes.molecules:InChI" display_in_upload="True">
|
||||
<converter file="inchi_to_smi_converter.xml" target_datatype="smi"/>
|
||||
<converter file="inchi_to_sdf_converter.xml" target_datatype="sdf"/>
|
||||
<converter file="inchi_to_mol_converter.xml" target_datatype="mol"/>
|
||||
<converter file="inchi_to_mol2_converter.xml" target_datatype="mol2"/>
|
||||
<converter file="inchi_to_cml_converter.xml" target_datatype="cml"/>
|
||||
</datatype>
|
||||
<datatype extension="mol" type="galaxy.datatypes.molecules:MOL" display_in_upload="True">
|
||||
<converter file="mol_to_smi_converter.xml" target_datatype="smi"/>
|
||||
<converter file="mol_to_inchi_converter.xml" target_datatype="inchi"/>
|
||||
<converter file="mol_to_mol2_converter.xml" target_datatype="mol2"/>
|
||||
<converter file="mol_to_cml_converter.xml" target_datatype="cml"/>
|
||||
</datatype>
|
||||
<datatype extension="mol2" type="galaxy.datatypes.molecules:MOL2" display_in_upload="False">
|
||||
<converter file="mol2_to_smi_converter.xml" target_datatype="smi"/>
|
||||
<converter file="mol2_to_sdf_converter.xml" target_datatype="sdf"/>
|
||||
<converter file="mol2_to_inchi_converter.xml" target_datatype="inchi"/>
|
||||
<converter file="mol2_to_mol_converter.xml" target_datatype="mol"/>
|
||||
<converter file="mol2_to_cml_converter.xml" target_datatype="cml"/>
|
||||
</datatype>
|
||||
<datatype extension="cml" type="galaxy.datatypes.molecules:CML" display_in_upload="True">
|
||||
<converter file="cml_to_smi_converter.xml" target_datatype="smi"/>
|
||||
<converter file="cml_to_inchi_converter.xml" target_datatype="inchi"/>
|
||||
<converter file="cml_to_sdf_converter.xml" target_datatype="sdf"/>
|
||||
<converter file="cml_to_mol2_converter.xml" target_datatype="mol2"/>
|
||||
</datatype>
|
||||
<datatype extension="fps" type="galaxy.datatypes.molecules:FPS" mimetype="text/html" display_in_upload="True" />
|
||||
<datatype extension="obfs" type="galaxy.datatypes.molecules:OBFS" mimetype="text/html" display_in_upload="True" />
|
||||
<datatype extension="phar" type="galaxy.datatypes.molecules:PHAR" display_in_upload="False" />
|
||||
<datatype extension="pdb" type="galaxy.datatypes.molecules:PDB" display_in_upload="True" />
|
||||
</registration>
|
||||
<sniffers>
|
||||
<!--
|
||||
@@ -484,6 +533,7 @@
|
||||
<sniffer type="galaxy.datatypes.proteomics:Msp"/>
|
||||
<sniffer type="galaxy.datatypes.proteomics:SPLib"/>
|
||||
<sniffer type="galaxy.datatypes.proteomics:ThermoRAW"/>
|
||||
<sniffer type="galaxy.datatypes.molecules:CML"/>
|
||||
<sniffer type="galaxy.datatypes.xml:GenericXml"/>
|
||||
<sniffer type="galaxy.datatypes.triples:Turtle"/>
|
||||
<sniffer type="galaxy.datatypes.triples:NTriples"/>
|
||||
@@ -493,6 +543,12 @@
|
||||
<sniffer type="galaxy.datatypes.sequence:csFasta"/>
|
||||
<sniffer type="galaxy.datatypes.qualityscore:QualityScoreSOLiD"/>
|
||||
<sniffer type="galaxy.datatypes.qualityscore:QualityScore454"/>
|
||||
<sniffer type="galaxy.datatypes.molecules:SDF"/>
|
||||
<sniffer type="galaxy.datatypes.molecules:PDB"/>
|
||||
<sniffer type="galaxy.datatypes.molecules:MOL2"/>
|
||||
<sniffer type="galaxy.datatypes.molecules:InChI"/>
|
||||
<sniffer type="galaxy.datatypes.molecules:FPS"/>
|
||||
<!-- TODO: see molecules.py <sniffer type="galaxy.datatypes.molecules:SMILES"/>-->
|
||||
<sniffer type="galaxy.datatypes.sequence:Fasta"/>
|
||||
<sniffer type="galaxy.datatypes.sequence:Fastq"/>
|
||||
<sniffer type="galaxy.datatypes.interval:Wiggle"/>
|
||||
|
||||
@@ -656,6 +656,13 @@ nglims_config_file = tool-data/nglims.yaml
|
||||
# log_events and log_actions functionality will eventually be merged.
|
||||
#log_actions = True
|
||||
|
||||
|
||||
# Fluentd configuration. Various events can be logged to the fluentd instance
|
||||
# configured below by enabling fluent_log.
|
||||
#fluent_log = False
|
||||
#fluent_host = localhost
|
||||
#fluent_port = 24224
|
||||
|
||||
# Sanitize all HTML tool output. By default, all tool output served as
|
||||
# 'text/html' will be sanitized thoroughly. This can be disabled if you have
|
||||
# special tools that require unaltered output. WARNING: disabling this does
|
||||
|
||||
@@ -98,6 +98,26 @@
|
||||
deprecated and will disappear with a future release of Galaxy.
|
||||
-->
|
||||
</plugin>
|
||||
<plugin id="pulsar_embedded" type="runner" load="galaxy.jobs.runners.pulsar:PulsarEmbeddedJobRunner">
|
||||
<!-- The embedded Pulsar runner starts a Pulsar app
|
||||
internal to Galaxy and communicates it directly.
|
||||
This maybe be useful for instance when Pulsar
|
||||
staging is important but a Pulsar server is
|
||||
unneeded (most obviously for instance if compute
|
||||
servers cannot mount Galaxy's files but Galaxy
|
||||
can mount a scratch directory available on
|
||||
compute). -->
|
||||
<!-- Specify a complete description of the Pulsar app
|
||||
to create. Currently this configuration (if set)
|
||||
must create exactly on job manager. For more
|
||||
information on configuring a Pulsar app see:
|
||||
|
||||
https://github.com/galaxyproject/pulsar/blob/master/app.yml.sample
|
||||
http://pulsar.readthedocs.org/en/latest/configure.html
|
||||
-->
|
||||
<!-- <param id="pulsar_conf">path/to/pulsar/app.yml</param> -->
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
<handlers default="handlers">
|
||||
<!-- Additional job handlers - the id should match the name of a
|
||||
|
||||
@@ -85,4 +85,9 @@
|
||||
<columns>value, name, url</columns>
|
||||
<file path="tool-data/vcf_iobio.loc" />
|
||||
</table>
|
||||
<!-- simple biom servers -->
|
||||
<table name="biom_simple_display" comment_char="#">
|
||||
<columns>value, name, url</columns>
|
||||
<file path="tool-data/biom_simple_display.loc" />
|
||||
</table>
|
||||
</tables>
|
||||
|
||||
@@ -35,6 +35,9 @@ database_file = database/community.sqlite
|
||||
# The default is the Galaxy installation directory.
|
||||
#hgweb_config_dir = None
|
||||
|
||||
# Disable Mercurial pushing to repositories.
|
||||
#disable_push = True
|
||||
|
||||
# Where tool shed repositories are stored.
|
||||
file_path = database/community_files
|
||||
# Temporary storage for additional datasets,
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<display id="biom_simple" version="1.0.0" name="view biom at">
|
||||
<dynamic_links from_data_table="biom_simple_display" skip_startswith="#" id="value" name="name">
|
||||
<url>${ url % { 'biom_file_url_qp': $biom_file.qp } }</url>
|
||||
<param type="data" name="biom_file" url="galaxy_${DATASET_HASH}.biom" />
|
||||
</dynamic_links>
|
||||
</display>
|
||||
@@ -10,5 +10,4 @@ lib
|
||||
log_tempfile
|
||||
mimeparse
|
||||
psyco_full
|
||||
pulsar
|
||||
tool_shed
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
pulsar.client package
|
||||
=====================
|
||||
|
||||
.. automodule:: pulsar.client
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
|
||||
pulsar.client.staging
|
||||
pulsar.client.transport
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
pulsar.client.action_mapper module
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.action_mapper
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.amqp_exchange module
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.amqp_exchange
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.amqp_exchange_factory module
|
||||
------------------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.amqp_exchange_factory
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.client module
|
||||
---------------------------
|
||||
|
||||
.. automodule:: pulsar.client.client
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.config_util module
|
||||
--------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.config_util
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.decorators module
|
||||
-------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.decorators
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.destination module
|
||||
--------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.destination
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.interface module
|
||||
------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.interface
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.job_directory module
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.job_directory
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.manager module
|
||||
----------------------------
|
||||
|
||||
.. automodule:: pulsar.client.manager
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.object_client module
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.object_client
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.path_mapper module
|
||||
--------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.path_mapper
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.setup_handler module
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.setup_handler
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.util module
|
||||
-------------------------
|
||||
|
||||
.. automodule:: pulsar.client.util
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
pulsar.client.staging package
|
||||
=============================
|
||||
|
||||
.. automodule:: pulsar.client.staging
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
pulsar.client.staging.down module
|
||||
---------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.staging.down
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.staging.up module
|
||||
-------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.staging.up
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
pulsar.client.transport package
|
||||
===============================
|
||||
|
||||
.. automodule:: pulsar.client.transport
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
pulsar.client.transport.curl module
|
||||
-----------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.transport.curl
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.transport.poster module
|
||||
-------------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.transport.poster
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.transport.requests module
|
||||
---------------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.transport.requests
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.transport.ssh module
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.transport.ssh
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pulsar.client.transport.standard module
|
||||
---------------------------------------
|
||||
|
||||
.. automodule:: pulsar.client.transport.standard
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
pulsar package
|
||||
==============
|
||||
|
||||
.. automodule:: pulsar
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
|
||||
pulsar.client
|
||||
|
||||
@@ -4,6 +4,8 @@ Releases
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
.. annoucements
|
||||
16.04_announce
|
||||
16.01_announce
|
||||
15.10_announce
|
||||
15.07_announce
|
||||
|
||||
@@ -91,7 +91,6 @@ class Configuration( object ):
|
||||
self.tool_data_path = resolve_path( kwargs.get( "tool_data_path", "tool-data" ), os.getcwd() )
|
||||
self.builds_file_path = resolve_path( kwargs.get( "builds_file_path", os.path.join( self.tool_data_path, 'shared', 'ucsc', 'builds.txt') ), self.root )
|
||||
self.len_file_path = resolve_path( kwargs.get( "len_file_path", os.path.join( self.tool_data_path, 'shared', 'ucsc', 'chrom') ), self.root )
|
||||
self.test_conf = resolve_path( kwargs.get( "test_conf", "" ), self.root )
|
||||
# The value of migrated_tools_config is the file reserved for containing only those tools that have been eliminated from the distribution
|
||||
# and moved to the tool shed.
|
||||
self.integrated_tool_panel_config = resolve_path( kwargs.get( 'integrated_tool_panel_config', 'integrated_tool_panel.xml' ), self.root )
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_cml_to_inchi" name="CML to InChI" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -icml "${input}" -oinchi -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="cml" label="Molecules in CML-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="inchi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_cml_to_mol2" name="CML to mol2" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -icml "${input}" -omol2 -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="cml" label="Molecules in CML-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="mol2"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_cml_to_sdf" name="CML to SDF" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -icml "${input}" -osdf "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="cml" label="Molecules in CML-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="sdf"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,48 @@
|
||||
<tool id="CONVERTER_cml_to_smiles" name="CML to SMILES" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command >
|
||||
<![CDATA[
|
||||
obabel
|
||||
-icml "${input}"
|
||||
#if $can:
|
||||
-ocan
|
||||
#else:
|
||||
-osmi
|
||||
#end if
|
||||
-O "${output}"
|
||||
-e
|
||||
$remove_h
|
||||
#if $iso_chi or $can or $exp_h:
|
||||
-x$iso_chi$exp_h$can
|
||||
#end if
|
||||
#if $dative_bonds:
|
||||
-b
|
||||
#end if
|
||||
#if int($ph) >= 0:
|
||||
-p $ph
|
||||
#end if
|
||||
|
||||
2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="cml" label="Molecules in CML-format"/>
|
||||
<param name="iso_chi" type="boolean" label="Do not include isotopic or chiral markings (-xi)" truevalue="i" falsevalue="" checked="false" />
|
||||
<param name="can" type="boolean" label="Output in canonical form (-xc)" truevalue="c" falsevalue="" checked="false" />
|
||||
<param name="exp_h" type="boolean" label="Output explicit hydrogens as such (-xh)" truevalue="h" falsevalue="" checked="false" />
|
||||
<param name="remove_h" type="boolean" label="Delete hydrogen atoms (-d)" truevalue="-d" falsevalue="" />
|
||||
<param name="ph" type="float" value="-1" label="Add hydrogens appropriate for pH (-p)" help="-1 means deactivated"/>
|
||||
<param name="dative_bonds" type="boolean" label="Convert dative bonds (e.g. [N+]([O-])=O to N(=O)=O) (-b)" truevalue="-b" falsevalue="" />
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="smi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_inchi_to_cml" name="InChI to CML" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -iinchi "${input}" -ocml -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="inchi" label="Molecules in InChI format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="cml"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_inchi_to_mol2" name="InChI to MOL2" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -iinchi "${input}" -omol2 -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="inchi" label="Molecules in InChI format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="mol2"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_inchi_to_mol" name="InChI to MOL" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -iinchi "${input}" -omol -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="inchi" label="Molecules in InChI-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="mol"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_inchi_to_sdf" name="InChI to SDF" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -iinchi "${input}" -osdf -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="inchi" label="Molecules in InChI format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="sdf"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_inchi_to_smi" name="InChI to SMILES" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -iinchi "${input}" -osmi -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="inchi" label="Molecules in InChI format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="smi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_mol2_to_cml" name="MOL2 to CML" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -imol2 "${input}" -ocml -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="mol2" label="Molecules in MOL2-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="cml"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_mol2_to_inchi" name="MOL2 to InChI" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -imol2 "${input}" -oinchi -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="mol2" label="Molecules in MOL2-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="inchi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_mol2_to_mol" name="MOL2 to MOL" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -imol2 "${input}" -omol -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="mol2" label="Molecules in MOL2-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="mol"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_mol2_to_sdf" name="MOL2 to SDF" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -imol2 "${input}" -osdf "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="mol2" label="Molecules in MOL2-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="sdf"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_mol2_to_smi" name="MOL2 to SMILES" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -imol2 "${input}" -omol "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="mol2" label="Molecules in MOL2-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="smi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,21 @@
|
||||
<tool id="CONVERTER_mol_to_cml" name="MOL to CML" version="1.0.0">
|
||||
<description></description>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -imol "${input}" -ocml -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="mol" label="Molecules in MOL-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="cml"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,21 @@
|
||||
<tool id="CONVERTER_mol_to_mol2" name="MOL to MOL2" version="1.0.0">
|
||||
<description></description>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -imol "${input}" -omol2 -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="mol" label="Molecules in MOL-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="mol2"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,21 @@
|
||||
<tool id="CONVERTER_mol_to_mol2" name="MOL to MOL2" version="1.0.0">
|
||||
<description></description>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -imol "${input}" -omol2 -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="mol" label="Molecules in MOL-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="mol2"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,21 @@
|
||||
<tool id="CONVERTER_mol_to_smi" name="MOL to SMILES" version="1.0.0">
|
||||
<description></description>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -imol "${input}" -osmi -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="mol" label="Molecules in MOL-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="smi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_sdf_to_cml" name="SDF to CML" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -isdf "${input}" -ocml -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="sdf" label="Molecules in SDF-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="cml"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_sdf_to_inchi" name="SDF to InChI" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -isdf "${input}" -oinchi -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="sdf" label="Molecules in SDF-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="inchi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_sdf_to_mol2" name="SDF to mol2" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -isdf "${input}" -omol2 -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="sdf" label="Molecules in SDF-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="mol2"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,27 @@
|
||||
<tool id="CONVERTER_sdf_to_smiles" name="SDF to SMILES" version="1.0.1">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command >
|
||||
<![CDATA[
|
||||
obabel
|
||||
-isdf "${input}"
|
||||
-ocan
|
||||
-O "${output}"
|
||||
-e
|
||||
2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="sdf" label="Molecules in SDF-format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="smi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_SMILES_to_cml" name="SMILES to CML" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -ismi "${input}" -ocml -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="smi" label="Molecules in SMILES format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="cml"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_SMILES_to_inchi" name="SMILES to InChI" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -ismi "${input}" -oinchi -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="smi" label="Molecules in SMILES format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="inchi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_SMILES_to_MOL2" name="SMILES to MOL2" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -ismi "${input}" -omol2 -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="smi" label="Molecules in SMILES format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="mol2"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_SMILES_to_MOL" name="SMILES to MOL" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -ismi "${input}" -omol -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="smi" label="Molecules in SMILES format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="mol"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,22 @@
|
||||
<tool id="CONVERTER_SMILES_to_sdf" name="SMILES to SDF" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command>
|
||||
<![CDATA[
|
||||
obabel -ismi "${input}" -osdf -O "${output}" -e 2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="smi" label="Molecules in SMILES format"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="sdf"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,48 @@
|
||||
<tool id="CONVERTER_smiles_to_smiles" name="SMILES to SMILES" version="1.0.0">
|
||||
<description></description>
|
||||
<parallelism method="multi" split_inputs="input" split_mode="to_size" split_size="10000" shared_inputs="" merge_outputs="output"></parallelism>
|
||||
<requirements>
|
||||
<requirement type="package" version="2.3.2">openbabel</requirement>
|
||||
</requirements>
|
||||
<command >
|
||||
<![CDATA[
|
||||
obabel
|
||||
-ismi "${input}"
|
||||
#if $can:
|
||||
-ocan
|
||||
#else:
|
||||
-osmi
|
||||
#end if
|
||||
-O "${output}"
|
||||
-e
|
||||
$remove_h
|
||||
#if $iso_chi or $can or $exp_h:
|
||||
-x$iso_chi$exp_h$can
|
||||
#end if
|
||||
#if $dative_bonds:
|
||||
-b
|
||||
#end if
|
||||
#if int($ph) >= 0:
|
||||
-p $ph
|
||||
#end if
|
||||
|
||||
2>&1
|
||||
]]>
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" format="smi" label="Molecules in SD-format"/>
|
||||
<param name="iso_chi" type="boolean" label="Do not include isotopic or chiral markings (-xi)" truevalue="i" falsevalue="" checked="false" />
|
||||
<param name="can" type="boolean" label="Output in canonical form (-xc)" truevalue="c" falsevalue="" checked="false" />
|
||||
<param name="exp_h" type="boolean" label="Output explicit hydrogens as such (-xh)" truevalue="h" falsevalue="" checked="false" />
|
||||
<param name="remove_h" type="boolean" label="Delete hydrogen atoms (-d)" truevalue="-d" falsevalue="" />
|
||||
<param name="ph" type="float" value="-1" label="Add hydrogens appropriate for pH (-p)" help="-1 means deactivated"/>
|
||||
<param name="dative_bonds" type="boolean" label="Convert dative bonds (e.g. [N+]([O-])=O to N(=O)=O) (-b)" truevalue="-b" falsevalue="" />
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="smi"/>
|
||||
</outputs>
|
||||
<help>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</help>
|
||||
</tool>
|
||||
@@ -0,0 +1,769 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from galaxy.datatypes import data
|
||||
import logging
|
||||
from galaxy.datatypes.sniff import get_headers
|
||||
from galaxy.datatypes.data import get_file_peek
|
||||
from galaxy.datatypes.tabular import Tabular
|
||||
from galaxy.datatypes.binary import Binary
|
||||
from galaxy.datatypes.xml import GenericXml
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
from galaxy.datatypes.metadata import MetadataElement
|
||||
from galaxy.datatypes import metadata
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def count_special_lines(word, filename, invert=False):
|
||||
"""
|
||||
searching for special 'words' using the grep tool
|
||||
grep is used to speed up the searching and counting
|
||||
The number of hits is returned.
|
||||
"""
|
||||
try:
|
||||
cmd = ["grep", "-c"]
|
||||
if invert:
|
||||
cmd.append('-v')
|
||||
cmd.extend([word, filename])
|
||||
out = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||
return int(out.communicate()[0].split()[0])
|
||||
except:
|
||||
pass
|
||||
return 0
|
||||
|
||||
|
||||
def count_lines(filename, non_empty=False):
|
||||
"""
|
||||
counting the number of lines from the 'filename' file
|
||||
"""
|
||||
try:
|
||||
if non_empty:
|
||||
out = subprocess.Popen(['grep', '-cve', '^\s*$', filename], stdout=subprocess.PIPE)
|
||||
else:
|
||||
out = subprocess.Popen(['wc', '-l', filename], stdout=subprocess.PIPE)
|
||||
return int(out.communicate()[0].split()[0])
|
||||
except:
|
||||
pass
|
||||
return 0
|
||||
|
||||
|
||||
class GenericMolFile(data.Text):
|
||||
"""
|
||||
abstract class for most of the molecule files
|
||||
"""
|
||||
MetadataElement(name="number_of_molecules", default=0, desc="Number of molecules", readonly=True, visible=True, optional=True, no_value=0)
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
if not dataset.dataset.purged:
|
||||
dataset.peek = get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
if (dataset.metadata.number_of_molecules == 1):
|
||||
dataset.blurb = "1 molecule"
|
||||
else:
|
||||
dataset.blurb = "%s molecules" % dataset.metadata.number_of_molecules
|
||||
dataset.peek = data.get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
else:
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
def get_mime(self):
|
||||
return 'text/plain'
|
||||
|
||||
|
||||
class MOL(GenericMolFile):
|
||||
file_ext = "mol"
|
||||
|
||||
def set_meta(self, dataset, **kwd):
|
||||
"""
|
||||
Set the number molecules, in the case of MOL its always one.
|
||||
"""
|
||||
dataset.metadata.number_of_molecules = 1
|
||||
|
||||
|
||||
class SDF(GenericMolFile):
|
||||
file_ext = "sdf"
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
Try to guess if the file is a SDF2 file.
|
||||
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> fname = get_test_fname('drugbank_drugs.sdf')
|
||||
>>> SDF().sniff(fname)
|
||||
True
|
||||
|
||||
>>> fname = get_test_fname('drugbank_drugs.cml')
|
||||
>>> SDF().sniff(fname)
|
||||
False
|
||||
"""
|
||||
counter = count_special_lines("^M\s*END", filename) + count_special_lines("^\$\$\$\$", filename)
|
||||
if counter > 0 and counter % 2 == 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_meta(self, dataset, **kwd):
|
||||
"""
|
||||
Set the number of molecules in dataset.
|
||||
"""
|
||||
dataset.metadata.number_of_molecules = count_special_lines("^\$\$\$\$", dataset.file_name)
|
||||
|
||||
def split(cls, input_datasets, subdir_generator_function, split_params):
|
||||
"""
|
||||
Split the input files by molecule records.
|
||||
"""
|
||||
if split_params is None:
|
||||
return None
|
||||
|
||||
if len(input_datasets) > 1:
|
||||
raise Exception("SD-file splitting does not support multiple files")
|
||||
input_files = [ds.file_name for ds in input_datasets]
|
||||
|
||||
chunk_size = None
|
||||
if split_params['split_mode'] == 'number_of_parts':
|
||||
raise Exception('Split mode "%s" is currently not implemented for SD-files.' % split_params['split_mode'])
|
||||
elif split_params['split_mode'] == 'to_size':
|
||||
chunk_size = int(split_params['split_size'])
|
||||
else:
|
||||
raise Exception('Unsupported split mode %s' % split_params['split_mode'])
|
||||
|
||||
def _read_sdf_records(filename):
|
||||
lines = []
|
||||
with open(filename) as handle:
|
||||
for line in handle:
|
||||
lines.append(line)
|
||||
if line.startswith("$$$$"):
|
||||
yield lines
|
||||
lines = []
|
||||
|
||||
def _write_part_sdf_file(accumulated_lines):
|
||||
part_dir = subdir_generator_function()
|
||||
part_path = os.path.join(part_dir, os.path.basename(input_files[0]))
|
||||
part_file = open(part_path, 'w')
|
||||
part_file.writelines(accumulated_lines)
|
||||
part_file.close()
|
||||
|
||||
try:
|
||||
sdf_records = _read_sdf_records(input_files[0])
|
||||
sdf_lines_accumulated = []
|
||||
for counter, sdf_record in enumerate(sdf_records, start=1):
|
||||
sdf_lines_accumulated.extend(sdf_record)
|
||||
if counter % chunk_size == 0:
|
||||
_write_part_sdf_file(sdf_lines_accumulated)
|
||||
sdf_lines_accumulated = []
|
||||
if sdf_lines_accumulated:
|
||||
_write_part_sdf_file(sdf_lines_accumulated)
|
||||
except Exception, e:
|
||||
log.error('Unable to split files: %s' % str(e))
|
||||
raise
|
||||
split = classmethod(split)
|
||||
|
||||
|
||||
class MOL2(GenericMolFile):
|
||||
file_ext = "mol2"
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
Try to guess if the file is a MOL2 file.
|
||||
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> fname = get_test_fname('drugbank_drugs.mol2')
|
||||
>>> MOL2().sniff(fname)
|
||||
True
|
||||
|
||||
>>> fname = get_test_fname('drugbank_drugs.cml')
|
||||
>>> MOL2().sniff(fname)
|
||||
False
|
||||
"""
|
||||
if count_special_lines("@<TRIPOS>MOLECULE", filename) > 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_meta(self, dataset, **kwd):
|
||||
"""
|
||||
Set the number of lines of data in dataset.
|
||||
"""
|
||||
dataset.metadata.number_of_molecules = count_special_lines("@<TRIPOS>MOLECULE", dataset.file_name)
|
||||
|
||||
def split(cls, input_datasets, subdir_generator_function, split_params):
|
||||
"""
|
||||
Split the input files by molecule records.
|
||||
"""
|
||||
if split_params is None:
|
||||
return None
|
||||
|
||||
if len(input_datasets) > 1:
|
||||
raise Exception("MOL2-file splitting does not support multiple files")
|
||||
input_files = [ds.file_name for ds in input_datasets]
|
||||
|
||||
chunk_size = None
|
||||
if split_params['split_mode'] == 'number_of_parts':
|
||||
raise Exception('Split mode "%s" is currently not implemented for MOL2-files.' % split_params['split_mode'])
|
||||
elif split_params['split_mode'] == 'to_size':
|
||||
chunk_size = int(split_params['split_size'])
|
||||
else:
|
||||
raise Exception('Unsupported split mode %s' % split_params['split_mode'])
|
||||
|
||||
def _read_mol2_records(filename):
|
||||
lines = []
|
||||
start = True
|
||||
with open(filename) as handle:
|
||||
for line in handle:
|
||||
if line.startswith("@<TRIPOS>MOLECULE"):
|
||||
if start:
|
||||
start = False
|
||||
else:
|
||||
yield lines
|
||||
lines = []
|
||||
lines.append(line)
|
||||
|
||||
def _write_part_mol2_file(accumulated_lines):
|
||||
part_dir = subdir_generator_function()
|
||||
part_path = os.path.join(part_dir, os.path.basename(input_files[0]))
|
||||
part_file = open(part_path, 'w')
|
||||
part_file.writelines(accumulated_lines)
|
||||
part_file.close()
|
||||
|
||||
try:
|
||||
mol2_records = _read_mol2_records(input_files[0])
|
||||
mol2_lines_accumulated = []
|
||||
for counter, mol2_record in enumerate(mol2_records, start=1):
|
||||
mol2_lines_accumulated.extend(mol2_record)
|
||||
if counter % chunk_size == 0:
|
||||
_write_part_mol2_file(mol2_lines_accumulated)
|
||||
mol2_lines_accumulated = []
|
||||
if mol2_lines_accumulated:
|
||||
_write_part_mol2_file(mol2_lines_accumulated)
|
||||
except Exception, e:
|
||||
log.error('Unable to split files: %s' % str(e))
|
||||
raise
|
||||
split = classmethod(split)
|
||||
|
||||
|
||||
class FPS(GenericMolFile):
|
||||
"""
|
||||
chemfp fingerprint file: http://code.google.com/p/chem-fingerprints/wiki/FPS
|
||||
"""
|
||||
file_ext = "fps"
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
Try to guess if the file is a FPS file.
|
||||
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> fname = get_test_fname('q.fps')
|
||||
>>> FPS().sniff(fname)
|
||||
True
|
||||
|
||||
>>> fname = get_test_fname('drugbank_drugs.cml')
|
||||
>>> FPS().sniff(fname)
|
||||
False
|
||||
"""
|
||||
header = get_headers(filename, sep='\t', count=1)
|
||||
if header[0][0].strip() == '#FPS1':
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_meta(self, dataset, **kwd):
|
||||
"""
|
||||
Set the number of lines of data in dataset.
|
||||
"""
|
||||
dataset.metadata.number_of_molecules = count_special_lines('^#', dataset.file_name, invert=True)
|
||||
|
||||
def split(cls, input_datasets, subdir_generator_function, split_params):
|
||||
"""
|
||||
Split the input files by fingerprint records.
|
||||
"""
|
||||
if split_params is None:
|
||||
return None
|
||||
|
||||
if len(input_datasets) > 1:
|
||||
raise Exception("FPS-file splitting does not support multiple files")
|
||||
input_files = [ds.file_name for ds in input_datasets]
|
||||
|
||||
chunk_size = None
|
||||
if split_params['split_mode'] == 'number_of_parts':
|
||||
raise Exception('Split mode "%s" is currently not implemented for MOL2-files.' % split_params['split_mode'])
|
||||
elif split_params['split_mode'] == 'to_size':
|
||||
chunk_size = int(split_params['split_size'])
|
||||
else:
|
||||
raise Exception('Unsupported split mode %s' % split_params['split_mode'])
|
||||
|
||||
def _write_part_fingerprint_file(accumulated_lines):
|
||||
part_dir = subdir_generator_function()
|
||||
part_path = os.path.join(part_dir, os.path.basename(input_files[0]))
|
||||
part_file = open(part_path, 'w')
|
||||
part_file.writelines(accumulated_lines)
|
||||
part_file.close()
|
||||
|
||||
try:
|
||||
header_lines = []
|
||||
lines_accumulated = []
|
||||
fingerprint_counter = 0
|
||||
for line in open(input_files[0]):
|
||||
if not line.strip():
|
||||
continue
|
||||
if line.startswith('#'):
|
||||
header_lines.append(line)
|
||||
else:
|
||||
fingerprint_counter += 1
|
||||
lines_accumulated.append(line)
|
||||
if fingerprint_counter != 0 and fingerprint_counter % chunk_size == 0:
|
||||
_write_part_fingerprint_file(header_lines + lines_accumulated)
|
||||
lines_accumulated = []
|
||||
if lines_accumulated:
|
||||
_write_part_fingerprint_file(header_lines + lines_accumulated)
|
||||
except Exception, e:
|
||||
log.error('Unable to split files: %s' % str(e))
|
||||
raise
|
||||
split = classmethod(split)
|
||||
|
||||
def merge(split_files, output_file):
|
||||
"""
|
||||
Merging fps files requires merging the header manually.
|
||||
We take the header from the first file.
|
||||
"""
|
||||
if len(split_files) == 1:
|
||||
# For one file only, use base class method (move/copy)
|
||||
return data.Text.merge(split_files, output_file)
|
||||
if not split_files:
|
||||
raise ValueError("No fps files given, %r, to merge into %s"
|
||||
% (split_files, output_file))
|
||||
out = open(output_file, "w")
|
||||
first = True
|
||||
for filename in split_files:
|
||||
with open(filename) as handle:
|
||||
for line in handle:
|
||||
if line.startswith('#'):
|
||||
if first:
|
||||
out.write(line)
|
||||
else:
|
||||
# line is no header and not a comment, we assume the first header is written to out and we set 'first' to False
|
||||
first = False
|
||||
out.write(line)
|
||||
out.close()
|
||||
merge = staticmethod(merge)
|
||||
|
||||
|
||||
class OBFS(Binary):
|
||||
"""OpenBabel Fastsearch format (fs)."""
|
||||
file_ext = 'fs'
|
||||
composite_type = 'basic'
|
||||
allow_datatype_change = False
|
||||
|
||||
MetadataElement(name="base_name", default='OpenBabel Fastsearch Index',
|
||||
readonly=True, visible=True, optional=True,)
|
||||
|
||||
def __init__(self, **kwd):
|
||||
"""
|
||||
A Fastsearch Index consists of a binary file with the fingerprints
|
||||
and a pointer the actual molecule file.
|
||||
"""
|
||||
Binary.__init__(self, **kwd)
|
||||
self.add_composite_file('molecule.fs', is_binary=True,
|
||||
description='OpenBabel Fastsearch Index')
|
||||
self.add_composite_file('molecule.sdf', optional=True,
|
||||
is_binary=False, description='Molecule File')
|
||||
self.add_composite_file('molecule.smi', optional=True,
|
||||
is_binary=False, description='Molecule File')
|
||||
self.add_composite_file('molecule.inchi', optional=True,
|
||||
is_binary=False, description='Molecule File')
|
||||
self.add_composite_file('molecule.mol2', optional=True,
|
||||
is_binary=False, description='Molecule File')
|
||||
self.add_composite_file('molecule.cml', optional=True,
|
||||
is_binary=False, description='Molecule File')
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
"""Set the peek and blurb text."""
|
||||
if not dataset.dataset.purged:
|
||||
dataset.peek = "OpenBabel Fastsearch Index"
|
||||
dataset.blurb = "OpenBabel Fastsearch Index"
|
||||
else:
|
||||
dataset.peek = "file does not exist"
|
||||
dataset.blurb = "file purged from disk"
|
||||
|
||||
def display_peek(self, dataset):
|
||||
"""Create HTML content, used for displaying peek."""
|
||||
try:
|
||||
return dataset.peek
|
||||
except:
|
||||
return "OpenBabel Fastsearch Index"
|
||||
|
||||
def display_data(self, trans, data, preview=False, filename=None,
|
||||
to_ext=None, size=None, offset=None, **kwd):
|
||||
"""Apparently an old display method, but still gets called.
|
||||
|
||||
This allows us to format the data shown in the central pane via the "eye" icon.
|
||||
"""
|
||||
return "This is a OpenBabel Fastsearch format. You can speed up your similarity and substructure search with it."
|
||||
|
||||
def get_mime(self):
|
||||
"""Returns the mime type of the datatype (pretend it is text for peek)"""
|
||||
return 'text/plain'
|
||||
|
||||
def merge(split_files, output_file, extra_merge_args):
|
||||
"""Merging Fastsearch indices is not supported."""
|
||||
raise NotImplementedError("Merging Fastsearch indices is not supported.")
|
||||
|
||||
def split(cls, input_datasets, subdir_generator_function, split_params):
|
||||
"""Splitting Fastsearch indices is not supported."""
|
||||
if split_params is None:
|
||||
return None
|
||||
raise NotImplementedError("Splitting Fastsearch indices is not possible.")
|
||||
|
||||
|
||||
class DRF(GenericMolFile):
|
||||
file_ext = "drf"
|
||||
|
||||
def set_meta(self, dataset, **kwd):
|
||||
"""
|
||||
Set the number of lines of data in dataset.
|
||||
"""
|
||||
dataset.metadata.number_of_molecules = count_special_lines('\"ligand id\"', dataset.file_name, invert=True)
|
||||
|
||||
|
||||
class PHAR(GenericMolFile):
|
||||
"""
|
||||
Pharmacophore database format from silicos-it.
|
||||
"""
|
||||
file_ext = "phar"
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
if not dataset.dataset.purged:
|
||||
dataset.peek = get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
dataset.blurb = "pharmacophore"
|
||||
else:
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
|
||||
class PDB(GenericMolFile):
|
||||
"""
|
||||
Protein Databank format.
|
||||
http://www.wwpdb.org/documentation/format33/v3.3.html
|
||||
"""
|
||||
file_ext = "pdb"
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
Try to guess if the file is a PDB file.
|
||||
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> fname = get_test_fname('5e5z.pdb')
|
||||
>>> PDB().sniff(fname)
|
||||
True
|
||||
|
||||
>>> fname = get_test_fname('drugbank_drugs.cml')
|
||||
>>> PDB().sniff(fname)
|
||||
False
|
||||
"""
|
||||
headers = get_headers(filename, sep=' ', count=300)
|
||||
h = t = c = s = k = e = False
|
||||
for line in headers:
|
||||
section_name = line[0].strip()
|
||||
if section_name == 'HEADER':
|
||||
h = True
|
||||
elif section_name == 'TITLE':
|
||||
t = True
|
||||
elif section_name == 'COMPND':
|
||||
c = True
|
||||
elif section_name == 'SOURCE':
|
||||
s = True
|
||||
elif section_name == 'KEYWDS':
|
||||
k = True
|
||||
elif section_name == 'EXPDTA':
|
||||
e = True
|
||||
|
||||
if h * t * c * s * k * e:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
if not dataset.dataset.purged:
|
||||
atom_numbers = count_special_lines("^ATOM", dataset.file_name)
|
||||
hetatm_numbers = count_special_lines("^HETATM", dataset.file_name)
|
||||
dataset.peek = get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
dataset.blurb = "%s atoms and %s HET-atoms" % (atom_numbers, hetatm_numbers)
|
||||
else:
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
|
||||
class grd(data.Text):
|
||||
file_ext = "grd"
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
if not dataset.dataset.purged:
|
||||
dataset.peek = get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
dataset.blurb = "grids for docking"
|
||||
else:
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
|
||||
class grdtgz(Binary):
|
||||
file_ext = "grd.tgz"
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
if not dataset.dataset.purged:
|
||||
dataset.peek = 'binary data'
|
||||
dataset.blurb = "compressed grids for docking"
|
||||
else:
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
|
||||
class InChI(Tabular):
|
||||
file_ext = "inchi"
|
||||
column_names = ['InChI']
|
||||
MetadataElement(name="columns", default=2, desc="Number of columns", readonly=True, visible=False)
|
||||
MetadataElement(name="column_types", default=['str'], param=metadata.ColumnTypesParameter, desc="Column types", readonly=True, visible=False)
|
||||
MetadataElement(name="number_of_molecules", default=0, desc="Number of molecules", readonly=True, visible=True, optional=True, no_value=0)
|
||||
|
||||
def set_meta(self, dataset, **kwd):
|
||||
"""
|
||||
Set the number of lines of data in dataset.
|
||||
"""
|
||||
dataset.metadata.number_of_molecules = self.count_data_lines(dataset)
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
if not dataset.dataset.purged:
|
||||
dataset.peek = get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
if (dataset.metadata.number_of_molecules == 1):
|
||||
dataset.blurb = "1 molecule"
|
||||
else:
|
||||
dataset.blurb = "%s molecules" % dataset.metadata.number_of_molecules
|
||||
dataset.peek = data.get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
else:
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
Try to guess if the file is a InChI file.
|
||||
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> fname = get_test_fname('drugbank_drugs.inchi')
|
||||
>>> InChI().sniff(fname)
|
||||
True
|
||||
|
||||
>>> fname = get_test_fname('drugbank_drugs.cml')
|
||||
>>> InChI().sniff(fname)
|
||||
False
|
||||
"""
|
||||
inchi_lines = get_headers(filename, sep=' ', count=10)
|
||||
for inchi in inchi_lines:
|
||||
if not inchi[0].startswith('InChI='):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
class SMILES(Tabular):
|
||||
file_ext = "smi"
|
||||
column_names = ['SMILES', 'TITLE']
|
||||
MetadataElement(name="columns", default=2, desc="Number of columns", readonly=True, visible=False)
|
||||
MetadataElement(name="column_types", default=['str', 'str'], param=metadata.ColumnTypesParameter, desc="Column types", readonly=True, visible=False)
|
||||
MetadataElement(name="number_of_molecules", default=0, desc="Number of molecules", readonly=True, visible=True, optional=True, no_value=0)
|
||||
|
||||
def set_meta(self, dataset, **kwd):
|
||||
"""
|
||||
Set the number of lines of data in dataset.
|
||||
"""
|
||||
dataset.metadata.number_of_molecules = self.count_data_lines(dataset)
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
if not dataset.dataset.purged:
|
||||
dataset.peek = get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
if dataset.metadata.number_of_molecules == 1:
|
||||
dataset.blurb = "1 molecule"
|
||||
else:
|
||||
dataset.blurb = "%s molecules" % dataset.metadata.number_of_molecules
|
||||
dataset.peek = data.get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
else:
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
'''
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
Its hard or impossible to sniff a SMILES File. We can
|
||||
try to import the first SMILES and check if it is a molecule, but
|
||||
currently its not possible to use external libraries in datatype definition files.
|
||||
Moreover it seems mpossible to inlcude OpenBabel as python library because OpenBabel
|
||||
is GPL licensed.
|
||||
"""
|
||||
self.molecule_number = count_lines(filename, non_empty = True)
|
||||
word_count = count_lines(filename)
|
||||
|
||||
if self.molecule_number != word_count:
|
||||
return False
|
||||
|
||||
if self.molecule_number > 0:
|
||||
# test first 3 SMILES
|
||||
smiles_lines = get_headers(filename, sep='\t', count=3)
|
||||
for smiles_line in smiles_lines:
|
||||
if len(smiles_line) > 2:
|
||||
return False
|
||||
smiles = smiles_line[0]
|
||||
try:
|
||||
# if we have atoms, we have a molecule
|
||||
if not len(pybel.readstring('smi', smiles).atoms) > 0:
|
||||
return False
|
||||
except:
|
||||
# if convert fails its not a smiles string
|
||||
return False
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
'''
|
||||
|
||||
|
||||
class CML(GenericXml):
|
||||
"""
|
||||
Chemical Markup Language
|
||||
http://cml.sourceforge.net/
|
||||
"""
|
||||
file_ext = "cml"
|
||||
MetadataElement(name="number_of_molecules", default=0, desc="Number of molecules", readonly=True, visible=True, optional=True, no_value=0)
|
||||
|
||||
def set_meta(self, dataset, **kwd):
|
||||
"""
|
||||
Set the number of lines of data in dataset.
|
||||
"""
|
||||
dataset.metadata.number_of_molecules = count_special_lines('^\s*<molecule', dataset.file_name)
|
||||
|
||||
def set_peek(self, dataset, is_multi_byte=False):
|
||||
if not dataset.dataset.purged:
|
||||
dataset.peek = get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
if (dataset.metadata.number_of_molecules == 1):
|
||||
dataset.blurb = "1 molecule"
|
||||
else:
|
||||
dataset.blurb = "%s molecules" % dataset.metadata.number_of_molecules
|
||||
dataset.peek = data.get_file_peek(dataset.file_name, is_multi_byte=is_multi_byte)
|
||||
else:
|
||||
dataset.peek = 'file does not exist'
|
||||
dataset.blurb = 'file purged from disk'
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
Try to guess if the file is a CML file.
|
||||
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> fname = get_test_fname('interval.interval')
|
||||
>>> CML().sniff(fname)
|
||||
False
|
||||
|
||||
>>> fname = get_test_fname('drugbank_drugs.cml')
|
||||
>>> CML().sniff(fname)
|
||||
True
|
||||
"""
|
||||
handle = open(filename)
|
||||
line = handle.readline()
|
||||
if line.strip() != '<?xml version="1.0"?>':
|
||||
handle.close()
|
||||
return False
|
||||
line = handle.readline()
|
||||
if line.strip().find('http://www.xml-cml.org/schema') == -1:
|
||||
handle.close()
|
||||
return False
|
||||
handle.close()
|
||||
return True
|
||||
|
||||
def split(cls, input_datasets, subdir_generator_function, split_params):
|
||||
"""
|
||||
Split the input files by molecule records.
|
||||
"""
|
||||
if split_params is None:
|
||||
return None
|
||||
|
||||
if len(input_datasets) > 1:
|
||||
raise Exception("CML-file splitting does not support multiple files")
|
||||
input_files = [ds.file_name for ds in input_datasets]
|
||||
|
||||
chunk_size = None
|
||||
if split_params['split_mode'] == 'number_of_parts':
|
||||
raise Exception('Split mode "%s" is currently not implemented for CML-files.' % split_params['split_mode'])
|
||||
elif split_params['split_mode'] == 'to_size':
|
||||
chunk_size = int(split_params['split_size'])
|
||||
else:
|
||||
raise Exception('Unsupported split mode %s' % split_params['split_mode'])
|
||||
|
||||
def _read_cml_records(filename):
|
||||
lines = []
|
||||
with open(filename) as handle:
|
||||
for line in handle:
|
||||
if line.lstrip().startswith('<?xml version="1.0"?>') or \
|
||||
line.lstrip().startswith('<cml xmlns="http://www.xml-cml.org/schema') or \
|
||||
line.lstrip().startswith('</cml>'):
|
||||
continue
|
||||
lines.append(line)
|
||||
if line.lstrip().startswith('</molecule>'):
|
||||
yield lines
|
||||
lines = []
|
||||
|
||||
header_lines = ['<?xml version="1.0"?>\n', '<cml xmlns="http://www.xml-cml.org/schema">\n']
|
||||
footer_line = ['</cml>\n']
|
||||
|
||||
def _write_part_cml_file(accumulated_lines):
|
||||
part_dir = subdir_generator_function()
|
||||
part_path = os.path.join(part_dir, os.path.basename(input_files[0]))
|
||||
part_file = open(part_path, 'w')
|
||||
part_file.writelines(header_lines)
|
||||
part_file.writelines(accumulated_lines)
|
||||
part_file.writelines(footer_line)
|
||||
part_file.close()
|
||||
|
||||
try:
|
||||
cml_records = _read_cml_records(input_files[0])
|
||||
cml_lines_accumulated = []
|
||||
for counter, cml_record in enumerate(cml_records, start=1):
|
||||
cml_lines_accumulated.extend(cml_record)
|
||||
if counter % chunk_size == 0:
|
||||
_write_part_cml_file(cml_lines_accumulated)
|
||||
cml_lines_accumulated = []
|
||||
if cml_lines_accumulated:
|
||||
_write_part_cml_file(cml_lines_accumulated)
|
||||
except Exception, e:
|
||||
log.error('Unable to split files: %s' % str(e))
|
||||
raise
|
||||
split = classmethod(split)
|
||||
|
||||
def merge(split_files, output_file):
|
||||
"""
|
||||
Merging CML files.
|
||||
"""
|
||||
if len(split_files) == 1:
|
||||
# For one file only, use base class method (move/copy)
|
||||
return data.Text.merge(split_files, output_file)
|
||||
if not split_files:
|
||||
raise ValueError("Given no CML files, %r, to merge into %s"
|
||||
% (split_files, output_file))
|
||||
with open(output_file, "w") as out:
|
||||
for filename in split_files:
|
||||
with open(filename) as handle:
|
||||
header = handle.readline()
|
||||
if not header:
|
||||
raise ValueError("CML file %s was empty" % filename)
|
||||
if not header.lstrip().startswith('<?xml version="1.0"?>'):
|
||||
out.write(header)
|
||||
raise ValueError("%s is not a valid XML file!" % filename)
|
||||
line = handle.readline()
|
||||
header += line
|
||||
if not line.lstrip().startswith('<cml xmlns="http://www.xml-cml.org/schema'):
|
||||
out.write(header)
|
||||
raise ValueError("%s is not a CML file!" % filename)
|
||||
molecule_found = False
|
||||
for line in handle.readlines():
|
||||
# We found two required header lines, the next line should start with <molecule >
|
||||
if line.lstrip().startswith('</cml>'):
|
||||
continue
|
||||
if line.lstrip().startswith('<molecule'):
|
||||
molecule_found = True
|
||||
if molecule_found:
|
||||
out.write(line)
|
||||
out.write("</cml>\n")
|
||||
merge = staticmethod(merge)
|
||||
@@ -263,8 +263,9 @@ def guess_ext( fname, sniff_order, is_multi_byte=False ):
|
||||
|
||||
>>> fname = get_test_fname('megablast_xml_parser_test1.blastxml')
|
||||
>>> from galaxy.datatypes import registry
|
||||
>>> sample_conf = os.path.join(util.galaxy_directory(), "config", "datatypes_conf.xml.sample")
|
||||
>>> datatypes_registry = registry.Registry()
|
||||
>>> datatypes_registry.load_datatypes()
|
||||
>>> datatypes_registry.load_datatypes(root_dir=util.galaxy_directory(), config=sample_conf)
|
||||
>>> sniff_order = datatypes_registry.sniff_order
|
||||
>>> guess_ext(fname, sniff_order)
|
||||
'xml'
|
||||
@@ -324,6 +325,24 @@ def guess_ext( fname, sniff_order, is_multi_byte=False ):
|
||||
>>> fname = get_test_fname('test.mz5')
|
||||
>>> guess_ext(fname, sniff_order)
|
||||
'h5'
|
||||
>>> fname = get_test_fname('drugbank_drugs.cml')
|
||||
>>> guess_ext(fname, sniff_order)
|
||||
'cml'
|
||||
>>> fname = get_test_fname('q.fps')
|
||||
>>> guess_ext(fname, sniff_order)
|
||||
'fps'
|
||||
>>> fname = get_test_fname('drugbank_drugs.inchi')
|
||||
>>> guess_ext(fname, sniff_order)
|
||||
'inchi'
|
||||
>>> fname = get_test_fname('drugbank_drugs.mol2')
|
||||
>>> guess_ext(fname, sniff_order)
|
||||
'mol2'
|
||||
>>> fname = get_test_fname('drugbank_drugs.sdf')
|
||||
>>> guess_ext(fname, sniff_order)
|
||||
'sdf'
|
||||
>>> fname = get_test_fname('5e5z.pdb')
|
||||
>>> guess_ext(fname, sniff_order)
|
||||
'pdb'
|
||||
"""
|
||||
for datatype in sniff_order:
|
||||
"""
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
HEADER DE NOVO PROTEIN, MEMBRANE PROTEIN 09-OCT-15 5E5Z
|
||||
TITLE STRUCTURE OF THE AMYLOID FORMING PEPTIDE LVHSSN (RESIDUES
|
||||
COMPND MOL_ID: 1;
|
||||
COMPND 2 MOLECULE: LVHSSN (RESIDUES 16-21) FROM ISLET AMYLOID POLYPEPTIDE;
|
||||
COMPND 3 CHAIN: A;
|
||||
COMPND 4 ENGINEERED: YES
|
||||
SOURCE MOL_ID: 1;
|
||||
SOURCE 2 SYNTHETIC: YES;
|
||||
SOURCE 3 ORGANISM_SCIENTIFIC: HOMO SAPIENS;
|
||||
SOURCE 4 ORGANISM_TAXID: 9606
|
||||
KEYWDS AMYLOID-LIKE PROTOFIBRIL, DE NOVO PROTEIN, MEMBRANE PROTEIN, PROTEIN
|
||||
KEYWDS 2 FIBRIL
|
||||
EXPDTA X-RAY DIFFRACTION
|
||||
AUTHOR A.B.SORIAGA,D.EISENBERG
|
||||
REVDAT 2 20-JAN-16 5E5Z 1 JRNL
|
||||
REVDAT 1 16-DEC-15 5E5Z 0
|
||||
JRNL AUTH A.B.SORIAGA,S.SANGWAN,R.MACDONALD,M.R.SAWAYA,D.EISENBERG
|
||||
JRNL TITL CRYSTAL STRUCTURES OF IAPP AMYLOIDOGENIC SEGMENTS REVEAL A
|
||||
JRNL TITL 2 NOVEL PACKING MOTIF OF OUT-OF-REGISTER BETA SHEETS.
|
||||
JRNL REF J.PHYS.CHEM.B 2016
|
||||
JRNL REFN ISSN 1089-5647
|
||||
JRNL PMID 26629790
|
||||
JRNL DOI 10.1021/ACS.JPCB.5B09981
|
||||
REMARK 2
|
||||
REMARK 2 RESOLUTION. 1.66 ANGSTROMS.
|
||||
REMARK 3
|
||||
REMARK 3 REFINEMENT.
|
||||
REMARK 3 PROGRAM : PHENIX 1.6.4_486
|
||||
REMARK 3 AUTHORS : PAUL ADAMS,PAVEL AFONINE,VINCENT CHEN,IAN
|
||||
REMARK 3 : DAVIS,KRESHNA GOPAL,RALF GROSSE-KUNSTLEVE,
|
||||
REMARK 3 : LI-WEI HUNG,ROBERT IMMORMINO,TOM IOERGER,
|
||||
REMARK 3 : AIRLIE MCCOY,ERIK MCKEE,NIGEL MORIARTY,
|
||||
REMARK 3 : REETAL PAI,RANDY READ,JANE RICHARDSON,
|
||||
REMARK 3 : DAVID RICHARDSON,TOD ROMO,JIM SACCHETTINI,
|
||||
REMARK 3 : NICHOLAS SAUTER,JACOB SMITH,LAURENT
|
||||
REMARK 3 : STORONI,TOM TERWILLIGER,PETER ZWART
|
||||
REMARK 3
|
||||
REMARK 3 REFINEMENT TARGET : LS_WUNIT_K1
|
||||
REMARK 3
|
||||
REMARK 3 DATA USED IN REFINEMENT.
|
||||
REMARK 3 RESOLUTION RANGE HIGH (ANGSTROMS) : 1.66
|
||||
REMARK 3 RESOLUTION RANGE LOW (ANGSTROMS) : 9.46
|
||||
REMARK 3 MIN(FOBS/SIGMA_FOBS) : 0.000
|
||||
REMARK 3 COMPLETENESS FOR RANGE (%) : 89.1
|
||||
REMARK 3 NUMBER OF REFLECTIONS : 391
|
||||
REMARK 3
|
||||
REMARK 3 FIT TO DATA USED IN REFINEMENT.
|
||||
REMARK 3 R VALUE (WORKING + TEST SET) : 0.170
|
||||
REMARK 3 R VALUE (WORKING SET) : 0.167
|
||||
REMARK 3 FREE R VALUE : 0.198
|
||||
REMARK 3 FREE R VALUE TEST SET SIZE (%) : 4.600
|
||||
REMARK 3 FREE R VALUE TEST SET COUNT : 18
|
||||
REMARK 3
|
||||
REMARK 3 FIT TO DATA USED IN REFINEMENT (IN BINS).
|
||||
REMARK 3 BIN RESOLUTION RANGE COMPL. NWORK NFREE RWORK RFREE
|
||||
REMARK 3 1 9.4587 - 1.6644 0.89 373 18 0.1673 0.1983
|
||||
REMARK 3
|
||||
REMARK 3 BULK SOLVENT MODELLING.
|
||||
REMARK 3 METHOD USED : FLAT BULK SOLVENT MODEL
|
||||
REMARK 3 SOLVENT RADIUS : 0.00
|
||||
REMARK 3 SHRINKAGE RADIUS : 0.00
|
||||
REMARK 3 K_SOL : 0.60
|
||||
REMARK 3 B_SOL : 251.4
|
||||
REMARK 3
|
||||
REMARK 3 ERROR ESTIMATES.
|
||||
REMARK 3 COORDINATE ERROR (MAXIMUM-LIKELIHOOD BASED) : 0.310
|
||||
REMARK 3 PHASE ERROR (DEGREES, MAXIMUM-LIKELIHOOD BASED) : 18.270
|
||||
REMARK 3
|
||||
REMARK 3 B VALUES.
|
||||
REMARK 3 FROM WILSON PLOT (A**2) : NULL
|
||||
REMARK 3 MEAN B VALUE (OVERALL, A**2) : NULL
|
||||
REMARK 3 OVERALL ANISOTROPIC B VALUE.
|
||||
REMARK 3 B11 (A**2) : 0.51090
|
||||
REMARK 3 B22 (A**2) : -3.44720
|
||||
REMARK 3 B33 (A**2) : -8.26450
|
||||
REMARK 3 B12 (A**2) : 0.00000
|
||||
REMARK 3 B13 (A**2) : 0.77970
|
||||
REMARK 3 B23 (A**2) : 0.00000
|
||||
REMARK 3
|
||||
REMARK 3 TWINNING INFORMATION.
|
||||
REMARK 3 FRACTION: NULL
|
||||
REMARK 3 OPERATOR: NULL
|
||||
REMARK 3
|
||||
REMARK 3 DEVIATIONS FROM IDEAL VALUES.
|
||||
REMARK 3 RMSD COUNT
|
||||
REMARK 3 BOND : 0.004 46
|
||||
REMARK 3 ANGLE : 0.975 62
|
||||
REMARK 3 CHIRALITY : 0.056 8
|
||||
REMARK 3 PLANARITY : 0.004 8
|
||||
REMARK 3 DIHEDRAL : 10.740 15
|
||||
REMARK 3
|
||||
REMARK 3 TLS DETAILS
|
||||
REMARK 3 NUMBER OF TLS GROUPS : 1
|
||||
REMARK 3 TLS GROUP : 1
|
||||
REMARK 3 SELECTION: ALL
|
||||
REMARK 3 ORIGIN FOR THE GROUP (A): 4.5323 0.1096 3.9760
|
||||
REMARK 3 T TENSOR
|
||||
REMARK 3 T11: -0.1260 T22: -0.0788
|
||||
REMARK 3 T33: -0.0487 T12: 0.0821
|
||||
REMARK 3 T13: -0.0518 T23: 0.0723
|
||||
REMARK 3 L TENSOR
|
||||
REMARK 3 L11: 0.1003 L22: 0.0184
|
||||
REMARK 3 L33: 0.0647 L12: -0.0319
|
||||
REMARK 3 L13: 0.0506 L23: -0.0233
|
||||
REMARK 3 S TENSOR
|
||||
REMARK 3 S11: 0.0084 S12: -0.0300 S13: -0.0565
|
||||
REMARK 3 S21: 0.0231 S22: 0.0090 S23: 0.0127
|
||||
REMARK 3 S31: -0.0046 S32: -0.0049 S33: -0.0009
|
||||
REMARK 3
|
||||
REMARK 3 NCS DETAILS
|
||||
REMARK 3 NUMBER OF NCS GROUPS : NULL
|
||||
REMARK 3
|
||||
REMARK 3 OTHER REFINEMENT REMARKS: NULL
|
||||
REMARK 4
|
||||
REMARK 4 5E5Z COMPLIES WITH FORMAT V. 3.30, 13-JUL-11
|
||||
REMARK 100
|
||||
REMARK 100 THIS ENTRY HAS BEEN PROCESSED BY RCSB ON 09-OCT-15.
|
||||
REMARK 100 THE DEPOSITION ID IS D_1000214421.
|
||||
REMARK 200
|
||||
REMARK 200 EXPERIMENTAL DETAILS
|
||||
REMARK 200 EXPERIMENT TYPE : X-RAY DIFFRACTION
|
||||
REMARK 200 DATE OF DATA COLLECTION : 10-MAR-10
|
||||
REMARK 200 TEMPERATURE (KELVIN) : 291
|
||||
REMARK 200 PH : NULL
|
||||
REMARK 200 NUMBER OF CRYSTALS USED : NULL
|
||||
REMARK 200
|
||||
REMARK 200 SYNCHROTRON (Y/N) : Y
|
||||
REMARK 200 RADIATION SOURCE : APS
|
||||
REMARK 200 BEAMLINE : 24-ID-E
|
||||
REMARK 200 X-RAY GENERATOR MODEL : NULL
|
||||
REMARK 200 MONOCHROMATIC OR LAUE (M/L) : M
|
||||
REMARK 200 WAVELENGTH OR RANGE (A) : 0.979
|
||||
REMARK 200 MONOCHROMATOR : NULL
|
||||
REMARK 200 OPTICS : NULL
|
||||
REMARK 200
|
||||
REMARK 200 DETECTOR TYPE : CCD
|
||||
REMARK 200 DETECTOR MANUFACTURER : ADSC QUANTUM 315
|
||||
REMARK 200 INTENSITY-INTEGRATION SOFTWARE : DENZO
|
||||
REMARK 200 DATA SCALING SOFTWARE : NULL
|
||||
REMARK 200
|
||||
REMARK 200 NUMBER OF UNIQUE REFLECTIONS : 1136
|
||||
REMARK 200 RESOLUTION RANGE HIGH (A) : 1.600
|
||||
REMARK 200 RESOLUTION RANGE LOW (A) : 100.000
|
||||
REMARK 200 REJECTION CRITERIA (SIGMA(I)) : NULL
|
||||
REMARK 200
|
||||
REMARK 200 OVERALL.
|
||||
REMARK 200 COMPLETENESS FOR RANGE (%) : 92.9
|
||||
REMARK 200 DATA REDUNDANCY : 2.900
|
||||
REMARK 200 R MERGE (I) : 0.07600
|
||||
REMARK 200 R SYM (I) : NULL
|
||||
REMARK 200 <I/SIGMA(I)> FOR THE DATA SET : 17.8600
|
||||
REMARK 200
|
||||
REMARK 200 IN THE HIGHEST RESOLUTION SHELL.
|
||||
REMARK 200 HIGHEST RESOLUTION SHELL, RANGE HIGH (A) : NULL
|
||||
REMARK 200 HIGHEST RESOLUTION SHELL, RANGE LOW (A) : NULL
|
||||
REMARK 200 COMPLETENESS FOR SHELL (%) : NULL
|
||||
REMARK 200 DATA REDUNDANCY IN SHELL : NULL
|
||||
REMARK 200 R MERGE FOR SHELL (I) : NULL
|
||||
REMARK 200 R SYM FOR SHELL (I) : NULL
|
||||
REMARK 200 <I/SIGMA(I)> FOR SHELL : NULL
|
||||
REMARK 200
|
||||
REMARK 200 DIFFRACTION PROTOCOL: SINGLE WAVELENGTH
|
||||
REMARK 200 METHOD USED TO DETERMINE THE STRUCTURE: MOLECULAR REPLACEMENT
|
||||
REMARK 200 SOFTWARE USED: PHASER
|
||||
REMARK 200 STARTING MODEL: NULL
|
||||
REMARK 200
|
||||
REMARK 200 REMARK: NULL
|
||||
REMARK 280
|
||||
REMARK 280 CRYSTAL
|
||||
REMARK 280 SOLVENT CONTENT, VS (%): 6.59
|
||||
REMARK 280 MATTHEWS COEFFICIENT, VM (ANGSTROMS**3/DA): 1.32
|
||||
REMARK 280
|
||||
REMARK 280 CRYSTALLIZATION CONDITIONS: 20 MG/ML IN WATER AND MIXED WITH 0.09
|
||||
REMARK 280 M HEPES PH 7.5, 1.26M TRI-SODIUM CITRATE, AND 10% GLYCEROL,
|
||||
REMARK 280 VAPOR DIFFUSION, HANGING DROP, TEMPERATURE 291K
|
||||
REMARK 290
|
||||
REMARK 290 CRYSTALLOGRAPHIC SYMMETRY
|
||||
REMARK 290 SYMMETRY OPERATORS FOR SPACE GROUP: P 1 21 1
|
||||
REMARK 290
|
||||
REMARK 290 SYMOP SYMMETRY
|
||||
REMARK 290 NNNMMM OPERATOR
|
||||
REMARK 290 1555 X,Y,Z
|
||||
REMARK 290 2555 -X,Y+1/2,-Z
|
||||
REMARK 290
|
||||
REMARK 290 WHERE NNN -> OPERATOR NUMBER
|
||||
REMARK 290 MMM -> TRANSLATION VECTOR
|
||||
REMARK 290
|
||||
REMARK 290 CRYSTALLOGRAPHIC SYMMETRY TRANSFORMATIONS
|
||||
REMARK 290 THE FOLLOWING TRANSFORMATIONS OPERATE ON THE ATOM/HETATM
|
||||
REMARK 290 RECORDS IN THIS ENTRY TO PRODUCE CRYSTALLOGRAPHICALLY
|
||||
REMARK 290 RELATED MOLECULES.
|
||||
REMARK 290 SMTRY1 1 1.000000 0.000000 0.000000 0.00000
|
||||
REMARK 290 SMTRY2 1 0.000000 1.000000 0.000000 0.00000
|
||||
REMARK 290 SMTRY3 1 0.000000 0.000000 1.000000 0.00000
|
||||
REMARK 290 SMTRY1 2 -1.000000 0.000000 0.000000 0.00000
|
||||
REMARK 290 SMTRY2 2 0.000000 1.000000 0.000000 4.80450
|
||||
REMARK 290 SMTRY3 2 0.000000 0.000000 -1.000000 0.00000
|
||||
REMARK 290
|
||||
REMARK 290 REMARK: NULL
|
||||
REMARK 300
|
||||
REMARK 300 BIOMOLECULE: 1
|
||||
REMARK 300 SEE REMARK 350 FOR THE AUTHOR PROVIDED AND/OR PROGRAM
|
||||
REMARK 300 GENERATED ASSEMBLY INFORMATION FOR THE STRUCTURE IN
|
||||
REMARK 300 THIS ENTRY. THE REMARK MAY ALSO PROVIDE INFORMATION ON
|
||||
REMARK 300 BURIED SURFACE AREA.
|
||||
REMARK 350
|
||||
REMARK 350 COORDINATES FOR A COMPLETE MULTIMER REPRESENTING THE KNOWN
|
||||
REMARK 350 BIOLOGICALLY SIGNIFICANT OLIGOMERIZATION STATE OF THE
|
||||
REMARK 350 MOLECULE CAN BE GENERATED BY APPLYING BIOMT TRANSFORMATIONS
|
||||
REMARK 350 GIVEN BELOW. BOTH NON-CRYSTALLOGRAPHIC AND
|
||||
REMARK 350 CRYSTALLOGRAPHIC OPERATIONS ARE GIVEN.
|
||||
REMARK 350
|
||||
REMARK 350 BIOMOLECULE: 1
|
||||
REMARK 350 AUTHOR DETERMINED BIOLOGICAL UNIT: DECAMERIC
|
||||
REMARK 350 APPLY THE FOLLOWING TO CHAINS: A
|
||||
REMARK 350 BIOMT1 1 1.000000 0.000000 0.000000 0.00000
|
||||
REMARK 350 BIOMT2 1 0.000000 1.000000 0.000000 0.00000
|
||||
REMARK 350 BIOMT3 1 0.000000 0.000000 1.000000 0.00000
|
||||
REMARK 350 BIOMT1 2 1.000000 0.000000 0.000000 0.00000
|
||||
REMARK 350 BIOMT2 2 0.000000 1.000000 0.000000 -9.60900
|
||||
REMARK 350 BIOMT3 2 0.000000 0.000000 1.000000 0.00000
|
||||
REMARK 350 BIOMT1 3 1.000000 0.000000 0.000000 0.00000
|
||||
REMARK 350 BIOMT2 3 0.000000 1.000000 0.000000 9.60900
|
||||
REMARK 350 BIOMT3 3 0.000000 0.000000 1.000000 0.00000
|
||||
REMARK 350 BIOMT1 4 1.000000 0.000000 0.000000 9.64300
|
||||
REMARK 350 BIOMT2 4 0.000000 1.000000 0.000000 0.00000
|
||||
REMARK 350 BIOMT3 4 0.000000 0.000000 1.000000 0.00000
|
||||
REMARK 350 BIOMT1 5 1.000000 0.000000 0.000000 9.64300
|
||||
REMARK 350 BIOMT2 5 0.000000 1.000000 0.000000 -9.60900
|
||||
REMARK 350 BIOMT3 5 0.000000 0.000000 1.000000 0.00000
|
||||
REMARK 350 BIOMT1 6 1.000000 0.000000 0.000000 9.64300
|
||||
REMARK 350 BIOMT2 6 0.000000 1.000000 0.000000 9.60900
|
||||
REMARK 350 BIOMT3 6 0.000000 0.000000 1.000000 0.00000
|
||||
REMARK 350 BIOMT1 7 -1.000000 0.000000 0.000000 9.64300
|
||||
REMARK 350 BIOMT2 7 0.000000 1.000000 0.000000 -4.80450
|
||||
REMARK 350 BIOMT3 7 0.000000 0.000000 -1.000000 0.00000
|
||||
REMARK 350 BIOMT1 8 -1.000000 0.000000 0.000000 9.64300
|
||||
REMARK 350 BIOMT2 8 0.000000 1.000000 0.000000 4.80450
|
||||
REMARK 350 BIOMT3 8 0.000000 0.000000 -1.000000 0.00000
|
||||
REMARK 350 BIOMT1 9 -1.000000 0.000000 0.000000 19.28600
|
||||
REMARK 350 BIOMT2 9 0.000000 1.000000 0.000000 -4.80450
|
||||
REMARK 350 BIOMT3 9 0.000000 0.000000 -1.000000 0.00000
|
||||
REMARK 350 BIOMT1 10 -1.000000 0.000000 0.000000 19.28600
|
||||
REMARK 350 BIOMT2 10 0.000000 1.000000 0.000000 4.80450
|
||||
REMARK 350 BIOMT3 10 0.000000 0.000000 -1.000000 0.00000
|
||||
REMARK 900
|
||||
REMARK 900 RELATED ENTRIES
|
||||
REMARK 900 RELATED ID: 5E5V RELATED DB: PDB
|
||||
REMARK 900 RELATED ID: 5E5X RELATED DB: PDB
|
||||
REMARK 900 RELATED ID: 5E61 RELATED DB: PDB
|
||||
DBREF 5E5Z A 1 6 PDB 5E5Z 5E5Z 1 6
|
||||
SEQRES 1 A 6 LEU VAL HIS SER SER ASN
|
||||
FORMUL 2 HOH *(H2 O)
|
||||
CRYST1 9.643 9.609 19.029 90.00 101.22 90.00 P 1 21 1 2
|
||||
ORIGX1 1.000000 0.000000 0.000000 0.00000
|
||||
ORIGX2 0.000000 1.000000 0.000000 0.00000
|
||||
ORIGX3 0.000000 0.000000 1.000000 0.00000
|
||||
SCALE1 0.103702 0.000000 0.020579 0.00000
|
||||
SCALE2 0.000000 0.104069 0.000000 0.00000
|
||||
SCALE3 0.000000 0.000000 0.053576 0.00000
|
||||
ATOM 1 N LEU A 1 6.078 -0.306 -5.753 1.00 0.00 N
|
||||
ANISOU 1 N LEU A 1 0 0 0 0 0 0 N
|
||||
ATOM 2 CA LEU A 1 5.166 -0.026 -4.647 1.00 2.42 C
|
||||
ANISOU 2 CA LEU A 1 307 307 307 0 0 0 C
|
||||
ATOM 3 C LEU A 1 5.682 -0.642 -3.356 1.00 3.48 C
|
||||
ANISOU 3 C LEU A 1 435 443 445 1 1 9 C
|
||||
ATOM 4 O LEU A 1 6.056 -1.814 -3.322 1.00 3.52 O
|
||||
ANISOU 4 O LEU A 1 436 449 454 2 2 16 O
|
||||
ATOM 5 CB LEU A 1 3.755 -0.555 -4.967 1.00 1.86 C
|
||||
ANISOU 5 CB LEU A 1 232 237 238 1 1 5 C
|
||||
ATOM 6 CG LEU A 1 2.596 -0.354 -3.975 1.00 6.87 C
|
||||
ANISOU 6 CG LEU A 1 861 873 877 2 2 14 C
|
||||
ATOM 7 CD1 LEU A 1 2.753 -1.182 -2.704 1.00 11.83 C
|
||||
ANISOU 7 CD1 LEU A 1 1481 1504 1512 4 4 27 C
|
||||
ATOM 8 CD2 LEU A 1 2.404 1.122 -3.638 1.00 4.27 C
|
||||
ANISOU 8 CD2 LEU A 1 537 543 544 1 2 7 C
|
||||
ATOM 9 N VAL A 2 5.715 0.161 -2.297 1.00 0.61 N
|
||||
ANISOU 9 N VAL A 2 71 80 82 2 2 11 N
|
||||
ATOM 10 CA VAL A 2 5.968 -0.352 -0.960 1.00 0.12 C
|
||||
ANISOU 10 CA VAL A 2 1 20 24 4 4 22 C
|
||||
ATOM 11 C VAL A 2 4.976 0.281 0.000 1.00 3.40 C
|
||||
ANISOU 11 C VAL A 2 413 437 440 5 5 27 C
|
||||
ATOM 12 O VAL A 2 4.746 1.489 -0.046 1.00 3.22 O
|
||||
ANISOU 12 O VAL A 2 395 414 414 4 5 20 O
|
||||
ATOM 13 CB VAL A 2 7.400 -0.027 -0.475 1.00 3.56 C
|
||||
ANISOU 13 CB VAL A 2 440 456 458 3 3 18 C
|
||||
ATOM 14 CG1 VAL A 2 7.566 -0.421 0.993 1.00 7.93 C
|
||||
ANISOU 14 CG1 VAL A 2 986 1012 1016 5 5 30 C
|
||||
ATOM 15 CG2 VAL A 2 8.429 -0.722 -1.342 1.00 6.71 C
|
||||
ANISOU 15 CG2 VAL A 2 841 853 856 2 2 14 C
|
||||
ATOM 16 N HIS A 3 4.367 -0.537 0.850 1.00 0.22 N
|
||||
ANISOU 16 N HIS A 3 1 38 44 7 8 41 N
|
||||
ATOM 17 CA HIS A 3 3.603 -0.011 1.971 1.00 1.73 C
|
||||
ANISOU 17 CA HIS A 3 189 233 237 10 10 48 C
|
||||
ATOM 18 C HIS A 3 4.003 -0.675 3.280 1.00 1.84 C
|
||||
ANISOU 18 C HIS A 3 194 250 255 12 12 61 C
|
||||
ATOM 19 O HIS A 3 4.208 -1.889 3.338 1.00 0.73 O
|
||||
ANISOU 19 O HIS A 3 47 109 120 11 12 69 O
|
||||
ATOM 20 CB HIS A 3 2.095 -0.177 1.781 1.00 2.62 C
|
||||
ANISOU 20 CB HIS A 3 296 346 351 11 11 54 C
|
||||
ATOM 21 CG HIS A 3 1.324 0.074 3.040 1.00 2.97 C
|
||||
ANISOU 21 CG HIS A 3 335 396 399 14 14 66 C
|
||||
ATOM 22 ND1 HIS A 3 0.950 -0.937 3.900 1.00 4.29 N
|
||||
ANISOU 22 ND1 HIS A 3 491 566 573 16 17 82 N
|
||||
ATOM 23 CD2 HIS A 3 0.921 1.230 3.620 1.00 4.90 C
|
||||
ANISOU 23 CD2 HIS A 3 581 642 639 16 16 64 C
|
||||
ATOM 24 CE1 HIS A 3 0.321 -0.417 4.940 1.00 5.53 C
|
||||
ANISOU 24 CE1 HIS A 3 644 727 729 20 20 89 C
|
||||
ATOM 25 NE2 HIS A 3 0.290 0.896 4.794 1.00 6.02 N
|
||||
ANISOU 25 NE2 HIS A 3 714 790 785 20 19 78 N
|
||||
ATOM 26 N SER A 4 4.099 0.141 4.326 1.00 0.34 N
|
||||
ANISOU 26 N SER A 4 3 63 63 14 14 62 N
|
||||
ATOM 27 CA SER A 4 4.357 -0.330 5.683 1.00 1.49 C
|
||||
ANISOU 27 CA SER A 4 141 213 213 16 16 75 C
|
||||
ATOM 28 C SER A 4 3.814 0.686 6.681 1.00 2.14 C
|
||||
ANISOU 28 C SER A 4 222 299 292 20 19 78 C
|
||||
ATOM 29 O SER A 4 4.008 1.889 6.507 1.00 3.47 O
|
||||
ANISOU 29 O SER A 4 397 465 454 19 18 68 O
|
||||
ATOM 30 CB SER A 4 5.858 -0.513 5.905 1.00 5.61 C
|
||||
ANISOU 30 CB SER A 4 665 734 734 15 15 72 C
|
||||
ATOM 31 OG SER A 4 6.132 -0.771 7.272 1.00 9.89 O
|
||||
ANISOU 31 OG SER A 4 1200 1280 1278 18 18 83 O
|
||||
ATOM 32 N SER A 5 3.138 0.213 7.725 1.00 2.34 N
|
||||
ANISOU 32 N SER A 5 239 330 322 24 23 93 N
|
||||
ATOM 33 CA SER A 5 2.651 1.119 8.765 1.00 0.66 C
|
||||
ANISOU 33 CA SER A 5 24 123 106 28 26 97 C
|
||||
ATOM 34 C SER A 5 3.677 1.311 9.885 1.00 2.66 C
|
||||
ANISOU 34 C SER A 5 275 378 356 30 27 100 C
|
||||
ATOM 35 O SER A 5 3.411 2.024 10.851 1.00 2.02 O
|
||||
ANISOU 35 O SER A 5 193 303 273 35 30 104 O
|
||||
ATOM 36 CB SER A 5 1.318 0.639 9.350 1.00 2.68 C
|
||||
ANISOU 36 CB SER A 5 269 383 365 32 29 113 C
|
||||
ATOM 37 OG SER A 5 1.478 -0.544 10.117 1.00 2.49 O
|
||||
ANISOU 37 OG SER A 5 236 363 349 33 31 128 O
|
||||
ATOM 38 N ASN A 6 4.838 0.672 9.758 1.00 2.94 N
|
||||
ANISOU 38 N ASN A 6 311 412 394 28 25 98 N
|
||||
ATOM 39 CA ASN A 6 5.912 0.838 10.741 1.00 4.68 C
|
||||
ANISOU 39 CA ASN A 6 530 634 613 29 26 100 C
|
||||
ATOM 40 C ASN A 6 6.574 2.203 10.638 1.00 10.84 C
|
||||
ANISOU 40 C ASN A 6 1320 1413 1387 28 24 87 C
|
||||
ATOM 41 O ASN A 6 7.335 2.594 11.519 1.00 13.68 O
|
||||
ANISOU 41 O ASN A 6 1680 1775 1745 30 26 88 O
|
||||
ATOM 42 CB ASN A 6 6.986 -0.243 10.589 1.00 5.08 C
|
||||
ANISOU 42 CB ASN A 6 579 682 668 27 25 102 C
|
||||
ATOM 43 CG ASN A 6 6.592 -1.558 11.236 1.00 8.08 C
|
||||
ANISOU 43 CG ASN A 6 948 1067 1057 28 27 120 C
|
||||
ATOM 44 OD1 ASN A 6 5.576 -1.644 11.923 1.00 8.72 O
|
||||
ANISOU 44 OD1 ASN A 6 1022 1152 1139 32 30 131 O
|
||||
ATOM 45 ND2 ASN A 6 7.409 -2.588 11.030 1.00 9.89 N
|
||||
ANISOU 45 ND2 ASN A 6 1174 1293 1290 25 25 122 N
|
||||
ATOM 46 OXT ASN A 6 6.383 2.933 9.667 1.00 14.02 O
|
||||
ANISOU 46 OXT ASN A 6 1730 1811 1787 25 22 75 O
|
||||
TER 47 ASN A 6
|
||||
HETATM 48 O HOH A 101 8.203 1.052 -4.564 1.00 12.67 O
|
||||
ANISOU 48 O HOH A 101 1605 1605 1605 0 0 0 O
|
||||
MASTER 227 0 0 0 0 0 0 6 47 1 0 1
|
||||
END
|
||||
@@ -0,0 +1,385 @@
|
||||
<?xml version="1.0"?>
|
||||
<cml xmlns="http://www.xml-cml.org/schema">
|
||||
<molecule id="Goserelin">
|
||||
<atomArray>
|
||||
<atom id="a1" elementType="O" x2="12.854800" y2="-2.638200"/>
|
||||
<atom id="a2" elementType="O" x2="13.972600" y2="-2.522600"/>
|
||||
<atom id="a3" elementType="O" x2="10.176600" y2="-3.932700"/>
|
||||
<atom id="a4" elementType="O" x2="11.201900" y2="-0.796100"/>
|
||||
<atom id="a5" elementType="O" x2="8.780000" y2="-1.306400"/>
|
||||
<atom id="a6" elementType="O" x2="16.858900" y2="-3.242100"/>
|
||||
<atom id="a7" elementType="O" x2="10.356200" y2="1.216300"/>
|
||||
<atom id="a8" elementType="O" x2="3.270200" y2="4.834100"/>
|
||||
<atom id="a9" elementType="O" x2="2.350000" y2="8.273400"/>
|
||||
<atom id="a10" elementType="O" x2="3.821300" y2="4.220100"/>
|
||||
<atom id="a11" elementType="O" x2="5.217800" y2="1.593800"/>
|
||||
<atom id="a12" elementType="O" x2="7.896000" y2="2.888300"/>
|
||||
<atom id="a13" elementType="O" x2="7.127100" y2="0.535800"/>
|
||||
<atom id="a14" elementType="O" x2="12.483400" y2="3.124900"/>
|
||||
<atom id="a15" elementType="N" x2="13.149500" y2="-4.036400"/>
|
||||
<atom id="a16" elementType="N" x2="11.240200" y2="-2.978400"/>
|
||||
<atom id="a17" elementType="N" x2="15.208900" y2="-3.239300"/>
|
||||
<atom id="a18" elementType="N" x2="10.138300" y2="-1.750300"/>
|
||||
<atom id="a19" elementType="N" x2="15.622600" y2="-2.525500"/>
|
||||
<atom id="a20" elementType="N" x2="12.380600" y2="-6.389000"/>
|
||||
<atom id="a21" elementType="N" x2="9.292600" y2="0.261900"/>
|
||||
<atom id="a22" elementType="N" x2="3.148500" y2="7.039100"/>
|
||||
<atom id="a23" elementType="N" x2="4.333800" y2="5.788400"/>
|
||||
<atom id="a24" elementType="N" x2="16.861300" y2="-1.813200"/>
|
||||
<atom id="a25" elementType="N" x2="8.190700" y2="1.490000"/>
|
||||
<atom id="a26" elementType="N" x2="5.179500" y2="3.776100"/>
|
||||
<atom id="a27" elementType="N" x2="6.281400" y2="2.548000"/>
|
||||
<atom id="a28" elementType="N" x2="11.317000" y2="-7.343300"/>
|
||||
<atom id="a29" elementType="N" x2="12.675300" y2="-7.787300"/>
|
||||
<atom id="a30" elementType="N" x2="3.859600" y2="0.709800"/>
|
||||
<atom id="a31" elementType="N" x2="6.733500" y2="6.382300"/>
|
||||
<atom id="a32" elementType="N" x2="5.950700" y2="7.463600"/>
|
||||
<atom id="a33" elementType="C" x2="13.970100" y2="-3.951600">
|
||||
<atomParity atomRefs4="a33 a39 a34 a15">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a34" elementType="C" x2="14.304300" y2="-4.705800"/>
|
||||
<atom id="a35" elementType="C" x2="13.690300" y2="-5.256900"/>
|
||||
<atom id="a36" elementType="C" x2="12.976600" y2="-4.843100"/>
|
||||
<atom id="a37" elementType="C" x2="12.598400" y2="-3.422400"/>
|
||||
<atom id="a38" elementType="C" x2="11.791200" y2="-3.592500">
|
||||
<atomParity atomRefs4="a38 a16 a37 a40">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a39" elementType="C" x2="14.383800" y2="-3.237800"/>
|
||||
<atom id="a40" elementType="C" x2="11.534900" y2="-4.376700"/>
|
||||
<atom id="a41" elementType="C" x2="12.085900" y2="-4.990700"/>
|
||||
<atom id="a42" elementType="C" x2="9.881900" y2="-2.534500">
|
||||
<atomParity atomRefs4="a42 a18 a43 a44">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a43" elementType="C" x2="10.433000" y2="-3.148600"/>
|
||||
<atom id="a44" elementType="C" x2="9.074700" y2="-2.704600"/>
|
||||
<atom id="a45" elementType="C" x2="8.818400" y2="-3.488900"/>
|
||||
<atom id="a46" elementType="C" x2="11.829500" y2="-5.775000"/>
|
||||
<atom id="a47" elementType="C" x2="8.011200" y2="-3.659000"/>
|
||||
<atom id="a48" elementType="C" x2="9.369400" y2="-4.102900"/>
|
||||
<atom id="a49" elementType="C" x2="9.587300" y2="-1.136300"/>
|
||||
<atom id="a50" elementType="C" x2="9.843600" y2="-0.352100">
|
||||
<atomParity atomRefs4="a50 a21 a51 a49">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a51" elementType="C" x2="10.650900" y2="-0.182000"/>
|
||||
<atom id="a52" elementType="C" x2="16.447600" y2="-2.526900"/>
|
||||
<atom id="a53" elementType="C" x2="2.975600" y2="6.232400">
|
||||
<atomParity atomRefs4="a53 a64 a58 a22">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a54" elementType="C" x2="12.009100" y2="-0.625900"/>
|
||||
<atom id="a55" elementType="C" x2="8.997900" y2="1.660200">
|
||||
<atomParity atomRefs4="a55 a25 a56 a62">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a56" elementType="C" x2="9.548900" y2="1.046100"/>
|
||||
<atom id="a57" elementType="C" x2="12.124200" y2="-7.173200"/>
|
||||
<atom id="a58" elementType="C" x2="2.154900" y2="6.147500"/>
|
||||
<atom id="a59" elementType="C" x2="4.884800" y2="5.174400">
|
||||
<atomParity atomRefs4="a59 a23 a68 a66">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a60" elementType="C" x2="4.923200" y2="2.992000">
|
||||
<atomParity atomRefs4="a60 a26 a73 a63">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a61" elementType="C" x2="1.820700" y2="6.901900"/>
|
||||
<atom id="a62" elementType="C" x2="9.254200" y2="2.444400"/>
|
||||
<atom id="a63" elementType="C" x2="4.115900" y2="2.821900"/>
|
||||
<atom id="a64" elementType="C" x2="3.526600" y2="5.618300"/>
|
||||
<atom id="a65" elementType="C" x2="2.434800" y2="7.452800"/>
|
||||
<atom id="a66" elementType="C" x2="5.692100" y2="5.344500"/>
|
||||
<atom id="a67" elementType="C" x2="6.832400" y2="1.934000">
|
||||
<atomParity atomRefs4="a67 a27 a74 a80">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a68" elementType="C" x2="4.628500" y2="4.390200"/>
|
||||
<atom id="a69" elementType="C" x2="12.179300" y2="-1.433200"/>
|
||||
<atom id="a70" elementType="C" x2="12.816400" y2="-0.455700"/>
|
||||
<atom id="a71" elementType="C" x2="11.838900" y2="0.181400"/>
|
||||
<atom id="a72" elementType="C" x2="3.859600" y2="2.037600"/>
|
||||
<atom id="a73" elementType="C" x2="5.474200" y2="2.377900"/>
|
||||
<atom id="a74" elementType="C" x2="7.639700" y2="2.104100"/>
|
||||
<atom id="a75" elementType="C" x2="10.061500" y2="2.614500"/>
|
||||
<atom id="a76" elementType="C" x2="3.079000" y2="1.786200"/>
|
||||
<atom id="a77" elementType="C" x2="5.948400" y2="6.128700"/>
|
||||
<atom id="a78" elementType="C" x2="4.341100" y2="1.373700"/>
|
||||
<atom id="a79" elementType="C" x2="3.079000" y2="0.961200"/>
|
||||
<atom id="a80" elementType="C" x2="6.576100" y2="1.149800"/>
|
||||
<atom id="a81" elementType="C" x2="2.364500" y2="2.198700"/>
|
||||
<atom id="a82" elementType="C" x2="10.317800" y2="3.398700"/>
|
||||
<atom id="a83" elementType="C" x2="10.612500" y2="2.000500"/>
|
||||
<atom id="a84" elementType="C" x2="2.364500" y2="0.548700"/>
|
||||
<atom id="a85" elementType="C" x2="5.464600" y2="6.797000"/>
|
||||
<atom id="a86" elementType="C" x2="1.650000" y2="1.786200"/>
|
||||
<atom id="a87" elementType="C" x2="1.650000" y2="0.961200"/>
|
||||
<atom id="a88" elementType="C" x2="11.125100" y2="3.568800"/>
|
||||
<atom id="a89" elementType="C" x2="11.419800" y2="2.170600"/>
|
||||
<atom id="a90" elementType="C" x2="6.734900" y2="7.207300"/>
|
||||
<atom id="a91" elementType="C" x2="11.676100" y2="2.954800"/>
|
||||
</atomArray>
|
||||
<bondArray>
|
||||
<bond atomRefs2="a1 a37" order="2"/>
|
||||
<bond atomRefs2="a2 a39" order="2"/>
|
||||
<bond atomRefs2="a3 a43" order="2"/>
|
||||
<bond atomRefs2="a4 a51" order="1"/>
|
||||
<bond atomRefs2="a4 a54" order="1"/>
|
||||
<bond atomRefs2="a5 a49" order="2"/>
|
||||
<bond atomRefs2="a6 a52" order="2"/>
|
||||
<bond atomRefs2="a7 a56" order="2"/>
|
||||
<bond atomRefs2="a8 a64" order="2"/>
|
||||
<bond atomRefs2="a9 a65" order="2"/>
|
||||
<bond atomRefs2="a10 a68" order="2"/>
|
||||
<bond atomRefs2="a11 a73" order="2"/>
|
||||
<bond atomRefs2="a12 a74" order="2"/>
|
||||
<bond atomRefs2="a13 a80" order="1"/>
|
||||
<bond atomRefs2="a14 a91" order="1"/>
|
||||
<bond atomRefs2="a15 a33" order="1"/>
|
||||
<bond atomRefs2="a15 a36" order="1"/>
|
||||
<bond atomRefs2="a15 a37" order="1"/>
|
||||
<bond atomRefs2="a38 a16" order="1"/>
|
||||
<bond atomRefs2="a16 a43" order="1"/>
|
||||
<bond atomRefs2="a17 a19" order="1"/>
|
||||
<bond atomRefs2="a17 a39" order="1"/>
|
||||
<bond atomRefs2="a42 a18" order="1"/>
|
||||
<bond atomRefs2="a18 a49" order="1"/>
|
||||
<bond atomRefs2="a19 a52" order="1"/>
|
||||
<bond atomRefs2="a20 a46" order="1"/>
|
||||
<bond atomRefs2="a20 a57" order="2"/>
|
||||
<bond atomRefs2="a50 a21" order="1"/>
|
||||
<bond atomRefs2="a21 a56" order="1"/>
|
||||
<bond atomRefs2="a22 a53" order="1"/>
|
||||
<bond atomRefs2="a22 a65" order="1"/>
|
||||
<bond atomRefs2="a59 a23" order="1"/>
|
||||
<bond atomRefs2="a23 a64" order="1"/>
|
||||
<bond atomRefs2="a24 a52" order="1"/>
|
||||
<bond atomRefs2="a55 a25" order="1"/>
|
||||
<bond atomRefs2="a25 a74" order="1"/>
|
||||
<bond atomRefs2="a60 a26" order="1"/>
|
||||
<bond atomRefs2="a26 a68" order="1"/>
|
||||
<bond atomRefs2="a67 a27" order="1"/>
|
||||
<bond atomRefs2="a27 a73" order="1"/>
|
||||
<bond atomRefs2="a28 a57" order="1"/>
|
||||
<bond atomRefs2="a29 a57" order="1"/>
|
||||
<bond atomRefs2="a30 a78" order="1"/>
|
||||
<bond atomRefs2="a30 a79" order="1"/>
|
||||
<bond atomRefs2="a31 a77" order="1"/>
|
||||
<bond atomRefs2="a31 a90" order="1"/>
|
||||
<bond atomRefs2="a32 a85" order="1"/>
|
||||
<bond atomRefs2="a32 a90" order="2"/>
|
||||
<bond atomRefs2="a33 a34" order="1"/>
|
||||
<bond atomRefs2="a33 a39" order="1"/>
|
||||
<bond atomRefs2="a34 a35" order="1"/>
|
||||
<bond atomRefs2="a35 a36" order="1"/>
|
||||
<bond atomRefs2="a37 a38" order="1"/>
|
||||
<bond atomRefs2="a38 a40" order="1"/>
|
||||
<bond atomRefs2="a40 a41" order="1"/>
|
||||
<bond atomRefs2="a41 a46" order="1"/>
|
||||
<bond atomRefs2="a42 a43" order="1"/>
|
||||
<bond atomRefs2="a42 a44" order="1"/>
|
||||
<bond atomRefs2="a44 a45" order="1"/>
|
||||
<bond atomRefs2="a45 a47" order="1"/>
|
||||
<bond atomRefs2="a45 a48" order="1"/>
|
||||
<bond atomRefs2="a49 a50" order="1"/>
|
||||
<bond atomRefs2="a50 a51" order="1"/>
|
||||
<bond atomRefs2="a53 a58" order="1"/>
|
||||
<bond atomRefs2="a53 a64" order="1"/>
|
||||
<bond atomRefs2="a54 a69" order="1"/>
|
||||
<bond atomRefs2="a54 a70" order="1"/>
|
||||
<bond atomRefs2="a54 a71" order="1"/>
|
||||
<bond atomRefs2="a55 a56" order="1"/>
|
||||
<bond atomRefs2="a55 a62" order="1"/>
|
||||
<bond atomRefs2="a58 a61" order="1"/>
|
||||
<bond atomRefs2="a59 a66" order="1"/>
|
||||
<bond atomRefs2="a59 a68" order="1"/>
|
||||
<bond atomRefs2="a60 a63" order="1"/>
|
||||
<bond atomRefs2="a60 a73" order="1"/>
|
||||
<bond atomRefs2="a61 a65" order="1"/>
|
||||
<bond atomRefs2="a62 a75" order="1"/>
|
||||
<bond atomRefs2="a63 a72" order="1"/>
|
||||
<bond atomRefs2="a66 a77" order="1"/>
|
||||
<bond atomRefs2="a67 a74" order="1"/>
|
||||
<bond atomRefs2="a67 a80" order="1"/>
|
||||
<bond atomRefs2="a72 a76" order="1"/>
|
||||
<bond atomRefs2="a72 a78" order="2"/>
|
||||
<bond atomRefs2="a75 a82" order="2"/>
|
||||
<bond atomRefs2="a75 a83" order="1"/>
|
||||
<bond atomRefs2="a76 a79" order="1"/>
|
||||
<bond atomRefs2="a76 a81" order="2"/>
|
||||
<bond atomRefs2="a77 a85" order="2"/>
|
||||
<bond atomRefs2="a79 a84" order="2"/>
|
||||
<bond atomRefs2="a81 a86" order="1"/>
|
||||
<bond atomRefs2="a82 a88" order="1"/>
|
||||
<bond atomRefs2="a83 a89" order="2"/>
|
||||
<bond atomRefs2="a84 a87" order="1"/>
|
||||
<bond atomRefs2="a86 a87" order="2"/>
|
||||
<bond atomRefs2="a88 a91" order="2"/>
|
||||
<bond atomRefs2="a89 a91" order="1"/>
|
||||
</bondArray>
|
||||
</molecule>
|
||||
<molecule id="Desmopressin">
|
||||
<atomArray>
|
||||
<atom id="a1" elementType="N" x2="0.000000" y2="-7.864600"/>
|
||||
<atom id="a2" elementType="C" x2="0.674100" y2="-7.460100"/>
|
||||
<atom id="a3" elementType="C" x2="1.393200" y2="-7.864600"/>
|
||||
<atom id="a4" elementType="N" x2="2.112200" y2="-7.460100"/>
|
||||
<atom id="a5" elementType="C" x2="2.831300" y2="-7.864600"/>
|
||||
<atom id="a6" elementType="C" x2="3.550300" y2="-7.460100">
|
||||
<atomParity atomRefs4="a6 a12 a7 a5">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a7" elementType="N" x2="4.269300" y2="-7.864600"/>
|
||||
<atom id="a8" elementType="C" x2="4.943500" y2="-7.460100"/>
|
||||
<atom id="a9" elementType="O" x2="5.662500" y2="-7.864600"/>
|
||||
<atom id="a10" elementType="O" x2="0.674100" y2="-6.651200"/>
|
||||
<atom id="a11" elementType="O" x2="2.831300" y2="-8.718400"/>
|
||||
<atom id="a12" elementType="C" x2="3.550300" y2="-6.651200"/>
|
||||
<atom id="a13" elementType="C" x2="2.831300" y2="-6.246700"/>
|
||||
<atom id="a14" elementType="C" x2="2.831300" y2="-5.437800"/>
|
||||
<atom id="a15" elementType="N" x2="2.112200" y2="-5.033300"/>
|
||||
<atom id="a16" elementType="C" x2="4.943500" y2="-6.651200">
|
||||
<atomParity atomRefs4="a16 a8 a17 a18">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a17" elementType="C" x2="4.314300" y2="-6.156800"/>
|
||||
<atom id="a18" elementType="N" x2="5.617600" y2="-6.156800"/>
|
||||
<atom id="a19" elementType="C" x2="4.539000" y2="-5.392900"/>
|
||||
<atom id="a20" elementType="C" x2="5.347900" y2="-5.392900"/>
|
||||
<atom id="a21" elementType="C" x2="6.336600" y2="-6.561300"/>
|
||||
<atom id="a22" elementType="C" x2="7.055700" y2="-6.156800">
|
||||
<atomParity atomRefs4="a22 a21 a28 a23">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a23" elementType="N" x2="7.774700" y2="-6.561300"/>
|
||||
<atom id="a24" elementType="C" x2="8.448800" y2="-6.156800"/>
|
||||
<atom id="a25" elementType="C" x2="9.167800" y2="-6.561300">
|
||||
<atomParity atomRefs4="a25 a32 a26 a24">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a26" elementType="N" x2="9.886900" y2="-6.156800"/>
|
||||
<atom id="a27" elementType="O" x2="6.336600" y2="-7.415200"/>
|
||||
<atom id="a28" elementType="C" x2="7.055700" y2="-5.347900"/>
|
||||
<atom id="a29" elementType="S" x2="6.336600" y2="-4.943500"/>
|
||||
<atom id="a30" elementType="S" x2="6.336600" y2="-4.134500"/>
|
||||
<atom id="a31" elementType="O" x2="8.448800" y2="-5.347900"/>
|
||||
<atom id="a32" elementType="C" x2="9.167800" y2="-7.415200"/>
|
||||
<atom id="a33" elementType="C" x2="9.886900" y2="-7.819700"/>
|
||||
<atom id="a34" elementType="O" x2="9.886900" y2="-8.628600"/>
|
||||
<atom id="a35" elementType="N" x2="10.606000" y2="-7.415200"/>
|
||||
<atom id="a36" elementType="C" x2="9.886900" y2="-5.347900"/>
|
||||
<atom id="a37" elementType="C" x2="10.606000" y2="-4.943500">
|
||||
<atomParity atomRefs4="a37 a39 a44 a36">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a38" elementType="O" x2="9.167800" y2="-4.943500"/>
|
||||
<atom id="a39" elementType="C" x2="11.325000" y2="-5.347900"/>
|
||||
<atom id="a40" elementType="C" x2="12.044100" y2="-4.943500"/>
|
||||
<atom id="a41" elementType="C" x2="12.763100" y2="-5.347900"/>
|
||||
<atom id="a42" elementType="N" x2="13.482200" y2="-4.943500"/>
|
||||
<atom id="a43" elementType="O" x2="12.763100" y2="-6.201800"/>
|
||||
<atom id="a44" elementType="N" x2="10.606000" y2="-4.134500"/>
|
||||
<atom id="a45" elementType="C" x2="11.325000" y2="-2.876200"/>
|
||||
<atom id="a46" elementType="C" x2="11.325000" y2="-3.730000"/>
|
||||
<atom id="a47" elementType="C" x2="10.606000" y2="-2.471700"/>
|
||||
<atom id="a48" elementType="C" x2="9.886900" y2="-2.876200">
|
||||
<atomParity atomRefs4="a48 a47 a61 a49">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a49" elementType="C" x2="9.886900" y2="-3.730000"/>
|
||||
<atom id="a50" elementType="C" x2="12.763100" y2="-2.876200"/>
|
||||
<atom id="a51" elementType="C" x2="12.763100" y2="-3.730000"/>
|
||||
<atom id="a52" elementType="C" x2="12.044100" y2="-2.471700"/>
|
||||
<atom id="a53" elementType="C" x2="12.044100" y2="-4.134500"/>
|
||||
<atom id="a54" elementType="N" x2="7.055700" y2="-2.876200"/>
|
||||
<atom id="a55" elementType="C" x2="6.336600" y2="-2.471700"/>
|
||||
<atom id="a56" elementType="C" x2="5.617600" y2="-2.876200"/>
|
||||
<atom id="a57" elementType="C" x2="5.617600" y2="-3.730000"/>
|
||||
<atom id="a58" elementType="C" x2="8.448800" y2="-2.876200"/>
|
||||
<atom id="a59" elementType="O" x2="8.448800" y2="-3.730000"/>
|
||||
<atom id="a60" elementType="C" x2="7.774700" y2="-2.471700">
|
||||
<atomParity atomRefs4="a60 a63 a54 a58">1</atomParity>
|
||||
</atom>
|
||||
<atom id="a61" elementType="N" x2="9.167800" y2="-2.471700"/>
|
||||
<atom id="a62" elementType="O" x2="9.167800" y2="-4.134500"/>
|
||||
<atom id="a63" elementType="C" x2="7.774700" y2="-1.662800"/>
|
||||
<atom id="a64" elementType="C" x2="9.167800" y2="-1.662800"/>
|
||||
<atom id="a65" elementType="C" x2="8.448800" y2="-1.258300"/>
|
||||
<atom id="a66" elementType="C" x2="9.886900" y2="-1.258300"/>
|
||||
<atom id="a67" elementType="C" x2="9.886900" y2="-0.404500"/>
|
||||
<atom id="a68" elementType="C" x2="8.448800" y2="-0.404500"/>
|
||||
<atom id="a69" elementType="C" x2="9.167800" y2="0.000000"/>
|
||||
<atom id="a70" elementType="O" x2="6.336600" y2="-1.662800"/>
|
||||
<atom id="a71" elementType="O" x2="10.606000" y2="0.000000"/>
|
||||
<atom id="a72" elementType="C" x2="1.393200" y2="-5.437800"/>
|
||||
<atom id="a73" elementType="N" x2="1.393200" y2="-6.246700"/>
|
||||
<atom id="a74" elementType="N" x2="0.674100" y2="-5.033300"/>
|
||||
</atomArray>
|
||||
<bondArray>
|
||||
<bond atomRefs2="a1 a2" order="1"/>
|
||||
<bond atomRefs2="a2 a3" order="1"/>
|
||||
<bond atomRefs2="a2 a10" order="2"/>
|
||||
<bond atomRefs2="a3 a4" order="1"/>
|
||||
<bond atomRefs2="a4 a5" order="1"/>
|
||||
<bond atomRefs2="a5 a6" order="1"/>
|
||||
<bond atomRefs2="a5 a11" order="2"/>
|
||||
<bond atomRefs2="a6 a7" order="1"/>
|
||||
<bond atomRefs2="a6 a12" order="1"/>
|
||||
<bond atomRefs2="a7 a8" order="1"/>
|
||||
<bond atomRefs2="a8 a9" order="2"/>
|
||||
<bond atomRefs2="a16 a8" order="1"/>
|
||||
<bond atomRefs2="a12 a13" order="1"/>
|
||||
<bond atomRefs2="a13 a14" order="1"/>
|
||||
<bond atomRefs2="a14 a15" order="1"/>
|
||||
<bond atomRefs2="a15 a72" order="1"/>
|
||||
<bond atomRefs2="a16 a17" order="1"/>
|
||||
<bond atomRefs2="a16 a18" order="1"/>
|
||||
<bond atomRefs2="a17 a19" order="1"/>
|
||||
<bond atomRefs2="a18 a20" order="1"/>
|
||||
<bond atomRefs2="a18 a21" order="1"/>
|
||||
<bond atomRefs2="a19 a20" order="1"/>
|
||||
<bond atomRefs2="a22 a21" order="1"/>
|
||||
<bond atomRefs2="a21 a27" order="2"/>
|
||||
<bond atomRefs2="a22 a23" order="1"/>
|
||||
<bond atomRefs2="a22 a28" order="1"/>
|
||||
<bond atomRefs2="a23 a24" order="1"/>
|
||||
<bond atomRefs2="a24 a25" order="1"/>
|
||||
<bond atomRefs2="a24 a31" order="2"/>
|
||||
<bond atomRefs2="a25 a26" order="1"/>
|
||||
<bond atomRefs2="a25 a32" order="1"/>
|
||||
<bond atomRefs2="a26 a36" order="1"/>
|
||||
<bond atomRefs2="a28 a29" order="1"/>
|
||||
<bond atomRefs2="a29 a30" order="1"/>
|
||||
<bond atomRefs2="a30 a57" order="1"/>
|
||||
<bond atomRefs2="a32 a33" order="1"/>
|
||||
<bond atomRefs2="a33 a34" order="2"/>
|
||||
<bond atomRefs2="a33 a35" order="1"/>
|
||||
<bond atomRefs2="a36 a37" order="1"/>
|
||||
<bond atomRefs2="a36 a38" order="2"/>
|
||||
<bond atomRefs2="a37 a39" order="1"/>
|
||||
<bond atomRefs2="a37 a44" order="1"/>
|
||||
<bond atomRefs2="a39 a40" order="1"/>
|
||||
<bond atomRefs2="a40 a41" order="1"/>
|
||||
<bond atomRefs2="a41 a42" order="1"/>
|
||||
<bond atomRefs2="a41 a43" order="2"/>
|
||||
<bond atomRefs2="a44 a49" order="1"/>
|
||||
<bond atomRefs2="a45 a47" order="1"/>
|
||||
<bond atomRefs2="a45 a52" order="1"/>
|
||||
<bond atomRefs2="a45 a46" order="2"/>
|
||||
<bond atomRefs2="a46 a53" order="1"/>
|
||||
<bond atomRefs2="a48 a47" order="1"/>
|
||||
<bond atomRefs2="a48 a61" order="1"/>
|
||||
<bond atomRefs2="a48 a49" order="1"/>
|
||||
<bond atomRefs2="a49 a62" order="2"/>
|
||||
<bond atomRefs2="a50 a51" order="1"/>
|
||||
<bond atomRefs2="a50 a52" order="2"/>
|
||||
<bond atomRefs2="a51 a53" order="2"/>
|
||||
<bond atomRefs2="a54 a55" order="1"/>
|
||||
<bond atomRefs2="a54 a60" order="1"/>
|
||||
<bond atomRefs2="a55 a56" order="1"/>
|
||||
<bond atomRefs2="a55 a70" order="2"/>
|
||||
<bond atomRefs2="a56 a57" order="1"/>
|
||||
<bond atomRefs2="a58 a59" order="2"/>
|
||||
<bond atomRefs2="a58 a60" order="1"/>
|
||||
<bond atomRefs2="a58 a61" order="1"/>
|
||||
<bond atomRefs2="a60 a63" order="1"/>
|
||||
<bond atomRefs2="a63 a65" order="1"/>
|
||||
<bond atomRefs2="a64 a66" order="2"/>
|
||||
<bond atomRefs2="a64 a65" order="1"/>
|
||||
<bond atomRefs2="a65 a68" order="2"/>
|
||||
<bond atomRefs2="a66 a67" order="1"/>
|
||||
<bond atomRefs2="a67 a69" order="2"/>
|
||||
<bond atomRefs2="a67 a71" order="1"/>
|
||||
<bond atomRefs2="a68 a69" order="1"/>
|
||||
<bond atomRefs2="a72 a73" order="2"/>
|
||||
<bond atomRefs2="a72 a74" order="1"/>
|
||||
</bondArray>
|
||||
</molecule>
|
||||
</cml>
|
||||
@@ -0,0 +1,2 @@
|
||||
InChI=1S/C59H84N18O14/c1-31(2)22-40(49(82)68-39(12-8-20-64-57(60)61)56(89)77-21-9-13-46(77)55(88)75-76-58(62)90)69-54(87)45(29-91-59(3,4)5)74-50(83)41(23-32-14-16-35(79)17-15-32)70-53(86)44(28-78)73-51(84)42(24-33-26-65-37-11-7-6-10-36(33)37)71-52(85)43(25-34-27-63-30-66-34)72-48(81)38-18-19-47(80)67-38/h6-7,10-11,14-17,26-27,30-31,38-46,65,78-79H,8-9,12-13,18-25,28-29H2,1-5H3,(H,63,66)(H,67,80)(H,68,82)(H,69,87)(H,70,86)(H,71,85)(H,72,81)(H,73,84)(H,74,83)(H,75,88)(H4,60,61,64)(H3,62,76,90)/t38-,39-,40-,41-,42-,43-,44-,45+,46-/m0/s1
|
||||
InChI=1S/C46H64N14O12S2/c47-35(62)15-14-29-40(67)58-32(22-36(48)63)43(70)59-33(45(72)60-18-5-9-34(60)44(71)56-28(8-4-17-52-46(50)51)39(66)53-23-37(49)64)24-74-73-19-16-38(65)54-30(21-26-10-12-27(61)13-11-26)41(68)57-31(42(69)55-29)20-25-6-2-1-3-7-25/h1-3,6-7,10-13,28-34,61H,4-5,8-9,14-24H2,(H2,47,62)(H2,48,63)(H2,49,64)(H,53,66)(H,54,65)(H,55,69)(H,56,71)(H,57,68)(H,58,67)(H,59,70)(H4,50,51,52)/t28-,29-,30-,31-,32-,33-,34-/m0/s1
|
||||
@@ -0,0 +1,354 @@
|
||||
@<TRIPOS>MOLECULE
|
||||
Goserelin
|
||||
91 96 0 0 0
|
||||
SMALL
|
||||
GASTEIGER
|
||||
|
||||
@<TRIPOS>ATOM
|
||||
1 O 12.8548 -2.6382 0.0000 O.2 4 UNK4 -0.2730
|
||||
2 O 13.9726 -2.5226 0.0000 O.2 4 UNK4 -0.2699
|
||||
3 O 10.1766 -3.9327 0.0000 O.2 4 UNK4 -0.2715
|
||||
4 O 11.2019 -0.7961 0.0000 O.3 4 UNK4 -0.3562
|
||||
5 O 8.7800 -1.3064 0.0000 O.2 4 UNK4 -0.2714
|
||||
6 O 16.8589 -3.2421 0.0000 O.2 4 UNK4 -0.2457
|
||||
7 O 10.3562 1.2163 0.0000 O.2 4 UNK4 -0.2715
|
||||
8 O 3.2702 4.8341 0.0000 O.2 1 UNK1 -0.2715
|
||||
9 O 2.3500 8.2734 0.0000 O.2 1 UNK1 -0.2733
|
||||
10 O 3.8213 4.2201 0.0000 O.2 2 HIS2 -0.2715
|
||||
11 O 5.2178 1.5938 0.0000 O.2 3 TRP3 -0.2715
|
||||
12 O 7.8960 2.8883 0.0000 O.2 4 UNK4 -0.2714
|
||||
13 O 7.1271 0.5358 0.0000 O.3 4 UNK4 -0.2179
|
||||
14 O 12.4834 3.1249 0.0000 O.3 4 UNK4 -0.2866
|
||||
15 N 13.1495 -4.0364 0.0000 N.am 4 UNK4 -0.2715
|
||||
16 N 11.2402 -2.9784 0.0000 N.am 4 UNK4 -0.1964
|
||||
17 N 15.2089 -3.2393 0.0000 N.am 4 UNK4 -0.0850
|
||||
18 N 10.1383 -1.7503 0.0000 N.am 4 UNK4 -0.1963
|
||||
19 N 15.6226 -2.5255 0.0000 N.am 4 UNK4 -0.0678
|
||||
20 N 12.3806 -6.3890 0.0000 N.pl3 4 UNK4 -0.0865
|
||||
21 N 9.2926 0.2619 0.0000 N.am 4 UNK4 -0.1937
|
||||
22 N 3.1485 7.0391 0.0000 N.am 1 UNK1 -0.1978
|
||||
23 N 4.3338 5.7884 0.0000 N.am 2 HIS2 -0.1959
|
||||
24 N 16.8613 -1.8132 0.0000 N.am 4 UNK4 -0.0665
|
||||
25 N 8.1907 1.4900 0.0000 N.am 4 UNK4 -0.1959
|
||||
26 N 5.1795 3.7761 0.0000 N.am 3 TRP3 -0.1960
|
||||
27 N 6.2814 2.5480 0.0000 N.am 4 UNK4 -0.1936
|
||||
28 N 11.3170 -7.3433 0.0000 N.pl3 4 UNK4 0.1354
|
||||
29 N 12.6753 -7.7873 0.0000 N.pl3 4 UNK4 0.1354
|
||||
30 NE1 3.8596 0.7098 0.0000 N.ar 3 TRP3 -0.2442
|
||||
31 ND1 6.7335 6.3823 0.0000 N.ar 2 HIS2 -0.2267
|
||||
32 NE2 5.9507 7.4636 0.0000 N.ar 2 HIS2 -0.2212
|
||||
33 C 13.9701 -3.9516 0.0000 C.3 4 UNK4 0.1552
|
||||
34 C 14.3043 -4.7058 0.0000 C.3 4 UNK4 0.0311
|
||||
35 C 13.6903 -5.2569 0.0000 C.3 4 UNK4 0.0237
|
||||
36 C 12.9766 -4.8431 0.0000 C.3 4 UNK4 0.0939
|
||||
37 C 12.5984 -3.4224 0.0000 C.2 4 UNK4 0.2458
|
||||
38 C 11.7912 -3.5925 0.0000 C.3 4 UNK4 0.1714
|
||||
39 C 14.3838 -3.2378 0.0000 C.2 4 UNK4 0.2788
|
||||
40 C 11.5349 -4.3767 0.0000 C.3 4 UNK4 0.0347
|
||||
41 C 12.0859 -4.9907 0.0000 C.3 4 UNK4 0.0492
|
||||
42 C 9.8819 -2.5345 0.0000 C.3 4 UNK4 0.1728
|
||||
43 C 10.4330 -3.1486 0.0000 C.2 4 UNK4 0.2616
|
||||
44 C 9.0747 -2.7046 0.0000 C.3 4 UNK4 0.0311
|
||||
45 C 8.8184 -3.4889 0.0000 C.3 4 UNK4 0.0022
|
||||
46 C 11.8295 -5.7750 0.0000 C.3 4 UNK4 0.2205
|
||||
47 C 8.0112 -3.6590 0.0000 C.3 4 UNK4 0.0001
|
||||
48 C 9.3694 -4.1029 0.0000 C.3 4 UNK4 0.0001
|
||||
49 C 9.5873 -1.1363 0.0000 C.2 4 UNK4 0.2642
|
||||
50 C 9.8436 -0.3521 0.0000 C.3 4 UNK4 0.2021
|
||||
51 C 10.6509 -0.1820 0.0000 C.3 4 UNK4 0.1729
|
||||
52 C 16.4476 -2.5269 0.0000 C.2 4 UNK4 0.3786
|
||||
53 C 2.9756 6.2324 0.0000 C.3 1 UNK1 0.1732
|
||||
54 C 12.0091 -0.6259 0.0000 C.3 4 UNK4 0.0931
|
||||
55 C 8.9979 1.6602 0.0000 C.3 4 UNK4 0.1771
|
||||
56 C 9.5489 1.0461 0.0000 C.2 4 UNK4 0.2620
|
||||
57 C 12.1242 -7.1732 0.0000 C.cat 4 UNK4 0.5346
|
||||
58 C 2.1549 6.1475 0.0000 C.3 1 UNK1 0.0407
|
||||
59 CA 4.8848 5.1744 0.0000 C.3 2 HIS2 0.1787
|
||||
60 CA 4.9232 2.9920 0.0000 C.3 3 TRP3 0.1771
|
||||
61 C 1.8207 6.9019 0.0000 C.3 1 UNK1 0.0891
|
||||
62 C 9.2542 2.4444 0.0000 C.3 4 UNK4 0.0574
|
||||
63 CB 4.1159 2.8219 0.0000 C.3 3 TRP3 0.0590
|
||||
64 C 3.5266 5.6183 0.0000 C.2 1 UNK1 0.2616
|
||||
65 C 2.4348 7.4528 0.0000 C.2 1 UNK1 0.2418
|
||||
66 CB 5.6921 5.3445 0.0000 C.3 2 HIS2 0.0785
|
||||
67 C 6.8324 1.9340 0.0000 C.3 4 UNK4 0.2055
|
||||
68 C 4.6285 4.3902 0.0000 C.2 2 HIS2 0.2620
|
||||
69 C 12.1793 -1.4332 0.0000 C.3 4 UNK4 0.0296
|
||||
70 C 12.8164 -0.4557 0.0000 C.3 4 UNK4 0.0296
|
||||
71 C 11.8389 0.1814 0.0000 C.3 4 UNK4 0.0296
|
||||
72 CG 3.8596 2.0376 0.0000 C.ar 3 TRP3 0.0006
|
||||
73 C 5.4742 2.3779 0.0000 C.2 3 TRP3 0.2620
|
||||
74 C 7.6397 2.1041 0.0000 C.2 4 UNK4 0.2643
|
||||
75 C 10.0615 2.6145 0.0000 C.ar 4 UNK4 -0.0198
|
||||
76 CD2 3.0790 1.7862 0.0000 C.ar 3 TRP3 0.0152
|
||||
77 CG 5.9484 6.1287 0.0000 C.ar 2 HIS2 0.0821
|
||||
78 CD1 4.3411 1.3737 0.0000 C.ar 3 TRP3 0.0946
|
||||
79 CE2 3.0790 0.9612 0.0000 C.ar 3 TRP3 0.0810
|
||||
80 C 6.5761 1.1498 0.0000 C.3 4 UNK4 0.2130
|
||||
81 CE3 2.3645 2.1987 0.0000 C.ar 3 TRP3 0.0012
|
||||
82 C 10.3178 3.3987 0.0000 C.ar 4 UNK4 -0.0009
|
||||
83 C 10.6125 2.0005 0.0000 C.ar 4 UNK4 -0.0009
|
||||
84 CZ2 2.3645 0.5487 0.0000 C.ar 3 TRP3 0.0191
|
||||
85 CD2 5.4646 6.7970 0.0000 C.ar 2 HIS2 0.1154
|
||||
86 CZ3 1.6500 1.7862 0.0000 C.ar 3 TRP3 0.0001
|
||||
87 CH2 1.6500 0.9612 0.0000 C.ar 3 TRP3 0.0015
|
||||
88 C 11.1251 3.5688 0.0000 C.ar 4 UNK4 0.0417
|
||||
89 C 11.4198 2.1706 0.0000 C.ar 4 UNK4 0.0417
|
||||
90 CE1 6.7349 7.2073 0.0000 C.ar 2 HIS2 0.1986
|
||||
91 C 11.6761 2.9548 0.0000 C.ar 4 UNK4 0.1957
|
||||
@<TRIPOS>BOND
|
||||
1 1 37 2
|
||||
2 2 39 2
|
||||
3 3 43 2
|
||||
4 4 51 1
|
||||
5 4 54 1
|
||||
6 5 49 2
|
||||
7 6 52 2
|
||||
8 7 56 2
|
||||
9 8 64 2
|
||||
10 9 65 2
|
||||
11 10 68 2
|
||||
12 11 73 2
|
||||
13 12 74 2
|
||||
14 13 80 1
|
||||
15 14 91 1
|
||||
16 15 33 1
|
||||
17 15 36 1
|
||||
18 15 37 am
|
||||
19 38 16 1
|
||||
20 16 43 am
|
||||
21 17 19 1
|
||||
22 17 39 am
|
||||
23 42 18 1
|
||||
24 18 49 am
|
||||
25 19 52 am
|
||||
26 20 46 1
|
||||
27 20 57 2
|
||||
28 50 21 1
|
||||
29 21 56 am
|
||||
30 22 53 1
|
||||
31 22 65 am
|
||||
32 59 23 1
|
||||
33 23 64 am
|
||||
34 24 52 am
|
||||
35 55 25 1
|
||||
36 25 74 am
|
||||
37 60 26 1
|
||||
38 26 68 am
|
||||
39 67 27 1
|
||||
40 27 73 am
|
||||
41 28 57 1
|
||||
42 29 57 1
|
||||
43 30 78 ar
|
||||
44 30 79 ar
|
||||
45 31 77 ar
|
||||
46 31 90 ar
|
||||
47 32 85 ar
|
||||
48 32 90 ar
|
||||
49 33 34 1
|
||||
50 33 39 1
|
||||
51 34 35 1
|
||||
52 35 36 1
|
||||
53 37 38 1
|
||||
54 38 40 1
|
||||
55 40 41 1
|
||||
56 41 46 1
|
||||
57 42 43 1
|
||||
58 42 44 1
|
||||
59 44 45 1
|
||||
60 45 47 1
|
||||
61 45 48 1
|
||||
62 49 50 1
|
||||
63 50 51 1
|
||||
64 53 58 1
|
||||
65 53 64 1
|
||||
66 54 69 1
|
||||
67 54 70 1
|
||||
68 54 71 1
|
||||
69 55 56 1
|
||||
70 55 62 1
|
||||
71 58 61 1
|
||||
72 59 66 1
|
||||
73 59 68 1
|
||||
74 60 63 1
|
||||
75 60 73 1
|
||||
76 61 65 1
|
||||
77 62 75 1
|
||||
78 63 72 1
|
||||
79 66 77 1
|
||||
80 67 74 1
|
||||
81 67 80 1
|
||||
82 72 76 ar
|
||||
83 72 78 ar
|
||||
84 75 82 ar
|
||||
85 75 83 ar
|
||||
86 76 79 ar
|
||||
87 76 81 ar
|
||||
88 77 85 ar
|
||||
89 79 84 ar
|
||||
90 81 86 ar
|
||||
91 82 88 ar
|
||||
92 83 89 ar
|
||||
93 84 87 ar
|
||||
94 86 87 ar
|
||||
95 88 91 ar
|
||||
96 89 91 ar
|
||||
@<TRIPOS>MOLECULE
|
||||
Desmopressin
|
||||
74 77 0 0 0
|
||||
SMALL
|
||||
GASTEIGER
|
||||
|
||||
@<TRIPOS>ATOM
|
||||
1 N 0.0000 -7.8646 0.0000 N.am 1 LIG1 -0.0862
|
||||
2 C 0.6741 -7.4601 0.0000 C.2 1 LIG1 0.2828
|
||||
3 C 1.3932 -7.8646 0.0000 C.3 1 LIG1 0.2031
|
||||
4 N 2.1122 -7.4601 0.0000 N.am 1 LIG1 -0.1939
|
||||
5 C 2.8313 -7.8646 0.0000 C.2 1 LIG1 0.2617
|
||||
6 C 3.5503 -7.4601 0.0000 C.3 1 LIG1 0.1729
|
||||
7 N 4.2693 -7.8646 0.0000 N.am 1 LIG1 -0.1964
|
||||
8 C 4.9435 -7.4601 0.0000 C.2 1 LIG1 0.2598
|
||||
9 O 5.6625 -7.8646 0.0000 O.2 1 LIG1 -0.2715
|
||||
10 O 0.6741 -6.6512 0.0000 O.2 1 LIG1 -0.2697
|
||||
11 O 2.8313 -8.7184 0.0000 O.2 1 LIG1 -0.2715
|
||||
12 C 3.5503 -6.6512 0.0000 C.3 1 LIG1 0.0348
|
||||
13 C 2.8313 -6.2467 0.0000 C.3 1 LIG1 0.0492
|
||||
14 C 2.8313 -5.4378 0.0000 C.3 1 LIG1 0.2205
|
||||
15 N 2.1122 -5.0333 0.0000 N.pl3 1 LIG1 -0.0865
|
||||
16 C 4.9435 -6.6512 0.0000 C.3 1 LIG1 0.1536
|
||||
17 C 4.3143 -6.1568 0.0000 C.3 1 LIG1 0.0310
|
||||
18 N 5.6176 -6.1568 0.0000 N.am 1 LIG1 -0.2715
|
||||
19 C 4.5390 -5.3929 0.0000 C.3 1 LIG1 0.0237
|
||||
20 C 5.3479 -5.3929 0.0000 C.3 1 LIG1 0.0939
|
||||
21 C 6.3366 -6.5613 0.0000 C.2 1 LIG1 0.2467
|
||||
22 C 7.0557 -6.1568 0.0000 C.3 1 LIG1 0.1828
|
||||
23 N 7.7747 -6.5613 0.0000 N.am 1 LIG1 -0.1954
|
||||
24 C 8.4488 -6.1568 0.0000 C.2 1 LIG1 0.2621
|
||||
25 C 9.1678 -6.5613 0.0000 C.3 1 LIG1 0.1819
|
||||
26 N 9.8869 -6.1568 0.0000 N.am 1 LIG1 -0.1958
|
||||
27 O 6.3366 -7.4152 0.0000 O.2 1 LIG1 -0.2730
|
||||
28 C 7.0557 -5.3479 0.0000 C.3 1 LIG1 0.0996
|
||||
29 S 6.3366 -4.9435 0.0000 S.3 1 LIG1 -0.0798
|
||||
30 S 6.3366 -4.1345 0.0000 S.3 1 LIG1 -0.0816
|
||||
31 O 8.4488 -5.3479 0.0000 O.2 1 LIG1 -0.2715
|
||||
32 C 9.1678 -7.4152 0.0000 C.3 1 LIG1 0.1195
|
||||
33 C 9.8869 -7.8197 0.0000 C.2 1 LIG1 0.2630
|
||||
34 O 9.8869 -8.6286 0.0000 O.2 1 LIG1 -0.2716
|
||||
35 N 10.6060 -7.4152 0.0000 N.am 1 LIG1 -0.0877
|
||||
36 C 9.8869 -5.3479 0.0000 C.2 1 LIG1 0.2616
|
||||
37 C 10.6060 -4.9435 0.0000 C.3 1 LIG1 0.1733
|
||||
38 O 9.1678 -4.9435 0.0000 O.2 1 LIG1 -0.2715
|
||||
39 C 11.3250 -5.3479 0.0000 C.3 1 LIG1 0.0408
|
||||
40 C 12.0441 -4.9435 0.0000 C.3 1 LIG1 0.0908
|
||||
41 C 12.7631 -5.3479 0.0000 C.2 1 LIG1 0.2608
|
||||
42 N 13.4822 -4.9435 0.0000 N.am 1 LIG1 -0.0878
|
||||
43 O 12.7631 -6.2018 0.0000 O.2 1 LIG1 -0.2717
|
||||
44 N 10.6060 -4.1345 0.0000 N.am 1 LIG1 -0.1963
|
||||
45 C 11.3250 -2.8762 0.0000 C.ar 1 LIG1 -0.0200
|
||||
46 C 11.3250 -3.7300 0.0000 C.ar 1 LIG1 -0.0042
|
||||
47 C 10.6060 -2.4717 0.0000 C.3 1 LIG1 0.0574
|
||||
48 C 9.8869 -2.8762 0.0000 C.3 1 LIG1 0.1771
|
||||
49 C 9.8869 -3.7300 0.0000 C.2 1 LIG1 0.2619
|
||||
50 C 12.7631 -2.8762 0.0000 C.ar 1 LIG1 -0.0003
|
||||
51 C 12.7631 -3.7300 0.0000 C.ar 1 LIG1 -0.0000
|
||||
52 C 12.0441 -2.4717 0.0000 C.ar 1 LIG1 -0.0042
|
||||
53 C 12.0441 -4.1345 0.0000 C.ar 1 LIG1 -0.0003
|
||||
54 N 7.0557 -2.8762 0.0000 N.am 1 LIG1 -0.1974
|
||||
55 C 6.3366 -2.4717 0.0000 C.2 1 LIG1 0.2427
|
||||
56 C 5.6176 -2.8762 0.0000 C.3 1 LIG1 0.0993
|
||||
57 C 5.6176 -3.7300 0.0000 C.3 1 LIG1 0.0783
|
||||
58 C 8.4488 -2.8762 0.0000 C.2 1 LIG1 0.2620
|
||||
59 O 8.4488 -3.7300 0.0000 O.2 1 LIG1 -0.2715
|
||||
60 C 7.7747 -2.4717 0.0000 C.3 1 LIG1 0.1770
|
||||
61 N 9.1678 -2.4717 0.0000 N.am 1 LIG1 -0.1960
|
||||
62 O 9.1678 -4.1345 0.0000 O.2 1 LIG1 -0.2715
|
||||
63 C 7.7747 -1.6628 0.0000 C.3 1 LIG1 0.0574
|
||||
64 C 9.1678 -1.6628 0.0000 C.ar 1 LIG1 -0.0009
|
||||
65 C 8.4488 -1.2583 0.0000 C.ar 1 LIG1 -0.0198
|
||||
66 C 9.8869 -1.2583 0.0000 C.ar 1 LIG1 0.0417
|
||||
67 C 9.8869 -0.4045 0.0000 C.ar 1 LIG1 0.1957
|
||||
68 C 8.4488 -0.4045 0.0000 C.ar 1 LIG1 -0.0009
|
||||
69 C 9.1678 0.0000 0.0000 C.ar 1 LIG1 0.0417
|
||||
70 O 6.3366 -1.6628 0.0000 O.2 1 LIG1 -0.2733
|
||||
71 O 10.6060 0.0000 0.0000 O.3 1 LIG1 -0.2866
|
||||
72 C 1.3932 -5.4378 0.0000 C.cat 1 LIG1 0.5346
|
||||
73 N 1.3932 -6.2467 0.0000 N.pl3 1 LIG1 0.1354
|
||||
74 N 0.6741 -5.0333 0.0000 N.pl3 1 LIG1 0.1354
|
||||
@<TRIPOS>BOND
|
||||
1 1 2 am
|
||||
2 2 3 1
|
||||
3 2 10 2
|
||||
4 3 4 1
|
||||
5 4 5 am
|
||||
6 5 6 1
|
||||
7 5 11 2
|
||||
8 6 7 1
|
||||
9 6 12 1
|
||||
10 7 8 am
|
||||
11 8 9 2
|
||||
12 16 8 1
|
||||
13 12 13 1
|
||||
14 13 14 1
|
||||
15 14 15 1
|
||||
16 15 72 1
|
||||
17 16 17 1
|
||||
18 16 18 1
|
||||
19 17 19 1
|
||||
20 18 20 1
|
||||
21 18 21 am
|
||||
22 19 20 1
|
||||
23 22 21 1
|
||||
24 21 27 2
|
||||
25 22 23 1
|
||||
26 22 28 1
|
||||
27 23 24 am
|
||||
28 24 25 1
|
||||
29 24 31 2
|
||||
30 25 26 1
|
||||
31 25 32 1
|
||||
32 26 36 am
|
||||
33 28 29 1
|
||||
34 29 30 1
|
||||
35 30 57 1
|
||||
36 32 33 1
|
||||
37 33 34 2
|
||||
38 33 35 am
|
||||
39 36 37 1
|
||||
40 36 38 2
|
||||
41 37 39 1
|
||||
42 37 44 1
|
||||
43 39 40 1
|
||||
44 40 41 1
|
||||
45 41 42 am
|
||||
46 41 43 2
|
||||
47 44 49 am
|
||||
48 45 47 1
|
||||
49 45 52 ar
|
||||
50 45 46 ar
|
||||
51 46 53 ar
|
||||
52 48 47 1
|
||||
53 48 61 1
|
||||
54 48 49 1
|
||||
55 49 62 2
|
||||
56 50 51 ar
|
||||
57 50 52 ar
|
||||
58 51 53 ar
|
||||
59 54 55 am
|
||||
60 54 60 1
|
||||
61 55 56 1
|
||||
62 55 70 2
|
||||
63 56 57 1
|
||||
64 58 59 2
|
||||
65 58 60 1
|
||||
66 58 61 am
|
||||
67 60 63 1
|
||||
68 63 65 1
|
||||
69 64 66 ar
|
||||
70 64 65 ar
|
||||
71 65 68 ar
|
||||
72 66 67 ar
|
||||
73 67 69 ar
|
||||
74 67 71 1
|
||||
75 68 69 ar
|
||||
76 72 73 2
|
||||
77 72 74 1
|
||||
@@ -0,0 +1,491 @@
|
||||
Goserelin
|
||||
Mrv0541 04221219462D
|
||||
|
||||
91 96 0 0 1 0 999 V2000
|
||||
12.8548 -2.6382 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
13.9726 -2.5226 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.1766 -3.9327 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.2019 -0.7961 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.7800 -1.3064 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
16.8589 -3.2421 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.3562 1.2163 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.2702 4.8341 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.3500 8.2734 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.8213 4.2201 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.2178 1.5938 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
7.8960 2.8883 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
7.1271 0.5358 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.4834 3.1249 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
13.1495 -4.0364 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.2402 -2.9784 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
15.2089 -3.2393 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.1383 -1.7503 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
15.6226 -2.5255 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.3806 -6.3890 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.2926 0.2619 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.1485 7.0391 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
4.3338 5.7884 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
16.8613 -1.8132 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.1907 1.4900 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.1795 3.7761 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.2814 2.5480 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.3170 -7.3433 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.6753 -7.7873 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.8596 0.7098 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.7335 6.3823 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.9507 7.4636 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
13.9701 -3.9516 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
||||
14.3043 -4.7058 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
13.6903 -5.2569 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.9766 -4.8431 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.5984 -3.4224 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.7912 -3.5925 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
||||
14.3838 -3.2378 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.5349 -4.3767 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.0859 -4.9907 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.8819 -2.5345 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
||||
10.4330 -3.1486 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.0747 -2.7046 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.8184 -3.4889 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.8295 -5.7750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.0112 -3.6590 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.3694 -4.1029 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.5873 -1.1363 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.8436 -0.3521 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
||||
10.6509 -0.1820 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
16.4476 -2.5269 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.9756 6.2324 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
||||
12.0091 -0.6259 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.9979 1.6602 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
||||
9.5489 1.0461 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.1242 -7.1732 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.1549 6.1475 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
4.8848 5.1744 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
||||
4.9232 2.9920 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
||||
1.8207 6.9019 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.2542 2.4444 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
4.1159 2.8219 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.5266 5.6183 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.4348 7.4528 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.6921 5.3445 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.8324 1.9340 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
||||
4.6285 4.3902 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.1793 -1.4332 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.8164 -0.4557 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.8389 0.1814 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.8596 2.0376 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.4742 2.3779 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
7.6397 2.1041 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.0615 2.6145 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.0790 1.7862 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.9484 6.1287 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
4.3411 1.3737 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.0790 0.9612 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.5761 1.1498 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.3645 2.1987 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.3178 3.3987 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.6125 2.0005 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.3645 0.5487 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.4646 6.7970 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
1.6500 1.7862 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
1.6500 0.9612 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.1251 3.5688 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.4198 2.1706 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.7349 7.2073 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.6761 2.9548 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
1 37 2 0 0 0 0
|
||||
2 39 2 0 0 0 0
|
||||
3 43 2 0 0 0 0
|
||||
4 51 1 0 0 0 0
|
||||
4 54 1 0 0 0 0
|
||||
5 49 2 0 0 0 0
|
||||
6 52 2 0 0 0 0
|
||||
7 56 2 0 0 0 0
|
||||
8 64 2 0 0 0 0
|
||||
9 65 2 0 0 0 0
|
||||
10 68 2 0 0 0 0
|
||||
11 73 2 0 0 0 0
|
||||
12 74 2 0 0 0 0
|
||||
13 80 1 0 0 0 0
|
||||
14 91 1 0 0 0 0
|
||||
15 33 1 0 0 0 0
|
||||
15 36 1 0 0 0 0
|
||||
15 37 1 0 0 0 0
|
||||
38 16 1 6 0 0 0
|
||||
16 43 1 0 0 0 0
|
||||
17 19 1 0 0 0 0
|
||||
17 39 1 0 0 0 0
|
||||
42 18 1 6 0 0 0
|
||||
18 49 1 0 0 0 0
|
||||
19 52 1 0 0 0 0
|
||||
20 46 1 0 0 0 0
|
||||
20 57 2 0 0 0 0
|
||||
50 21 1 6 0 0 0
|
||||
21 56 1 0 0 0 0
|
||||
22 53 1 0 0 0 0
|
||||
22 65 1 0 0 0 0
|
||||
59 23 1 1 0 0 0
|
||||
23 64 1 0 0 0 0
|
||||
24 52 1 0 0 0 0
|
||||
55 25 1 1 0 0 0
|
||||
25 74 1 0 0 0 0
|
||||
60 26 1 6 0 0 0
|
||||
26 68 1 0 0 0 0
|
||||
67 27 1 6 0 0 0
|
||||
27 73 1 0 0 0 0
|
||||
28 57 1 0 0 0 0
|
||||
29 57 1 0 0 0 0
|
||||
30 78 1 0 0 0 0
|
||||
30 79 1 0 0 0 0
|
||||
31 77 1 0 0 0 0
|
||||
31 90 1 0 0 0 0
|
||||
32 85 1 0 0 0 0
|
||||
32 90 2 0 0 0 0
|
||||
33 34 1 0 0 0 0
|
||||
33 39 1 6 0 0 0
|
||||
34 35 1 0 0 0 0
|
||||
35 36 1 0 0 0 0
|
||||
37 38 1 0 0 0 0
|
||||
38 40 1 0 0 0 0
|
||||
40 41 1 0 0 0 0
|
||||
41 46 1 0 0 0 0
|
||||
42 43 1 0 0 0 0
|
||||
42 44 1 0 0 0 0
|
||||
44 45 1 0 0 0 0
|
||||
45 47 1 0 0 0 0
|
||||
45 48 1 0 0 0 0
|
||||
49 50 1 0 0 0 0
|
||||
50 51 1 0 0 0 0
|
||||
53 58 1 0 0 0 0
|
||||
53 64 1 6 0 0 0
|
||||
54 69 1 0 0 0 0
|
||||
54 70 1 0 0 0 0
|
||||
54 71 1 0 0 0 0
|
||||
55 56 1 0 0 0 0
|
||||
55 62 1 0 0 0 0
|
||||
58 61 1 0 0 0 0
|
||||
59 66 1 0 0 0 0
|
||||
59 68 1 0 0 0 0
|
||||
60 63 1 0 0 0 0
|
||||
60 73 1 0 0 0 0
|
||||
61 65 1 0 0 0 0
|
||||
62 75 1 0 0 0 0
|
||||
63 72 1 0 0 0 0
|
||||
66 77 1 0 0 0 0
|
||||
67 74 1 0 0 0 0
|
||||
67 80 1 0 0 0 0
|
||||
72 76 1 0 0 0 0
|
||||
72 78 2 0 0 0 0
|
||||
75 82 2 0 0 0 0
|
||||
75 83 1 0 0 0 0
|
||||
76 79 1 0 0 0 0
|
||||
76 81 2 0 0 0 0
|
||||
77 85 2 0 0 0 0
|
||||
79 84 2 0 0 0 0
|
||||
81 86 1 0 0 0 0
|
||||
82 88 1 0 0 0 0
|
||||
83 89 2 0 0 0 0
|
||||
84 87 1 0 0 0 0
|
||||
86 87 2 0 0 0 0
|
||||
88 91 2 0 0 0 0
|
||||
89 91 1 0 0 0 0
|
||||
M END
|
||||
> <DRUGBANK_ID>
|
||||
DB00014
|
||||
|
||||
> <DRUG_GROUPS>
|
||||
approved
|
||||
|
||||
> <GENERIC_NAME>
|
||||
Goserelin
|
||||
|
||||
> <SALTS>
|
||||
Goserelin acetate
|
||||
|
||||
> <BRANDS>
|
||||
Zoladex
|
||||
|
||||
> <CHEMICAL_FORMULA>
|
||||
C59H84N18O14
|
||||
|
||||
> <MOLECULAR_WEIGHT>
|
||||
1269.4105
|
||||
|
||||
> <EXACT_MASS>
|
||||
1268.641439486
|
||||
|
||||
> <IUPAC_NAME>
|
||||
(2S)-1-[(2S)-2-[(2S)-2-[(2R)-3-(tert-butoxy)-2-[(2S)-2-[(2S)-3-hydroxy-2-[(2S)-2-[(2S)-3-(1H-imidazol-5-yl)-2-{[(2S)-5-oxopyrrolidin-2-yl]formamido}propanamido]-3-(1H-indol-3-yl)propanamido]propanamido]-3-(4-hydroxyphenyl)propanamido]propanamido]-4-methylpentanamido]-5-[(diaminomethylidene)amino]pentanoyl]-N-(carbamoylamino)pyrrolidine-2-carboxamide
|
||||
|
||||
> <INCHI_IDENTIFIER>
|
||||
InChI=1S/C59H84N18O14/c1-31(2)22-40(49(82)68-39(12-8-20-64-57(60)61)56(89)77-21-9-13-46(77)55(88)75-76-58(62)90)69-54(87)45(29-91-59(3,4)5)74-50(83)41(23-32-14-16-35(79)17-15-32)70-53(86)44(28-78)73-51(84)42(24-33-26-65-37-11-7-6-10-36(33)37)71-52(85)43(25-34-27-63-30-66-34)72-48(81)38-18-19-47(80)67-38/h6-7,10-11,14-17,26-27,30-31,38-46,65,78-79H,8-9,12-13,18-25,28-29H2,1-5H3,(H,63,66)(H,67,80)(H,68,82)(H,69,87)(H,70,86)(H,71,85)(H,72,81)(H,73,84)(H,74,83)(H,75,88)(H4,60,61,64)(H3,62,76,90)/t38-,39-,40-,41-,42-,43-,44-,45+,46-/m0/s1
|
||||
|
||||
> <INCHI_KEY>
|
||||
InChIKey=BLCLNMBMMGCOAS-URPVMXJPSA-N
|
||||
|
||||
> <SMILES>
|
||||
CC(C)C[C@H](NC(=O)[C@@H](COC(C)(C)C)NC(=O)[C@H](CC1=CC=C(O)C=C1)NC(=O)[C@H](CO)NC(=O)[C@H](CC1=CNC2=CC=CC=C12)NC(=O)[C@H](CC1=CN=CN1)NC(=O)[C@@H]1CCC(=O)N1)C(=O)N[C@@H](CCCN=C(N)N)C(=O)N1CCC[C@H]1C(=O)NNC(N)=O
|
||||
|
||||
> <JCHEM_ACCEPTOR_COUNT>
|
||||
18
|
||||
|
||||
> <JCHEM_DONOR_COUNT>
|
||||
17
|
||||
|
||||
> <JCHEM_ACIDIC_PKA>
|
||||
9.82
|
||||
|
||||
> <ALOGPS_LOGP>
|
||||
0.3
|
||||
|
||||
> <JCHEM_LOGP>
|
||||
-5.2
|
||||
|
||||
> <ALOGPS_LOGS>
|
||||
-4.7
|
||||
|
||||
> <JCHEM_POLARIZABILITY>
|
||||
131.22
|
||||
|
||||
> <JCHEM_POLAR_SURFACE_AREA>
|
||||
495.89
|
||||
|
||||
> <JCHEM_REFRACTIVITY>
|
||||
325.84
|
||||
|
||||
> <JCHEM_ROTATABLE_BOND_COUNT>
|
||||
33
|
||||
|
||||
> <ALOGPS_SOLUBILITY>
|
||||
2.83e-02 g/l
|
||||
|
||||
$$$$
|
||||
Desmopressin
|
||||
Mrv0541 04221221522D
|
||||
|
||||
74 77 0 0 1 0 999 V2000
|
||||
0.0000 -7.8646 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0.6741 -7.4601 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
1.3932 -7.8646 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.1122 -7.4601 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.8313 -7.8646 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.5503 -7.4601 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
||||
4.2693 -7.8646 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
4.9435 -7.4601 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.6625 -7.8646 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0.6741 -6.6512 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.8313 -8.7184 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
3.5503 -6.6512 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.8313 -6.2467 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.8313 -5.4378 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
2.1122 -5.0333 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
4.9435 -6.6512 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
||||
4.3143 -6.1568 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.6176 -6.1568 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
4.5390 -5.3929 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.3479 -5.3929 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.3366 -6.5613 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
7.0557 -6.1568 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
||||
7.7747 -6.5613 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.4488 -6.1568 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.1678 -6.5613 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
||||
9.8869 -6.1568 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.3366 -7.4152 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
7.0557 -5.3479 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.3366 -4.9435 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.3366 -4.1345 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.4488 -5.3479 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.1678 -7.4152 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.8869 -7.8197 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.8869 -8.6286 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.6060 -7.4152 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.8869 -5.3479 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.6060 -4.9435 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
||||
9.1678 -4.9435 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.3250 -5.3479 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.0441 -4.9435 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.7631 -5.3479 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
13.4822 -4.9435 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.7631 -6.2018 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.6060 -4.1345 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.3250 -2.8762 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
11.3250 -3.7300 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.6060 -2.4717 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.8869 -2.8762 0.0000 C 0 0 1 0 0 0 0 0 0 0 0 0
|
||||
9.8869 -3.7300 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.7631 -2.8762 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.7631 -3.7300 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.0441 -2.4717 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
12.0441 -4.1345 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
7.0557 -2.8762 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.3366 -2.4717 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.6176 -2.8762 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
5.6176 -3.7300 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.4488 -2.8762 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.4488 -3.7300 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
7.7747 -2.4717 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
|
||||
9.1678 -2.4717 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.1678 -4.1345 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
7.7747 -1.6628 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.1678 -1.6628 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.4488 -1.2583 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.8869 -1.2583 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.8869 -0.4045 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
8.4488 -0.4045 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
9.1678 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
6.3366 -1.6628 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
10.6060 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
1.3932 -5.4378 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
1.3932 -6.2467 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0.6741 -5.0333 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
1 2 1 0 0 0 0
|
||||
2 3 1 0 0 0 0
|
||||
2 10 2 0 0 0 0
|
||||
3 4 1 0 0 0 0
|
||||
4 5 1 0 0 0 0
|
||||
5 6 1 0 0 0 0
|
||||
5 11 2 0 0 0 0
|
||||
6 7 1 0 0 0 0
|
||||
6 12 1 6 0 0 0
|
||||
7 8 1 0 0 0 0
|
||||
8 9 2 0 0 0 0
|
||||
16 8 1 6 0 0 0
|
||||
12 13 1 0 0 0 0
|
||||
13 14 1 0 0 0 0
|
||||
14 15 1 0 0 0 0
|
||||
15 72 1 0 0 0 0
|
||||
16 17 1 0 0 0 0
|
||||
16 18 1 0 0 0 0
|
||||
17 19 1 0 0 0 0
|
||||
18 20 1 0 0 0 0
|
||||
18 21 1 0 0 0 0
|
||||
19 20 1 0 0 0 0
|
||||
22 21 1 6 0 0 0
|
||||
21 27 2 0 0 0 0
|
||||
22 23 1 0 0 0 0
|
||||
22 28 1 0 0 0 0
|
||||
23 24 1 0 0 0 0
|
||||
24 25 1 0 0 0 0
|
||||
24 31 2 0 0 0 0
|
||||
25 26 1 0 0 0 0
|
||||
25 32 1 1 0 0 0
|
||||
26 36 1 0 0 0 0
|
||||
28 29 1 0 0 0 0
|
||||
29 30 1 0 0 0 0
|
||||
30 57 1 0 0 0 0
|
||||
32 33 1 0 0 0 0
|
||||
33 34 2 0 0 0 0
|
||||
33 35 1 0 0 0 0
|
||||
36 37 1 0 0 0 0
|
||||
36 38 2 0 0 0 0
|
||||
37 39 1 1 0 0 0
|
||||
37 44 1 0 0 0 0
|
||||
39 40 1 0 0 0 0
|
||||
40 41 1 0 0 0 0
|
||||
41 42 1 0 0 0 0
|
||||
41 43 2 0 0 0 0
|
||||
44 49 1 0 0 0 0
|
||||
45 47 1 0 0 0 0
|
||||
45 52 1 0 0 0 0
|
||||
45 46 2 0 0 0 0
|
||||
46 53 1 0 0 0 0
|
||||
48 47 1 1 0 0 0
|
||||
48 61 1 0 0 0 0
|
||||
48 49 1 0 0 0 0
|
||||
49 62 2 0 0 0 0
|
||||
50 51 1 0 0 0 0
|
||||
50 52 2 0 0 0 0
|
||||
51 53 2 0 0 0 0
|
||||
54 55 1 0 0 0 0
|
||||
54 60 1 0 0 0 0
|
||||
55 56 1 0 0 0 0
|
||||
55 70 2 0 0 0 0
|
||||
56 57 1 0 0 0 0
|
||||
58 59 2 0 0 0 0
|
||||
58 60 1 0 0 0 0
|
||||
58 61 1 0 0 0 0
|
||||
60 63 1 1 0 0 0
|
||||
63 65 1 0 0 0 0
|
||||
64 66 2 0 0 0 0
|
||||
64 65 1 0 0 0 0
|
||||
65 68 2 0 0 0 0
|
||||
66 67 1 0 0 0 0
|
||||
67 69 2 0 0 0 0
|
||||
67 71 1 0 0 0 0
|
||||
68 69 1 0 0 0 0
|
||||
72 73 2 3 0 0 0
|
||||
72 74 1 0 0 0 0
|
||||
M END
|
||||
> <DRUGBANK_ID>
|
||||
DB00035
|
||||
|
||||
> <DRUG_GROUPS>
|
||||
approved
|
||||
|
||||
> <GENERIC_NAME>
|
||||
Desmopressin
|
||||
|
||||
> <SYNONYMS>
|
||||
1-Desamino-8-D-arginine vasopressin; Desmopresina [INN-Spanish]; Desmopressine [INN-French]; Desmopressinum [INN-Latin]
|
||||
|
||||
> <SALTS>
|
||||
Desmopressin acetate
|
||||
|
||||
> <BRANDS>
|
||||
Adiuretin; Concentraid; DDAVP; Minirin; Stimate
|
||||
|
||||
> <CHEMICAL_FORMULA>
|
||||
C46H64N14O12S2
|
||||
|
||||
> <MOLECULAR_WEIGHT>
|
||||
1069.217
|
||||
|
||||
> <EXACT_MASS>
|
||||
1068.426954962
|
||||
|
||||
> <IUPAC_NAME>
|
||||
(2S)-2-{[(2S)-1-{[(4R,7S,10S,13S,16S)-13-benzyl-10-(2-carbamoylethyl)-7-(carbamoylmethyl)-16-[(4-hydroxyphenyl)methyl]-6,9,12,15,18-pentaoxo-1,2-dithia-5,8,11,14,17-pentaazacycloicosan-4-yl]carbonyl}pyrrolidin-2-yl]formamido}-5-carbamimidamido-N-(carbamoylmethyl)pentanamide
|
||||
|
||||
> <INCHI_IDENTIFIER>
|
||||
InChI=1S/C46H64N14O12S2/c47-35(62)15-14-29-40(67)58-32(22-36(48)63)43(70)59-33(45(72)60-18-5-9-34(60)44(71)56-28(8-4-17-52-46(50)51)39(66)53-23-37(49)64)24-74-73-19-16-38(65)54-30(21-26-10-12-27(61)13-11-26)41(68)57-31(42(69)55-29)20-25-6-2-1-3-7-25/h1-3,6-7,10-13,28-34,61H,4-5,8-9,14-24H2,(H2,47,62)(H2,48,63)(H2,49,64)(H,53,66)(H,54,65)(H,55,69)(H,56,71)(H,57,68)(H,58,67)(H,59,70)(H4,50,51,52)/t28-,29-,30-,31-,32-,33-,34-/m0/s1
|
||||
|
||||
> <INCHI_KEY>
|
||||
InChIKey=NFLWUMRGJYTJIN-NXBWRCJVSA-N
|
||||
|
||||
> <SMILES>
|
||||
NC(=O)CC[C@@H]1NC(=O)[C@H](CC2=CC=CC=C2)NC(=O)[C@H](CC2=CC=C(O)C=C2)NC(=O)CCSSC[C@H](NC(=O)[C@H](CC(N)=O)NC1=O)C(=O)N1CCC[C@H]1C(=O)N[C@@H](CCCNC(N)=N)C(=O)NCC(N)=O
|
||||
|
||||
> <JCHEM_ACCEPTOR_COUNT>
|
||||
15
|
||||
|
||||
> <JCHEM_DONOR_COUNT>
|
||||
14
|
||||
|
||||
> <JCHEM_ACIDIC_PKA>
|
||||
11.34
|
||||
|
||||
> <ALOGPS_LOGP>
|
||||
-1
|
||||
|
||||
> <JCHEM_LOGP>
|
||||
-6.1
|
||||
|
||||
> <ALOGPS_LOGS>
|
||||
-4
|
||||
|
||||
> <JCHEM_POLARIZABILITY>
|
||||
106.19
|
||||
|
||||
> <JCHEM_POLAR_SURFACE_AREA>
|
||||
435.41
|
||||
|
||||
> <JCHEM_REFRACTIVITY>
|
||||
279.78
|
||||
|
||||
> <JCHEM_ROTATABLE_BOND_COUNT>
|
||||
19
|
||||
|
||||
> <ALOGPS_SOLUBILITY>
|
||||
1.10e-01 g/l
|
||||
|
||||
$$$$
|
||||
@@ -0,0 +1,2 @@
|
||||
O=C(N1[C@@H](CCC1)C(=O)NNC(=O)N)[C@@H](NC(=O)[C@@H](NC(=O)[C@H](NC(=O)[C@@H](NC(=O)[C@@H](NC(=O)[C@@H](NC(=O)[C@@H](NC(=O)[C@H]1NC(=O)CC1)Cc1[nH]cnc1)Cc1c2c([nH]c1)cccc2)CO)Cc1ccc(O)cc1)COC(C)(C)C)CC(C)C)CCCN=C(N)N Goserelin
|
||||
NC(=O)CNC(=O)[C@@H](NC(=O)[C@@H]1CCCN1C(=O)[C@H]1NC(=O)[C@@H](NC(=O)[C@H](CCC(=O)N)NC(=O)[C@H](Cc2ccccc2)NC(=O)[C@@H](NC(=O)CCSSC1)Cc1ccc(cc1)O)CC(=O)N)CCCNC(=N)N Desmopressin
|
||||
@@ -0,0 +1,7 @@
|
||||
#FPS1
|
||||
#num_bits=881
|
||||
#type=CACTVS-E_SCREEN/1.0 extended=2
|
||||
#software=CACTVS/unknown
|
||||
#source=CID_28434379.sdf
|
||||
#date=2012-02-03T13:08:39
|
||||
07ce04000000000000000000000000000080060000000c060000000000001a800f0000780008100000101487e9608c0bed3248000580644626204101b4844805901b041c2e19511e45039b8b2924101609401b13e40800000000000100200000040080000010000002000000000000 28434379
|
||||
@@ -3,8 +3,7 @@ bx-python==0.7.3
|
||||
MarkupSafe==0.23
|
||||
PyYAML==3.11
|
||||
SQLAlchemy==1.0.8
|
||||
# Mercurial >= 3.5 changed the bundle format, which breaks hg push of TS repositories
|
||||
mercurial==3.4.2
|
||||
mercurial==3.7.3
|
||||
numpy==1.9.2
|
||||
pycrypto==2.6.1
|
||||
|
||||
@@ -25,6 +24,7 @@ Mako==1.0.2
|
||||
pytz==2015.4
|
||||
Babel==2.0
|
||||
Beaker==1.7.0
|
||||
dictobj==0.3.1
|
||||
|
||||
# Cheetah and dependencies
|
||||
Cheetah==2.4.4
|
||||
@@ -41,13 +41,16 @@ kombu==3.0.30
|
||||
amqp==1.4.8
|
||||
anyjson==0.3.3
|
||||
|
||||
# Pulsar requirements
|
||||
psutil==4.1.0
|
||||
pulsar-galaxy-lib==0.7.0.dev1
|
||||
|
||||
# sqlalchemy-migrate and dependencies
|
||||
sqlalchemy-migrate==0.10.0
|
||||
decorator==4.0.2
|
||||
Tempita==0.5.3dev
|
||||
sqlparse==0.1.16
|
||||
pbr==1.8.0
|
||||
# six is also a Pulsar client dep
|
||||
six==1.9.0
|
||||
Parsley==1.3
|
||||
nose==1.3.7
|
||||
|
||||
@@ -26,6 +26,7 @@ Mako
|
||||
pytz
|
||||
Babel
|
||||
Beaker
|
||||
dictobj
|
||||
|
||||
# Cheetah and dependencies
|
||||
Cheetah
|
||||
@@ -38,6 +39,10 @@ requests
|
||||
# kombu and dependencies
|
||||
kombu
|
||||
|
||||
# Pulsar requirements
|
||||
psutil
|
||||
pulsar-galaxy-lib==0.7.0.dev1
|
||||
|
||||
# sqlalchemy-migrate and dependencies
|
||||
sqlalchemy-migrate
|
||||
decorator
|
||||
|
||||
@@ -1662,10 +1662,13 @@ class JobWrapper( object ):
|
||||
**kwds )
|
||||
if resolve_metadata_dependencies:
|
||||
metadata_tool = self.app.toolbox.get_tool("__SET_METADATA__")
|
||||
dependency_shell_commands = metadata_tool.build_dependency_shell_commands(job_directory=self.working_directory)
|
||||
if dependency_shell_commands:
|
||||
dependency_shell_commands = "; ".join(dependency_shell_commands)
|
||||
command = "%s; %s" % (dependency_shell_commands, command)
|
||||
if metadata_tool is not None:
|
||||
# Due to tool shed hacks for migrate and installed tool tests...
|
||||
# see (``setup_shed_tools_for_test`` in test/base/driver_util.py).
|
||||
dependency_shell_commands = metadata_tool.build_dependency_shell_commands(job_directory=self.working_directory)
|
||||
if dependency_shell_commands:
|
||||
dependency_shell_commands = "; ".join(dependency_shell_commands)
|
||||
command = "%s; %s" % (dependency_shell_commands, command)
|
||||
return command
|
||||
|
||||
@property
|
||||
|
||||
@@ -186,7 +186,7 @@ class JobHandlerQueue( object ):
|
||||
jobs (either from the database or from its own queue), then iterates
|
||||
over all new and waiting jobs to check the state of the jobs each
|
||||
depends on. If the job has dependencies that have not finished, it
|
||||
it goes to the waiting queue. If the job has dependencies with errors,
|
||||
goes to the waiting queue. If the job has dependencies with errors,
|
||||
it is marked as having errors and removed from the queue. If the job
|
||||
belongs to an inactive user it is ignored.
|
||||
Otherwise, the job is dispatched.
|
||||
|
||||
@@ -322,7 +322,7 @@ class BaseJobRunner( object ):
|
||||
compute_job_directory=None
|
||||
):
|
||||
if not compute_working_directory:
|
||||
compute_working_directory = job_wrapper.working_directory
|
||||
compute_working_directory = job_wrapper.tool_working_directory
|
||||
|
||||
if not compute_tool_directory:
|
||||
compute_tool_directory = job_wrapper.tool.tool_dir
|
||||
|
||||
@@ -272,7 +272,7 @@ class PBSJobRunner( AsynchronousJobRunner ):
|
||||
# write the job script
|
||||
if self.app.config.pbs_stage_path != '':
|
||||
# touch the ecfile so that it gets staged
|
||||
with file(ecfile, 'a'):
|
||||
with open(ecfile, 'a'):
|
||||
os.utime(ecfile, None)
|
||||
|
||||
stage_commands = pbs_symlink_template % (
|
||||
|
||||
@@ -1,6 +1,26 @@
|
||||
"""Job runner used to execute Galaxy jobs through Pulsar.
|
||||
|
||||
More infromation on Pulsar can be found at http://pulsar.readthedocs.org/.
|
||||
"""
|
||||
from __future__ import absolute_import # Need to import pulsar_client absolutely.
|
||||
|
||||
import errno
|
||||
import logging
|
||||
import os
|
||||
from time import sleep
|
||||
|
||||
from pulsar.client import build_client_manager
|
||||
from pulsar.client import url_to_destination_params
|
||||
from pulsar.client import finish_job as pulsar_finish_job
|
||||
from pulsar.client import submit_job as pulsar_submit_job
|
||||
from pulsar.client import ClientJobDescription
|
||||
from pulsar.client import PulsarOutputs
|
||||
from pulsar.client import ClientOutputs
|
||||
from pulsar.client import PathMapper
|
||||
|
||||
import pulsar.core
|
||||
|
||||
import yaml
|
||||
|
||||
from galaxy import model
|
||||
from galaxy.jobs.runners import AsynchronousJobState, AsynchronousJobRunner
|
||||
@@ -12,22 +32,15 @@ from galaxy.util import string_as_bool_or_none
|
||||
from galaxy.util.bunch import Bunch
|
||||
from galaxy.util import specs
|
||||
|
||||
import errno
|
||||
from time import sleep
|
||||
import os
|
||||
|
||||
from pulsar.client import build_client_manager
|
||||
from pulsar.client import url_to_destination_params
|
||||
from pulsar.client import finish_job as pulsar_finish_job
|
||||
from pulsar.client import submit_job as pulsar_submit_job
|
||||
from pulsar.client import ClientJobDescription
|
||||
from pulsar.client import PulsarOutputs
|
||||
from pulsar.client import ClientOutputs
|
||||
from pulsar.client import PathMapper
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
__all__ = [ 'PulsarLegacyJobRunner', 'PulsarRESTJobRunner', 'PulsarMQJobRunner' ]
|
||||
__all__ = [
|
||||
'PulsarLegacyJobRunner',
|
||||
'PulsarRESTJobRunner',
|
||||
'PulsarMQJobRunner',
|
||||
'PulsarEmbeddedJobRunner',
|
||||
]
|
||||
|
||||
NO_REMOTE_GALAXY_FOR_METADATA_MESSAGE = "Pulsar misconfiguration - Pulsar client configured to set metadata remotely, but remote Pulsar isn't properly configured with a galaxy_home directory."
|
||||
NO_REMOTE_DATATYPES_CONFIG = "Pulsar client is configured to use remote datatypes configuration when setting metadata externally, but Pulsar is not configured with this information. Defaulting to datatypes_conf.xml."
|
||||
@@ -57,6 +70,10 @@ PULSAR_PARAM_SPECS = dict(
|
||||
map=specs.to_str_or_none,
|
||||
default=None,
|
||||
),
|
||||
pulsar_config=dict(
|
||||
map=specs.to_str_or_none,
|
||||
default=None,
|
||||
),
|
||||
manager=dict(
|
||||
map=specs.to_str_or_none,
|
||||
default=None,
|
||||
@@ -133,13 +150,13 @@ PARAMETER_SPECIFICATION_IGNORED = object()
|
||||
|
||||
|
||||
class PulsarJobRunner( AsynchronousJobRunner ):
|
||||
"""
|
||||
Pulsar Job Runner
|
||||
"""
|
||||
"""Base class for pulsar job runners."""
|
||||
|
||||
runner_name = "PulsarJobRunner"
|
||||
default_build_pulsar_app = False
|
||||
|
||||
def __init__( self, app, nworkers, **kwds ):
|
||||
"""Start the job runner """
|
||||
"""Start the job runner."""
|
||||
super( PulsarJobRunner, self ).__init__( app, nworkers, runner_param_specs=PULSAR_PARAM_SPECS, **kwds )
|
||||
self._init_worker_threads()
|
||||
galaxy_url = self.runner_params.galaxy_url
|
||||
@@ -156,16 +173,42 @@ class PulsarJobRunner( AsynchronousJobRunner ):
|
||||
self._init_monitor_thread()
|
||||
|
||||
def __init_client_manager( self ):
|
||||
pulsar_conf = self.runner_params.get('pulsar_conf', None)
|
||||
self.__init_pulsar_app(pulsar_conf)
|
||||
|
||||
client_manager_kwargs = {}
|
||||
for kwd in 'manager', 'cache', 'transport', 'persistence_directory':
|
||||
client_manager_kwargs[ kwd ] = self.runner_params[ kwd ]
|
||||
if self.pulsar_app is not None:
|
||||
# TODO: Make this more generic and configurable - client_manager
|
||||
# should define an app and client (destination) should reference
|
||||
# a job manager.
|
||||
job_manager = self.pulsar_app.only_manager
|
||||
client_manager_kwargs[ "job_manager" ] = job_manager
|
||||
# TODO: Hack remove this following line pulsar lib update
|
||||
# that includes https://github.com/galaxyproject/pulsar/commit/ce0636a5b64fae52d165bcad77b2caa3f0e9c232
|
||||
client_manager_kwargs[ "file_cache" ] = None
|
||||
|
||||
for kwd in self.runner_params.keys():
|
||||
if kwd.startswith( 'amqp_' ):
|
||||
client_manager_kwargs[ kwd ] = self.runner_params[ kwd ]
|
||||
self.client_manager = build_client_manager(**client_manager_kwargs)
|
||||
|
||||
def __init_pulsar_app( self, pulsar_conf_path ):
|
||||
if pulsar_conf_path is None and not self.default_build_pulsar_app:
|
||||
self.pulsar_app = None
|
||||
return
|
||||
conf = {}
|
||||
if pulsar_conf_path is None:
|
||||
log.info("Creating a Pulsar app with default configuration (no pulsar_conf specified).")
|
||||
else:
|
||||
log.info("Loading Pulsar app configuration from %s" % pulsar_conf_path)
|
||||
with open(pulsar_conf_path, "r") as f:
|
||||
conf.update(yaml.load(f) or {})
|
||||
self.pulsar_app = pulsar.core.PulsarApp(**conf)
|
||||
|
||||
def url_to_destination( self, url ):
|
||||
"""Convert a legacy URL to a job destination"""
|
||||
"""Convert a legacy URL to a job destination."""
|
||||
return JobDestination( runner="pulsar", params=url_to_destination_params( url ) )
|
||||
|
||||
def check_watched_item(self, job_state):
|
||||
@@ -217,7 +260,7 @@ class PulsarJobRunner( AsynchronousJobRunner ):
|
||||
command_line=command_line,
|
||||
input_files=self.get_input_files(job_wrapper),
|
||||
client_outputs=self.__client_outputs(client, job_wrapper),
|
||||
working_directory=job_wrapper.working_directory,
|
||||
working_directory=job_wrapper.tool_working_directory,
|
||||
tool=job_wrapper.tool,
|
||||
config_files=job_wrapper.extra_filenames,
|
||||
dependencies_description=dependencies_description,
|
||||
@@ -243,7 +286,7 @@ class PulsarJobRunner( AsynchronousJobRunner ):
|
||||
self.monitor_job(pulsar_job_state)
|
||||
|
||||
def __prepare_job(self, job_wrapper, job_destination):
|
||||
""" Build command-line and Pulsar client for this job. """
|
||||
"""Build command-line and Pulsar client for this job."""
|
||||
command_line = None
|
||||
client = None
|
||||
remote_job_config = None
|
||||
@@ -424,9 +467,7 @@ class PulsarJobRunner( AsynchronousJobRunner ):
|
||||
job_wrapper.fail("Unable to finish job", exception=True)
|
||||
|
||||
def fail_job( self, job_state, message=GENERIC_REMOTE_ERROR ):
|
||||
"""
|
||||
Seperated out so we can use the worker threads for it.
|
||||
"""
|
||||
"""Seperated out so we can use the worker threads for it."""
|
||||
self.stop_job( self.sa_session.query( self.app.model.Job ).get( job_state.job_wrapper.job_id ) )
|
||||
job_state.job_wrapper.fail( getattr( job_state, "fail_message", message ) )
|
||||
|
||||
@@ -475,7 +516,7 @@ class PulsarJobRunner( AsynchronousJobRunner ):
|
||||
client.kill()
|
||||
|
||||
def recover( self, job, job_wrapper ):
|
||||
"""Recovers jobs stuck in the queued/running state when Galaxy started"""
|
||||
"""Recover jobs stuck in the queued/running state when Galaxy started."""
|
||||
job_state = self._job_state( job, job_wrapper )
|
||||
job_wrapper.command_line = job.get_command_line()
|
||||
state = job.get_state()
|
||||
@@ -538,7 +579,9 @@ class PulsarJobRunner( AsynchronousJobRunner ):
|
||||
|
||||
@staticmethod
|
||||
def __use_remote_datatypes_conf( pulsar_client ):
|
||||
""" When setting remote metadata, use integrated datatypes from this
|
||||
"""Use remote metadata datatypes instead of Galaxy's.
|
||||
|
||||
When setting remote metadata, use integrated datatypes from this
|
||||
Galaxy instance or use the datatypes config configured via the remote
|
||||
Pulsar.
|
||||
|
||||
@@ -604,6 +647,8 @@ class PulsarJobRunner( AsynchronousJobRunner ):
|
||||
|
||||
|
||||
class PulsarLegacyJobRunner( PulsarJobRunner ):
|
||||
"""Flavor of Pulsar job runner mimicking behavior of old LWR runner."""
|
||||
|
||||
destination_defaults = dict(
|
||||
rewrite_parameters="false",
|
||||
dependency_resolution="local",
|
||||
@@ -611,6 +656,8 @@ class PulsarLegacyJobRunner( PulsarJobRunner ):
|
||||
|
||||
|
||||
class PulsarMQJobRunner( PulsarJobRunner ):
|
||||
"""Flavor of Pulsar job runner with sensible defaults for message queue communication."""
|
||||
|
||||
destination_defaults = dict(
|
||||
default_file_action="remote_transfer",
|
||||
rewrite_parameters="true",
|
||||
@@ -640,6 +687,8 @@ class PulsarMQJobRunner( PulsarJobRunner ):
|
||||
|
||||
|
||||
class PulsarRESTJobRunner( PulsarJobRunner ):
|
||||
"""Flavor of Pulsar job runner with sensible defaults for RESTful usage."""
|
||||
|
||||
destination_defaults = dict(
|
||||
default_file_action="transfer",
|
||||
rewrite_parameters="true",
|
||||
@@ -648,6 +697,21 @@ class PulsarRESTJobRunner( PulsarJobRunner ):
|
||||
)
|
||||
|
||||
|
||||
class PulsarEmbeddedJobRunner(PulsarJobRunner):
|
||||
"""Flavor of Puslar job runnner that runs Pulsar's server code directly within Galaxy.
|
||||
|
||||
This is an appropriate job runner for when the desire is to use Pulsar staging
|
||||
but their is not need to run a remote service.
|
||||
"""
|
||||
|
||||
destination_defaults = dict(
|
||||
default_file_action="copy",
|
||||
rewrite_parameters="true",
|
||||
dependency_resolution="remote",
|
||||
)
|
||||
default_build_pulsar_app = True
|
||||
|
||||
|
||||
class PulsarComputeEnvironment( ComputeEnvironment ):
|
||||
|
||||
def __init__( self, pulsar_client, job_wrapper, remote_job_config ):
|
||||
|
||||
+17
-12
@@ -930,6 +930,9 @@ class ModelFilterParser( HasAModelManager ):
|
||||
super( ModelFilterParser, self ).__init__( app, **kwargs )
|
||||
self.app = app
|
||||
|
||||
#: regex for testing/dicing iso8601 date strings, with optional time and ms, but allowing only UTC timezone
|
||||
self.date_string_re = re.compile( r'^(\d{4}\-\d{2}\-\d{2})[T| ]{0,1}(\d{2}:\d{2}:\d{2}(?:\.\d{1,6}){0,1}){0,1}Z{0,1}$' )
|
||||
|
||||
# dictionary containing parsing data for ORM/SQLAlchemy-based filters
|
||||
# ..note: although kind of a pain in the ass and verbose, opt-in/whitelisting allows more control
|
||||
# over potentially expensive queries
|
||||
@@ -1121,19 +1124,21 @@ class ModelFilterParser( HasAModelManager ):
|
||||
|
||||
def parse_date( self, date_string ):
|
||||
"""
|
||||
Attempts to get an SQL-able(?) date string for a query filter.
|
||||
Reformats a string containing either seconds from epoch or an iso8601 formated
|
||||
date string into a new date string usable within a filter query.
|
||||
|
||||
Seconds from epoch can be a floating point value as well (i.e containing ms).
|
||||
"""
|
||||
# Attempts to parse epoch int back into date string
|
||||
# assume it's epoch if no date separator is present
|
||||
try:
|
||||
epoch = int( date_string )
|
||||
date = datetime.datetime.fromtimestamp( epoch )
|
||||
return date.isoformat().replace( 'T', ' ', 1 )
|
||||
epoch = float( date_string )
|
||||
datetime_obj = datetime.datetime.fromtimestamp( epoch )
|
||||
return datetime_obj.isoformat( sep=' ' )
|
||||
except ValueError:
|
||||
pass
|
||||
# or removes T from date string
|
||||
if not hasattr( self, 'date_string_re' ):
|
||||
self.date_string_re = re.compile( r'^\d{4}\-\d{2}\-\d{2}T' )
|
||||
if self.date_string_re.match( date_string ):
|
||||
return date_string.replace( 'T', ' ', 1 )
|
||||
# or as is
|
||||
return date_string
|
||||
|
||||
match = self.date_string_re.match( date_string )
|
||||
if match:
|
||||
date_string = ' '.join([ group for group in match.groups() if group ])
|
||||
return date_string
|
||||
raise ValueError( 'datetime strings must be in the ISO 8601 format and in the UTC' )
|
||||
|
||||
@@ -961,8 +961,13 @@ class PostJobAction( object ):
|
||||
|
||||
|
||||
class PostJobActionAssociation( object ):
|
||||
def __init__(self, pja, job):
|
||||
self.job = job
|
||||
def __init__(self, pja, job=None, job_id=None ):
|
||||
if job is not None:
|
||||
self.job = job
|
||||
elif job_id is not None:
|
||||
self.job_id = job_id
|
||||
else:
|
||||
raise Exception("PostJobActionAssociation must be created with a job or a job_id.")
|
||||
self.post_job_action = pja
|
||||
|
||||
|
||||
@@ -1173,7 +1178,7 @@ class History( object, Dictifiable, UsesAnnotations, HasName ):
|
||||
dataset.history = self
|
||||
if genome_build not in [None, '?']:
|
||||
self.genome_build = genome_build
|
||||
self.datasets.append( dataset )
|
||||
dataset.history_id = self.id
|
||||
return dataset
|
||||
|
||||
def add_datasets( self, sa_session, datasets, parent_id=None, genome_build=None, set_hid=True, quota=True, flush=False ):
|
||||
@@ -1208,7 +1213,8 @@ class History( object, Dictifiable, UsesAnnotations, HasName ):
|
||||
dataset.history = self
|
||||
if set_genome:
|
||||
self.genome_build = genome_build
|
||||
self.datasets.extend( datasets )
|
||||
for dataset in datasets:
|
||||
dataset.history_id = self.id
|
||||
return datasets
|
||||
|
||||
def add_dataset_collection( self, history_dataset_collection, set_hid=True ):
|
||||
|
||||
+29
-18
@@ -4,7 +4,7 @@ Migration script to support subworkflows and workflow request input parameters
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from sqlalchemy import Column, Integer, ForeignKey, MetaData, Table
|
||||
from sqlalchemy import Column, Integer, ForeignKey, MetaData, Table, Index, ForeignKeyConstraint
|
||||
|
||||
from galaxy.model.custom_types import TrimmedString, UUIDType, JSONType
|
||||
|
||||
@@ -15,22 +15,33 @@ metadata = MetaData()
|
||||
WorkflowInvocationToSubworkflowInvocationAssociation_table = Table(
|
||||
"workflow_invocation_to_subworkflow_invocation_association", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "workflow_invocation_id", Integer, ForeignKey( "workflow_invocation.id" ), index=True ),
|
||||
Column( "subworkflow_invocation_id", Integer, ForeignKey( "workflow_invocation.id" ), index=True ),
|
||||
Column( "workflow_step_id", Integer, ForeignKey("workflow_step.id") ),
|
||||
Column( "workflow_invocation_id", Integer ),
|
||||
Column( "subworkflow_invocation_id", Integer ),
|
||||
Column( "workflow_step_id", Integer ),
|
||||
ForeignKeyConstraint(['workflow_invocation_id'], ['workflow_invocation.id'], name='fk_wfi_swi_wfi'),
|
||||
ForeignKeyConstraint(['subworkflow_invocation_id'], ['workflow_invocation.id'], name='fk_wfi_swi_swi'),
|
||||
ForeignKeyConstraint(['workflow_step_id'], ['workflow_step.id'], name='fk_wfi_swi_ws')
|
||||
)
|
||||
|
||||
WorkflowRequestInputStepParmeter_table = Table(
|
||||
WorkflowRequestInputStepParameter_table = Table(
|
||||
"workflow_request_input_step_parameter", metadata,
|
||||
Column( "id", Integer, primary_key=True ),
|
||||
Column( "workflow_invocation_id", Integer, ForeignKey( "workflow_invocation.id" ), index=True ),
|
||||
Column( "workflow_step_id", Integer, ForeignKey("workflow_step.id") ),
|
||||
Column( "workflow_invocation_id", Integer ),
|
||||
Column( "workflow_step_id", Integer ),
|
||||
Column( "parameter_value", JSONType ),
|
||||
ForeignKeyConstraint(['workflow_invocation_id'], ['workflow_invocation.id'], name='fk_wfreq_isp_wfi'),
|
||||
ForeignKeyConstraint(['workflow_step_id'], ['workflow_step.id'], name='fk_wfreq_isp_ws')
|
||||
)
|
||||
|
||||
TABLES = [
|
||||
WorkflowInvocationToSubworkflowInvocationAssociation_table,
|
||||
WorkflowRequestInputStepParmeter_table,
|
||||
WorkflowRequestInputStepParameter_table,
|
||||
]
|
||||
|
||||
INDEXES = [
|
||||
Index( "ix_wfinv_swfinv_wfi", WorkflowInvocationToSubworkflowInvocationAssociation_table.c.workflow_invocation_id),
|
||||
Index( "ix_wfinv_swfinv_swfi", WorkflowInvocationToSubworkflowInvocationAssociation_table.c.subworkflow_invocation_id),
|
||||
Index( "ix_wfreq_inputstep_wfi", WorkflowRequestInputStepParameter_table.c.workflow_invocation_id)
|
||||
]
|
||||
|
||||
|
||||
@@ -38,16 +49,17 @@ def upgrade(migrate_engine):
|
||||
metadata.bind = migrate_engine
|
||||
print __doc__
|
||||
metadata.reflect()
|
||||
|
||||
subworkflow_id_column = Column( "subworkflow_id", Integer, ForeignKey("workflow.id"), nullable=True )
|
||||
if migrate_engine.name in ['postgres', 'postgresql']:
|
||||
subworkflow_id_column = Column( "subworkflow_id", Integer, ForeignKey("workflow.id"), nullable=True )
|
||||
input_subworkflow_step_id_column = Column( "input_subworkflow_step_id", Integer, ForeignKey("workflow_step.id"), nullable=True )
|
||||
parent_workflow_id_column = Column( "parent_workflow_id", Integer, ForeignKey("workflow.id"), nullable=True )
|
||||
else:
|
||||
subworkflow_id_column = Column( "subworkflow_id", Integer, nullable=True )
|
||||
input_subworkflow_step_id_column = Column( "input_subworkflow_step_id", Integer, nullable=True )
|
||||
parent_workflow_id_column = Column( "parent_workflow_id", Integer, nullable=True )
|
||||
__add_column( subworkflow_id_column, "workflow_step", metadata )
|
||||
|
||||
input_subworkflow_step_id_column = Column( "input_subworkflow_step_id", Integer, ForeignKey("workflow_step.id"), nullable=True )
|
||||
__add_column( input_subworkflow_step_id_column, "workflow_step_connection", metadata )
|
||||
|
||||
parent_workflow_id_column = Column( "parent_workflow_id", Integer, ForeignKey("workflow.id"), nullable=True )
|
||||
__add_column( parent_workflow_id_column, "workflow", metadata )
|
||||
|
||||
workflow_output_label_column = Column( "label", TrimmedString(255) )
|
||||
workflow_output_uuid_column = Column( "uuid", UUIDType, nullable=True )
|
||||
__add_column( workflow_output_label_column, "workflow_output", metadata )
|
||||
@@ -58,6 +70,7 @@ def upgrade(migrate_engine):
|
||||
__alter_column("workflow", "stored_workflow_id", metadata, nullable=True)
|
||||
|
||||
for table in TABLES:
|
||||
# Indexes are automatically created when the tables are.
|
||||
__create(table)
|
||||
|
||||
|
||||
@@ -66,15 +79,13 @@ def downgrade(migrate_engine):
|
||||
metadata.reflect()
|
||||
|
||||
__drop_column( "subworkflow_id", "workflow_step", metadata )
|
||||
__drop_column( "parent_workflow_id", "workflow_step", metadata )
|
||||
__drop_column( "parent_workflow_id", "workflow", metadata )
|
||||
|
||||
__drop_column( "input_subworkflow_step_id", "workflow_step_connection", metadata )
|
||||
|
||||
__drop_column( "label", "workflow_output", metadata )
|
||||
__drop_column( "uuid", "workflow_output", metadata )
|
||||
|
||||
__alter_column("workflow", "stored_workflow_id", metadata, nullable=False)
|
||||
|
||||
for table in TABLES:
|
||||
__drop(table)
|
||||
|
||||
+20
-21
@@ -10,25 +10,24 @@ def pgcalc( sa_session, id, dryrun=False ):
|
||||
TODO: Check against the recently updated versions of sqlalchemy if this
|
||||
'special' postgresql version is even necessary.
|
||||
"""
|
||||
sql = """
|
||||
UPDATE galaxy_user
|
||||
SET disk_usage = (SELECT COALESCE(SUM(total_size), 0)
|
||||
FROM ( SELECT DISTINCT ON (d.id) d.total_size, d.id
|
||||
FROM history_dataset_association hda
|
||||
JOIN history h ON h.id = hda.history_id
|
||||
JOIN dataset d ON hda.dataset_id = d.id
|
||||
WHERE h.user_id = :id
|
||||
AND h.purged = false
|
||||
AND hda.purged = false
|
||||
AND d.purged = false
|
||||
AND d.id NOT IN (SELECT dataset_id
|
||||
FROM library_dataset_dataset_association)
|
||||
) sizes)
|
||||
WHERE id = :id
|
||||
RETURNING disk_usage;
|
||||
"""
|
||||
r = sa_session.execute(sql, {'id': id})
|
||||
new = r.fetchone()[0]
|
||||
sql_calc = """SELECT COALESCE(SUM(total_size), 0)
|
||||
FROM ( SELECT DISTINCT ON (d.id) d.total_size, d.id
|
||||
FROM history_dataset_association hda
|
||||
JOIN history h ON h.id = hda.history_id
|
||||
JOIN dataset d ON hda.dataset_id = d.id
|
||||
WHERE h.user_id = :id
|
||||
AND h.purged = false
|
||||
AND hda.purged = false
|
||||
AND d.purged = false
|
||||
AND d.id NOT IN (SELECT dataset_id
|
||||
FROM library_dataset_dataset_association)
|
||||
) sizes"""
|
||||
sql_update = """UPDATE galaxy_user
|
||||
SET disk_usage = (%s)
|
||||
WHERE id = :id
|
||||
RETURNING disk_usage;""" % sql_calc
|
||||
if dryrun:
|
||||
sa_session.rollback()
|
||||
return new
|
||||
r = sa_session.execute(sql_calc, {'id': id})
|
||||
else:
|
||||
r = sa_session.execute(sql_update, {'id': id})
|
||||
return r.fetchone()[0]
|
||||
|
||||
@@ -407,6 +407,8 @@ class Tool( object, Dictifiable ):
|
||||
"""
|
||||
:returns: bool -- Whether the user is allowed to access the tool.
|
||||
"""
|
||||
if self.require_login and user is None:
|
||||
return False
|
||||
return True
|
||||
|
||||
def parse( self, tool_source, guid=None ):
|
||||
@@ -1426,7 +1428,7 @@ class Tool( object, Dictifiable ):
|
||||
return output_collect.collect_dynamic_collections( self, output, **kwds )
|
||||
|
||||
def to_archive(self):
|
||||
tool = self.tool
|
||||
tool = self
|
||||
tarball_files = []
|
||||
temp_files = []
|
||||
tool_xml = open( os.path.abspath( tool.config_file ), 'r' ).read()
|
||||
@@ -1643,7 +1645,8 @@ class Tool( object, Dictifiable ):
|
||||
# expand incoming parameters (parameters might trigger multiple tool executions,
|
||||
# here we select the first execution only in order to resolve dynamic parameters)
|
||||
expanded_incomings, _ = expand_meta_parameters( trans, self, params.__dict__ )
|
||||
params.__dict__ = expanded_incomings[ 0 ]
|
||||
if expanded_incomings:
|
||||
params.__dict__ = expanded_incomings[ 0 ]
|
||||
|
||||
# do param translation here, used by datasource tools
|
||||
if self.input_translator:
|
||||
@@ -1659,12 +1662,6 @@ class Tool( object, Dictifiable ):
|
||||
tool_model[ 'inputs' ] = {}
|
||||
populate_model( self.inputs, state_inputs, tool_model[ 'inputs' ] )
|
||||
|
||||
# sanitize tool state
|
||||
def value_to_basic( input, value, parent, **kwargs ):
|
||||
parent[ input.name ] = input.value_to_basic( value, self.app )
|
||||
|
||||
visit_input_values( self.inputs, state_inputs, value_to_basic )
|
||||
|
||||
# create tool help
|
||||
tool_help = ''
|
||||
if self.help:
|
||||
@@ -1690,10 +1687,11 @@ class Tool( object, Dictifiable ):
|
||||
'versions' : tool_versions,
|
||||
'requirements' : [ { 'name' : r.name, 'version' : r.version } for r in self.requirements ],
|
||||
'errors' : state_errors,
|
||||
'state_inputs' : state_inputs,
|
||||
'state_inputs' : params_to_strings( self.inputs, state_inputs, self.app ),
|
||||
'job_id' : trans.security.encode_id( job.id ) if job else None,
|
||||
'job_remap' : self._get_job_remap( job ),
|
||||
'history_id' : trans.security.encode_id( history.id )
|
||||
'history_id' : trans.security.encode_id( history.id ),
|
||||
'display' : self.display_interface
|
||||
})
|
||||
return tool_model
|
||||
|
||||
@@ -1753,12 +1751,26 @@ class Tool( object, Dictifiable ):
|
||||
rep_prefix = '%s_%d|' % ( key, rep_index )
|
||||
self.populate_state( request_context, input.inputs, incoming, rep_state, errors, prefix=rep_prefix, context=context )
|
||||
else:
|
||||
param_value = incoming.get( key, state.get( input.name ) )
|
||||
param_value = self._get_incoming_value( incoming, key, state.get( input.name ) )
|
||||
value, error = check_param( request_context, input, param_value, context )
|
||||
if error:
|
||||
errors[ key ] = error
|
||||
state[ input.name ] = value
|
||||
|
||||
def _get_incoming_value( self, incoming, key, default ):
|
||||
"""
|
||||
Fetch value from incoming dict directly or check special nginx upload
|
||||
created variants of this key.
|
||||
"""
|
||||
if '__' + key + '__is_composite' in incoming:
|
||||
composite_keys = incoming[ '__' + key + '__keys' ].split()
|
||||
value = dict()
|
||||
for composite_key in composite_keys:
|
||||
value[ composite_key ] = incoming[ key + '_' + composite_key ]
|
||||
return value
|
||||
else:
|
||||
return incoming.get( key, default )
|
||||
|
||||
def _get_job_remap( self, job):
|
||||
if job:
|
||||
if job.state == job.states.ERROR:
|
||||
|
||||
@@ -439,6 +439,7 @@ class DefaultToolAction( object ):
|
||||
handle_output( name, output )
|
||||
log.info("Handled output named %s for tool %s %s" % (name, tool.id, handle_output_timer))
|
||||
|
||||
add_datasets_timer = ExecutionTimer()
|
||||
# Add all the top-level (non-child) datasets to the history unless otherwise specified
|
||||
datasets_to_persist = []
|
||||
for name in out_data.keys():
|
||||
@@ -461,6 +462,8 @@ class DefaultToolAction( object ):
|
||||
child_dataset = out_data[ child_name ]
|
||||
parent_dataset.children.append( child_dataset )
|
||||
|
||||
log.info("Added output datasets to history %s" % add_datasets_timer)
|
||||
job_setup_timer = ExecutionTimer()
|
||||
# Create the job object
|
||||
job, galaxy_session = self._new_job_for_session( trans, tool, history )
|
||||
self._record_inputs( trans, tool, job, incoming, inp_data, inp_dataset_collections, current_user_roles )
|
||||
@@ -509,7 +512,12 @@ class DefaultToolAction( object ):
|
||||
trans.sa_session.add(jtod)
|
||||
except Exception:
|
||||
log.exception('Cannot remap rerun dependencies.')
|
||||
|
||||
log.info("Setup for job %s complete, ready to flush %s" % (job.log_str(), job_setup_timer))
|
||||
|
||||
job_flush_timer = ExecutionTimer()
|
||||
trans.sa_session.flush()
|
||||
log.info("Flushed transaction for job %s %s" % (job.log_str(), job_flush_timer))
|
||||
# Some tools are not really executable, but jobs are still created for them ( for record keeping ).
|
||||
# Examples include tools that redirect to other applications ( epigraph ). These special tools must
|
||||
# include something that can be retrieved from the params ( e.g., REDIRECT_URL ) to keep the job
|
||||
|
||||
@@ -318,6 +318,10 @@ class TabularToolDataTable( ToolDataTable, Dictifiable ):
|
||||
filename = os.path.join( tool_data_path, filename )
|
||||
if os.path.exists( filename ):
|
||||
found = True
|
||||
elif os.path.exists( "%s.sample" % filename ) and not from_shed_config:
|
||||
log.info("Could not find tool data %s, reading sample" % filename)
|
||||
filename = "%s.sample" % filename
|
||||
found = True
|
||||
else:
|
||||
# Since the path attribute can include a hard-coded path to a specific directory
|
||||
# (e.g., <file path="tool-data/cg_crr_files.loc" />) which may not be the same value
|
||||
|
||||
@@ -298,7 +298,7 @@ class DockerContainer(Container):
|
||||
defaults = "$job_directory:ro,$tool_directory:ro,$job_directory/outputs:rw,$working_directory:rw"
|
||||
elif self.app_info.outputs_to_working_directory:
|
||||
# Should need default_file_path (which is a course estimate given
|
||||
# object stores anyway.
|
||||
# object stores anyway).
|
||||
defaults = "$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:ro"
|
||||
else:
|
||||
defaults = "$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$default_file_path:rw"
|
||||
|
||||
@@ -131,7 +131,7 @@ class ToolEvaluator( object ):
|
||||
param_dict.update( incoming )
|
||||
|
||||
input_dataset_paths = dataset_path_rewrites( input_paths )
|
||||
self.__populate_wrappers(param_dict, input_dataset_paths, job_working_directory)
|
||||
self.__populate_wrappers(param_dict, input_datasets, input_dataset_paths, job_working_directory)
|
||||
self.__populate_input_dataset_wrappers(param_dict, input_datasets, input_dataset_paths)
|
||||
self.__populate_output_dataset_wrappers(param_dict, output_datasets, output_paths, job_working_directory)
|
||||
self.__populate_output_collection_wrappers(param_dict, output_collections, output_paths, job_working_directory)
|
||||
@@ -167,7 +167,7 @@ class ToolEvaluator( object ):
|
||||
|
||||
do_walk( inputs, input_values )
|
||||
|
||||
def __populate_wrappers(self, param_dict, input_dataset_paths, job_working_directory):
|
||||
def __populate_wrappers(self, param_dict, input_datasets, input_dataset_paths, job_working_directory):
|
||||
|
||||
def wrap_input( input_values, input ):
|
||||
if isinstance( input, DataToolParameter ) and input.multiple:
|
||||
@@ -219,14 +219,16 @@ class ToolEvaluator( object ):
|
||||
tool=self,
|
||||
name=input.name
|
||||
)
|
||||
identifier_key = "%s|__identifier__" % input.name
|
||||
if identifier_key in param_dict:
|
||||
wrapper_kwds["identifier"] = param_dict[identifier_key]
|
||||
if dataset:
|
||||
# A None dataset does not have a filename
|
||||
real_path = dataset.file_name
|
||||
if real_path in input_dataset_paths:
|
||||
wrapper_kwds[ "dataset_path" ] = input_dataset_paths[ real_path ]
|
||||
identifier_key = param_dict[ "identifier_key" ].get( dataset, None )
|
||||
if identifier_key:
|
||||
element_identifier = param_dict.get(identifier_key, None)
|
||||
if element_identifier:
|
||||
wrapper_kwds[ "identifier" ] = element_identifier
|
||||
input_values[ input.name ] = \
|
||||
DatasetFilenameWrapper( dataset, **wrapper_kwds )
|
||||
elif isinstance( input, DataCollectionToolParameter ):
|
||||
@@ -254,6 +256,7 @@ class ToolEvaluator( object ):
|
||||
# tools where the inputs don't even get passed through. These
|
||||
# tools (e.g. UCSC) should really be handled in a special way.
|
||||
if self.tool.check_values:
|
||||
param_dict[ "identifier_key" ] = dict((v, "%s|__identifier__" % k) for k, v in input_datasets.iteritems()) # allows lookup of identifier through HDA.
|
||||
self.__walk_inputs( self.tool.inputs, param_dict, wrap_input )
|
||||
|
||||
def __populate_input_dataset_wrappers(self, param_dict, input_datasets, input_dataset_paths):
|
||||
|
||||
@@ -72,6 +72,7 @@ def execute( trans, tool, param_combinations, history, rerun_remap_job_id=None,
|
||||
log.debug("Executed %d job(s) for tool %s request: %s" % (job_count, tool.id, all_jobs_timer))
|
||||
if collection_info:
|
||||
history = history or tool.get_default_history_by_trans( trans )
|
||||
params = param_combinations[0]
|
||||
execution_tracker.create_output_collections( trans, history, params )
|
||||
|
||||
return execution_tracker
|
||||
|
||||
@@ -24,7 +24,7 @@ def visit_input_values( inputs, input_values, callback, name_prefix='', label_pr
|
||||
>>> from xml.etree.ElementTree import XML
|
||||
>>> from galaxy.util.bunch import Bunch
|
||||
>>> from galaxy.util.odict import odict
|
||||
>>> from galaxy.tools.parameters.basic import TextToolParameter
|
||||
>>> from galaxy.tools.parameters.basic import TextToolParameter, BooleanToolParameter
|
||||
>>> from galaxy.tools.parameters.grouping import Repeat
|
||||
>>> a = TextToolParameter( None, XML( '<param name="a"/>' ) )
|
||||
>>> b = Repeat()
|
||||
@@ -32,7 +32,7 @@ def visit_input_values( inputs, input_values, callback, name_prefix='', label_pr
|
||||
>>> d = Repeat()
|
||||
>>> e = TextToolParameter( None, XML( '<param name="e"/>' ) )
|
||||
>>> f = Conditional()
|
||||
>>> g = TextToolParameter( None, XML( '<param name="g"/>' ) )
|
||||
>>> g = BooleanToolParameter( None, XML( '<param name="g"/>' ) )
|
||||
>>> h = TextToolParameter( None, XML( '<param name="h"/>' ) )
|
||||
>>> i = TextToolParameter( None, XML( '<param name="i"/>' ) )
|
||||
>>> b.name = 'b'
|
||||
@@ -45,12 +45,16 @@ def visit_input_values( inputs, input_values, callback, name_prefix='', label_pr
|
||||
>>>
|
||||
>>> def visitor( input, value, prefix, prefixed_name, **kwargs ):
|
||||
... print 'name=%s, prefix=%s, prefixed_name=%s, value=%s' % ( input.name, prefix, prefixed_name, value )
|
||||
>>> visit_input_values( odict([('a',a),('b',b)]), odict([ ('a', 1), ('b', [ odict([('c', 3), ( 'd', [odict([ ('e',5), ('f', odict([ ('g','true'), ('h',7) ])) ]) ])]) ]) ]), visitor )
|
||||
>>> inputs = odict([('a',a),('b',b)])
|
||||
>>> nested = odict([ ('a', 1), ('b', [ odict([('c', 3), ( 'd', [odict([ ('e', 5), ('f', odict([ ('g', True), ('h', 7) ])) ]) ])]) ]) ])
|
||||
>>> visit_input_values( inputs, nested, visitor )
|
||||
name=a, prefix=, prefixed_name=a, value=1
|
||||
name=c, prefix=b_0|, prefixed_name=b_0|c, value=3
|
||||
name=e, prefix=b_0|d_0|, prefixed_name=b_0|d_0|e, value=5
|
||||
name=g, prefix=b_0|d_0|, prefixed_name=b_0|d_0|f|g, value=true
|
||||
name=g, prefix=b_0|d_0|, prefixed_name=b_0|d_0|f|g, value=True
|
||||
name=h, prefix=b_0|d_0|, prefixed_name=b_0|d_0|f|h, value=7
|
||||
>>> params_from_strings( inputs, params_to_strings( inputs, nested, None ), None )[ 'b' ][ 0 ][ 'd' ][ 0 ][ 'f' ][ 'g' ] is True
|
||||
True
|
||||
"""
|
||||
def callback_helper( input, input_values, name_prefix, label_prefix, parent_prefix, context=None, error=None ):
|
||||
args = {
|
||||
|
||||
@@ -187,9 +187,10 @@ class ToolParameter( object, Dictifiable ):
|
||||
return value
|
||||
|
||||
def validate( self, value, trans=None ):
|
||||
if value is not '' or not self.optional:
|
||||
for validator in self.validators:
|
||||
validator.validate( value, trans )
|
||||
if value in ["", None] and self.optional:
|
||||
return
|
||||
for validator in self.validators:
|
||||
validator.validate( value, trans )
|
||||
|
||||
def to_dict( self, trans, view='collection', value_mapper=None, other_values={} ):
|
||||
""" to_dict tool parameter. This can be overridden by subclasses. """
|
||||
@@ -476,7 +477,7 @@ class BooleanToolParameter( ToolParameter ):
|
||||
return ( value in [ True, 'True', 'true' ] )
|
||||
|
||||
def to_json( self, value, app=None ):
|
||||
if value is True:
|
||||
if self.to_python( value, app ):
|
||||
return 'true'
|
||||
else:
|
||||
return 'false'
|
||||
@@ -1873,6 +1874,8 @@ class DataToolParameter( BaseDataToolParameter ):
|
||||
raise ValueError( "History does not include a dataset of the required format / build" )
|
||||
if value in [ None, "None", '' ]:
|
||||
return None
|
||||
if isinstance( value, dict ) and 'values' in value:
|
||||
value = self.to_python( value, trans.app )
|
||||
if isinstance( value, string_types ) and value.find( "," ) > 0:
|
||||
value = [ int( value_part ) for value_part in value.split( "," ) ]
|
||||
if isinstance( value, list ):
|
||||
@@ -1954,7 +1957,7 @@ class DataToolParameter( BaseDataToolParameter ):
|
||||
dataset_count = 0
|
||||
for validator in self.validators:
|
||||
def do_validate( v ):
|
||||
if validator.requires_dataset_metadata and v and v.dataset.state != galaxy.model.Dataset.states.OK:
|
||||
if validator.requires_dataset_metadata and v and hasattr( v, 'dataset' ) and v.dataset.state != galaxy.model.Dataset.states.OK:
|
||||
return
|
||||
else:
|
||||
validator.validate( v, trans )
|
||||
@@ -2149,6 +2152,8 @@ class DataCollectionToolParameter( BaseDataToolParameter ):
|
||||
raise ValueError( "History does not include a dataset collection of the correct type or containing the correct types of datasets" )
|
||||
if value in [None, "None"]:
|
||||
return None
|
||||
if isinstance( value, dict ) and 'values' in value:
|
||||
value = self.to_python( value, trans.app )
|
||||
if isinstance( value, string_types ) and value.find( "," ) > 0:
|
||||
value = [ int( value_part ) for value_part in value.split( "," ) ]
|
||||
elif isinstance( value, trans.app.model.HistoryDatasetCollectionAssociation ):
|
||||
|
||||
@@ -63,6 +63,9 @@ def _json_wrap_input(input, value, handle_files="SKIP"):
|
||||
json_value = _cast_if_not_none(value, int, empty_to_none=True)
|
||||
elif input_type == "boolean":
|
||||
json_value = _cast_if_not_none(value, bool)
|
||||
elif input_type == "data_column":
|
||||
# value is a SelectToolParameterWrapper()
|
||||
json_value = map(int, _cast_if_not_none(value.value, list))
|
||||
else:
|
||||
raise NotImplementedError("input_type [%s] not implemented" % input_type)
|
||||
|
||||
|
||||
@@ -347,10 +347,11 @@ class TestCollectionDef( object ):
|
||||
|
||||
|
||||
class TestCollectionOutputDef( object ):
|
||||
# TODO: do not require XML directly here.
|
||||
|
||||
def __init__( self, name, attrib, element_tests ):
|
||||
self.name = name
|
||||
self.collection_type = attrib.get( "type", None )
|
||||
count = attrib.get("count", None)
|
||||
self.count = int(count) if count is not None else None
|
||||
self.attrib = attrib
|
||||
self.element_tests = element_tests
|
||||
|
||||
@@ -126,13 +126,10 @@ class AbstractToolBox( Dictifiable, ManagesIntegratedToolPanelMixin, object ):
|
||||
log.info( "Parsing the tool configuration %s" % config_filename )
|
||||
tool_conf_source = get_toolbox_parser(config_filename)
|
||||
tool_path = tool_conf_source.parse_tool_path()
|
||||
if tool_path:
|
||||
# We're parsing a shed_tool_conf file since we have a tool_path attribute.
|
||||
parsing_shed_tool_conf = True
|
||||
parsing_shed_tool_conf = tool_conf_source.is_shed_tool_conf()
|
||||
if parsing_shed_tool_conf:
|
||||
# Keep an in-memory list of xml elements to enable persistence of the changing tool config.
|
||||
config_elems = []
|
||||
else:
|
||||
parsing_shed_tool_conf = False
|
||||
tool_path = self.__resolve_tool_path(tool_path, config_filename)
|
||||
# Only load the panel_dict under certain conditions.
|
||||
load_panel_dict = not self._integrated_tool_panel_config_has_contents
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user