gramene-search 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.parcel-cache/83e7562660f7cc15-BundleGraph +0 -0
- package/.parcel-cache/d3a1b9507cb44047-AssetGraph +0 -0
- package/.parcel-cache/data.mdb +0 -0
- package/.parcel-cache/dc1da35000e13623-RequestGraph +0 -0
- package/.parcel-cache/lock.mdb +0 -0
- package/.parcel-cache/snapshot-dc1da35000e13623.txt +2 -2
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/bundles/filters.js +3 -1
- package/src/components/results/TaxDist.js +6 -3
- package/src/demo.js +1 -0
package/package.json
CHANGED
package/src/bundles/filters.js
CHANGED
|
@@ -266,7 +266,9 @@ const grameneFilters = {
|
|
|
266
266
|
case 'GRAMENE_SEARCH_FETCH_FINISHED':
|
|
267
267
|
return Object.assign({}, state, {status: 'finished'});
|
|
268
268
|
case 'GRAMENE_GENOMES_UPDATED':
|
|
269
|
-
|
|
269
|
+
if (!(state.status === 'ready')) {
|
|
270
|
+
return Object.assign({}, state, {status: 'search'});
|
|
271
|
+
}
|
|
270
272
|
case 'URL_UPDATED':
|
|
271
273
|
if (state.status === 'ready') {
|
|
272
274
|
return Object.assign({}, initialState, {children:[]})
|
|
@@ -9,7 +9,8 @@ class TaxDist extends React.Component {
|
|
|
9
9
|
super(props);
|
|
10
10
|
this.state = {
|
|
11
11
|
collapseEmpties: true,
|
|
12
|
-
comparaOnly: true
|
|
12
|
+
comparaOnly: true,
|
|
13
|
+
showCompara: props.configuration.hasOwnProperty('partialCompara')
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
handleSelection(selections) {
|
|
@@ -42,7 +43,7 @@ class TaxDist extends React.Component {
|
|
|
42
43
|
selectedTaxa = this.props.grameneGenomes.active
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
if (this.state.comparaOnly && this.props.grameneMaps) {
|
|
46
|
+
if (this.state.showCompara && this.state.comparaOnly && this.props.grameneMaps) {
|
|
46
47
|
Object.keys(selectedTaxa).forEach(tid => {
|
|
47
48
|
if (!this.props.grameneMaps[tid].in_compara) {
|
|
48
49
|
delete selectedTaxa[tid];
|
|
@@ -57,11 +58,12 @@ class TaxDist extends React.Component {
|
|
|
57
58
|
onClick={this.toggleEmpties.bind(this)}>
|
|
58
59
|
{this.state.collapseEmpties ? 'Expand' : 'Collapse'} empty branches
|
|
59
60
|
</button>
|
|
60
|
-
<button type="button"
|
|
61
|
+
{this.state.showCompara && <button type="button"
|
|
61
62
|
className="btn btn-outline-success btn-sm"
|
|
62
63
|
onClick={this.toggleCompara.bind(this)}>
|
|
63
64
|
Show {this.state.comparaOnly ? 'all genomes' : 'only genomes in gene trees'}
|
|
64
65
|
</button>
|
|
66
|
+
}
|
|
65
67
|
</span>}
|
|
66
68
|
{this.props.grameneTaxDist && <Vis taxonomy={this.props.grameneTaxDist}
|
|
67
69
|
selectedTaxa={selectedTaxa}
|
|
@@ -83,6 +85,7 @@ class TaxDist extends React.Component {
|
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
export default connect(
|
|
88
|
+
'selectConfiguration',
|
|
86
89
|
'selectGrameneTaxDist',
|
|
87
90
|
'selectGrameneGenomes',
|
|
88
91
|
'selectGrameneSearch',
|