Skip to content
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
31 changes: 31 additions & 0 deletions api/src/Page/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class Download extends Page
array('/ap/attachments(/:AUTOPROCPROGRAMATTACHMENTID)(/dl/:download)', 'get', '_get_autoproc_attachments'),
array('/ap/archive/:AUTOPROCPROGRAMID', 'get', '_get_autoproc_archive'),
array('/ap/log/:AUTOPROCPROGRAMID', 'get', '_get_autoproc_log'),
array('/ap/cluster/:AUTOPROCPROGRAMID', 'get', '_get_multiplex_clustering_file'),
);


Expand Down Expand Up @@ -513,6 +514,36 @@ function _get_autoproc_log()
}


# ------------------------------------------------------------------------
# Get the xia2 multiplex clustering file
function _get_multiplex_clustering_file()
{

if (!$this->has_arg('prop')) {
$this->_error('No proposal specified');
}
$args = array($this->proposalid, $this->arg('AUTOPROCPROGRAMID'));

$rows = $this->db->pq(
"SELECT app.autoprocprogramid, appa.filename, appa.filepath
FROM autoprocprogram app
INNER JOIN processingjob pj on pj.processingjobid = app.processingjobid
INNER JOIN autoprocprogramattachment appa ON appa.autoprocprogramid = app.autoprocprogramid
INNER JOIN datacollection dc ON dc.datacollectionid = pj.datacollectionid
INNER JOIN datacollectiongroup dcg ON dcg.datacollectiongroupid = dc.datacollectiongroupid
INNER JOIN blsession s ON s.sessionid = dcg.sessionid
WHERE s.proposalid=:1
AND app.autoprocprogramid=:2
AND appa.filename='xia2.multiplex_clustering.html'", $args);

if (!sizeof($rows)) {
return $this->_output(array('error' => 'No xia2.multiplex_clustering.html file found'));
}
$this->_get_file($rows[0]['AUTOPROCPROGRAMID'], $rows[0]);

}


# ------------------------------------------------------------------------
# Get an archive of an autoproc
function _get_autoproc_archive()
Expand Down
4 changes: 4 additions & 0 deletions client/src/css/partials/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -497,3 +497,7 @@ form > ul > li > select {
@apply tw-ml-2;
@apply tw-py-2;
}

.valign-bottom {
vertical-align: text-bottom;
}
16 changes: 12 additions & 4 deletions client/src/js/modules/dc/views/autointegration.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ define(['marionette',
'click a.apattach': 'showAttachments',
'click a.downstream': 'downstream',
'click .dll': utils.signHandler,
'click @ui.multiplex': 'multiplexReprocessing',
'click .reproc': 'multiplexReprocessing',
},

ui: {
multiplex: '.multiplex',
reproc: '.reproc',
logf: '.logf',
},

regions: {
Expand All @@ -48,8 +49,15 @@ define(['marionette',

onRender: function() {
this.messages.show(new APMessagesView({ messages: new Backbone.Collection(this.model.get('MESSAGES')), embed: true }))
if (this.model.get('TYPE').toLowerCase().includes('cluster') || !this.model.get('TYPE').toLowerCase().includes('multiplex')) {
this.ui.multiplex.hide()
const type = this.model.get('TYPE').toLowerCase();
const isMultiplex = type.includes('multiplex');
const isFiltering = type.includes('filtering');
const isCluster = type.includes('cluster');
if (!isMultiplex || isFiltering || isCluster) {
this.ui.reproc.hide();
}
if (!isMultiplex || isFiltering) {
this.ui.logf.hide();
}
},

Expand Down
8 changes: 8 additions & 0 deletions client/src/js/modules/dc/views/multiplexreprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ define(['backbone', 'marionette', 'views/dialog',
ui: {
fields: 'input, select',
sg: 'select[name=sg]',
sm: 'input[name=sm]',
res: 'input[name=res]',
opts: 'div.options',
filteringMethod: 'select[name=method]',
Expand Down Expand Up @@ -118,6 +119,13 @@ define(['backbone', 'marionette', 'views/dialog',
PARAMETERVALUE: sg
}))

var sm = this.ui.sm.is(':checked')
if (sm) reprocessingparams.add(new ReprocessingParameter({
PROCESSINGJOBID: jobId,
PARAMETERKEY: 'small_molecule',
PARAMETERVALUE: 'true'
}))

const cchalf = this.ui.cchalf.prop('checked')
if (cchalf) reprocessingparams.add(new ReprocessingParameter({
PROCESSINGJOBID: jobId,
Expand Down
3 changes: 2 additions & 1 deletion client/src/js/templates/dc/dc_autoproc.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<% } else { %>

<p class="r downloads">
<a class="multiplex button" href="#"><i class="fa fa-cog"></i> Multiplex Reprocessing</a>
<a class="multiplex button logf" href="<%-APIURL%>/download/ap/cluster/<%-AID%>"><i class="fa fa-line-chart"></i> Cluster Plots</a>
<a class="multiplex button reproc" href="#"><i class="fa fa-cog"></i> Multiplex Reprocessing</a>
<% if (IMAGESWEEPCOUNT > 1) { %>
<span><%=IMAGESWEEPCOUNT%> image sweeps</span>
<% } %>
Expand Down
1 change: 1 addition & 0 deletions client/src/js/templates/dc/multiplex.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
High Res :<input type="text" name="res" placeholder="eg 1.5" /> &#197;
</span>
<a href="#" class="button opt">Filtering Options</a>
&nbsp;<label>Small Molecule: <input type="checkbox" class="valign-bottom" name="sm" value="1" /></label>
<br />
</div>

Expand Down
4 changes: 2 additions & 2 deletions client/src/js/templates/dc/reprocess.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<a href="/mc/visit/<%-VISIT%>" class="button multicrystal" title="Multicrystal Integrator"><i class="fa fa-diamond"></i> <span>Multi Crystal</span></a>
</div>
<div class="data_collection">
<label><input type="checkbox" name="individual" /> Process Individually</label>
<label><input type="checkbox" class="valign-bottom" name="individual" /> Process Individually</label>

<span class="multi form">
|
Expand All @@ -32,7 +32,7 @@


<div class="options data_collection">
<label>Small Molecule<input type="checkbox" name="sm" value="1" /></label>
<label>Small Molecule<input type="checkbox" class="valign-bottom" name="sm" value="1" /></label>
<label>CC Half :<input type="text" name="cc_half" /></label>
<label>Unmerged &lt;I/sigI&gt; :<input type="text" name="isigma" /></label>
<label>Merged &lt;I/sigI&gt; :<input type="text" name="misigma" /></label>
Expand Down
2 changes: 1 addition & 1 deletion client/src/js/templates/mc/datacollections.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1>Data Collections for <%-VISIT%></h1>
</div>

<div class="options data_collection">
<label>Small Molecule<input type="checkbox" name="sm" value="1" /></label>
<label>Small Molecule<input type="checkbox" class="valign-bottom" name="sm" value="1" /></label>
<label>CC Half :<input type="text" name="cc_half" /></label>
<label>Unmerged &lt;I/sigI&gt; :<input type="text" name="isigma" /></label>
<label>Merged &lt;I/sigI&gt; :<input type="text" name="misigma" /></label>
Expand Down
Loading