Update curated NEWT README documentation: data/embeddings/newt_msigdb_bundle/README.md
Browse files
data/embeddings/newt_msigdb_bundle/README.md
CHANGED
|
@@ -1,40 +1,22 @@
|
|
| 1 |
-
# NEWT-MSigDB-bundle
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
## Public files
|
| 8 |
|
| 9 |
- `embeddings.npz`: compressed NumPy archive containing the embedding matrix under key `embeddings`.
|
| 10 |
- `genes.tsv`: row metadata table. Row order matches the embedding matrix.
|
| 11 |
- `metadata.json`: machine-readable provenance and processing metadata.
|
| 12 |
-
- `README.md`: this per-embedding documentation file.
|
| 13 |
|
| 14 |
## Matrix
|
| 15 |
|
| 16 |
- Shape: `15423 genes × 256 dimensions`
|
| 17 |
- Dtype: `float32`
|
| 18 |
-
- NPZ array key: `embeddings`
|
| 19 |
-
|
| 20 |
-
The row order is authoritative:
|
| 21 |
-
|
| 22 |
-
```text
|
| 23 |
-
embeddings.npz['embeddings'][i, :] corresponds to genes.tsv row i
|
| 24 |
-
```
|
| 25 |
|
| 26 |
-
## Loading example
|
| 27 |
|
| 28 |
-
```python
|
| 29 |
-
import numpy as np
|
| 30 |
-
import pandas as pd
|
| 31 |
-
|
| 32 |
-
with np.load('embeddings.npz') as z:
|
| 33 |
-
X = z['embeddings']
|
| 34 |
-
|
| 35 |
-
genes = pd.read_csv('genes.tsv', sep='\t')
|
| 36 |
-
assert X.shape[0] == len(genes)
|
| 37 |
-
```
|
| 38 |
|
| 39 |
## genes.tsv columns
|
| 40 |
|
|
@@ -43,37 +25,80 @@ assert X.shape[0] == len(genes)
|
|
| 43 |
| `ensembl_gene_id` | 15423 | 15423 | ENSG00000000003<br>ENSG00000000005<br>ENSG00000000419<br>ENSG00000000457 | Ensembl gene identifier; main stable identifier used to align genes across embeddings. |
|
| 44 |
| `gene_symbol` | 15423 | 15423 | TSPAN6<br>TNMD<br>DPM1<br>SCYL3 | Gene symbol associated with the Ensembl gene ID. |
|
| 45 |
| `gene_type` | 15423 | 1 | protein_coding | Gene biotype, usually protein_coding. |
|
| 46 |
-
| `entrez_id` | 15423 | 15423 | 7105<br>64102<br>8813<br>57147 | NCBI Entrez Gene identifier
|
| 47 |
| `uniprot_id` | 15419 | 15388 | O43657<br>Q9H2S6<br>O60762<br>Q8IZE3 | UniProt accession or identifier, when available. |
|
| 48 |
| `canonical_transcript_id` | 15423 | 15423 | ENST00000373020<br>ENST00000373031<br>ENST00000371588<br>ENST00000367771 | Canonical transcript identifier recorded or used for this gene. |
|
| 49 |
| `canonical_protein_id` | 15423 | 15423 | ENSP00000362111<br>ENSP00000362122<br>ENSP00000360644<br>ENSP00000356745 | Canonical protein identifier recorded or used for this gene. |
|
| 50 |
-
| `source_embedding` | 15423 | 1 | NEWT-MSigDB-bundle-v1.1 | Name of the original source embedding. |
|
| 51 |
-
| `source_identifier_type` | 15423 | 1 | Entrez Gene ID from NEWT component embedding CSV | Type of source identifier used by the original
|
| 52 |
-
| `source_key_count` | 15423 | 2 | 1<br>2 | Number of source
|
| 53 |
-
| `source_keys_examples` | 15423 | 15423 | 7105<br>64102<br>8813<br>57147 | Example source
|
| 54 |
-
| `source_row_indices_examples` | 15423 | 15423 | 2631<br>11384<br>8925<br>16480 | Example source row indices mapped to this final gene. |
|
| 55 |
-
| `mapping_methods` | 15423 | 1 | entrez_id_exact_unique | Mapping methods used to connect source
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
| Field | Value |
|
| 60 |
-
|---|---|
|
| 61 |
-
| `modality` | multimodal functional/regulatory/co-expression/pathway gene embedding component from NEWT |
|
| 62 |
-
| `embedding_name` | NEWT-MSigDB-bundle-v1.1 |
|
| 63 |
-
| `download_source` | Official NEWT Zenodo dataset release, DOI 10.5281/zenodo.19340318 |
|
| 64 |
-
| `original_model_or_method` | NEWT component embedding |
|
| 65 |
-
| `embedding_generated_by` | NEWT authors; processed locally into the project standard format |
|
| 66 |
|
| 67 |
## Detailed processing notes
|
| 68 |
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
|
|
|
|
|
| 1 |
+
# Embedding name: NEWT-MSigDB-bundle
|
| 2 |
|
| 3 |
+
- Modality: Pathway / gene-set component embedding
|
| 4 |
+
- Algorithm: Official NEWT MSigDB bundle component embedding, standardized by strict Entrez mapping
|
| 5 |
+
- Embedding source URL: Official NEWT Zenodo data release
|
| 6 |
+
- Original model/code URL: Not applicable; source is an official NEWT component embedding table, not a local model checkpoint
|
| 7 |
|
| 8 |
## Public files
|
| 9 |
|
| 10 |
- `embeddings.npz`: compressed NumPy archive containing the embedding matrix under key `embeddings`.
|
| 11 |
- `genes.tsv`: row metadata table. Row order matches the embedding matrix.
|
| 12 |
- `metadata.json`: machine-readable provenance and processing metadata.
|
|
|
|
| 13 |
|
| 14 |
## Matrix
|
| 15 |
|
| 16 |
- Shape: `15423 genes × 256 dimensions`
|
| 17 |
- Dtype: `float32`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
|
|
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
## genes.tsv columns
|
| 22 |
|
|
|
|
| 25 |
| `ensembl_gene_id` | 15423 | 15423 | ENSG00000000003<br>ENSG00000000005<br>ENSG00000000419<br>ENSG00000000457 | Ensembl gene identifier; main stable identifier used to align genes across embeddings. |
|
| 26 |
| `gene_symbol` | 15423 | 15423 | TSPAN6<br>TNMD<br>DPM1<br>SCYL3 | Gene symbol associated with the Ensembl gene ID. |
|
| 27 |
| `gene_type` | 15423 | 1 | protein_coding | Gene biotype, usually protein_coding. |
|
| 28 |
+
| `entrez_id` | 15423 | 15423 | 7105<br>64102<br>8813<br>57147 | NCBI Entrez Gene identifier mapped from the NEWT source row. |
|
| 29 |
| `uniprot_id` | 15419 | 15388 | O43657<br>Q9H2S6<br>O60762<br>Q8IZE3 | UniProt accession or identifier, when available. |
|
| 30 |
| `canonical_transcript_id` | 15423 | 15423 | ENST00000373020<br>ENST00000373031<br>ENST00000371588<br>ENST00000367771 | Canonical transcript identifier recorded or used for this gene. |
|
| 31 |
| `canonical_protein_id` | 15423 | 15423 | ENSP00000362111<br>ENSP00000362122<br>ENSP00000360644<br>ENSP00000356745 | Canonical protein identifier recorded or used for this gene. |
|
| 32 |
+
| `source_embedding` | 15423 | 1 | NEWT-MSigDB-bundle-v1.1 | Name of the original NEWT component source embedding. |
|
| 33 |
+
| `source_identifier_type` | 15423 | 1 | Entrez Gene ID from NEWT component embedding CSV | Type of source identifier used by the original NEWT component. |
|
| 34 |
+
| `source_key_count` | 15423 | 2 | 1<br>2 | Number of NEWT source rows mapped or collapsed to this final master-table gene. |
|
| 35 |
+
| `source_keys_examples` | 15423 | 15423 | 7105<br>64102<br>8813<br>57147 | Example NEWT source identifiers mapped to this final master-table gene. |
|
| 36 |
+
| `source_row_indices_examples` | 15423 | 15423 | 2631<br>11384<br>8925<br>16480 | Example NEWT source row indices mapped to this final gene. |
|
| 37 |
+
| `mapping_methods` | 15423 | 1 | entrez_id_exact_unique | Mapping methods used to connect NEWT source rows to the master gene table. |
|
| 38 |
+
|
| 39 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
## Detailed processing notes
|
| 42 |
|
| 43 |
+
### Source and interpretation
|
| 44 |
+
|
| 45 |
+
This embedding is one of the five core NEWT component embeddings retained in the gene-embedding resource. It was processed from the official NEWT Zenodo data release and standardized to the shared master_gene_table.csv gene universe.
|
| 46 |
+
|
| 47 |
+
This embedding represents the MSigDB pathway/gene-set component of NEWT. It should be interpreted as a pathway and gene-set-derived gene representation.
|
| 48 |
+
|
| 49 |
+
The source file used for this component was `msigdb_bundle_embeddings_entrez.csv`. Source rows were identified primarily by Entrez Gene IDs. The raw NEWT component vectors were not retrained locally; the local work here was standardization, strict mapping, duplicate handling, QC, and conversion into the shared public resource format.
|
| 50 |
+
|
| 51 |
+
### Provenance fields
|
| 52 |
+
|
| 53 |
+
source_name: NEWT-MSigDB-bundle
|
| 54 |
+
original_model_or_method: NEWT component embedding
|
| 55 |
+
input_data_type: official NEWT component embedding CSV
|
| 56 |
+
input_source_file: msigdb_bundle_embeddings_entrez.csv
|
| 57 |
+
source_download_page: official NEWT Zenodo data release
|
| 58 |
+
raw_source_folder: ~/data/raw_embeddings/newt_official/zenodo/
|
| 59 |
+
processing_script: ~/scripts/process_embeddings/process_newt_components_v1_1.py
|
| 60 |
+
batch_summary_report: ~/reports/mapping_reports/newt_components_v1_1_summary.tsv
|
| 61 |
+
source_identifier_type: Entrez Gene ID
|
| 62 |
+
mapping_identifier_type: strict Entrez Gene ID mapping to master_gene_table.csv
|
| 63 |
+
source_rows: 19,508
|
| 64 |
+
final_mapped_genes: 15,423
|
| 65 |
+
model_or_component_dimension: 256
|
| 66 |
+
training_or_finetuning: none
|
| 67 |
+
final_embedding_dtype: float32
|
| 68 |
+
|
| 69 |
+
### Mapping and processing decisions
|
| 70 |
+
|
| 71 |
+
Source identifiers were mapped to master_gene_table.csv by strict Entrez Gene ID mapping through the enriched master table. Ambiguous Entrez IDs were excluded. Duplicate source rows mapping to the same final master-table gene were averaged within that final gene.
|
| 72 |
+
|
| 73 |
+
The source contained Entrez IDs plus non-Entrez tokens; 541 non-Entrez tokens were excluded before strict Entrez mapping.
|
| 74 |
+
|
| 75 |
+
The two additional NEWT regulon-token-derived outputs, DoRothEA and CollecTRI, were treated as auxiliary only and are not part of this core NEWT README block, because their source vocabularies include signed or augmented regulatory tokens that collapse back to genes during mapping.
|
| 76 |
+
|
| 77 |
+
### Processing workflow
|
| 78 |
+
|
| 79 |
+
For this NEWT component:
|
| 80 |
+
|
| 81 |
+
1. Read the official NEWT component CSV file `msigdb_bundle_embeddings_entrez.csv`.
|
| 82 |
+
2. Parse source identifiers as Entrez Gene IDs where possible.
|
| 83 |
+
3. Exclude non-gene or non-Entrez source tokens when present.
|
| 84 |
+
4. Map source Entrez IDs to master_gene_table.csv using strict enriched-master Entrez mapping.
|
| 85 |
+
5. Exclude ambiguous source identifiers.
|
| 86 |
+
6. Average duplicate source rows only when they map to the same final master-table gene.
|
| 87 |
+
7. Save the final matrix as float32.
|
| 88 |
+
|
| 89 |
+
### Important implementation decisions
|
| 90 |
+
|
| 91 |
+
The NEWT component vectors were not regenerated or retrained locally. The retained vectors come from the official NEWT component files, and the local processing standardizes them into the common gene-resource format.
|
| 92 |
+
|
| 93 |
+
Each NEWT component should be treated as a separate biological view. They should not be assumed to be interchangeable, because GO, ARCHS4, GO graph, MSigDB, and CellNet encode different functional, co-expression, ontology-graph, pathway, and regulatory-network information.
|
| 94 |
|
| 95 |
+
### Summary of final mapping:
|
| 96 |
|
| 97 |
+
Source identifiers / source rows: 19,508
|
| 98 |
+
Dimensions: 256
|
| 99 |
+
Final mapped genes: 15,423
|
| 100 |
+
Master table rows: 20,097
|
| 101 |
+
Master coverage: 76.74%
|
| 102 |
+
Mapping strategy: strict Entrez mapping through enriched master table
|
| 103 |
+
Ambiguous Entrez IDs: excluded
|
| 104 |
+
Duplicate final mappings averaged: yes
|