From 8be47ee7e010d3a051360ff81fde9c877fffb6f0 Mon Sep 17 00:00:00 2001 From: yisehak Date: Fri, 13 Sep 2019 15:12:50 +0300 Subject: [PATCH 1/7] Removed react DOM line and added default export --- .../thirdPartyServices/snet/gene_annotation_service/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/assets/thirdPartyServices/snet/gene_annotation_service/index.js b/src/assets/thirdPartyServices/snet/gene_annotation_service/index.js index b1972cdc3..dfea8bbf1 100644 --- a/src/assets/thirdPartyServices/snet/gene_annotation_service/index.js +++ b/src/assets/thirdPartyServices/snet/gene_annotation_service/index.js @@ -1,5 +1,4 @@ import React, { useState } from "react"; -import ReactDOM from "react-dom"; import { SnackbarProvider } from "notistack"; import AnnotationForm from "./form"; import AnnotationResult from "./result"; @@ -15,4 +14,4 @@ const App = props => { ); }; -ReactDOM.render(, document.getElementById("app")); +export default App; From 04ab4f00457fb8d1ddd2be87501e354f519e69e1 Mon Sep 17 00:00:00 2001 From: yisehak Date: Fri, 13 Sep 2019 15:16:51 +0300 Subject: [PATCH 2/7] removed margins from form --- .../snet/gene_annotation_service/form/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js b/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js index da481c6e6..0c630dffb 100644 --- a/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js +++ b/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js @@ -188,7 +188,7 @@ const AnnotationForm = props => { }; return ( -
+
{/* Gene List */} Input Genes From 61884bab507f58e119d5d5400ec0d0c68b51b809 Mon Sep 17 00:00:00 2001 From: yisehak Date: Fri, 13 Sep 2019 15:21:08 +0300 Subject: [PATCH 3/7] removed this --- .../snet/gene_annotation_service/form/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js b/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js index 0c630dffb..8c5e7957d 100644 --- a/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js +++ b/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js @@ -184,7 +184,7 @@ const AnnotationForm = props => { }, }; - this.props.serviceClient.unary(Annotate.Annotate, requestProps); + props.serviceClient.unary(Annotate.Annotate, requestProps); }; return ( From 975d46e053f4b7cd4d09f3fb90f17dc05e8e9e67 Mon Sep 17 00:00:00 2001 From: yisehak Date: Fri, 13 Sep 2019 16:48:15 +0300 Subject: [PATCH 4/7] pass serviceClient as prop to form --- package-lock.json | 5 +++++ .../thirdPartyServices/snet/gene_annotation_service/index.js | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index fac506d18..1dfc30b51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31752,6 +31752,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "validate.js": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/validate.js/-/validate.js-0.13.1.tgz", + "integrity": "sha512-PnFM3xiZ+kYmLyTiMgTYmU7ZHkjBZz2/+F0DaALc/uUtVzdCt1wAosvYJ5hFQi/hz8O4zb52FQhHZRC+uVkJ+g==" + }, "value-equal": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.4.0.tgz", diff --git a/src/assets/thirdPartyServices/snet/gene_annotation_service/index.js b/src/assets/thirdPartyServices/snet/gene_annotation_service/index.js index dfea8bbf1..21572e877 100644 --- a/src/assets/thirdPartyServices/snet/gene_annotation_service/index.js +++ b/src/assets/thirdPartyServices/snet/gene_annotation_service/index.js @@ -9,7 +9,9 @@ const App = props => { return (
- {id ? : } + + {id ? : } +
); }; From 4dac8ab19aa013b8eac495ba99387e47f231401e Mon Sep 17 00:00:00 2001 From: Abdulrahman Semrie Date: Fri, 13 Sep 2019 17:53:49 +0300 Subject: [PATCH 5/7] Fixed issues with the date-fn library and added minor css improvements --- .../snet/gene_annotation_service/form/index.js | 2 +- .../snet/gene_annotation_service/result/index.js | 4 ++-- .../snet/gene_annotation_service/result/style.css | 2 +- .../snet/gene_annotation_service/visualizer/index.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js b/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js index 8c5e7957d..a9212c5f8 100644 --- a/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js +++ b/src/assets/thirdPartyServices/snet/gene_annotation_service/form/index.js @@ -29,7 +29,7 @@ const GeneGoOptions = [ { label: "Molecular Function", value: "molecular_function" }, ]; -const Pathways = [{ label: "SMPDB", value: "smpdb" }, { label: "Reactome", value: "reactome" }]; +const Pathways = [{ label: "Reactome", value: "reactome" }]; const GeneInputMethods = { Manual: 0, Import: 1 }; diff --git a/src/assets/thirdPartyServices/snet/gene_annotation_service/result/index.js b/src/assets/thirdPartyServices/snet/gene_annotation_service/result/index.js index d4688298a..0811a9f93 100644 --- a/src/assets/thirdPartyServices/snet/gene_annotation_service/result/index.js +++ b/src/assets/thirdPartyServices/snet/gene_annotation_service/result/index.js @@ -1,5 +1,5 @@ import React, { useState, useEffect, Fragment } from "react"; -import { parse, formatDistanceToNow } from "date-fns"; +import { parse, formatDistanceToNow, toDate } from "date-fns"; import { RESULT_ADDR, downloadSchemeFile } from "../service"; import TabbedTables from "../tables"; import Visualizer from "../visualizer"; @@ -82,7 +82,7 @@ const AnnotationResult = props => { The result contains {nodes.length} entities and {edges.length} connections between them.
- This page will expire in {formatDistanceToNow(parse(response.expire_time * 1000))}. + This page will expire in {formatDistanceToNow(toDate(response.expire_time * 1000))}.
@@ -86,7 +85,7 @@ const AnnotationResult = props => {
); @@ -496,7 +498,7 @@ const Visualizer = props => {
- + @@ -529,12 +531,12 @@ const Visualizer = props => { +

Use the checkboxes to the right to filter the graph by annotations and node types.

Right click on a node to perform actions on it.

You may download the graph JSON and view it on Cytoscape desktop.

The search is case sensitive.

-
+ } > @@ -543,8 +545,9 @@ const Visualizer = props => {
- + setSearchToken(e.target.value)} onKeyPress={e => { diff --git a/src/assets/thirdPartyServices/snet/gene_annotation_service/visualizer/style.css b/src/assets/thirdPartyServices/snet/gene_annotation_service/visualizer/style.css index 2cfd45ee5..a852d230d 100644 --- a/src/assets/thirdPartyServices/snet/gene_annotation_service/visualizer/style.css +++ b/src/assets/thirdPartyServices/snet/gene_annotation_service/visualizer/style.css @@ -1,7 +1,10 @@ +div button:first-of-type { + margin-right: 0 !important; +} + .context-menu { border: none !important; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), - 0 1px 2px rgba(0, 0, 0, 0.24); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); -ms-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); -o-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); @@ -66,8 +69,8 @@ } .visualizer-wrapper { - width: 100vw; - height: 100vh; + width: 100%; + height: 100%; position: absolute; top: 0; left: 0; @@ -98,4 +101,5 @@ position: absolute; top: 15px; left: 90px; + z-index: 10; } From 9e3dbc123d0880c5b46455df70d81a6e921a9b07 Mon Sep 17 00:00:00 2001 From: yisehak Date: Fri, 13 Sep 2019 21:24:53 +0300 Subject: [PATCH 7/7] biogrid tables fix --- .../gene_annotation_service/result/index.js | 2 +- .../gene_annotation_service/tables/index.js | 65 ++++++++----------- .../visualizer/index.js | 17 ++--- 3 files changed, 37 insertions(+), 47 deletions(-) diff --git a/src/assets/thirdPartyServices/snet/gene_annotation_service/result/index.js b/src/assets/thirdPartyServices/snet/gene_annotation_service/result/index.js index eb8a3197b..d7ebf7b65 100644 --- a/src/assets/thirdPartyServices/snet/gene_annotation_service/result/index.js +++ b/src/assets/thirdPartyServices/snet/gene_annotation_service/result/index.js @@ -85,7 +85,7 @@ const AnnotationResult = props => {