danieltslz commited on
Commit
beac1c2
·
verified ·
1 Parent(s): 294d629

Update curated README documentation: data/embeddings/gtex_tissue_median_log1p_zscore/README.md

Browse files
data/embeddings/gtex_tissue_median_log1p_zscore/README.md CHANGED
@@ -1,40 +1,22 @@
1
- # GTEx-tissue-median-log1p-zscore-v1.1
2
 
3
- Embedding ID: `gtex_tissue_median_log1p_zscore`
4
-
5
- Former processing ID: `gtex_tissue_median_log1p_zscore_v1_1`
 
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: `19353 genes × 68 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
 
@@ -50,24 +32,68 @@ assert X.shape[0] == len(genes)
50
  | `source_ensembl_gene_id_versioned` | 19353 | 19353 | ENSG00000000003.16<br>ENSG00000000005.6<br>ENSG00000000419.14<br>ENSG00000000457.14 | Original versioned Ensembl gene identifier from the source. |
51
  | `source_gene_symbol` | 19353 | 19335 | TSPAN6<br>TNMD<br>DPM1<br>SCYL3 | Original gene symbol from the source before final mapping. |
52
 
53
- ## Basic metadata
54
 
55
- | Field | Value |
56
- |---|---|
57
- | `status` | processed_qc_passed |
58
- | `modality` | bulk RNA expression / normal tissue expression |
59
- | `embedding_name` | GTEx-tissue-median-log1p-zscore-v1.1 |
60
 
61
  ## Detailed processing notes
62
 
63
- TODO: manually paste and curate the processing explanation for this embedding from the central project README.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
- Please include, when relevant:
66
 
67
- - original source/model/checkpoint;
68
- - whether the embedding was downloaded or generated locally;
69
- - input data used;
70
- - identifier mapping and filtering decisions;
71
- - pooling, aggregation, PCA, or normalization method;
72
- - coverage and important caveats;
73
- - license or redistribution notes.
 
 
 
 
1
+ # Embedding name: GTEx-tissue-median-log1p-zscore
2
 
3
+ - Modality: Bulk RNA expression / normal tissue median expression
4
+ - Algorithm: Tissue-level expression feature vector
5
+ - Embedding source URL: Local processing from GTEx v11 median gene-level TPM GCT file
6
+ - Original model/code URL: Not applicable; source is a GTEx expression matrix
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: `19353 genes × 68 dimensions`
17
  - Dtype: `float32`
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
 
 
19
 
 
 
 
20
 
21
  ## genes.tsv columns
22
 
 
32
  | `source_ensembl_gene_id_versioned` | 19353 | 19353 | ENSG00000000003.16<br>ENSG00000000005.6<br>ENSG00000000419.14<br>ENSG00000000457.14 | Original versioned Ensembl gene identifier from the source. |
33
  | `source_gene_symbol` | 19353 | 19335 | TSPAN6<br>TNMD<br>DPM1<br>SCYL3 | Original gene symbol from the source before final mapping. |
34
 
 
35
 
 
 
 
 
 
36
 
37
  ## Detailed processing notes
38
 
39
+ ### Source and interpretation
40
+
41
+ This embedding is a gene-level normal-tissue expression representation derived from GTEx v11 median gene-level TPM values. It was generated locally from the GTEx median-tissue GCT file and mapped to master_gene_table.csv.
42
+
43
+ The source matrix contained median TPM values for 68 GTEx tissue columns. For each mapped gene, the 68 tissue median TPM values were transformed with log1p and then each tissue column was z-scored across mapped genes. The final vector therefore represents the relative normal-tissue expression profile of each gene across GTEx tissues.
44
+
45
+ This embedding should be interpreted as a tissue-interpretable bulk RNA expression embedding. Each dimension corresponds to one GTEx tissue column after log1p(TPM) and z-score normalization. It is not a learned neural embedding and it is not a PCA embedding.
46
+
47
+ ### Provenance fields
48
+
49
+ source_name: GTEx tissue median gene-level TPM
50
+ original_model_or_method: GTEx RNA-seq median tissue expression matrix
51
+ input_data_type: bulk RNA-seq median TPM by tissue
52
+ input_source_file: GTEx_Analysis_2025-08-22_v11_RNASeQCv2.4.3_gene_median_tpm.gct.gz
53
+ source_rows: 74,628
54
+ source_tissue_columns: 68
55
+ source_identifier_type: versioned Ensembl gene ID
56
+ mapping_identifier_type: stable Ensembl gene ID after removing version suffix
57
+ final_output_dimension: 68
58
+ transformation: log1p(TPM), then tissue-column z-score across mapped genes
59
+ dimensionality_reduction: none
60
+
61
+ ### Mapping and expression-processing decisions
62
+
63
+ The GTEx source gene identifiers were versioned Ensembl gene IDs. The version suffix was stripped to obtain stable Ensembl gene IDs, and these were matched directly to `ensembl_gene_id` in master_gene_table.csv.
64
+
65
+ Only master-table genes present in the GTEx source matrix were retained. GTEx rows that did not map to a master-table Ensembl gene were excluded.
66
+
67
+ PCA was intentionally not applied. The source matrix has only 68 tissue columns, so PCA256 is impossible. Keeping the native 68-dimensional tissue vector preserves direct tissue interpretability.
68
+
69
+ ### Processing workflow
70
+
71
+ For each gene in the GTEx source matrix:
72
+
73
+ 1. Read the GTEx v11 median gene-level TPM GCT file.
74
+ 2. Strip the version suffix from the GTEx Ensembl gene ID.
75
+ 3. Match the stable Ensembl gene ID to master_gene_table.csv.
76
+ 4. Keep only genes present in the master table.
77
+ 5. Extract the 68 tissue median TPM values.
78
+ 6. Apply log1p(TPM).
79
+ 7. Z-score each tissue column across mapped genes.
80
+ 8. Save the final matrix as float32.
81
+
82
+ ### Important implementation decisions
83
+
84
+ The native 68 tissue dimensions were retained instead of applying PCA. This keeps every dimension directly interpretable as a GTEx tissue expression feature.
85
+
86
+ The z-score transformation was applied tissue-wise across mapped genes, not gene-wise across tissues. This makes each tissue feature comparable across genes.
87
 
88
+ ### Summary of final mapping:
89
 
90
+ Source identifiers / GTEx source rows: 74,628
91
+ Dimensions: 68
92
+ Tissue columns: 68
93
+ Rows generated before duplicate collapse: 19,353
94
+ Unmapped source rows: 55,275
95
+ Ambiguous source rows: 0
96
+ Final mapped genes: 19,353
97
+ Master table rows: 20,097
98
+ Master coverage: 96.296%
99
+ Duplicate final mappings averaged: 0