Spaces:
Running
Running
Graph from molecule similarity.
Browse files
README.md
CHANGED
@@ -14,6 +14,7 @@ original LynxKite. The primary goals of this rewrite are:
|
|
14 |
- `lynxkite-graph-analytics`: Graph analytics plugin. The classical LynxKite experience!
|
15 |
- `lynxkite-pillow`: A simple example plugin.
|
16 |
- `lynxkite-lynxscribe`: A plugin for building and running LynxScribe applications.
|
|
|
17 |
- `docs`: User-facing documentation. It's shared between all packages.
|
18 |
|
19 |
## Development
|
@@ -25,7 +26,7 @@ uv venv
|
|
25 |
source .venv/bin/activate
|
26 |
uvx pre-commit install
|
27 |
# The [dev] tag is only needed if you intend on running tests
|
28 |
-
uv pip install -e lynxkite-core/[dev] -e lynxkite-app/[dev] -e lynxkite-graph-analytics/[dev] -e lynxkite-lynxscribe/ -e lynxkite-pillow-example/
|
29 |
```
|
30 |
|
31 |
This also builds the frontend, hopefully very quickly. To run it:
|
|
|
14 |
- `lynxkite-graph-analytics`: Graph analytics plugin. The classical LynxKite experience!
|
15 |
- `lynxkite-pillow`: A simple example plugin.
|
16 |
- `lynxkite-lynxscribe`: A plugin for building and running LynxScribe applications.
|
17 |
+
- `lynxkite-bio`: Bioinformatics additions for LynxKite Graph Analytics.
|
18 |
- `docs`: User-facing documentation. It's shared between all packages.
|
19 |
|
20 |
## Development
|
|
|
26 |
source .venv/bin/activate
|
27 |
uvx pre-commit install
|
28 |
# The [dev] tag is only needed if you intend on running tests
|
29 |
+
uv pip install -e lynxkite-core/[dev] -e lynxkite-app/[dev] -e lynxkite-graph-analytics/[dev] -e lynxkite-bio -e lynxkite-lynxscribe/ -e lynxkite-pillow-example/
|
30 |
```
|
31 |
|
32 |
This also builds the frontend, hopefully very quickly. To run it:
|
lynxkite-app/src/lynxkite_app/crdt.py
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
import asyncio
|
4 |
import contextlib
|
5 |
import enum
|
6 |
-
import pathlib
|
7 |
import fastapi
|
8 |
import os.path
|
9 |
import pycrdt
|
|
|
3 |
import asyncio
|
4 |
import contextlib
|
5 |
import enum
|
|
|
6 |
import fastapi
|
7 |
import os.path
|
8 |
import pycrdt
|
lynxkite-graph-analytics/src/lynxkite_graph_analytics/__init__.py
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
from . import
|
2 |
from . import networkx_ops # noqa (imported to trigger registration)
|
3 |
from . import pytorch_model_ops # noqa (imported to trigger registration)
|
|
|
1 |
+
from .lynxkite_ops import * # noqa (imported to trigger registration)
|
2 |
from . import networkx_ops # noqa (imported to trigger registration)
|
3 |
from . import pytorch_model_ops # noqa (imported to trigger registration)
|
lynxkite-graph-analytics/src/lynxkite_graph_analytics/lynxkite_ops.py
CHANGED
@@ -80,9 +80,10 @@ class Bundle:
|
|
80 |
# TODO: Use relations.
|
81 |
graph = nx.DiGraph()
|
82 |
if "nodes" in self.dfs:
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
86 |
graph.add_edges_from(
|
87 |
self.dfs["edges"][["source", "target"]].itertuples(index=False, name=None)
|
88 |
)
|
|
|
80 |
# TODO: Use relations.
|
81 |
graph = nx.DiGraph()
|
82 |
if "nodes" in self.dfs:
|
83 |
+
df = self.dfs["nodes"]
|
84 |
+
if df.index.name != "id":
|
85 |
+
df = df.set_index("id")
|
86 |
+
graph.add_nodes_from(df.to_dict("index").items())
|
87 |
graph.add_edges_from(
|
88 |
self.dfs["edges"][["source", "target"]].itertuples(index=False, name=None)
|
89 |
)
|