text stringlengths 0 80 |
|---|
================================================================================ |
gene_pooled_embeddings.npz — AlphaGenome gene-level DNA embeddings (pooled) |
================================================================================ |
WHAT THIS FILE IS |
----------------- |
One row per gene: AlphaGenome sequence embeddings (128 bp windows, 3072 dims) |
were averaged over all windows L_i for that gene (mean pooling along the |
sequence). Model / layer match the raw shards (see SHARD_KEYS_AND_SAMPLE.md). |
File: gene_pooled_embeddings.npz (NumPy compressed archive, ~500+ MB) |
WHO HAS WHICH GENES |
------------------- |
Rows are protein_coding and lncRNA genes from the filtered AlphaGenome run |
(54,901 genes in the version built with default pooling). Each gene_id appears |
once (unique Ensembl IDs with version, e.g. ENSG00000000003.14). |
CONTENTS (keys inside the .npz) |
-------------------------------- |
pooled (G, 3072) float32 main matrix — one vector per gene |
gene_ids (G,) str unique Ensembl gene ID (versioned) |
gene_symbols (G,) str HGNC symbol (not globally unique) |
gene_types (G,) str e.g. protein_coding, lncRNA |
chroms (G,) str |
starts (G,) str genomic coordinates (as stored in shards) |
ends (G,) str |
strands (G,) str + or - |
seq_lengths (G,) int32 input DNA length in bp |
G = number of genes. Row index i is consistent across all arrays. |
HOW TO LOAD IN PYTHON |
--------------------- |
import numpy as np |
path = "gene_pooled_embeddings.npz" # or full path on cluster |
data = np.load(path, allow_pickle=True) |
X = data["pooled"] # (G, 3072) float32 |
ids = data["gene_ids"] # use for joins; compare as str(id) |
# Example: map Ensembl -> row index |
id_to_row = {str(g): i for i, g in enumerate(data["gene_ids"])} |
data.close() # optional; good practice with np.load |
Note: allow_pickle=True is required because string columns are stored as |
numpy object arrays. |
JOINING WITH OTHER TABLES |
------------------------- |
- Match on gene_ids as strings (same version string as in GTF/FASTA metadata). |
- gene_symbols can repeat across genes; prefer gene_ids for unique keys. |
REGENERATING OR OTHER POOL MODES |
-------------------------------- |
Script: pool_embeddings.py (same directory) |
- Default pool mode: mean -> (G, 3072) |
- Other modes: max, cls, first window, last window, mean+max -> (G, 6144) |
Batch job example (repo root): pool_alphagenome_embeddings.slurm |
Raw per-window embeddings (much larger) live in shard_*_of_005.npz or |
alphagenome_shards_and_doc.tar — see SHARD_KEYS_AND_SAMPLE.md. |
QUESTIONS |
--------- |
See SHARD_KEYS_AND_SAMPLE.md for raw shard layout and embedding geometry |
(L_i = ceil(seq_length / 128) windows per gene). |
================================================================================ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.