Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIMS-1537: Add more options to reprocessing #876

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 40 additions & 3 deletions client/src/js/modules/dc/views/reprocess2.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ define(['backbone', 'marionette', 'views/dialog',
ind: 'div.ind',
pipeline: 'select[name=pipeline]',
res: 'input[name=res]',
sg: 'select[name=SG]'
lowres: 'input[name=lowres]',
sg: 'input[name=SG]'
},

events: {
Expand All @@ -71,13 +72,18 @@ define(['backbone', 'marionette', 'views/dialog',

'change @ui.pipeline': 'updatePipeline',
'change @ui.res': 'updateRes',
'change @ui.lowres': 'updateLowRes',
},


updateRes: function() {
this.model.set('RES', this.ui.res.val())
},

updateLowRes: function() {
this.model.set('LOWRES', this.ui.lowres.val())
},

updatePipeline: function() {
this.model.set('PIPELINE', this.ui.pipeline.val())
},
Expand Down Expand Up @@ -139,6 +145,7 @@ define(['backbone', 'marionette', 'views/dialog',
this.ui.ind.hide()
this.$el.find('ul').addClass('half')
this.$el.find('li input[type="text"]').css('width', '25%')
this.$el.find('div input[type="text"]').css('width', '50px')
this.ui.pipeline.html(this.getOption('pipelines').opts())
this.model.set('PIPELINE', this.ui.pipeline.val())
},
Expand Down Expand Up @@ -172,7 +179,7 @@ define(['backbone', 'marionette', 'views/dialog',
this.ui.be.val(c['CELL_BE']).trigger('change')
this.ui.ga.val(c['CELL_GA']).trigger('change')

this.ui.sg.val(a['SG']).trigger('change')
this.ui.sg.val(a.get('SG')).trigger('change')
}
},

Expand Down Expand Up @@ -213,6 +220,12 @@ define(['backbone', 'marionette', 'views/dialog',
}, KVCollection))


var AbsorptionLevels = Backbone.Collection.extend(_.extend({
keyAttribute: 'NAME',
valueAttribute: 'VALUE',
}, KVCollection))


return ReprocessView = DialogView.extend({
template: template,
dialog: true,
Expand All @@ -233,6 +246,7 @@ define(['backbone', 'marionette', 'views/dialog',
sg: 'select[name=sg]',
sm: 'input[name=sm]',
indexingMethod: 'select[name=method]',
absorptionLevel: 'select[name=absorption_level]',
},

buttons: {
Expand Down Expand Up @@ -287,7 +301,7 @@ define(['backbone', 'marionette', 'views/dialog',
},

xia2params: function() {
return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method']
return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method', 'absorption_level']
},

integrate: function(e) {
Expand Down Expand Up @@ -327,6 +341,12 @@ define(['backbone', 'marionette', 'views/dialog',
PARAMETERVALUE: sw.get('RES')
}))

if (sw.get('LOWRES')) reprocessingparams.add(new ReprocessingParameter({
PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID'),
PARAMETERKEY: 'd_max',
PARAMETERVALUE: sw.get('LOWRES')
}))

var hascell = true
var cell = []
_.each(['CELL_A', 'CELL_B', 'CELL_C', 'CELL_ALPHA', 'CELL_BETA', 'CELL_GAMMA'], function(f, i) {
Expand Down Expand Up @@ -416,6 +436,13 @@ define(['backbone', 'marionette', 'views/dialog',
PARAMETERVALUE: res
}))

var lowres = self.$el.find('input[name=lowres]').val()
if (lowres) reprocessingparams.add(new ReprocessingParameter({
PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID'),
PARAMETERKEY: 'd_max',
PARAMETERVALUE: lowres
}))

var hascell = true
var cell = []
_.each(['a', 'b', 'c', 'alpha', 'beta', 'gamma'], function(f, i) {
Expand Down Expand Up @@ -505,6 +532,7 @@ define(['backbone', 'marionette', 'views/dialog',
onRender: function() {
this.ui.opts.hide()
this.ui.cell.hide()
this.$el.find('span input[type="text"]').css('width', '50px')

this.pipelines = new Pipelines([
{ NAME: 'Xia2 DIALS', VALUE: 'xia2-dials' },
Expand All @@ -524,6 +552,15 @@ define(['backbone', 'marionette', 'views/dialog',

this.ui.indexingMethod.html(this.indexingMethods.opts())

this.absorptionLevels = new AbsorptionLevels([
{ NAME: '-', VALUE: '' },
{ NAME: 'Low', VALUE: 'low' },
{ NAME: 'Medium', VALUE: 'medium' },
{ NAME: 'High', VALUE: 'high' },
])

this.ui.absorptionLevel.html(this.absorptionLevels.opts())

// asynchronously load space groups into the select menu
this.showSpaceGroups()

Expand Down
27 changes: 25 additions & 2 deletions client/src/js/modules/mc/views/datacollections.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ define(['backbone', 'marionette',
}, KVCollection))


var AbsorptionLevels = Backbone.Collection.extend(_.extend({
keyAttribute: 'NAME',
valueAttribute: 'VALUE',
}, KVCollection))


return Marionette.LayoutView.extend({
className: 'content',
template: template,
Expand All @@ -63,6 +69,7 @@ define(['backbone', 'marionette',
wait: '.wait',
pipeline: 'select[name=pipeline]',
indexingMethod: 'select[name=method]',
absorptionLevel: 'select[name=absorption_level]',
opts: 'div.options',
sm: 'input[name=sm]',
sg: 'select[name=sg]',
Expand Down Expand Up @@ -94,7 +101,7 @@ define(['backbone', 'marionette',
},

xia2params: function() {
return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method']
return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method', 'absorption_level']
},

integrate: function(e) {
Expand Down Expand Up @@ -127,6 +134,13 @@ define(['backbone', 'marionette',
PARAMETERVALUE: res
}))

var lowres = self.$el.find('input[name=lowres]').val()
if (lowres) reprocessingparams.add(new ReprocessingParameter({
PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID'),
PARAMETERKEY: 'd_max',
PARAMETERVALUE: lowres
}))

var hascell = true
var cell = []
_.each(['a', 'b', 'c', 'alpha', 'beta', 'gamma'], function(f, i) {
Expand Down Expand Up @@ -179,7 +193,7 @@ define(['backbone', 'marionette',
var reprocessingsweeps = new ReprocessingImageSweeps(sweeps)
reprocessingsweeps.save()

app.alert({ message: '1 reprocessing job successfully submitted'})
app.message({ message: '1 reprocessing job successfully submitted'})
self._enqueue({ PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID') })
},

Expand Down Expand Up @@ -252,6 +266,15 @@ define(['backbone', 'marionette',
])

this.ui.indexingMethod.html(this.indexingMethods.opts())

this.absorptionLevels = new AbsorptionLevels([
{ NAME: '-', VALUE: '' },
{ NAME: 'Low', VALUE: 'low' },
{ NAME: 'Medium', VALUE: 'medium' },
{ NAME: 'High', VALUE: 'high' },
])

this.ui.absorptionLevel.html(this.absorptionLevels.opts())
},

setCell: function(view, ap) {
Expand Down
5 changes: 4 additions & 1 deletion client/src/js/templates/dc/reprocess.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<span class="multi form">
|
Pipeline :<select name="pipeline"></select>
High Res :<input type="text" name="res" /> &#197; |
High Res :<input type="text" name="res" /> &#197;
Low Res :<input type="text" name="lowres" /> &#197; |
<a href="#" class="button sgm">Space Group / Cell</a>
<!-- Comments: <input type="text" name="comments" class="full" /> -->
</span>
Expand All @@ -36,7 +37,9 @@
<label>Unmerged &lt;I/sigI&gt; :<input type="text" name="isigma" /></label>
<label>Merged &lt;I/sigI&gt; :<input type="text" name="misigma" /></label>
<label>Spot Finding Threshold :<input type="text" name="sigma_strong" /></label>
<br /><br />
<label>Indexing Method: <select name="method"></select></label>
<label>Absorption Level: <select name="absorption_level"></select></label>
</div>


Expand Down
3 changes: 2 additions & 1 deletion client/src/js/templates/dc/reprocess_dc.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ <h1 class="clearfix">

<div class="ind data_collection">
Pipeline <select name="pipeline"></select>
High Res <input type="text" name="res" /> &#197; |
High Res <input type="text" name="res" /> &#197;
Low Res <input type="text" name="lowres" /> &#197; |
<a href="#" class="button sg">Space Group / Cell</a> <br />
</div>

Expand Down
4 changes: 3 additions & 1 deletion client/src/js/templates/mc/datacollections.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ <h1>Data Collections for <%-VISIT%></h1>
<label>&beta; <input type="text" name="beta" /></label>
<label>&gamma; <input type="text" name="gamma" /></label>

<label>High Resolution <input type="text" name="res" /></label>
<label>High Res <input type="text" name="res" /> &#197;</label>
<label>Low Res <input type="text" name="lowres" /> &#197;</label>

<a href="#" class="button integrate" title="Integrate the selected data collections"><i class="fa fa-cog"></i> Integrate</a>
<a href="#" class="button opt">Xia2 Options</a>
Expand All @@ -41,6 +42,7 @@ <h1>Data Collections for <%-VISIT%></h1>
<label>Merged &lt;I/sigI&gt; :<input type="text" name="misigma" /></label>
<label>Spot Finding Threshold :<input type="text" name="sigma_strong" /></label>
<label>Indexing Method: <select name="method"></select></label>
<label>Absorption Level: <select name="absorption_level"></select></label>
</div>

<div class="dcs"></div>
Expand Down
Loading