Skip to content

Commit

Permalink
lint changes and removed unnessecary print
Browse files Browse the repository at this point in the history
  • Loading branch information
kataikko committed Sep 12, 2023
1 parent f0fb1d3 commit e8ec0e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions backend/src/enrichment_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def get_functional_graph(list_enrichment, species_id):
df2 = nodesterm.rename(columns={"id": "external_id"})
merged = pd.merge(df2[["external_id", "fdr_rate", "p_value"]], nodes, on="external_id")

print(df2[df2.duplicated(subset=["external_id"], keep=False)].sort_values(by="external_id")["external_id"].to_list())
# Add the two columns to df2
nodes = merged.drop_duplicates()

Expand Down Expand Up @@ -66,7 +65,7 @@ def get_functional_graph(list_enrichment, species_id):
nodes_sub = graph.create_nodes_subgraph(nk_graph, nodes)

stopwatch.round("Enrichment")

if len(nodes.index) == 0:
sigmajs_data = {"nodes": [], "edges": []}
else:
Expand Down
1 change: 0 additions & 1 deletion backend/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def proteins_subgraph_api():
# TODO: make better (Vincent)
nodes = pd.DataFrame(proteins).rename(columns={"ENSEMBL": "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
4 changes: 3 additions & 1 deletion backend/src/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ def get_number_of_proteins(driver: neo4j.Driver, species_id: int) -> int:
return int(num_proteins)


def _convert_to_connection_info_score(result: neo4j.Result, _int: bool, protein:bool) -> (list[str], list[str], list[str], list[int]):
def _convert_to_connection_info_score(
result: neo4j.Result, _int: bool, protein: bool
) -> (list[str], list[str], list[str], list[int]):
nodes, source, target, score = list(), list(), list(), list()

for row in result:
Expand Down

0 comments on commit e8ec0e0

Please sign in to comment.