File size: 7,509 Bytes
8b2fe90
60c95f0
8b2fe90
 
 
66e9baf
60c95f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8b2fe90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cf8068c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# Embedding name: Node2Vec-consensus-PPI

- Modality: Protein-protein interaction network / direct PPI graph embedding
- Algorithm: Node2Vec-style random walks with Word2Vec skip-gram training
- Embedding source URL: https://github.com/ylaboratory/gene-embedding-benchmarks
- Original model/code URL: Embedding was locally generated from a recovered PPI edge list using node2vec-style random walks and Word2Vec

## Public files

- `embeddings.npz`: compressed NumPy archive containing the embedding matrix under key `embeddings`.
- `genes.tsv`: row metadata table. Row order matches the embedding matrix.
- `metadata.json`: machine-readable provenance and processing metadata.

## Matrix

- Shape: `18356 genes × 128 dimensions`
- Dtype: `float32`


## Detailed processing notes

### Source and interpretation

This embedding is a gene-level direct PPI network representation generated locally from the recovered `consensus.dat` PPI graph input used in the Zhong gene-embedding benchmark preprocessing repository.

The source graph is a two-column Entrez-ID PPI edge list. The final embedding was generated by running node2vec-style random walks over the recovered graph and training a Word2Vec skip-gram model on the walks. Each graph node is therefore represented by its position in the direct PPI network.

This embedding should be interpreted as a direct PPI graph embedding. It is complementary to PrimeKG and Hetionet, which were deliberately processed as non-PPI heterogeneous biomedical context embeddings.

### Provenance fields

    source_name: Node2Vec consensus PPI
    original_model_or_method: node2vec-style random walks with Word2Vec skip-gram
    input_data_type: recovered consensus PPI edge list
    input_source_file: consensus.dat
    source_download_or_code_page: https://github.com/ylaboratory/gene-embedding-benchmarks
    source_identifier_type: Entrez Gene ID graph node
    mapping_identifier_type: Entrez Gene ID matched to master_gene_table.csv
    source_graph_nodes: 20,349
    raw_edge_rows: 822,311
    undirected_non_self_edges: 816,726
    skipped_self_or_bad_edges: 5,585
    dimensions: 128
    walk_length: 80
    num_walks: 10
    p: 1
    q: 1
    window: 10
    epochs: 5
    min_count: 1
    sg: 1
    seed: 42
    workers: 8
    final_embedding_dtype: float32

### Mapping and graph-processing decisions

Source graph nodes were treated as Entrez Gene IDs. They were mapped through `entrez_id`, `hgnc_entrez_id`, and `map_entrez_ids_all` in master_gene_table.csv.

Only source Entrez IDs that mapped uniquely to one master-table gene were accepted. Source nodes that were unmapped or ambiguous across master rows were excluded.

Duplicate source rows were averaged only when they safely mapped to the same final master gene. This keeps the final output aligned to master_gene_table.csv while avoiding ambiguous Entrez-to-gene assignments.

### Processing workflow

For the Node2Vec consensus PPI embedding:

    1. Read the recovered consensus.dat PPI graph.
    2. Parse graph nodes as Entrez Gene IDs.
    3. Remove self or malformed edges.
    4. Build the undirected PPI graph.
    5. Run node2vec-style random walks with walk_length=80, num_walks=10, p=1, and q=1.
    6. Train Word2Vec skip-gram on the generated walks with window=10, epochs=5, min_count=1, and seed=42.
    7. Map source Entrez graph nodes to master_gene_table.csv.
    8. Exclude unmapped or ambiguous source nodes.
    9. Average duplicate source rows only when they map to the same final master gene.
    10. Save the final matrix as float32.

### Important implementation decisions

The exact graph input was recovered, but the exact Zhong NODE2VEC hyperparameters were not found in the inspected preprocessing notebook. Therefore this output should not be described as byte-identical to Zhong's archived NODE2VEC matrix.

