mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge branch 'dev' of git://github.com/galaxyproject/galaxy into toolshed_decouple
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -220,29 +220,22 @@ var FolderView = Backbone.View.extend({
|
||||
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>');
|
||||
|
||||
|
||||
@@ -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 );
|
||||
@@ -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 );
|
||||
@@ -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)
|
||||
@@ -1051,77 +1079,89 @@ 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" 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 id="toolbtn_dl" class="btn-group dataset-manipulation" style="margin-left: 0.5em; display:none; ">',
|
||||
'<button title="Download selected datasets as archive" id="drop_toggle" 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 information" class="primary-button toolbtn-show-locinfo" style="margin-left: 0.5em;" type="button">',
|
||||
'<span class="fa fa-info-circle"></span>',
|
||||
' Location Info',
|
||||
'</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>');
|
||||
'<div class="folder-paginator paginator-bottom"></div>'
|
||||
|
||||
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(''));
|
||||
].join(''));
|
||||
},
|
||||
|
||||
templateLocInfoInModal: function(){
|
||||
@@ -1188,220 +1228,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 datasets 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(''));
|
||||
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(''));
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
@@ -240,7 +240,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>',
|
||||
|
||||
@@ -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,13 @@
|
||||
@import "galaxy_bootstrap/variables.less";
|
||||
@import "galaxy_variables.less";
|
||||
|
||||
.library_style_container .fa{
|
||||
font-size: 12px;
|
||||
}
|
||||
.library_style_container .fa-globe{
|
||||
font-size: initial;
|
||||
}
|
||||
|
||||
.libraryRow {
|
||||
background-color: @table-heading-bg;
|
||||
}
|
||||
@@ -229,3 +236,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 {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<display file="ensembl/ensembl_bam.xml" />
|
||||
<display file="igv/bam.xml" />
|
||||
<display file="igb/bam.xml" />
|
||||
<display file="iobio/bam.xml" />
|
||||
</datatype>
|
||||
<datatype extension="cram" type="galaxy.datatypes.binary:CRAM" mimetype="application/octet-stream" display_in_upload="true" description="CRAM is a file format for highly efficient and tunable reference-based compression of alignment data." description_url="http://www.ebi.ac.uk/ena/software/cram-usage"/>
|
||||
<datatype extension="bed" type="galaxy.datatypes.interval:Bed" display_in_upload="true" description="BED format provides a flexible way to define the data lines that are displayed in an annotation track. BED lines have three required columns and nine additional optional columns. The three required columns are chrom, chromStart and chromEnd." description_url="https://wiki.galaxyproject.org/Learn/Datatypes#Bed">
|
||||
@@ -247,6 +248,7 @@
|
||||
<display file="ucsc/vcf.xml" />
|
||||
<display file="igv/vcf.xml" />
|
||||
<display file="rviewer/vcf.xml" inherit="True"/>
|
||||
<display file="iobio/vcf.xml" />
|
||||
</datatype>
|
||||
<datatype extension="bcf" type="galaxy.datatypes.binary:Bcf" mimetype="application/octet-stream" display_in_upload="True">
|
||||
<converter file="bcf_to_bcf_bgzip_converter.xml" target_datatype="bcf_bgzip"/>
|
||||
@@ -441,6 +443,53 @@
|
||||
<datatype extension="biom1" type="galaxy.datatypes.text:Biom1" display_in_upload="True" subclass="True" mimetype="application/json" />
|
||||
<!-- 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>
|
||||
<!--
|
||||
@@ -482,6 +531,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"/>
|
||||
@@ -491,6 +541,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
|
||||
|
||||
@@ -75,4 +75,14 @@
|
||||
<columns>dbkey, name, value</columns>
|
||||
<file path="tool-data/liftOver.loc" />
|
||||
</table>
|
||||
<!-- iobio bam servers -->
|
||||
<table name="bam_iobio" comment_char="#">
|
||||
<columns>value, name, url</columns>
|
||||
<file path="tool-data/bam_iobio.loc" />
|
||||
</table>
|
||||
<!-- iobio vcf servers -->
|
||||
<table name="vcf_iobio" comment_char="#">
|
||||
<columns>value, name, url</columns>
|
||||
<file path="tool-data/vcf_iobio.loc" />
|
||||
</table>
|
||||
</tables>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<display id="iobio_bam" version="1.0.0" name="display at bam.iobio">
|
||||
<dynamic_links from_data_table="bam_iobio" skip_startswith="#" id="value" name="name">
|
||||
<url>${url}?bam=${bam_file.qp}</url>
|
||||
<param type="data" name="bam_file" url="galaxy_${DATASET_HASH}.bam" />
|
||||
<param type="data" name="bai_file" url="galaxy_${DATASET_HASH}.bam.bai" metadata="bam_index" />
|
||||
</dynamic_links>
|
||||
</display>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<display id="iobio_vcf" version="1.0.0" name="display at vcf.iobio">
|
||||
<dynamic_links from_data_table="vcf_iobio" skip_startswith="#" id="value" name="name">
|
||||
<url>${url}?vcf=${bgzip_file.qp}</url>
|
||||
<param type="data" name="bgzip_file" url="galaxy_${DATASET_HASH}.vcf.gz" format="vcf_bgzip" />
|
||||
<param type="data" name="tabix_file" dataset="bgzip_file" url="galaxy_${DATASET_HASH}.vcf.gz.tbi" format="tabix" />
|
||||
</dynamic_links>
|
||||
</display>
|
||||
@@ -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>
|
||||
@@ -142,7 +142,7 @@ class DynamicDisplayApplicationBuilder( object ):
|
||||
max_col = max( id_col, name_col )
|
||||
dynamic_params = {}
|
||||
if data_table is not None:
|
||||
max_col = max( [ max_col ] + data_table.columns.values() )
|
||||
max_col = max( [ max_col ] + data_table.columns.values() )
|
||||
for key, value in data_table.columns.items():
|
||||
dynamic_params[key] = { 'column': value, 'split': False, 'separator': ',' }
|
||||
for dynamic_param in elem.findall( 'dynamic_param' ):
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -30,6 +30,7 @@ from xml.etree import ElementInclude, ElementTree
|
||||
from six import binary_type, iteritems, PY3, string_types, text_type
|
||||
from six.moves import email_mime_text, xrange, zip
|
||||
from six.moves.urllib import parse as urlparse
|
||||
from six.moves.urllib import request as urlrequest
|
||||
|
||||
try:
|
||||
import docutils.core as docutils_core
|
||||
@@ -1342,6 +1343,46 @@ def parse_int(value, min_val=None, max_val=None, default=None, allow_none=False)
|
||||
raise
|
||||
|
||||
|
||||
def build_url( base_url, port=80, scheme='http', pathspec=None, params=None, doseq=False ):
|
||||
if params is None:
|
||||
params = dict()
|
||||
if pathspec is None:
|
||||
pathspec = []
|
||||
parsed_url = urlparse.urlparse( base_url )
|
||||
if scheme != 'http':
|
||||
parsed_url.scheme = scheme
|
||||
if port != 80:
|
||||
url = '%s://%s:%d/%s' % ( parsed_url.scheme, parsed_url.netloc.rstrip( '/' ), int( port ), parsed_url.path )
|
||||
else:
|
||||
url = '%s://%s/%s' % ( parsed_url.scheme, parsed_url.netloc.rstrip( '/' ), parsed_url.path.lstrip( '/' ) )
|
||||
if len( pathspec ) > 0:
|
||||
url = '%s/%s' % ( url.rstrip( '/' ), '/'.join( pathspec ) )
|
||||
if parsed_url.query:
|
||||
for query_parameter in parsed_url.query.split( '&' ):
|
||||
key, value = query_parameter.split( '=' )
|
||||
params[ key ] = value
|
||||
if params:
|
||||
url += '?%s' % urlparse.urlencode( params, doseq=doseq )
|
||||
return url
|
||||
|
||||
|
||||
def url_get( base_url, password_mgr=None, pathspec=None, params=None ):
|
||||
"""Make contact with the uri provided and return any contents."""
|
||||
# Uses system proxy settings if they exist.
|
||||
proxy = urlrequest.ProxyHandler()
|
||||
if password_mgr is not None:
|
||||
auth = urlrequest.HTTPDigestAuthHandler( password_mgr )
|
||||
urlopener = urlrequest.build_opener( proxy, auth )
|
||||
else:
|
||||
urlopener = urlrequest.build_opener( proxy )
|
||||
urlrequest.install_opener( urlopener )
|
||||
full_url = build_url( base_url, pathspec=pathspec, params=params )
|
||||
response = urlopener.open( full_url )
|
||||
content = response.read()
|
||||
response.close()
|
||||
return content
|
||||
|
||||
|
||||
def safe_relpath(path):
|
||||
"""
|
||||
Given what we expect to be a relative path, determine whether the path
|
||||
|
||||
@@ -3,6 +3,7 @@ Provides a `TraceLogger` implementation that logs to a fluentd collector
|
||||
"""
|
||||
|
||||
import threading
|
||||
import time
|
||||
|
||||
try:
|
||||
from fluent.sender import FluentSender
|
||||
@@ -34,11 +35,10 @@ class FluentTraceLogger( object ):
|
||||
del self.thread_local.context[key]
|
||||
self.lock.release()
|
||||
|
||||
def log( self, label, time=None, **kwargs ):
|
||||
def log( self, label, event_time=None, **kwargs ):
|
||||
self.lock.acquire()
|
||||
if hasattr( self.thread_local, 'context' ):
|
||||
kwargs.update( self.thread_local.context )
|
||||
self.lock.release()
|
||||
if time is None:
|
||||
time = int( time.time() )
|
||||
self.sender.emit_with_time( label, time, kwargs )
|
||||
event_time = event_time or time.time()
|
||||
self.sender.emit_with_time( label, int(event_time), kwargs )
|
||||
|
||||
@@ -180,6 +180,7 @@ class WebApplication( object ):
|
||||
# Is the method callable
|
||||
if not callable( method ):
|
||||
raise httpexceptions.HTTPNotFound( "Action not callable for " + path_info )
|
||||
environ['controller_action_key'] = "%s.%s.%s" % ('api' if environ['is_api_request'] else 'web', controller_name, action or 'default')
|
||||
# Combine mapper args and query string / form args and call
|
||||
kwargs = trans.request.params.mixed()
|
||||
kwargs.update( map )
|
||||
|
||||
@@ -32,5 +32,5 @@ class StatsdMiddleware(object):
|
||||
start_time = time.time()
|
||||
req = self.application(environ, start_response)
|
||||
dt = int((time.time() - start_time) * 1000)
|
||||
self.statsd_client.timing(environ.get('PATH_INFO', "NOPATH").strip('/').replace('/', '.'), dt)
|
||||
self.statsd_client.timing(environ.get('controller_action_key', None) or environ.get('PATH_INFO', "NOPATH").strip('/').replace('/', '.'), dt)
|
||||
return req
|
||||
|
||||
@@ -156,7 +156,7 @@ class DatasetsController( BaseAPIController, UsesVisualizationMixin ):
|
||||
if msg:
|
||||
return msg
|
||||
|
||||
# Get datasources and check for essages.
|
||||
# Get datasources and check for messages.
|
||||
data_sources = dataset.get_datasources( trans )
|
||||
messages_list = [ data_source_dict[ 'message' ] for data_source_dict in data_sources.values() ]
|
||||
return_message = self._get_highest_priority_msg( messages_list )
|
||||
@@ -251,7 +251,7 @@ class DatasetsController( BaseAPIController, UsesVisualizationMixin ):
|
||||
|
||||
registry = trans.app.data_provider_registry
|
||||
|
||||
# allow the caller to specifiy which provider is used
|
||||
# allow the caller to specify which provider is used
|
||||
# pulling from the original providers if possible, then the new providers
|
||||
if provider:
|
||||
if provider in registry.dataset_type_name_to_data_provider:
|
||||
|
||||
@@ -404,8 +404,8 @@ class LibraryDatasetsController( BaseAPIController, UsesVisualizationMixin ):
|
||||
"""
|
||||
if payload:
|
||||
kwd.update(payload)
|
||||
kwd[ 'space_to_tab' ] = 'False'
|
||||
kwd[ 'to_posix_lines' ] = 'True'
|
||||
kwd['space_to_tab'] = False
|
||||
kwd['to_posix_lines'] = True
|
||||
kwd[ 'dbkey' ] = kwd.get( 'dbkey', '?' )
|
||||
kwd[ 'file_type' ] = kwd.get( 'file_type', 'auto' )
|
||||
kwd['link_data_only'] = 'link_to_files' if util.string_as_bool( kwd.get( 'link_data', False ) ) else 'copy_files'
|
||||
|
||||
@@ -87,7 +87,7 @@ class MetricsController( BaseAPIController ):
|
||||
"""
|
||||
if trans.app.trace_logger:
|
||||
for label, time, kwargs in metrics:
|
||||
trans.app.trace_logger.log( label, time=int( time ), **kwargs )
|
||||
trans.app.trace_logger.log( label, event_time=int( time ), **kwargs )
|
||||
elif self.debugging:
|
||||
for label, time, kwargs in metrics:
|
||||
log.debug( '%s %s %s', label, time, kwargs )
|
||||
|
||||
@@ -6,7 +6,7 @@ import time
|
||||
import hashlib
|
||||
from galaxy import exceptions
|
||||
from galaxy.web import _future_expose_api as expose_api
|
||||
from galaxy.util import jstree
|
||||
from galaxy.util import jstree, unicodify
|
||||
from galaxy.web.base.controller import BaseAPIController
|
||||
from operator import itemgetter
|
||||
|
||||
@@ -134,20 +134,18 @@ class RemoteFilesAPIController( BaseAPIController ):
|
||||
jstree_paths = []
|
||||
if os.path.exists( directory ):
|
||||
for ( dirpath, dirnames, filenames ) in os.walk( directory ):
|
||||
|
||||
for dirname in dirnames:
|
||||
dir_path = os.path.relpath( os.path.join( dirpath, dirname ), directory )
|
||||
dir_path_hash = hashlib.sha1( dir_path.encode('utf-8') ).hexdigest()
|
||||
dir_path_hash = hashlib.sha1(unicodify(dir_path).encode('utf-8')).hexdigest()
|
||||
disabled = True if disable == 'folders' else False
|
||||
jstree_paths.append( jstree.Path( dir_path, dir_path_hash, { 'type': 'folder', 'state': { 'disabled': disabled }, 'li_attr': { 'full_path': dir_path } } ) )
|
||||
|
||||
for filename in filenames:
|
||||
file_path = os.path.relpath( os.path.join( dirpath, filename ), directory )
|
||||
file_path_hash = hashlib.sha1( file_path.encode('utf-8') ).hexdigest()
|
||||
file_path_hash = hashlib.sha1(unicodify(file_path).encode('utf-8')).hexdigest()
|
||||
disabled = True if disable == 'files' else False
|
||||
jstree_paths.append( jstree.Path( file_path, file_path_hash, { 'type': 'file', 'state': { 'disabled': disabled }, 'li_attr': { 'full_path': file_path } } ) )
|
||||
else:
|
||||
raise exceptions.ConfigDoesNotAllowException( 'The given directory does not exist.' )
|
||||
|
||||
userdir_jstree = jstree.JSTree( jstree_paths )
|
||||
return userdir_jstree
|
||||
|
||||
@@ -14,7 +14,6 @@ from galaxy.web.base.controller import BaseAPIController
|
||||
from tool_shed.galaxy_install.install_manager import InstallRepositoryManager, RepositoriesInstalledException
|
||||
from tool_shed.galaxy_install.metadata.installed_repository_metadata_manager import InstalledRepositoryMetadataManager
|
||||
from tool_shed.galaxy_install.repair_repository_manager import RepairRepositoryManager
|
||||
from tool_shed.util import common_util
|
||||
from tool_shed.util import encoding_util
|
||||
from tool_shed.util import hg_util
|
||||
from tool_shed.util import workflow_util
|
||||
@@ -115,7 +114,7 @@ class ToolShedRepositoriesController( BaseAPIController ):
|
||||
params = dict( name=name, owner=owner )
|
||||
pathspec = [ 'api', 'repositories', 'get_ordered_installable_revisions' ]
|
||||
try:
|
||||
raw_text = common_util.tool_shed_get( self.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
raw_text = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
except Exception, e:
|
||||
message = "Error attempting to retrieve the latest installable revision from tool shed %s for repository %s owned by %s: %s" % \
|
||||
( str( tool_shed_url ), str( name ), str( owner ), str( e ) )
|
||||
|
||||
@@ -53,9 +53,12 @@ class ToolsController( BaseAPIController, UsesVisualizationMixin ):
|
||||
results = []
|
||||
if hits:
|
||||
for hit in hits:
|
||||
tool = self._get_tool( hit )
|
||||
if tool:
|
||||
results.append( tool.id )
|
||||
try:
|
||||
tool = self._get_tool( hit, user=trans.user )
|
||||
if tool:
|
||||
results.append( tool.id )
|
||||
except exceptions.AuthenticationFailed:
|
||||
pass
|
||||
return results
|
||||
|
||||
# Find whether to detect.
|
||||
@@ -218,6 +221,11 @@ class ToolsController( BaseAPIController, UsesVisualizationMixin ):
|
||||
tool = trans.app.toolbox.get_tool( payload[ 'tool_id' ] , tool_version ) if 'tool_id' in payload else None
|
||||
if not tool or not tool.allow_user_access( trans.user ):
|
||||
raise exceptions.MessageException( 'Tool not found or not accessible.' )
|
||||
if trans.app.config.user_activation_on:
|
||||
if not trans.user:
|
||||
log.warning( "Anonymous user attempts to execute tool, but account activation is turned on." )
|
||||
elif not trans.user.active:
|
||||
log.warning( "User \"%s\" attempts to execute tool, but account activation is turned on and user account is not active." % trans.user.email )
|
||||
|
||||
# Set running history from payload parameters.
|
||||
# History not set correctly as part of this API call for
|
||||
@@ -295,8 +303,10 @@ class ToolsController( BaseAPIController, UsesVisualizationMixin ):
|
||||
def _get_tool( self, id, tool_version=None, user=None ):
|
||||
id = urllib.unquote_plus( id )
|
||||
tool = self.app.toolbox.get_tool( id, tool_version )
|
||||
if not tool or not tool.allow_user_access( user ):
|
||||
raise exceptions.ObjectNotFound("Could not find tool with id '%s'" % id)
|
||||
if not tool:
|
||||
raise exceptions.ObjectNotFound( "Could not find tool with id '%s'." % id )
|
||||
if not tool.allow_user_access( user ):
|
||||
raise exceptions.AuthenticationFailed( "Access denied, please login for tool with id '%s'." % id )
|
||||
return tool
|
||||
|
||||
def _rerun_tool( self, trans, payload, **kwargs ):
|
||||
|
||||
@@ -11,7 +11,7 @@ from galaxy.actions.admin import AdminActions
|
||||
from galaxy.exceptions import MessageException
|
||||
from galaxy.model import tool_shed_install as install_model
|
||||
from galaxy.model.util import pgcalc
|
||||
from galaxy.util import nice_size, sanitize_text
|
||||
from galaxy.util import nice_size, sanitize_text, url_get
|
||||
from galaxy.util.odict import odict
|
||||
from galaxy.web import url_for
|
||||
from galaxy.web.base.controller import BaseUIController, UsesQuotaMixin
|
||||
@@ -770,9 +770,9 @@ class AdminGalaxy( BaseUIController, Admin, AdminActions, UsesQuotaMixin, QuotaP
|
||||
tree = galaxy.util.parse_xml( tools_xml_file_path )
|
||||
root = tree.getroot()
|
||||
tool_shed = root.get( 'name' )
|
||||
tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( trans.app, tool_shed )
|
||||
shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( trans.app, tool_shed )
|
||||
repo_name_dependency_tups = []
|
||||
if tool_shed_url:
|
||||
if shed_url:
|
||||
for elem in root:
|
||||
if elem.tag == 'repository':
|
||||
tool_dependencies = []
|
||||
@@ -781,7 +781,7 @@ class AdminGalaxy( BaseUIController, Admin, AdminActions, UsesQuotaMixin, QuotaP
|
||||
changeset_revision = elem.get( 'changeset_revision' )
|
||||
params = dict( name=repository_name, owner='devteam', changeset_revision=changeset_revision )
|
||||
pathspec = [ 'repository', 'get_tool_dependencies' ]
|
||||
text = common_util.tool_shed_get( trans.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
text = url_get( shed_url, password_mgr=self.app.tool_shed_registry.url_auth( shed_url ), pathspec=pathspec, params=params )
|
||||
if text:
|
||||
tool_dependencies_dict = encoding_util.tool_shed_decode( text )
|
||||
for dependency_key, requirements_dict in tool_dependencies_dict.items():
|
||||
|
||||
@@ -189,7 +189,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
tool_shed_url = kwd.get( 'tool_shed_url', '' )
|
||||
tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( trans.app, tool_shed_url )
|
||||
params = dict( galaxy_url=web.url_for( '/', qualified=True ) )
|
||||
url = common_util.url_join( tool_shed_url, pathspec=[ 'repository', 'browse_valid_categories' ], params=params )
|
||||
url = util.build_url( tool_shed_url, pathspec=[ 'repository', 'browse_valid_categories' ], params=params )
|
||||
return trans.response.send_redirect( url )
|
||||
|
||||
@web.expose
|
||||
@@ -262,7 +262,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
owner=str( repository.owner ),
|
||||
changeset_revision=str( repository.changeset_revision ) )
|
||||
pathspec = [ 'repository', 'check_for_updates' ]
|
||||
url = common_util.url_join( tool_shed_url, pathspec=pathspec, params=params )
|
||||
url = util.build_url( tool_shed_url, pathspec=pathspec, params=params )
|
||||
return trans.response.send_redirect( url )
|
||||
|
||||
@web.expose
|
||||
@@ -419,7 +419,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
tool_shed_url = kwd.get( 'tool_shed_url', '' )
|
||||
tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( trans.app, tool_shed_url )
|
||||
params = dict( galaxy_url=web.url_for( '/', qualified=True ) )
|
||||
url = common_util.url_join( tool_shed_url, pathspec=[ 'repository', 'find_tools' ], params=params )
|
||||
url = util.build_url( tool_shed_url, pathspec=[ 'repository', 'find_tools' ], params=params )
|
||||
return trans.response.send_redirect( url )
|
||||
|
||||
@web.expose
|
||||
@@ -428,7 +428,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
tool_shed_url = kwd.get( 'tool_shed_url', '' )
|
||||
tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( trans.app, tool_shed_url )
|
||||
params = dict( galaxy_url=web.url_for( '/', qualified=True ) )
|
||||
url = common_util.url_join( tool_shed_url, pathspec=[ 'repository', 'find_workflows' ], params=params )
|
||||
url = util.build_url( tool_shed_url, pathspec=[ 'repository', 'find_workflows' ], params=params )
|
||||
return trans.response.send_redirect( url )
|
||||
|
||||
@web.expose
|
||||
@@ -463,7 +463,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
raise Exception( message )
|
||||
params = dict( name=repository_name, owner=repository_owner, changeset_revision=changeset_revision )
|
||||
pathspec = [ 'repository', 'get_tool_dependencies' ]
|
||||
raw_text = common_util.tool_shed_get( trans.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
raw_text = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
if len( raw_text ) > 2:
|
||||
encoded_text = json.loads( raw_text )
|
||||
text = encoding_util.tool_shed_decode( encoded_text )
|
||||
@@ -489,7 +489,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
owner=str( repository_owner ),
|
||||
changeset_revision=changeset_revision )
|
||||
pathspec = [ 'repository', 'get_updated_repository_information' ]
|
||||
raw_text = common_util.tool_shed_get( trans.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
raw_text = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
repo_information_dict = json.loads( raw_text )
|
||||
return repo_information_dict
|
||||
|
||||
@@ -579,8 +579,8 @@ class AdminToolshed( AdminGalaxy ):
|
||||
name=name,
|
||||
owner=owner )
|
||||
pathspec = [ 'repository', 'get_latest_downloadable_changeset_revision' ]
|
||||
raw_text = common_util.tool_shed_get( trans.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
url = common_util.url_join( tool_shed_url, pathspec=pathspec, params=params )
|
||||
raw_text = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
url = util.build_url( tool_shed_url, pathspec=pathspec, params=params )
|
||||
latest_downloadable_revision = json.loads( raw_text )
|
||||
if latest_downloadable_revision == hg_util.INITIAL_CHANGELOG_HASH:
|
||||
message = 'Error retrieving the latest downloadable revision for this repository via the url <b>%s</b>.' % url
|
||||
@@ -591,7 +591,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
# appropriate repository revision if one exists. We need to create a temporary repo_info_tuple
|
||||
# with the following entries to handle this.
|
||||
# ( description, clone_url, changeset_revision, ctx_rev, owner, repository_dependencies, tool_dependencies )
|
||||
tmp_clone_url = common_util.url_join( tool_shed_url, pathspec=[ 'repos', owner, name ] )
|
||||
tmp_clone_url = util.build_url( tool_shed_url, pathspec=[ 'repos', owner, name ] )
|
||||
tmp_repo_info_tuple = ( None, tmp_clone_url, latest_downloadable_revision, None, owner, None, None )
|
||||
installed_repository, installed_changeset_revision = \
|
||||
suc.repository_was_previously_installed( trans.app, tool_shed_url, name, tmp_repo_info_tuple, from_tip=False )
|
||||
@@ -609,7 +609,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
changeset_revisions=str( latest_downloadable_revision ),
|
||||
galaxy_url=web.url_for( '/', qualified=True ) )
|
||||
pathspec = [ 'repository', 'install_repositories_by_revision' ]
|
||||
url = common_util.url_join( tool_shed_url, pathspec=pathspec, params=params )
|
||||
url = util.build_url( tool_shed_url, pathspec=pathspec, params=params )
|
||||
return trans.response.send_redirect( url )
|
||||
else:
|
||||
message = 'Cannot locate installed tool shed repository with encoded id <b>%s</b>.' % str( repository_id )
|
||||
@@ -777,7 +777,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
changeset_revisions=installed_changeset_revision,
|
||||
galaxy_url=web.url_for( '/', qualified=True ) )
|
||||
pathspec = [ 'repository', 'install_repositories_by_revision' ]
|
||||
url = common_util.url_join( tool_shed_url, pathspec=pathspec, params=params )
|
||||
url = util.build_url( tool_shed_url, pathspec=pathspec, params=params )
|
||||
return trans.response.send_redirect( url )
|
||||
description = kwd.get( 'description', repository.description )
|
||||
shed_tool_conf, tool_path, relative_install_dir = suc.get_tool_panel_config_tool_path_install_dir( trans.app, repository )
|
||||
@@ -1035,7 +1035,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
try:
|
||||
params = dict( name=str( repository.name ), owner=str( repository.owner ) )
|
||||
pathspec = [ 'repository', 'get_repository_id' ]
|
||||
repository_ids = common_util.tool_shed_get( trans.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
repository_ids = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
except Exception, e:
|
||||
# The Tool Shed cannot handle the get_repository_id request, so the code must be older than the
|
||||
# 04/2014 Galaxy release when it was introduced. It will be safest to error out and let the
|
||||
@@ -1055,7 +1055,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
# Get the information necessary to install each repository.
|
||||
params = dict( repository_ids=str( repository_ids ), changeset_revisions=str( changeset_revisions ) )
|
||||
pathspec = [ 'repository', 'get_repository_information' ]
|
||||
raw_text = common_util.tool_shed_get( trans.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
raw_text = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
repo_information_dict = json.loads( raw_text )
|
||||
for encoded_repo_info_dict in repo_information_dict.get( 'repo_info_dicts', [] ):
|
||||
decoded_repo_info_dict = encoding_util.tool_shed_decode( encoded_repo_info_dict )
|
||||
@@ -1604,7 +1604,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
owner=tool_shed_repository.owner,
|
||||
changeset_revision=tool_shed_repository.installed_changeset_revision )
|
||||
pathspec = [ 'repository', 'get_readme_files' ]
|
||||
raw_text = common_util.tool_shed_get( trans.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
raw_text = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
readme_files_dict = json.loads( raw_text )
|
||||
tool_dependencies = metadata.get( 'tool_dependencies', None )
|
||||
rdim = repository_dependency_manager.RepositoryDependencyInstallManager( trans.app )
|
||||
@@ -1804,7 +1804,7 @@ class AdminToolshed( AdminGalaxy ):
|
||||
tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( trans.app, str( repository.tool_shed ) )
|
||||
params = dict( name=repository.name, owner=repository.owner, changeset_revision=repository.changeset_revision )
|
||||
pathspec = [ 'repository', 'get_tool_versions' ]
|
||||
text = common_util.tool_shed_get( trans.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
text = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
if text:
|
||||
tool_version_dicts = json.loads( text )
|
||||
tvm = tool_version_manager.ToolVersionManager( trans.app )
|
||||
|
||||
@@ -38,18 +38,23 @@ class HistoryListGrid( grids.Grid ):
|
||||
# Custom column types
|
||||
class DatasetsByStateColumn( grids.GridColumn ):
|
||||
def get_value( self, trans, grid, history ):
|
||||
state_counts = {
|
||||
'ok' : 0,
|
||||
'running' : 0,
|
||||
'queued' : 0,
|
||||
'error' : 0,
|
||||
}
|
||||
for hda in history.datasets:
|
||||
if hda.visible and not hda.deleted and hda.state in state_counts.keys():
|
||||
state_counts[ hda.state ] += 1
|
||||
# States to show in column.
|
||||
states_to_show = ( 'ok', 'running', 'queued', 'new', 'error' )
|
||||
|
||||
# Get dataset counts for each state in a state-count dictionary.
|
||||
state_counts = dict( ( state, count ) for state, count in
|
||||
trans.sa_session.query( model.Dataset.state, func.count(model.Dataset.state) )
|
||||
.join( model.HistoryDatasetAssociation )
|
||||
.group_by( model.Dataset.state )
|
||||
.filter( model.HistoryDatasetAssociation.history_id == history.id,
|
||||
model.HistoryDatasetAssociation.visible == true(),
|
||||
model.HistoryDatasetAssociation.deleted == false(),
|
||||
model.Dataset.state.in_(states_to_show) )
|
||||
)
|
||||
|
||||
# Create HTML.
|
||||
rval = ''
|
||||
for state in state_counts.keys():
|
||||
for state in states_to_show:
|
||||
count = state_counts.get( state )
|
||||
if count:
|
||||
rval += '<div class="count-box state-color-%s">%s</div> ' % (state, count)
|
||||
|
||||
@@ -10,7 +10,6 @@ from sqlalchemy import and_
|
||||
from sqlalchemy.sql import expression
|
||||
from markupsafe import escape
|
||||
|
||||
from tool_shed.util import common_util
|
||||
from tool_shed.util import encoding_util
|
||||
|
||||
from galaxy import model
|
||||
@@ -862,7 +861,7 @@ class WorkflowController( BaseUIController, SharableMixin, UsesStoredWorkflowMix
|
||||
workflow_name=encoding_util.tool_shed_encode( workflow_name ),
|
||||
open_for_url=True )
|
||||
pathspec = [ 'workflow', 'import_workflow' ]
|
||||
workflow_text = common_util.tool_shed_get( trans.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
workflow_text = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
import_button = True
|
||||
if import_button:
|
||||
workflow_data = None
|
||||
|
||||
@@ -88,7 +88,7 @@ class RepositoriesController( BaseAPIController ):
|
||||
return response_dict
|
||||
|
||||
@web.expose_api_anonymous
|
||||
def get_ordered_installable_revisions( self, trans, **kwd ):
|
||||
def get_ordered_installable_revisions( self, trans, name=None, owner=None, **kwd ):
|
||||
"""
|
||||
GET /api/repositories/get_ordered_installable_revisions
|
||||
|
||||
@@ -99,17 +99,22 @@ class RepositoriesController( BaseAPIController ):
|
||||
As in the changelog, the list is ordered oldest to newest.
|
||||
"""
|
||||
# Example URL: http://localhost:9009/api/repositories/get_ordered_installable_revisions?name=add_column&owner=test
|
||||
name = kwd.get( 'name', None )
|
||||
owner = kwd.get( 'owner', None )
|
||||
if name is None:
|
||||
name = kwd.get( 'name', None )
|
||||
if owner is None:
|
||||
owner = kwd.get( 'owner', None )
|
||||
tsr_id = kwd.get( 'tsr_id', None )
|
||||
if None not in [ name, owner ]:
|
||||
# Get the repository information.
|
||||
repository = suc.get_repository_by_name_and_owner( self.app, name, owner )
|
||||
if repository is None:
|
||||
trans.response.status = 404
|
||||
return { 'status': 'error', 'message': 'No repository named %s found with owner %s' % ( name, owner ) }
|
||||
elif tsr_id is not None:
|
||||
repository = suc.get_repository_in_tool_shed( self.app, tsr_id )
|
||||
else:
|
||||
error_message = "Error in the Tool Shed repositories API in get_ordered_installable_revisions: "
|
||||
error_message += "invalid parameters received." % ( str( name ), str( owner ) )
|
||||
error_message += "invalid parameters received."
|
||||
log.debug( error_message )
|
||||
return []
|
||||
return repository.ordered_installable_revisions( self.app )
|
||||
|
||||
@@ -7,7 +7,7 @@ import sys
|
||||
import logging
|
||||
import logging.config
|
||||
import ConfigParser
|
||||
from galaxy.util import string_as_bool, listify
|
||||
from galaxy.util import string_as_bool
|
||||
from galaxy.web.formatting import expand_pretty_datetime_format
|
||||
from galaxy.version import VERSION, VERSION_MAJOR
|
||||
|
||||
@@ -66,12 +66,12 @@ class Configuration( object ):
|
||||
self.new_file_path = resolve_path( kwargs.get( "new_file_path", "database/tmp" ), self.root )
|
||||
self.cookie_path = kwargs.get( "cookie_path", "/" )
|
||||
self.enable_quotas = string_as_bool( kwargs.get( 'enable_quotas', False ) )
|
||||
self.test_conf = resolve_path( kwargs.get( "test_conf", "" ), self.root )
|
||||
self.id_secret = kwargs.get( "id_secret", "USING THE DEFAULT IS NOT SECURE!" )
|
||||
# Tool stuff
|
||||
self.tool_path = resolve_path( kwargs.get( "tool_path", "tools" ), self.root )
|
||||
self.tool_secret = kwargs.get( "tool_secret", "" )
|
||||
self.tool_data_path = resolve_path( kwargs.get( "tool_data_path", "shed-tool-data" ), os.getcwd() )
|
||||
self.tool_data_table_config_path = None
|
||||
self.integrated_tool_panel_config = resolve_path( kwargs.get( 'integrated_tool_panel_config', 'integrated_tool_panel.xml' ), self.root )
|
||||
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 )
|
||||
@@ -175,10 +175,6 @@ class Configuration( object ):
|
||||
shed_tool_data_table_config=[ 'shed_tool_data_table_conf.xml', 'config/shed_tool_data_table_conf.xml' ],
|
||||
)
|
||||
|
||||
listify_defaults = dict(
|
||||
tool_data_table_config_path=[ 'config/tool_data_table_conf.xml', 'tool_data_table_conf.xml', 'config/tool_data_table_conf.xml.sample' ],
|
||||
)
|
||||
|
||||
for var, defaults in defaults.items():
|
||||
if kwargs.get( var, None ) is not None:
|
||||
path = kwargs.get( var )
|
||||
@@ -191,22 +187,6 @@ class Configuration( object ):
|
||||
path = defaults[-1]
|
||||
setattr( self, var, resolve_path( path, self.root ) )
|
||||
|
||||
for var, defaults in listify_defaults.items():
|
||||
paths = []
|
||||
if kwargs.get( var, None ) is not None:
|
||||
paths = listify( kwargs.get( var ) )
|
||||
else:
|
||||
for default in defaults:
|
||||
for path in listify( default ):
|
||||
if not os.path.exists( resolve_path( path, self.root ) ):
|
||||
break
|
||||
else:
|
||||
paths = listify( default )
|
||||
break
|
||||
else:
|
||||
paths = listify( defaults[-1] )
|
||||
setattr( self, var, [ resolve_path( x, self.root ) for x in paths ] )
|
||||
|
||||
# Backwards compatibility for names used in too many places to fix
|
||||
self.datatypes_config = self.datatypes_config_file
|
||||
|
||||
|
||||
@@ -809,7 +809,7 @@ class RepositoryController( BaseUIController, ratings_util.ItemRatings ):
|
||||
return update
|
||||
params['latest_changeset_revision'] = str( latest_changeset_revision )
|
||||
params['latest_ctx_rev'] = str( update_to_ctx.rev() )
|
||||
url = common_util.url_join( galaxy_url, pathspec=pathspec, params=params )
|
||||
url = util.build_url( galaxy_url, pathspec=pathspec, params=params )
|
||||
return trans.response.send_redirect( url )
|
||||
|
||||
@web.expose
|
||||
@@ -1065,7 +1065,7 @@ class RepositoryController( BaseUIController, ratings_util.ItemRatings ):
|
||||
trans.sa_session.flush()
|
||||
tool_shed_url = web.url_for( '/', qualified=True )
|
||||
pathspec = [ 'repos', str( repository.user.username ), str( repository.name ), 'archive', file_type_str ]
|
||||
download_url = common_util.url_join( tool_shed_url, pathspec=pathspec )
|
||||
download_url = util.build_url( tool_shed_url, pathspec=pathspec )
|
||||
return trans.response.send_redirect( download_url )
|
||||
|
||||
@web.expose
|
||||
@@ -1534,7 +1534,7 @@ class RepositoryController( BaseUIController, ratings_util.ItemRatings ):
|
||||
time_tested = repository_metadata.time_last_tested.strftime( '%a, %d %b %Y %H:%M:%S UT' )
|
||||
# Generate a citable URL for this repository with owner and changeset revision.
|
||||
pathspec = [ 'view', str( user.username ), str( repository.name ), str( repository_metadata.changeset_revision ) ]
|
||||
repository_citable_url = common_util.url_join( tool_shed_url, pathspec=pathspec )
|
||||
repository_citable_url = util.build_url( tool_shed_url, pathspec=pathspec )
|
||||
passed_tests = len( tool_test_results.get( 'passed_tests', [] ) )
|
||||
failed_tests = len( tool_test_results.get( 'failed_tests', [] ) )
|
||||
missing_test_components = len( tool_test_results.get( 'missing_test_components', [] ) )
|
||||
@@ -1982,7 +1982,7 @@ class RepositoryController( BaseUIController, ratings_util.ItemRatings ):
|
||||
repository_ids=','.join( util.listify( repository_ids ) ),
|
||||
changeset_revisions=','.join( util.listify( changeset_revisions ) ) )
|
||||
pathspec = [ 'admin_toolshed', 'prepare_for_install' ]
|
||||
url = common_util.url_join( galaxy_url, pathspec=pathspec, params=params )
|
||||
url = util.build_url( galaxy_url, pathspec=pathspec, params=params )
|
||||
return trans.response.send_redirect( url )
|
||||
else:
|
||||
message = 'Repository installation is not possible due to an invalid Galaxy URL: <b>%s</b>. ' % galaxy_url
|
||||
|
||||
@@ -259,7 +259,7 @@ class Repository( object, Dictifiable ):
|
||||
return tip_ctx.rev() < 0
|
||||
|
||||
def ordered_installable_revisions( self, app ):
|
||||
return suc.get_ordered_metadata_changeset_revisions( self, hg.repository( ui.ui(), self.repo_path( app ) ), downloadable=True )
|
||||
return [ revision[ 1 ] for revision in suc.get_metadata_revisions( self, hg.repository( ui.ui(), self.repo_path( app ) ), downloadable=True ) ]
|
||||
|
||||
def repo_path( self, app ):
|
||||
return app.hgweb_config_manager.get_entry( os.path.join( "repos", self.user.username, self.name ) )
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
Modules used in building workflows
|
||||
"""
|
||||
import copy
|
||||
import logging
|
||||
from json import dumps, loads
|
||||
from xml.etree.ElementTree import Element
|
||||
@@ -529,7 +528,7 @@ class InputDataModule( InputModule ):
|
||||
|
||||
def get_runtime_inputs( self, filter_set=['data'] ):
|
||||
label = self.state.get( "name", "Input Dataset" )
|
||||
return dict( input=DataToolParameter( None, Element( "param", name="input", label=label, multiple=True, type="data", format=', '.join(filter_set) ), self.trans ) )
|
||||
return dict( input=DataToolParameter( None, Element( "param", name="input", label=label, multiple=False, type="data", format=', '.join(filter_set) ), self.trans ) )
|
||||
|
||||
|
||||
class InputDataCollectionModule( InputModule ):
|
||||
@@ -965,11 +964,8 @@ class ToolModule( WorkflowModule ):
|
||||
input_dicts.append( { "name": name, "description": "runtime parameter for tool %s" % self.get_name() } )
|
||||
return input_dicts
|
||||
|
||||
def get_post_job_actions( self, incoming=None):
|
||||
if incoming is None:
|
||||
return self.post_job_actions
|
||||
else:
|
||||
return ActionBox.handle_incoming(incoming)
|
||||
def get_post_job_actions( self, incoming ):
|
||||
return ActionBox.handle_incoming( incoming )
|
||||
|
||||
def get_config_form( self ):
|
||||
self.add_dummy_datasets()
|
||||
@@ -977,8 +973,7 @@ class ToolModule( WorkflowModule ):
|
||||
tool=self.tool, values=self.state.inputs, errors=( self.errors or {} ) )
|
||||
|
||||
def update_state( self, incoming ):
|
||||
self.label = incoming.get( 'label' )
|
||||
self.state.inputs = copy.deepcopy( incoming )
|
||||
self.recover_state( incoming )
|
||||
|
||||
def check_and_update_state( self ):
|
||||
inputs = self.state.inputs
|
||||
@@ -1123,6 +1118,7 @@ class ToolModule( WorkflowModule ):
|
||||
|
||||
# Combine workflow and runtime post job actions into the effective post
|
||||
# job actions for this execution.
|
||||
flush_required = False
|
||||
effective_post_job_actions = step.post_job_actions[:]
|
||||
for key, value in self.runtime_post_job_actions.iteritems():
|
||||
effective_post_job_actions.append( self.__to_pja( key, value, None ) )
|
||||
@@ -1130,7 +1126,11 @@ class ToolModule( WorkflowModule ):
|
||||
if pja.action_type in ActionBox.immediate_actions:
|
||||
ActionBox.execute( self.trans.app, self.trans.sa_session, pja, job, replacement_dict )
|
||||
else:
|
||||
job.add_post_job_action( pja )
|
||||
pjaa = model.PostJobActionAssociation( pja, job_id=job.id )
|
||||
self.trans.sa_session.add(pjaa)
|
||||
flush_required = True
|
||||
if flush_required:
|
||||
self.trans.sa_session.flush()
|
||||
|
||||
def add_dummy_datasets( self, connections=None):
|
||||
if connections:
|
||||
|
||||
@@ -153,6 +153,7 @@ class WorkflowInvoker( object ):
|
||||
remaining_steps = self.progress.remaining_steps()
|
||||
delayed_steps = False
|
||||
for step in remaining_steps:
|
||||
step_delayed = False
|
||||
step_timer = ExecutionTimer()
|
||||
jobs = None
|
||||
try:
|
||||
@@ -167,7 +168,7 @@ class WorkflowInvoker( object ):
|
||||
workflow_invocation_step.workflow_step = step
|
||||
workflow_invocation_step.job = job
|
||||
except modules.DelayedWorkflowEvaluation:
|
||||
delayed_steps = True
|
||||
step_delayed = delayed_steps = True
|
||||
self.progress.mark_step_outputs_delayed( step )
|
||||
except Exception:
|
||||
log.exception(
|
||||
@@ -177,7 +178,8 @@ class WorkflowInvoker( object ):
|
||||
)
|
||||
raise
|
||||
|
||||
log.debug("Workflow step %s of invocation %s invoked %s" % (step.id, workflow_invocation.id, step_timer))
|
||||
step_verb = "invoked" if not step_delayed else "delayed"
|
||||
log.debug("Workflow step %s of invocation %s %s %s" % (step.id, workflow_invocation.id, step_verb, step_timer))
|
||||
|
||||
if delayed_steps:
|
||||
state = model.WorkflowInvocation.states.READY
|
||||
|
||||
@@ -73,6 +73,7 @@ class WorkflowSchedulingManager( object ):
|
||||
workflow_invocation.state = model.WorkflowInvocation.states.NEW
|
||||
scheduler = request_params.get( "scheduler", None ) or self.default_scheduler_id
|
||||
handler = self._get_handler()
|
||||
log.info("Queueing workflow invocation for handler [%s]" % handler)
|
||||
|
||||
workflow_invocation.scheduler = scheduler
|
||||
workflow_invocation.handler = handler
|
||||
|
||||
@@ -15,6 +15,7 @@ from galaxy import web
|
||||
from galaxy.util import asbool
|
||||
from galaxy.util import CHUNK_SIZE
|
||||
from galaxy.util import safe_relpath
|
||||
from galaxy.util import build_url
|
||||
from galaxy.util.odict import odict
|
||||
from tool_shed.dependencies.repository.relation_builder import RelationBuilder
|
||||
from tool_shed.dependencies import attribute_handlers
|
||||
@@ -123,7 +124,7 @@ class ExportRepositoryManager( object ):
|
||||
params = dict( encoded_repositories_archive_name=encoded_repositories_archive_name )
|
||||
pathspec = [ 'repository', 'export_via_api' ]
|
||||
tool_shed_url = web.url_for( '/', qualified=True )
|
||||
download_url = common_util.url_join( tool_shed_url, pathspec=pathspec, params=params )
|
||||
download_url = build_url( tool_shed_url, pathspec=pathspec, params=params )
|
||||
return dict( download_url=download_url, error_messages=error_messages )
|
||||
return repositories_archive, error_messages
|
||||
|
||||
|
||||
@@ -455,7 +455,7 @@ class DependencyDisplayer( object ):
|
||||
owner=str( repository.owner ),
|
||||
changeset_revision=str( repository.installed_changeset_revision ) )
|
||||
pathspec = [ 'repository', 'get_readme_files' ]
|
||||
raw_text = common_util.tool_shed_get( self.app, tool_shed_url, pathspec=pathspec, params=params )
|
||||
raw_text = util.url_get( tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth( tool_shed_url ), pathspec=pathspec, params=params )
|
||||
readme_files_dict = json.loads( raw_text )
|
||||
else:
|
||||
readme_files_dict = readme_util.build_readme_files_dict( self.app,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user