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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gramene-search",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "description": "search wrapper for gramene",
5
5
  "source": "src/index.js",
6
6
  "main": "dist/index.js",
@@ -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
- return Object.assign({}, state, {status: 'search'});
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',
package/src/demo.js CHANGED
@@ -143,6 +143,7 @@ const panSites = [
143
143
  targetTaxonId: 4558001,
144
144
  alertText: 'Click the search icon in the menu bar or type /',
145
145
  showViews: true,
146
+ partialCompara: true,
146
147
  details: {
147
148
  sequences: true,
148
149
  VEP: true,