From 90910d3b56b74b674b522ec9941b8265271b9062 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Wed, 13 Jun 2018 17:31:39 -0400 Subject: [PATCH 01/13] edit: per chads suggestions --- src/containers/Fishers.js | 5 +++-- src/middleware/api.js | 25 ++++++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/containers/Fishers.js b/src/containers/Fishers.js index e62eec9..4d4cbde 100644 --- a/src/containers/Fishers.js +++ b/src/containers/Fishers.js @@ -47,7 +47,7 @@ const fdescrip = (step, nextStep, prevStep) => ( ontology - + @@ -79,7 +79,8 @@ const fdescrip = (step, nextStep, prevStep) => (
Rationale:
Because analysis modules in biology tend to have different result formats, graph storage allows comparisons between the results of - different types without explicit joins. As in the above example, our + different types without explicit joins. We treat all nodes in the graph + database as available for anlaysis. As in the above example, our O-type analysis was developed internally whereas the RGI tool was developed by the CARD initiative doi: 10.1093/nar/gkw1004.

diff --git a/src/middleware/api.js b/src/middleware/api.js index cdfd72c..49f9c83 100644 --- a/src/middleware/api.js +++ b/src/middleware/api.js @@ -1,7 +1,7 @@ import React from 'react' //const ROOT = window.location.protocol + '//' + 'spfy.enchartus.ca' + '/' -const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' -// const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' +// const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' +const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' // const ROOT = 'http://10.139.14.212:8000/' // const ROOT = 'http://192.168.5.19:8000/' // const ROOT = 'https://spfy.enchartus.ca/' @@ -12,7 +12,9 @@ export const version = 'v.6.3.0' export const analyses = [ { 'analysis':'subtyping', - 'description':'Serotype, Virulence Factors, Antimicrobial Resistance, Shiga-toxin & Intimin', + 'description':( +

Serotype, Virulence Factors, Antimicrobial Resistance, Shiga-toxin & Intimin

+ ), 'text':(

Upload genome files & determine associated subtypes. @@ -25,7 +27,10 @@ export const analyses = [ },{ 'analysis':'fishers', 'pseudonym':'statistical comparison', - 'description':"Group database nodes and compare them using Fisher's Exact Test", + 'description': ( +

Identify predictive markers for groups of bacteria based on genome content or +
metadata, using Fisher's Exact Test

+ ), 'text':'Select groups from uploaded genomes & compare for a chosen target datum.' } ] @@ -33,15 +38,21 @@ export const analyses = [ export const extra = [ { 'analysis': 'database', - 'description': 'Status check of database connection', + 'description': ( +

Status check of database connection

+ ), 'text': '' },{ 'analysis': 'metadata', - 'description': 'Submit metadata in the form of a .csv for upload to the database', + 'description': ( +

Submit metadata in the form of a .csv for upload to the database

+ ), 'text': '' },{ 'analysis': 'panseq', - 'description': 'Load a pan-genome into the database for secondary analyses', + 'description': ( +

Load a pan-genome into the database for secondary analyses

+ ), 'text': (

Upload genomes & split into pan-genome regions. From 8de8568e671662e3d20b0fb67fe1e9534a53baaf Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Wed, 13 Jun 2018 17:34:12 -0400 Subject: [PATCH 02/13] edit: per chads suggestions --- src/middleware/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/middleware/api.js b/src/middleware/api.js index 49f9c83..d12770f 100644 --- a/src/middleware/api.js +++ b/src/middleware/api.js @@ -1,7 +1,7 @@ import React from 'react' //const ROOT = window.location.protocol + '//' + 'spfy.enchartus.ca' + '/' -// const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' -const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' +const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' +// const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' // const ROOT = 'http://10.139.14.212:8000/' // const ROOT = 'http://192.168.5.19:8000/' // const ROOT = 'https://spfy.enchartus.ca/' From 0e87cf924cf1a35e5fe69a590d2ad3fa6087ba0b Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Mon, 18 Jun 2018 12:57:35 -0400 Subject: [PATCH 03/13] START: first draft of Search.js --- src/containers/Search.js | 234 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 src/containers/Search.js diff --git a/src/containers/Search.js b/src/containers/Search.js new file mode 100644 index 0000000..ff00315 --- /dev/null +++ b/src/containers/Search.js @@ -0,0 +1,234 @@ +import React, { Component } from 'react'; +// react-md +import { + FileInput, + Checkbox, + TextField, + Button, + Switch, + Subheader, + Divider, + CircularProgress, + Collapse, +} from 'react-md'; +// redux +import { connect } from 'react-redux' +import { addJob } from '../actions' +import { subtypingDescription } from '../middleware/subtyping' +// import { phylotyperDescription } from '../middleware/phylotyper' +// axios +import axios from 'axios' +import { API_ROOT } from '../middleware/api' +// router +import { withRouter } from 'react-router'; +import { Redirect } from 'react-router' +import Loading from '../components/Loading' +import { RedirectToken } from '../components/RedirectToken' +// redirects +import { RESULTS } from '../Routes' + +class Search extends Component { + constructor(props) { + super(props); + this.state = { + st: '', + collapsed: true, + submitted: false, + open: false, + jobId: "", + hasResult: false, + } + } + toggle = () => { + this.setState({ collapsed: !this.state.collapsed }); + }; + + _handleSubmit = (e) => { + e.preventDefault() // disable default HTML form behavior + // Create form. + var data = new FormData() + data.append('st', this.state.st) + // POST + axios.post(API_ROOT + 'search', data) + .then(response => { + console.log("RESPONSE") + console.log(response) + let jobId = response.data + this.setState({ jobId }) + // Handle the return. + this.props.dispatch(addJob(jobId, + 'search', + new Date().toLocaleString(), + String('Search for ' + this.state.st + ' at: ' + new Date().toLocaleString()) + )) + this.setState({ hasResult: true }) + }) + }; + render(){ + const { st, hasResult, collapsed } = this.state; + const { token } = this.props; + return ( +

+ + {/* actual form */} + {(!hasResult)? +
+
+ {/* Help Text */} + + +
+
+
Search By Accession:
+

+

+
+
+
+ {/* End: Help Text */} +
+ + +
+
+
ECTyper Subtyping Analysis
+ + {bulk?:''} + {!groupresults && !bulk ? + + : ''} + + + + +
+
+
RGI (CARD) Analysis
+ + {amr ? + + : ''} + +
+
+ +
Phylotyper Subtyping Analysis
+ + {/* */} + + + + + + + + + +
+
+ +
+
+ {this.state.file ? this.state.file.map(f => ( + + )) : ''} +
+
: + // if results are grouped, display the Loading page + // else, results are separate and display the JobsList cards page + (!uploading?(!groupresults? + : + + ):"") + } +
+ ) + } +} + +const mapStateToProps = (state, ownProps) => { + return { + jobs: state.jobs, + ...ownProps + } +} + +Subtyping = withRouter(connect( + mapStateToProps +)(Subtyping)) + +Subtyping = connect()(Subtyping) + +export default Search From e80973ecf9a8dfd004254fb0b2e47b87125d5237 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Mon, 18 Jun 2018 12:58:10 -0400 Subject: [PATCH 04/13] START: first draft of Search.js --- src/containers/Search.js | 146 +++------------------------------------ 1 file changed, 11 insertions(+), 135 deletions(-) diff --git a/src/containers/Search.js b/src/containers/Search.js index ff00315..8ec4780 100644 --- a/src/containers/Search.js +++ b/src/containers/Search.js @@ -1,31 +1,19 @@ import React, { Component } from 'react'; // react-md import { - FileInput, - Checkbox, TextField, Button, - Switch, - Subheader, - Divider, - CircularProgress, Collapse, } from 'react-md'; // redux import { connect } from 'react-redux' import { addJob } from '../actions' -import { subtypingDescription } from '../middleware/subtyping' -// import { phylotyperDescription } from '../middleware/phylotyper' // axios import axios from 'axios' import { API_ROOT } from '../middleware/api' // router -import { withRouter } from 'react-router'; -import { Redirect } from 'react-router' import Loading from '../components/Loading' import { RedirectToken } from '../components/RedirectToken' -// redirects -import { RESULTS } from '../Routes' class Search extends Component { constructor(props) { @@ -42,7 +30,9 @@ class Search extends Component { toggle = () => { this.setState({ collapsed: !this.state.collapsed }); }; - + _updateSt = (value) => { + this.setState({ st: value }); + } _handleSubmit = (e) => { e.preventDefault() // disable default HTML form behavior // Create form. @@ -81,7 +71,7 @@ class Search extends Component {

-
Search By Accession:
+
Description:

@@ -89,104 +79,15 @@ class Search extends Component { {/* End: Help Text */}
- - -
-
-
ECTyper Subtyping Analysis
- - {bulk?:''} - {!groupresults && !bulk ? - - : ''} - - +
Search By Accession
- -
-
-
RGI (CARD) Analysis
- - {amr ? - - : ''} -
- -
Phylotyper Subtyping Analysis
- - {/* */} - - - - - - - - - -
-
-
-
- {this.state.file ? this.state.file.map(f => ( - - )) : ''} -
: - // if results are grouped, display the Loading page - // else, results are separate and display the JobsList cards page - (!uploading?(!groupresults? - : - - ):"") + } ) } } -const mapStateToProps = (state, ownProps) => { - return { - jobs: state.jobs, - ...ownProps - } -} - -Subtyping = withRouter(connect( - mapStateToProps -)(Subtyping)) - -Subtyping = connect()(Subtyping) +Search = connect()(Search) export default Search From 16f38be92c156967a2f339c55e177020a12bdc92 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Mon, 18 Jun 2018 13:09:16 -0400 Subject: [PATCH 05/13] ADD: Search route to homepage --- src/Routes.jsx | 3 +++ src/containers/Search.js | 1 - src/middleware/api.js | 11 +++++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Routes.jsx b/src/Routes.jsx index bd91454..2451e97 100644 --- a/src/Routes.jsx +++ b/src/Routes.jsx @@ -8,6 +8,7 @@ import Subtyping from './containers/Subtyping' import Metadata from './containers/Metadata' import Database from './containers/Database' import Panseq from './containers/Panseq' +import Search from './containers/Search' // others import Results from './containers/Results' import VisibleResult from './containers/VisibleResult' @@ -20,6 +21,7 @@ export const METADATA = dirpath + '/metadata' export const DATABASE = dirpath + '/database' export const PANSEQ = dirpath + '/panseq' export const RESULTS = dirpath + '/results' +export const SEARCH = dirpath + '/search' export const VISIBLE_RESULT = dirpath + '/results/:hash' const renderMergedProps = (component, ...rest) => { @@ -45,6 +47,7 @@ const Routes = (token) => ( + diff --git a/src/containers/Search.js b/src/containers/Search.js index 8ec4780..90b855c 100644 --- a/src/containers/Search.js +++ b/src/containers/Search.js @@ -93,7 +93,6 @@ class Search extends Component { secondary type="submit" label="Submit" - disabled={!file} onClick={this._handleSubmit} /> diff --git a/src/middleware/api.js b/src/middleware/api.js index d12770f..43be422 100644 --- a/src/middleware/api.js +++ b/src/middleware/api.js @@ -1,7 +1,7 @@ import React from 'react' //const ROOT = window.location.protocol + '//' + 'spfy.enchartus.ca' + '/' -const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' -// const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' +// const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' +const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' // const ROOT = 'http://10.139.14.212:8000/' // const ROOT = 'http://192.168.5.19:8000/' // const ROOT = 'https://spfy.enchartus.ca/' @@ -37,6 +37,13 @@ export const analyses = [ export const extra = [ { + 'analysis': 'search', + 'pseudonym': 'search by accession', + 'description': ( +

Search database results by accession #

+ ), + 'text': '' + },{ 'analysis': 'database', 'description': (

Status check of database connection

From bd4f39789d0a2db38b48dddf121bc4fc85dc9a24 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Mon, 18 Jun 2018 13:18:55 -0400 Subject: [PATCH 06/13] change: swap search to a core func --- src/middleware/api.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/middleware/api.js b/src/middleware/api.js index 43be422..9620e33 100644 --- a/src/middleware/api.js +++ b/src/middleware/api.js @@ -32,18 +32,18 @@ export const analyses = [
metadata, using Fisher's Exact Test

), 'text':'Select groups from uploaded genomes & compare for a chosen target datum.' - } -] - -export const extra = [ - { + },{ 'analysis': 'search', 'pseudonym': 'search by accession', 'description': (

Search database results by accession #

), 'text': '' - },{ + }, +] + +export const extra = [ + { 'analysis': 'database', 'description': (

Status check of database connection

From 0d3b8f897f3a5885da1191a4a6caee109602f3c4 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Tue, 19 Jun 2018 22:04:36 -0400 Subject: [PATCH 07/13] stop: done description for search --- src/containers/Search.js | 26 ++++++++++++++++++++++++-- src/middleware/api.js | 4 ++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/containers/Search.js b/src/containers/Search.js index 90b855c..52cdd36 100644 --- a/src/containers/Search.js +++ b/src/containers/Search.js @@ -20,7 +20,7 @@ class Search extends Component { super(props); this.state = { st: '', - collapsed: true, + collapsed: false, submitted: false, open: false, jobId: "", @@ -65,7 +65,7 @@ class Search extends Component {
{/* Help Text */} - @@ -73,6 +73,28 @@ class Search extends Component {
Description:

+ We use the SeqIO + library to parse the accession numbers from an isolate. + Specifically, we use the record.id +

+

+ For example, a genbank record: +
+
+ Escherichia coli strain 97-3250 chromosome, complete genome +
+ 5,942,969 bp circular DNA +
+ CP027599.1 GI:1370526529 +
+
+ With fasta header: +
+
+ >gi|1370526529|gb|CP027599.1| Escherichia coli strain 97-3250 chromosome, complete genome +
+
+ Has accession CP027599.1

diff --git a/src/middleware/api.js b/src/middleware/api.js index 9620e33..2587805 100644 --- a/src/middleware/api.js +++ b/src/middleware/api.js @@ -1,9 +1,9 @@ import React from 'react' //const ROOT = window.location.protocol + '//' + 'spfy.enchartus.ca' + '/' // const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' -const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' +// const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' // const ROOT = 'http://10.139.14.212:8000/' -// const ROOT = 'http://192.168.5.19:8000/' +const ROOT = 'http://192.168.5.19:8000/' // const ROOT = 'https://spfy.enchartus.ca/' export const API_ROOT = ROOT + 'api/v0/' export const OLD_API = ROOT From 480e031baa5b8ac7cfcfb5be63e20e7e6c5f987f Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Tue, 19 Jun 2018 22:14:49 -0400 Subject: [PATCH 08/13] edit: record.id was diff than i expected --- src/containers/Search.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/containers/Search.js b/src/containers/Search.js index 52cdd36..81cbd3e 100644 --- a/src/containers/Search.js +++ b/src/containers/Search.js @@ -74,8 +74,9 @@ class Search extends Component {
Description:

We use the SeqIO - library to parse the accession numbers from an isolate. - Specifically, we use the record.id + library to parse the identifiers from an isolate. + Specifically, we use the record.id which uses the combined + gi gb accession numbers.

For example, a genbank record: @@ -94,19 +95,19 @@ class Search extends Component { >gi|1370526529|gb|CP027599.1| Escherichia coli strain 97-3250 chromosome, complete genome

- Has accession CP027599.1 + Would have a record.id of gi|1370526529|gb|CP027599.1|

{/* End: Help Text */}
-
Search By Accession
+
Search By record.id
From 00de50d0c6945bc06650012e62b8920a5f331af2 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Tue, 19 Jun 2018 22:28:06 -0400 Subject: [PATCH 09/13] edit: set a default value --- src/containers/Search.js | 2 +- src/middleware/api.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/containers/Search.js b/src/containers/Search.js index 81cbd3e..9cfe69c 100644 --- a/src/containers/Search.js +++ b/src/containers/Search.js @@ -19,7 +19,7 @@ class Search extends Component { constructor(props) { super(props); this.state = { - st: '', + st: 'gi|1370526529|gb|CP027599.1|', collapsed: false, submitted: false, open: false, diff --git a/src/middleware/api.js b/src/middleware/api.js index 2587805..4113de5 100644 --- a/src/middleware/api.js +++ b/src/middleware/api.js @@ -34,9 +34,9 @@ export const analyses = [ 'text':'Select groups from uploaded genomes & compare for a chosen target datum.' },{ 'analysis': 'search', - 'pseudonym': 'search by accession', + 'pseudonym': 'search by record.id', 'description': ( -

Search database results by accession #

+

Search database results by record.id

), 'text': '' }, From 001dac6494e9ee2525024040842b2f9ebf1e5ea7 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Thu, 21 Jun 2018 16:59:30 -0400 Subject: [PATCH 10/13] add: more descriptions to search --- src/components/ResultSubtyping.js | 1 + src/containers/Search.js | 13 ++++++++++++- src/middleware/api.js | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/ResultSubtyping.js b/src/components/ResultSubtyping.js index e3e2802..c21dd4e 100644 --- a/src/components/ResultSubtyping.js +++ b/src/components/ResultSubtyping.js @@ -47,6 +47,7 @@ class ResultSubtyping extends Component { Analysis Hit Long Hitname + ARO Link Orientation Start Stop diff --git a/src/containers/Search.js b/src/containers/Search.js index 9cfe69c..ed63550 100644 --- a/src/containers/Search.js +++ b/src/containers/Search.js @@ -79,7 +79,7 @@ class Search extends Component { gi gb accession numbers.

- For example, a genbank record: + For example, a GenBank record:

Escherichia coli strain 97-3250 chromosome, complete genome @@ -96,6 +96,17 @@ class Search extends Component {

Would have a record.id of gi|1370526529|gb|CP027599.1| +
+
+ For shotgun sequences, search is indexed by individual sequence ids. +
+ For example, a sequence with header: +
+
+ >MOKN01000001.1 Escherichia coli strain 443 BN4_443_1_(paired)_contig_1, whole genome shotgun sequence +
+
+ Would have a record.id of MOKN01000001.1

diff --git a/src/middleware/api.js b/src/middleware/api.js index 4113de5..a4724bd 100644 --- a/src/middleware/api.js +++ b/src/middleware/api.js @@ -3,6 +3,7 @@ import React from 'react' // const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' // const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' // const ROOT = 'http://10.139.14.212:8000/' +// const ROOT = 'http://192.168.5.19:8090/' const ROOT = 'http://192.168.5.19:8000/' // const ROOT = 'https://spfy.enchartus.ca/' export const API_ROOT = ROOT + 'api/v0/' From 322d569987edf3f677c37d5afe9be8a03eedbe34 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Thu, 21 Jun 2018 18:30:59 -0400 Subject: [PATCH 11/13] stop: basic ver of sort works --- src/components/ResultSearch.js | 48 +++++++++++++++++++++--------- src/components/ResultSubtyping.js | 2 +- src/components/ResultsTemplates.js | 5 ++++ src/containers/Search.js | 4 ++- 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/src/components/ResultSearch.js b/src/components/ResultSearch.js index dc0246e..cb6012e 100644 --- a/src/components/ResultSearch.js +++ b/src/components/ResultSearch.js @@ -7,11 +7,34 @@ import { API_ROOT } from '../middleware/api' // Table import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; -class ResultDatabase extends Component { +const sidebar = 200; + +class ResultSubtyping extends Component { + constructor(props) { + super(props); + this.state = { width: 0, height: 0 }; + this.updateWindowDimensions = this.updateWindowDimensions.bind(this); + } + componentWillMount() { + this.updateWindowDimensions(); + window.addEventListener('resize', this.updateWindowDimensions); + } + componentWillUnmount() { + window.removeEventListener('resize', this.updateWindowDimensions); + } + updateWindowDimensions() { + this.setState({ width: window.innerWidth, height: window.innerHeight }); + } + calcWidth = ( dec ) => { + let workableWidth = this.state.width - sidebar; + return String(workableWidth*dec) + } render() { - const { results } = this.props + const { results } = this.props; const options = { - searchPosition: 'left' + searchPosition: 'left', + defaultSortName: 'analysis', + defaultSortOrder: 'asc', }; if (results.pending){ return
Waiting for server response...
@@ -20,16 +43,13 @@ class ResultDatabase extends Component { } else if (results.fulfilled){ console.log(results) return ( -
-

# of Genome Files: {results.value.length}

- - Spfy ID - Filename - Submitted - O-Type - H-Type - -
+ + Filename + Date Submitted + Contig ID + Analysis + Hit + ); } } @@ -37,4 +57,4 @@ class ResultDatabase extends Component { export default connect(props => ({ results: {url: API_ROOT + `results/${props.jobId}`} -}))(ResultDatabase) +}))(ResultSubtyping) diff --git a/src/components/ResultSubtyping.js b/src/components/ResultSubtyping.js index c21dd4e..2156f29 100644 --- a/src/components/ResultSubtyping.js +++ b/src/components/ResultSubtyping.js @@ -27,7 +27,7 @@ class ResultSubtyping extends Component { } calcWidth = ( dec ) => { let workableWidth = this.state.width - sidebar; - return workableWidth*dec + return String(workableWidth*dec) } render() { const { results } = this.props; diff --git a/src/components/ResultsTemplates.js b/src/components/ResultsTemplates.js index 4d94e4c..2463258 100644 --- a/src/components/ResultsTemplates.js +++ b/src/components/ResultsTemplates.js @@ -8,6 +8,7 @@ import ResultBulk from './ResultBulk' import ResultMetadata from './ResultMetadata' import ResultPanseq from './ResultsPanseq' import { RedirectToken } from '../components/RedirectToken' +import ResultSearch from './ResultSearch'; const ResultsTemplates = ({ job, ...props }) => { switch (job.analysis) { @@ -44,6 +45,10 @@ const ResultsTemplates = ({ job, ...props }) => { return + case "search": + return + + default: return
ERROR: no matching analysis view found.
} diff --git a/src/containers/Search.js b/src/containers/Search.js index ed63550..fd6f305 100644 --- a/src/containers/Search.js +++ b/src/containers/Search.js @@ -98,7 +98,9 @@ class Search extends Component { Would have a record.id of gi|1370526529|gb|CP027599.1|

- For shotgun sequences, search is indexed by individual sequence ids. + For shotgun sequences, search is indexed by sequence ids. + Seraching for any accession in a shotgun sequence will return results + for all sequences in the isolate (not just for the single sequence).
For example, a sequence with header:
From 463fff0c4a33fdd6f08a741ce9169c4b5eec4086 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Thu, 21 Jun 2018 18:31:59 -0400 Subject: [PATCH 12/13] edit: api for pr --- src/middleware/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/middleware/api.js b/src/middleware/api.js index a4724bd..aa5d170 100644 --- a/src/middleware/api.js +++ b/src/middleware/api.js @@ -1,10 +1,10 @@ import React from 'react' //const ROOT = window.location.protocol + '//' + 'spfy.enchartus.ca' + '/' -// const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' +const ROOT = window.location.protocol + '//' + window.location.hostname + ':8000/' // const ROOT = 'https://lfz.corefacility.ca/superphy/spfyapi/' // const ROOT = 'http://10.139.14.212:8000/' // const ROOT = 'http://192.168.5.19:8090/' -const ROOT = 'http://192.168.5.19:8000/' +// const ROOT = 'http://192.168.5.19:8000/' // const ROOT = 'https://spfy.enchartus.ca/' export const API_ROOT = ROOT + 'api/v0/' export const OLD_API = ROOT From 181a4801b38980cec8141664c7b8ccb7cfed3f9f Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Thu, 21 Jun 2018 18:34:00 -0400 Subject: [PATCH 13/13] fix: naming --- src/components/ResultSearch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ResultSearch.js b/src/components/ResultSearch.js index cb6012e..1b10736 100644 --- a/src/components/ResultSearch.js +++ b/src/components/ResultSearch.js @@ -9,7 +9,7 @@ import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const sidebar = 200; -class ResultSubtyping extends Component { +class ResultSearch extends Component { constructor(props) { super(props); this.state = { width: 0, height: 0 }; @@ -57,4 +57,4 @@ class ResultSubtyping extends Component { export default connect(props => ({ results: {url: API_ROOT + `results/${props.jobId}`} -}))(ResultSubtyping) +}))(ResultSearch)