This output is the dedicated direct PPI embedding in the resource. Broader KG embeddings such as PrimeKG and Hetionet should be compared against it to test whether heterogeneous biomedical context adds information beyond direct PPI graph structure.

### Summary of final mapping:

    Source identifiers / PPI graph nodes: 20,349
    Raw edge rows: 822,311
    Undirected non-self edges: 816,726
    Skipped self/bad edges: 5,585
    Mapped source nodes before duplicate collapse: 18,404
    Unmapped source nodes: 1,792
    Ambiguous source nodes: 153
    Dimensions: 128
    Rows generated before duplicate collapse: 18,404
    Final mapped genes: 18,356
    Master table rows: 20,097
    Master coverage: 91.34%
    Duplicate final mappings averaged: 44

<!-- BEGIN CATALOG NORMALIZATION: LEGACY METADATA -->

## Processing and provenance metadata

This section preserves information moved out of `metadata.json` during catalog normalization. The loading-facing metadata is intentionally compact; detailed source, mapping, processing, quality-control, and reproducibility records remain here.

Source catalog commit: `ab37742040d20b523aebd188d3079871a0c2b534`.

### Canonicalized field names

| Previous field | Compact metadata field |
| --- | --- |
| `embedding_name` | `display_name` |
| `source_identifier_type` | `original_identifier_type` |
| `mapping_strategy` | `mapping_method` |
| `num_genes` | `n_genes` |
| `embedding_dimension` | `n_dimensions` |
| `matrix_shape[0]` | `n_genes` |
| `matrix_shape[1]` | `n_dimensions` |
| `original_model_or_method` | `original_method` |
| `download_source` | `input_data_source` |

### Derived standardized fields

- `species` was set to `Homo sapiens` from the validated human Ensembl `ENSG` identifier namespace.
- `master_coverage_fraction` was computed as `n_genes / 20097`.

### Legacy processing and provenance record

```json
{
  "all_zero_rows": {
    "count": 0,
    "documented": true,
    "expected": false,
    "reason": "No exact all-zero rows were detected in embeddings.npz.",
    "report_file": null
  },
  "counts": {
    "ambiguous_source_nodes": 153,
    "duplicate_final_mappings_averaged": 44,
    "final_dimensions": 128,
    "final_mapped_genes": 18356,
    "mapped_source_nodes_before_duplicate_collapse": 18404,
    "master_rows": 20097,
    "raw_edge_rows": 822311,
    "skipped_self_or_bad_edges": 5585,
    "source_dimensions": 128,
    "source_nodes": 20349,
    "undirected_nonself_edges": 816726,
    "unmapped_source_nodes": 1792
  },
  "coverage": {
    "master_gene_coverage_fraction": 0.9133701547494651,
    "source_node_mapping_fraction": 0.9044179075138827
  },
  "exact_zhong_reproduction": false,
  "exact_zhong_reproduction_note": "The graph input was recovered, but exact NODE2VEC hyperparameters were not found in the inspected Zhong preprocessing notebook. This is therefore a local reproducible node2vec-on-consensus-PPI embedding, not guaranteed byte-identical to Zhong's archived NODE2VEC.",
  "former_processing_embedding_id": "node2vec_consensus_ppi_v1_1",
  "input_graph": "Consensus human PPI edge list used by Zhong preprocessing; two-column Entrez-ID interaction file",
  "node2vec_parameters": {
    "dimensions": 128,
    "epochs": 5,
    "min_count": 1,
    "num_walks": 10,
    "p": 1,
    "q": 1,
    "seed": 42,
    "sg": 1,
    "walk_length": 80,
    "window": 10,
    "workers": 8
  },
  "public_file_structure": {
    "embeddings": "embeddings.npz",
    "genes": "genes.tsv",
    "metadata": "metadata.json",
    "readme": "README.md"
  },
  "source_embedding": "Node2Vec-consensus-PPI-v1.1"
}
```

<!-- END CATALOG NORMALIZATION: LEGACY METADATA -->