Datasets:
File size: 3,701 Bytes
e15ee92 489f1e7 e15ee92 489f1e7 e15ee92 0acc1e0 e15ee92 8898e2d e15ee92 8898e2d e15ee92 489f1e7 a46cebb 489f1e7 8898e2d 489f1e7 8898e2d 489f1e7 a46cebb 489f1e7 8898e2d 489f1e7 a46cebb 489f1e7 e15ee92 a46cebb 489f1e7 a46cebb e15ee92 8898e2d e15ee92 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
---
tags: ['napistu', 'napistu-torch', 'graph-neural-networks', 'biological-networks', 'pytorch', 'napistu-data-store']
library_name: napistu-torch
license: mit
---
# NapistuDataStore Dataset
This dataset contains a complete NapistuDataStore with all artifacts published as a read-only store.
## Source Data
This store was created from GCS asset: **human_consensus_no_rxns** (version: **20251218**)
## Artifacts
### NapistuData (1)
- `relation_prediction`
### VertexTensor (1)
- `comprehensive_pathway_memberships`
### Pandas DataFrame (5)
- `edge_strata_by_node_species_type`
- `edge_strata_by_edge_sbo_terms`
- `species_identifiers`
- `name_to_sid_map`
- `edge_strata_by_node_type`
## Usage
### Load from HuggingFace Hub
The easiest way to load this dataset is using the `from_huggingface` class method:
```python
from napistu_torch.napistu_data_store import NapistuDataStore
from pathlib import Path
# Load read-only store from HuggingFace Hub
store = NapistuDataStore.from_huggingface(
repo_id="seanhacks/relation_prediction",
store_dir=Path("./local_store"),
revision="main"
)
# Use the store (read-only)
napistu_data = store.load_napistu_data("relation_prediction")
```
### Configure DataConfig
You can also use this dataset in your `DataConfig` YAML for PyTorch Lightning experiments:
```yaml
data:
store_dir: "./local_store"
hf_repo_id: "seanhacks/relation_prediction"
hf_revision: "main"
napistu_data_name: "relation_prediction"
```
To make the store writable (non-read-only), provide paths to the raw data files:
```yaml
data:
store_dir: "./local_store"
hf_repo_id: "seanhacks/relation_prediction"
hf_revision: "main"
sbml_dfs_path: "/path/to/sbml_dfs.pkl"
napistu_graph_path: "/path/to/napistu_graph.pkl"
napistu_data_name: "relation_prediction"
```
### Load Raw Data from GCS (Optional)
If you need to create new artifacts, you can convert this read-only store to a non-read-only store
by loading the raw data from GCS and passing the paths directly to `from_huggingface`:
```python
from napistu_torch.napistu_data_store import NapistuDataStore
from napistu.gcs.downloads import load_public_napistu_asset
from napistu.gcs.constants import GCS_SUBASSET_NAMES
from pathlib import Path
import tempfile
# Download raw data from GCS
with tempfile.TemporaryDirectory() as temp_data_dir:
sbml_dfs_path = load_public_napistu_asset(
"human_consensus_no_rxns",
temp_data_dir,
subasset=GCS_SUBASSET_NAMES.SBML_DFS,
version="20251218",
)
napistu_graph_path = load_public_napistu_asset(
"human_consensus_no_rxns",
temp_data_dir,
subasset=GCS_SUBASSET_NAMES.NAPISTU_GRAPH,
version="20251218",
)
# Load and convert to non-read-only in one step
store = NapistuDataStore.from_huggingface(
repo_id="seanhacks/relation_prediction",
store_dir=Path("./local_store"),
revision="main",
sbml_dfs_path=sbml_dfs_path,
napistu_graph_path=napistu_graph_path,
)
# Now you can create new artifacts
store.ensure_artifacts(["new_artifact_name"])
```
## Links
- 🌐 [Napistu](https://napistu.com)
- 💻 [GitHub Repository](https://github.com/napistu/Napistu-Torch)
- 📚 [Napistu Wiki](https://github.com/napistu/napistu/wiki)
## Citation
If you use this dataset, please cite:
```bibtex
@software{napistu_torch,
title = {Napistu-Torch: Graph Neural Networks for Biological Pathway Analysis},
author = {Hackett, Sean R.},
url = {https://github.com/napistu/Napistu-Torch},
year = {2025}
}
```
## License
MIT License - See [LICENSE](https://github.com/napistu/Napistu-Torch/blob/main/LICENSE) for details.
|