Skip to main content

STRND

STRND = Spatio Topological Recovery by Network Discovery

  • Feed an edge list (pandas DataFrame, NX, PyG, list of edges)
  • Get back node coordinates in 2D or 3D (pandas DataFrame)

Install

pip install strnd

Minimal use

from strnd import get_strnd_positions_df

coords_df = get_strnd_positions_df(edge_df, dim=2)
# coords_df columns: node_ID, x, y

edge_df must have columns source, target (and optionally weight).

Example with Graph Generation + Quality Metrics

import numpy as np
from proxigraph.config import GraphConfig
from proxigraph.core import ProximityGraph
from PointQuality import QualityMetrics
from strnd import get_strnd_positions_df

np.random.seed(42)

# 1) create a graph
config = GraphConfig(dim=2, num_points=1000, L=1, point_mode="circle", proximity_mode="delaunay_corrected")
pg = ProximityGraph(config=config)
positions = pg.generate_positions()
edge_df = pg.get_edge_list(as_dataframe=True)

# 2) run STRND
rec_positions = get_strnd_positions_df(edge_df, dim=2)

# 3) quality
rec_positions_ordered = rec_positions.sort_values("node_ID")[["x","y"]].to_numpy()
qm = QualityMetrics(positions, rec_positions_ordered)
print(qm.evaluate_metrics(compute_distortion=False))

# 4) print head
print(rec_positions.head())

dependencies

  • numpy
  • pandas
  • matplotlib
  • pecanpy (node2vec)
  • umap-learn
  • (optional) proxigraph for the demo

Citation

If you use STRND in your work, please cite:

Core STRND paper

Fernández Bonet, D., & Hoffecker, I. T. (2023). Image recovery from unknown network mechanisms for DNA sequencing-based microscopy. Nanoscale, 15, 8153–8157. https://doi.org/10.1039/D2NR05435C

Related work

Dahlberg, S. K., Fernández Bonet, D., & Hoffecker, I. T. (2025). Hidden network preserved in Slide-tags data allows reference-free spatial reconstruction. Nature Communications. https://doi.org/10.1038/s41467-025-65295-w

Fernández Bonet, D., Blumenthal, J. I., Lang, S., Dahlberg, S. K., & Hoffecker, I. T. (2024). Spatial coherence of DNA barcode networks. bioRxiv. https://doi.org/10.1101/2024.05.12.593725

Metadata

Release files for strnd 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for strnd 0.3.0
File Size Uploaded
strnd-0.3.0.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for strnd 0.3.0
File Interpreter ABI Platform
strnd-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / strnd-0.3.0.tar.gz

Download URL strnd-0.3.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
826f26d3b76d93f992c8ca113acb03f83c75a7f7c358c4863a6597237f6ac7ab
BLAKE2b-256 checksum
How to use checksums
dcfc07b1e4f8c7187b89ae6763726c599e3b696e6982ccbf792f0c0b3f6e783a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / strnd-0.3.0-py3-none-any.whl

Download URL strnd-0.3.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6b07fe07953a9add8558b1ebd2ff667dd73fb9961279ceb3b8feb994193a51b
BLAKE2b-256 checksum
How to use checksums
68870da9c2d3e665be4a757fe4baa9d725b8013c333e9dfe88847b17a62eda4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page