Skip to content

Commit

Permalink
Merge pull request #51 from BackofenLab/workNico
Browse files Browse the repository at this point in the history
Frontend update.
  • Loading branch information
TripZz authored Nov 30, 2023
2 parents 6de0a58 + d141c5f commit 318f454
Show file tree
Hide file tree
Showing 108 changed files with 8,131 additions and 4,845 deletions.
1 change: 0 additions & 1 deletion backend/src/enrichment.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def functional_enrichment(driver: neo4j.Driver, in_genes, species_id: Any):
csv.field_size_limit(sys.maxsize)

# Read Terms and put into Dataframe
df_terms = pd.DataFrame(queries.get_enrichment_terms(driver, species_id))
tot_tests = len(df_terms)

stopwatch.round("setup_enrichment")
Expand Down
2 changes: 2 additions & 0 deletions backend/src/enrichment_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def get_functional_graph(list_enrichment, species_id):
terms, source, target, score = queries.get_terms_connected_by_overlap(driver, list_term, species_id)

stopwatch.round("Neo4j")

if len(terms) == 0: return

nodes = pd.DataFrame(terms).rename(columns={"Term": "external_id"}).drop_duplicates(subset="external_id")

Expand Down
3 changes: 2 additions & 1 deletion backend/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import queries
import signal
from util.stopwatch import Stopwatch
import g4f, asyncio

app = Flask(__name__)

Expand Down Expand Up @@ -73,7 +74,6 @@ def proteins_enrichment():
json_str = json.dumps(list_enrichment.to_dict("records"), ensure_ascii=False, separators=(",", ":"))
return Response(json_str, mimetype="application/json")


# ====================== Subgraph API ======================
# request comes from home.js
# TODO Refactor this
Expand Down Expand Up @@ -110,6 +110,7 @@ def proteins_subgraph_api():
pd.DataFrame(proteins).rename(columns={"ENSEMBL_PROTEIN": "external_id"}).drop_duplicates(subset="external_id")
)


edges = pd.DataFrame({"source": source, "target": target, "score": score})
edges = edges.drop_duplicates(subset=["source", "target"])

Expand Down
1 change: 0 additions & 1 deletion backend/src/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def get_protein_associations(
result = session.run(query)
return _convert_to_connection_info_score(result=result, _int=True, protein=True)


def get_enrichment_terms(driver: neo4j.Driver, species_id: int) -> list[dict[str, Any]]:
if species_id == 10090:
species = "Mus_Musculus"
Expand Down
1,899 changes: 1,147 additions & 752 deletions frontend/package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
"3d-force-graph": "^1.71.1",
"axios": "^1.3.2",
"core-js": "^3.8.3",
"d3": "^7.8.4",
"d3": "^7.8.5",
"file-saver": "^2.0.5",
"graphology": "^0.25.1",
"imports-loader": "^4.0.1",
"jquery": "^3.6.3",
"mitt": "^3.0.0",
"ml-hclust": "^3.1.0",
"random-color-rgb": "^1.1.1",
"sigma": "^1.2.2",
"smallest-enclosing-circle": "^1.0.2",
Expand All @@ -33,7 +34,7 @@
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/cli-service": "^5.0.8",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"versions": "^10.4.1"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container" id="container">
<router-view v-slot="{ Component }">
<keep-alive exclude="HomeView">
<component :is="Component" />
Expand Down
Binary file added frontend/src/assets/pane/follow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pane/invisible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/src/assets/pane/visible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pathwaybar/active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pathwaybar/arrows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pathwaybar/background-dna.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pathwaybar/cross.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pathwaybar/delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pathwaybar/favorite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pathwaybar/pathway-button-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/pathwaybar/pathway-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/src/assets/pathwaybar/star-solid-checked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/src/assets/pathwaybar/star-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/toolbar/google-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/toolbar/logout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/assets/toolbar/proteinselect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 318f454

Please sign in to comment.