Skip to content

Commit

Permalink
Merge pull request #479 from plantinformatics/develop
Browse files Browse the repository at this point in the history
Release v3.5.0 Dataset Collections
  • Loading branch information
Don-Isdale authored Jan 31, 2025
2 parents 033af07 + 0de299e commit 4030af5
Show file tree
Hide file tree
Showing 45 changed files with 1,099 additions and 145 deletions.
5 changes: 5 additions & 0 deletions doc/adminGuides/install_and_configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ for i in api database blastserver; do \
docker logs pretzel-$stage-$i-1 >& ~/log/compose/$stage/$i.$logDate; done
```

Observe Pretzel server containers created by Docker compose :
```
docker ps --filter="name=pretzel-$stage-api"
```

---

### Preparing a custom Pretzel API server container image
Expand Down
17 changes: 17 additions & 0 deletions frontend/app/components/form/api-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ import $ from 'jquery';
import { inject as service } from '@ember/service';
import Component from '@ember/component';

import { datasetsReport } from '../../utils/data/datasets-csv';

//------------------------------------------------------------------------------

const dLog = console.debug;

//------------------------------------------------------------------------------

/**
* @param name=apiServerName
* @param data=apiServer
*/
export default Component.extend({
apiServers: service(),

Expand Down Expand Up @@ -39,4 +45,15 @@ export default Component.extend({
}
},

/** Generate a CSV / TSV report of the datasets visible to this user, and
* export as a file download.
*/
datasetsReport() {
const
fnName = 'datasetsReport',
apiServer = this.data,
datasets = apiServer.datasetsBlocks;
datasetsReport(datasets, apiServer.store);
},

});
2 changes: 1 addition & 1 deletion frontend/app/components/form/natural-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default class FormNaturalSearchComponent extends Component {
blocks = datasets.map(dataset =>
dataset?.dataset.blocks.findBy('name', chromosome))
.filter(block => block);
later(() => blocks.forEach(block => this.args.loadBlock(block)));
later(() => blocks.forEach(block => this.args.loadBlock(block, true)));
}
/* or nameChr2Block() or this.datasetService.datasetsByName,
dataset = datasets[datasetName]; */
Expand Down
3 changes: 2 additions & 1 deletion frontend/app/components/form/select-group.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{!-- (queue (mut selectedValue) (action @selectedGroupChanged)) --}}
<select onchange={{action this.selectedGroupChangedId value="target.value"}}>
<select multiple={{@isMultiple}}
onchange={{action this.selectedGroupChangedId value="target.value" preventDefault=false}}>
{{#each @values as |optionValue|}}
<option value={{optionValue.id}} selected={{eq @selectedValue optionValue}}>{{optionValue.name}}</option>
{{/each}}
Expand Down
4 changes: 3 additions & 1 deletion frontend/app/components/form/select-group.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import Component from '@glimmer/component';
import { action } from '@ember/object';

import { thenOrNow } from '../../utils/common/promises';

// -----------------------------------------------------------------------------

const dLog = console.debug;
Expand All @@ -15,7 +17,7 @@ export default class FormSelectGroupComponent extends Component {
const fnName = 'selectedGroupChangedId';
let
gsP = this.args.values,
selectedGroup = gsP.then((gs) => {
selectedGroup = thenOrNow(gsP, (gs) => {
let
groupValue = gs.findBy('id', selectedGroupId);
dLog(fnName, selectedGroupId, groupValue?.name, groupValue?.id, arguments, this);
Expand Down
10 changes: 10 additions & 0 deletions frontend/app/components/form/select-multiple.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{!-- (queue (mut selectedValue) (action @selectedGroupChanged)) --}}
<select multiple
onchange={{action this.selectedGroupChangedId value="target.value" preventDefault=false}}>
{{#each @values as |optionValue|}}
{{!-- selected seems to be not used for multiple --}}
<option value={{optionValue.id}} selected={{action this.selected @selectedValue optionValue}}>{{optionValue.name}}</option>
{{/each}}
</select>

{{yield}}
42 changes: 42 additions & 0 deletions frontend/app/components/form/select-multiple.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import Component from '@glimmer/component';

import { action } from '@ember/object';

import { thenOrNow } from '../../utils/common/promises';

// -----------------------------------------------------------------------------

const dLog = console.debug;

// -----------------------------------------------------------------------------

export default class FormSelectMultipleComponent extends Component {
// selectedValue;

@action
selectedGroupChangedId(selectedGroupId) {
const fnName = 'selectedGroupChangedId';
let
gsP = this.args.values,
selectedGroup = thenOrNow(gsP, (gs) => {
let
groupValue = gs.findBy('id', selectedGroupId);
dLog(fnName, selectedGroupId, groupValue?.name, groupValue?.id, arguments, this);
this.args.selectedGroupChanged(groupValue);
});
}

@action
/**
* @param selectedValue @selectedValue i.e. currently selected values
* @param optionValue {id, name} of the selected row
* selected seems to be not used for multiple.
*/
selected(selectedValue, optionValue) {
const
fnName = 'selected',
ok = selectedValue.any(s => s.id === optionValue.id);
dLog(fnName, ok, selectedValue, optionValue);
return ok;
}
}
38 changes: 38 additions & 0 deletions frontend/app/components/goto-feature-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default Component.extend({
serverTabSelected : alias('controls.serverTabSelected'),

matchAliases : true,
/** Cleared by clearResults(), set by getBlocksOfFeatures(). */
showResult : true,

/*----------------------------------------------------------------------------*/
actions : {
Expand All @@ -42,6 +44,7 @@ export default Component.extend({
: this.blocksUnique(selectedFeatureNames);
if (activeFeatureList?.empty)
this.set('blocksOfFeatures', blocksUnique);
this.set('showResult', true);
},

/** not used - the requirements shifted from setting the axis brushes from
Expand Down Expand Up @@ -232,6 +235,41 @@ export default Component.extend({
}),

brushFeatures() {
},

/** Clear the displayed search results.
*/
clearResults() {
// This hides 'Received :'
this.set('showResult', false);

/* Not strictly required because showResult masks display of blocksOfFeatures and aliases. */
this.set('blocksOfFeatures', []);
this.set('aliases', []);

/* Not effective
this.emptyObject(this.featuresAliases.search);
this.emptyObject(this.featuresAliases.result);
*/
this.set('featuresAliases', {search : {}, result : {}});

/** Required to clear selected features display in the graph : triangles and labels. */
const features = [];
this.set('selected.features', features);
this.get('selected').featureSearchResult(features);
},

/** Empty the given array, i.e. mutate it.
* To enable clearResults() to update the display, may be achieved by
* upgrading this component to a native class and perhaps using tracked
* properties, instead of mutating the the results from blocksUnique() :
* blocksOfFeatures, aliases, featuresAliases,
*/
emptyArray(array) {
for (let i = array.length; --i >= 0; ) { array.shiftObject();}
},
emptyObject(object) {
Object.keys(object).forEach(key => delete object[key]);
}

});
2 changes: 1 addition & 1 deletion frontend/app/components/matrix-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,7 @@ export default Component.extend({
let table = this.get('table');
let data = this.get('data');
const gtPlainRender = this.urlOptions.gtPlainRender;
dLog('matrix-view', fnName, t, rows.length, rowHeaderWidth, 'colHeaderHeight', colHeaderHeight, tableHeight, table, data, this.blockSamples && 'vcf');
dLog('matrix-view', fnName, t, rows.length, rowHeaderWidth, 'colHeaderHeight', colHeaderHeight, tableHeight, /*table,*/ data, this.blockSamples && 'vcf');
d3.select('body').style('--matrixViewColumnHeaderHeight', '' + colHeaderHeight + 'px');

if (gtPlainRender & 0b10000) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/panel/filter-groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default Component.extend({

addFilterOrGroup() {
let data = this.get('data'),
filterGroup = this.get('store').createRecord('filter-Group');
filterGroup = this.get('store').createRecord('filter-group');
data.pushObject(filterGroup);
},

Expand Down
Loading

0 comments on commit 4030af5

Please sign in to comment.