Update curated literature and coexpression README documentation: data/embeddings/bioconceptvec_fasttext/README.md
Browse files
data/embeddings/bioconceptvec_fasttext/README.md
CHANGED
|
@@ -1,40 +1,22 @@
|
|
| 1 |
-
# BioConceptVec-fastText
|
| 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: `
|
| 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 |
|
|
@@ -49,27 +31,63 @@ assert X.shape[0] == len(genes)
|
|
| 49 |
| `canonical_protein_id` | 17040 | 17040 | ENSP00000362111<br>ENSP00000362122<br>ENSP00000360644<br>ENSP00000356745 | Canonical protein identifier recorded or used for this gene. |
|
| 50 |
| `source_embedding` | 17040 | 1 | BioConceptVec-fastText-v1.1 | Name of the original source embedding. |
|
| 51 |
| `source_identifier_type` | 17040 | 1 | entrez_id | Type of source identifier used by the original embedding. |
|
| 52 |
-
| `source_key_count` | 17040 | 2 | 1<br>2 | Number of source
|
| 53 |
-
| `source_keys_examples` | 17040 | 17040 | Gene_7105<br>Gene_64102<br>Gene_8813<br>Gene_57147 | Example source
|
| 54 |
-
| `mapping_methods` | 17040 | 1 | entrez_id_from_map_entrez_ids_all | Mapping methods used to connect source
|
| 55 |
|
| 56 |
-
## Basic metadata
|
| 57 |
|
| 58 |
-
| Field | Value |
|
| 59 |
-
|---|---|
|
| 60 |
-
| `modality` | biomedical_literature_text |
|
| 61 |
-
| `embedding_name` | BioConceptVec-fastText-v1.1 |
|
| 62 |
|
| 63 |
## Detailed processing notes
|
| 64 |
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
-
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
| 1 |
+
# Embedding name: BioConceptVec-fastText
|
| 2 |
|
| 3 |
+
- Modality: Biomedical literature / text
|
| 4 |
+
- Algorithm: BioConceptVec fastText Gene_<Entrez> concept vectors standardized by strict Entrez mapping
|
| 5 |
+
- Embedding source URL: https://github.com/ncbi/BioConceptVec
|
| 6 |
+
- Original model/code URL: https://github.com/ncbi/BioConceptVec
|
| 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: `17,040 genes × 100 dimensions`
|
| 17 |
- Dtype: `float32`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
## genes.tsv columns
|
| 22 |
|
|
|
|
| 31 |
| `canonical_protein_id` | 17040 | 17040 | ENSP00000362111<br>ENSP00000362122<br>ENSP00000360644<br>ENSP00000356745 | Canonical protein identifier recorded or used for this gene. |
|
| 32 |
| `source_embedding` | 17040 | 1 | BioConceptVec-fastText-v1.1 | Name of the original source embedding. |
|
| 33 |
| `source_identifier_type` | 17040 | 1 | entrez_id | Type of source identifier used by the original embedding. |
|
| 34 |
+
| `source_key_count` | 17040 | 2 | 1<br>2 | Number of source identifiers mapped or collapsed to this final master-table gene. |
|
| 35 |
+
| `source_keys_examples` | 17040 | 17040 | Gene_7105<br>Gene_64102<br>Gene_8813<br>Gene_57147 | Example source identifiers mapped to this final master-table gene. |
|
| 36 |
+
| `mapping_methods` | 17040 | 1 | entrez_id_from_map_entrez_ids_all | Mapping methods used to connect source identifiers to the master gene table. |
|
| 37 |
|
|
|
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
## Detailed processing notes
|
| 41 |
|
| 42 |
+
### Source and interpretation
|
| 43 |
+
|
| 44 |
+
This embedding represents BioConceptVec gene concepts using the fastText training variant.
|
| 45 |
+
|
| 46 |
+
The raw vectors were not regenerated locally for this README update. The local work here was identifier cleaning, mapping to the shared master_gene_table.csv gene universe, duplicate handling, QC, and conversion into the shared public resource format.
|
| 47 |
+
|
| 48 |
+
### Provenance fields
|
| 49 |
+
|
| 50 |
+
source_name: BioConceptVec-fastText
|
| 51 |
+
original_model_or_method: BioConceptVec-fastText
|
| 52 |
+
input_data_type: BioConceptVec concept JSON
|
| 53 |
+
raw_source: ~/data/raw_embeddings/bioconceptvec/concept_fast.json
|
| 54 |
+
processing_script: ~/scripts/process_embeddings/process_bioconceptvec_fasttext_v1_1.py
|
| 55 |
+
source_download_page: https://github.com/ncbi/BioConceptVec
|
| 56 |
+
source_code_page: https://github.com/ncbi/BioConceptVec
|
| 57 |
+
source_identifier_type: Gene_<Entrez> concept key
|
| 58 |
+
mapping_identifier_type: strict single-Entrez mapping to master_gene_table.csv
|
| 59 |
+
source_rows_or_entries: 402,712 total concepts; 126,751 single-Entrez gene concepts
|
| 60 |
+
final_mapped_genes: 17,040
|
| 61 |
+
model_or_feature_dimension: 100
|
| 62 |
+
training_or_finetuning: none
|
| 63 |
+
final_embedding_dtype: float32
|
| 64 |
+
|
| 65 |
+
### Mapping and processing decisions
|
| 66 |
+
|
| 67 |
+
The same strict single-Entrez mapping rule as BioConceptVec-CBOW was used.
|
| 68 |
+
|
| 69 |
+
### Processing workflow
|
| 70 |
+
|
| 71 |
+
For this embedding:
|
| 72 |
+
|
| 73 |
+
1. Read concept_fast.json.
|
| 74 |
+
2. Parse the source identifiers.
|
| 75 |
+
3. Map source identifiers to master_gene_table.csv using the project mapping rule for this identifier type.
|
| 76 |
+
4. Exclude unmapped and ambiguous source identifiers.
|
| 77 |
+
5. Average duplicate source rows only when they map to the same final master-table gene.
|
| 78 |
+
6. Save the final matrix as float32.
|
| 79 |
+
|
| 80 |
+
### Important implementation decisions
|
| 81 |
+
|
| 82 |
+
This README describes the standardized gene-level version included in the public resource. The source vectors were kept as released or previously generated in the project, while the mapping and QC were made consistent with the rest of the v1.1 embedding library.
|
| 83 |
|
| 84 |
+
### Summary of final mapping:
|
| 85 |
|
| 86 |
+
Source identifiers / source rows or entries: 402,712 total concepts; 126,751 single-Entrez gene concepts
|
| 87 |
+
Dimensions: 100
|
| 88 |
+
Final mapped genes: 17,040
|
| 89 |
+
Master table rows: 20,097
|
| 90 |
+
Master coverage: 84.79%
|
| 91 |
+
Mapping strategy: strict single-Entrez mapping to master_gene_table.csv
|
| 92 |
+
Ambiguous identifiers: excluded
|
| 93 |
+
Duplicate final mappings averaged: yes
|