Add curated DeepSEA per-embedding README
Browse files
data/embeddings/deepsea_tss_1kb_epigenomic_probs/README.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
-
# DeepSEA-TSS-1kb
|
| 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 |
|
|
@@ -17,24 +18,7 @@ Former processing ID: `deepsea_tss_1kb_epigenomic_probs_v1_1`
|
|
| 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 |
|
|
@@ -52,28 +36,73 @@ assert X.shape[0] == len(genes)
|
|
| 52 |
| `tss_1based` | 20097 | 20047 | 100639991<br>100584936<br>50959140<br>169894267 | Transcription start site coordinate in 1-based coordinates. |
|
| 53 |
| `bed_start_0based` | 20097 | 20047 | 100639490<br>100584435<br>50958639<br>169893766 | BED-format interval start coordinate, 0-based. |
|
| 54 |
| `bed_end_0based` | 20097 | 20047 | 100640490<br>100585435<br>50959639<br>169894766 | BED-format interval end coordinate, half-open. |
|
| 55 |
-
| `bed_name` | 20097 | 20097 | ENSG00000000003
|
| 56 |
| `assembly` | 20097 | 1 | GRCh38 | Genome assembly used for coordinates. |
|
| 57 |
| `gencode_release` | 20097 | 1 | 49 | GENCODE release used for annotation. |
|
| 58 |
|
| 59 |
-
## Basic metadata
|
| 60 |
|
| 61 |
-
| Field | Value |
|
| 62 |
-
|---|---|
|
| 63 |
-
| `status` | processed_qc_passed |
|
| 64 |
-
| `modality` | regulatory DNA / promoter-TSS sequence model |
|
| 65 |
-
| `embedding_name` | DeepSEA-TSS-1kb-epigenomic-probabilities-zscore-v1.1 |
|
| 66 |
|
| 67 |
## Detailed processing notes
|
| 68 |
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
-
-
|
| 74 |
-
- whether the embedding was downloaded or generated locally;
|
| 75 |
-
- input data used;
|
| 76 |
-
- identifier mapping and filtering decisions;
|
| 77 |
-
- pooling, aggregation, PCA, or normalization method;
|
| 78 |
-
- coverage and important caveats;
|
| 79 |
-
- license or redistribution notes.
|
|
|
|
| 1 |
+
# Embedding name: DeepSEA-TSS-1kb epigenomic probabilities
|
| 2 |
|
| 3 |
+
- Modality: Regulatory DNA / TSS epigenomic prediction profile
|
| 4 |
+
- Algorithm: Deep convolutional sequence-to-function model
|
| 5 |
+
- Source used here: Local inference with Kipoi DeepSEA/predict
|
| 6 |
+
- Embedding source URL: Local generation from master_gene_table.csv TSS windows
|
| 7 |
+
- Original model/code URL: https://kipoi.org/models/DeepSEA/predict/
|
| 8 |
|
| 9 |
## Public files
|
| 10 |
|
| 11 |
- `embeddings.npz`: compressed NumPy archive containing the embedding matrix under key `embeddings`.
|
| 12 |
- `genes.tsv`: row metadata table. Row order matches the embedding matrix.
|
| 13 |
- `metadata.json`: machine-readable provenance and processing metadata.
|
|
|
|
| 14 |
|
| 15 |
## Matrix
|
| 16 |
|
|
|
|
| 18 |
- Dtype: `float32`
|
| 19 |
- NPZ array key: `embeddings`
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
## genes.tsv columns
|
| 24 |
|
|
|
|
| 36 |
| `tss_1based` | 20097 | 20047 | 100639991<br>100584936<br>50959140<br>169894267 | Transcription start site coordinate in 1-based coordinates. |
|
| 37 |
| `bed_start_0based` | 20097 | 20047 | 100639490<br>100584435<br>50958639<br>169893766 | BED-format interval start coordinate, 0-based. |
|
| 38 |
| `bed_end_0based` | 20097 | 20047 | 100640490<br>100585435<br>50959639<br>169894766 | BED-format interval end coordinate, half-open. |
|
| 39 |
+
| `bed_name` | 20097 | 20097 | ENSG00000000003|TSPAN6<br>ENSG00000000005|TNMD<br>ENSG00000000419|DPM1<br>ENSG00000000457|SCYL3 | BED interval name. |
|
| 40 |
| `assembly` | 20097 | 1 | GRCh38 | Genome assembly used for coordinates. |
|
| 41 |
| `gencode_release` | 20097 | 1 | 49 | GENCODE release used for annotation. |
|
| 42 |
|
|
|
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
## Detailed processing notes
|
| 46 |
|
| 47 |
+
### Source and interpretation
|
| 48 |
+
|
| 49 |
+
This embedding is a gene-level regulatory DNA representation derived from DeepSEA predictions around each gene transcription start site. In this project, it was generated locally from master-table GRCh38 gene coordinates and reference-genome TSS windows. It was not downloaded as a ready gene-level embedding table.
|
| 50 |
+
|
| 51 |
+
The model used was Kipoi DeepSEA/predict. For each gene, a 1,000 bp window centered on the transcription start site was generated from the GRCh38 reference genome. DeepSEA produced 919 epigenomic prediction probabilities per gene. These raw probabilities were then z-scored dimension-wise across genes to create the final embedding matrix.
|
| 52 |
+
|
| 53 |
+
This embedding should therefore be interpreted as a local promoter/TSS regulatory prediction embedding. It captures predicted chromatin, transcription-factor, and DNase-style epigenomic activity around the TSS. It is complementary to CDS or protein-sequence embeddings because it represents regulatory sequence context rather than coding sequence or amino acid sequence.
|
| 54 |
+
|
| 55 |
+
### Provenance fields
|
| 56 |
+
|
| 57 |
+
source_name: DeepSEA / Kipoi DeepSEA-predict
|
| 58 |
+
original_model_or_method: DeepSEA sequence-to-function model
|
| 59 |
+
embedding_generated_by: Daniel locally
|
| 60 |
+
input_sequence_type: regulatory DNA sequence
|
| 61 |
+
input_sequence_source: GRCh38 primary assembly FASTA and master_gene_table.csv TSS coordinates
|
| 62 |
+
genome_build: GRCh38
|
| 63 |
+
annotation_reference: GENCODE release 49 where annotation was needed
|
| 64 |
+
model_interface: Kipoi DeepSEA/predict
|
| 65 |
+
input_window: 1,000 bp centered on gene TSS
|
| 66 |
+
raw_model_output: 919 DeepSEA epigenomic probabilities per gene
|
| 67 |
+
final_transformation: dimension-wise z-score of raw probabilities across genes
|
| 68 |
+
|
| 69 |
+
### Coordinate and sequence decisions
|
| 70 |
+
|
| 71 |
+
The source coordinates came from master_gene_table.csv. For plus-strand genes, the TSS was defined as gene_start. For minus-strand genes, the TSS was defined as gene_end. A 1,000 bp interval centered on this TSS was generated for each master-table gene.
|
| 72 |
+
|
| 73 |
+
Sequences were run in genomic reference orientation. They were not reverse-complemented by gene strand. Boundary windows were N-padded if needed. This means the embedding represents local reference-genome regulatory sequence context around the TSS, not transcript-oriented sequence.
|
| 74 |
+
|
| 75 |
+
### Processing workflow
|
| 76 |
+
|
| 77 |
+
For each gene in the master table:
|
| 78 |
+
|
| 79 |
+
1. Read gene coordinates and strand from master_gene_table.csv.
|
| 80 |
+
2. Define the TSS using gene_start for plus-strand genes and gene_end for minus-strand genes.
|
| 81 |
+
3. Build a 1,000 bp BED3 window centered on the TSS.
|
| 82 |
+
4. Extract the corresponding GRCh38 reference sequence.
|
| 83 |
+
5. Run Kipoi DeepSEA/predict with ignore_targets=True and use_strand=False.
|
| 84 |
+
6. Collect the 919 raw DeepSEA epigenomic probabilities.
|
| 85 |
+
7. Z-score each of the 919 probability dimensions across genes.
|
| 86 |
+
8. Save the final matrix as float32.
|
| 87 |
+
|
| 88 |
+
### Important implementation decision
|
| 89 |
+
|
| 90 |
+
The BED file passed to Kipoi DeepSEA was BED3 only: chrom, start, end. Additional BED columns were intentionally avoided because Kipoi interprets them as label columns and can fail during numeric conversion.
|
| 91 |
+
|
| 92 |
+
### Final QC summary
|
| 93 |
+
|
| 94 |
+
Status: processed_qc_passed
|
| 95 |
+
Master rows: 20,097
|
| 96 |
+
Valid TSS windows: 20,097
|
| 97 |
+
Skipped TSS windows: 0
|
| 98 |
+
Raw probability matrix: 20,097 x 919, float32, finite
|
| 99 |
+
Raw probability min: 6.067958580047161e-09
|
| 100 |
+
Raw probability max: 0.9992761015892029
|
| 101 |
+
Final embedding matrix: 20,097 x 919, float32, finite
|
| 102 |
+
Master coverage: 100.00%
|
| 103 |
+
|
| 104 |
+
### Caveats
|
| 105 |
|
| 106 |
+
This embedding has complete master-table coverage for the 20,097 protein-coding master rows. However, it should be interpreted specifically as a 1 kb TSS-centered regulatory prediction profile. It does not represent long-range regulatory context, full gene-body DNA sequence, mature transcript sequence, protein sequence, expression, or single-cell context.
|
| 107 |
|
| 108 |
+
For long-range regulatory comparisons, compare this embedding with Enformer-TSS-393kb-human-central3 and Basenji2-TSS-131kb-human-central3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|