Add TF isoform benign control variants
Browse files- .gitattributes +5 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/README.md +55 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/parse_hgvs_protein_example.py +38 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.csv +3 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.fasta +3 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.hgvs_parse_validation.csv +0 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.isoform_summary.csv +0 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.metadata_only.csv +3 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.natural_evidence_only.csv +3 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.natural_evidence_only.metadata_only.csv +0 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.sequences.json +3 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.summary.json +54 -0
- processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.vocab.json +0 -0
.gitattributes
CHANGED
|
@@ -6137,3 +6137,8 @@ data/raw/perturbqa_zero_shot/K562/ReplogleWeissman2022_K562_gwps.h5ad filter=lfs
|
|
| 6137 |
data/raw/perturbqa_zero_shot/RPE1/ReplogleWeissman2022_rpe1.h5ad filter=lfs diff=lfs merge=lfs -text
|
| 6138 |
raw_sources/joung_tfatlas/published_h5ad/GSE217460_210322_TFAtlas_subsample_raw_csr.h5ad filter=lfs diff=lfs merge=lfs -text
|
| 6139 |
processed/TFAtlas_subsample_raw_csr_scarf.h5ad filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6137 |
data/raw/perturbqa_zero_shot/RPE1/ReplogleWeissman2022_rpe1.h5ad filter=lfs diff=lfs merge=lfs -text
|
| 6138 |
raw_sources/joung_tfatlas/published_h5ad/GSE217460_210322_TFAtlas_subsample_raw_csr.h5ad filter=lfs diff=lfs merge=lfs -text
|
| 6139 |
processed/TFAtlas_subsample_raw_csr_scarf.h5ad filter=lfs diff=lfs merge=lfs -text
|
| 6140 |
+
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.csv filter=lfs diff=lfs merge=lfs -text
|
| 6141 |
+
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.fasta filter=lfs diff=lfs merge=lfs -text
|
| 6142 |
+
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.metadata_only.csv filter=lfs diff=lfs merge=lfs -text
|
| 6143 |
+
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.natural_evidence_only.csv filter=lfs diff=lfs merge=lfs -text
|
| 6144 |
+
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.sequences.json filter=lfs diff=lfs merge=lfs -text
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TF Isoform Benign/Control Variants, 10 Per Isoform
|
| 2 |
+
|
| 3 |
+
Generated: 2026-05-17
|
| 4 |
+
|
| 5 |
+
This folder contains 10 benign/control variant candidates for each non-control HopTF TF isoform in `PERTURBATION_METADATA_hard_local_subsample.csv`.
|
| 6 |
+
|
| 7 |
+
Natural evidence is used first:
|
| 8 |
+
|
| 9 |
+
1. Tier 1 ClinVar benign/likely benign exact isoform matches.
|
| 10 |
+
2. Tier 2 gnomAD v4.1 exome population-tolerated exact isoform matches.
|
| 11 |
+
3. Tier 3 MaveDB high-score functional-assay exact isoform matches.
|
| 12 |
+
|
| 13 |
+
Isoforms without 10 natural rows are filled with Tier 4 conservative synthetic fallback controls. These fallback rows are clearly marked with `synthetic_conservative_flag=True` and should not be described as clinical benign variants.
|
| 14 |
+
|
| 15 |
+
## Files
|
| 16 |
+
|
| 17 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.csv`: full table including WT and mutant protein sequences.
|
| 18 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.metadata_only.csv`: same metadata without sequence columns.
|
| 19 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.natural_evidence_only.csv`: natural-evidence rows only, including sequence columns.
|
| 20 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.natural_evidence_only.metadata_only.csv`: natural-evidence rows only, without sequence columns.
|
| 21 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.isoform_summary.csv`: per-isoform source coverage summary.
|
| 22 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.hgvs_parse_validation.csv`: HGVS protein parse and sequence round-trip validation.
|
| 23 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.fasta`: mutant protein sequences keyed by `variant_uid`.
|
| 24 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.vocab.json`: ordered `variant_uid` list.
|
| 25 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.sequences.json`: `variant_uid -> mutant_sequence` map.
|
| 26 |
+
- `parse_hgvs_protein_example.py`: minimal Biopython-based parser example.
|
| 27 |
+
- `tf_isoform_benign_controls_10_per_isoform_20260517.summary.json`: machine-readable summary.
|
| 28 |
+
|
| 29 |
+
## Counts
|
| 30 |
+
|
| 31 |
+
- Isoforms: 3264
|
| 32 |
+
- Variants per isoform: 10
|
| 33 |
+
- Total variants: 32640
|
| 34 |
+
- Natural evidence rows selected: 5889
|
| 35 |
+
- Conservative synthetic fallback rows selected: 26751
|
| 36 |
+
- Isoforms with at least one natural row: 717
|
| 37 |
+
- Isoforms with 10 natural rows: 435
|
| 38 |
+
- HGVS protein parser backend: biopython
|
| 39 |
+
- HGVS validation status counts: {'ok': 32640}
|
| 40 |
+
|
| 41 |
+
## HGVS Notation
|
| 42 |
+
|
| 43 |
+
`hgvs_p` and `hgvs_protein` use HGVS protein notation such as `p.Ala123Val`. `local_hgvs_p` prefixes that protein change with the HopTF `isoform_embedding_id`, for example `TFORF0001-HIF3A-HIF3A-1:p.Ala123Val`. The generator validates every `hgvs_p` entry by parsing the three-letter amino-acid codes, checking the one-based position, checking the WT sequence residue, and checking the mutant sequence residue.
|
| 44 |
+
|
| 45 |
+
`mutation` and `mutation_shorthand` store the same one-letter shorthand form, such as `A123V`, for quick filtering and display. Use the HGVS columns for anything that needs formal parsing.
|
| 46 |
+
|
| 47 |
+
Parsing example:
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
uv run python parse_hgvs_protein_example.py p.Arg339Gln
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
## Interpretation Caveat
|
| 54 |
+
|
| 55 |
+
This is an evidence-tiered benign/control set. Use `label_tier`, `evidence_source`, and the boolean evidence flags to stratify analyses. The safest paper language is `benign/control variants` or `putatively benign controls`, not `all molecularly neutral variants`.
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/parse_hgvs_protein_example.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Parse HopTF HGVS protein substitutions.
|
| 3 |
+
|
| 4 |
+
Example:
|
| 5 |
+
uv run python parse_hgvs_protein_example.py p.Arg339Gln
|
| 6 |
+
"""
|
| 7 |
+
|
| 8 |
+
from __future__ import annotations
|
| 9 |
+
|
| 10 |
+
import re
|
| 11 |
+
import sys
|
| 12 |
+
|
| 13 |
+
try:
|
| 14 |
+
from Bio.SeqUtils import seq1
|
| 15 |
+
except Exception as exc: # pragma: no cover
|
| 16 |
+
raise SystemExit("Biopython is required. Run with `uv run python ...` in the HopTF repo.") from exc
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
HGVS_P_RE = re.compile(r"^p\.([A-Z][a-z]{2})([0-9]+)([A-Z][a-z]{2})$")
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
def parse_hgvs_p(value: str) -> tuple[str, int, str]:
|
| 23 |
+
match = HGVS_P_RE.match(value.strip())
|
| 24 |
+
if not match:
|
| 25 |
+
raise ValueError(f"not a simple missense HGVS protein substitution: {value!r}")
|
| 26 |
+
ref3, pos, alt3 = match.groups()
|
| 27 |
+
return seq1(ref3), int(pos), seq1(alt3)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def main(argv: list[str]) -> int:
|
| 31 |
+
for value in argv[1:]:
|
| 32 |
+
ref, pos, alt = parse_hgvs_p(value)
|
| 33 |
+
print(f"{value}\t{ref}{pos}{alt}\tref={ref}\tposition={pos}\talt={alt}")
|
| 34 |
+
return 0
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
if __name__ == "__main__":
|
| 38 |
+
raise SystemExit(main(sys.argv))
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9ff272104e9f42178efec121a6c8f695dd6c5557893d27966e62b2f99343705
|
| 3 |
+
size 61324063
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.fasta
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5eb3f22ee6c2be87f8ce069cefb216e59a8987c96e6c7ef1c8144098c2e1cdcf
|
| 3 |
+
size 18036718
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.hgvs_parse_validation.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.isoform_summary.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.metadata_only.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca953a1a90b4975feac1f8786b1560a8cbee52ce0ef9f67419732da28d0bfdb8
|
| 3 |
+
size 28812638
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.natural_evidence_only.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8cc58187417b1bae50fbcab9ac3383d29a7010702277fae76c1299f030bbc3b6
|
| 3 |
+
size 12673072
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.natural_evidence_only.metadata_only.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.sequences.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd56465dc9694e839127a9ed2a145ffad9a48a969d46e7a9e73fe0d66601ccca
|
| 3 |
+
size 18078721
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.summary.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"answer": "Yes, with tiered evidence labels. Natural ClinVar/gnomAD/MaveDB controls are used first; remaining slots are filled with clearly labeled conservative synthetic fallback controls.",
|
| 3 |
+
"date": "2026-05-17",
|
| 4 |
+
"hgvs_parse_validation_status_counts": {
|
| 5 |
+
"ok": 32640
|
| 6 |
+
},
|
| 7 |
+
"hgvs_parser_backend": "biopython",
|
| 8 |
+
"isoforms_with_10_natural_rows": 435,
|
| 9 |
+
"isoforms_with_at_least_one_natural_row": 717,
|
| 10 |
+
"isoforms_with_exactly_requested_count": 3264,
|
| 11 |
+
"label_status_counts": {
|
| 12 |
+
"ambiguous": 16320,
|
| 13 |
+
"nonresponder": 8160,
|
| 14 |
+
"responder": 8160
|
| 15 |
+
},
|
| 16 |
+
"limitations": [
|
| 17 |
+
"Only ClinVar, gnomAD, and MaveDB rows are independent natural evidence. Synthetic fallback rows are conservative sequence controls, not clinical benign labels.",
|
| 18 |
+
"The synthetic fallback does not use MSA, AlphaFold, MTR/HMC, AlphaMissense, or ESM scoring. Those columns are present but left empty for future annotation.",
|
| 19 |
+
"Use label_tier/evidence_source to stratify analyses; do not pool all rows as equivalent molecularly neutral variants."
|
| 20 |
+
],
|
| 21 |
+
"metadata": "/home/dmeyer/HopTF/data/processed/linear_probe/tfatlas_subsample/PERTURBATION_METADATA_hard_local_subsample.csv",
|
| 22 |
+
"n_isoforms": 3264,
|
| 23 |
+
"n_variants": 32640,
|
| 24 |
+
"natural_selected_rows": 5889,
|
| 25 |
+
"outputs": {
|
| 26 |
+
"fasta": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.fasta",
|
| 27 |
+
"full_csv": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.csv",
|
| 28 |
+
"hgvs_parse_validation_csv": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.hgvs_parse_validation.csv",
|
| 29 |
+
"isoform_summary_csv": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.isoform_summary.csv",
|
| 30 |
+
"metadata_only_csv": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.metadata_only.csv",
|
| 31 |
+
"natural_evidence_only_csv": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.natural_evidence_only.csv",
|
| 32 |
+
"natural_evidence_only_metadata_csv": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.natural_evidence_only.metadata_only.csv",
|
| 33 |
+
"parser_helper": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/parse_hgvs_protein_example.py",
|
| 34 |
+
"readme": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/README.md",
|
| 35 |
+
"sequences_json": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.sequences.json",
|
| 36 |
+
"vocab_json": "/home/dmeyer/HopTF/data/processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.vocab.json"
|
| 37 |
+
},
|
| 38 |
+
"question": "Can we provide 10 benign/control variants for every local HopTF TF isoform?",
|
| 39 |
+
"source_files": {
|
| 40 |
+
"clinvar": "/home/dmeyer/HopTF/tmp/hoptf_variant_validation_expanded_20260516/variant_panel_locked_all_clinvar_uncapped.csv",
|
| 41 |
+
"gnomad": "/home/dmeyer/HopTF/tmp/hoptf_population_functional_controls_20260517/gnomad_population_tolerated_mapped_all.csv",
|
| 42 |
+
"mavedb": "/home/dmeyer/HopTF/tmp/hoptf_population_functional_controls_20260517/mavedb_functional_assay_locked_domain_annotated.csv"
|
| 43 |
+
},
|
| 44 |
+
"source_tier_counts": {
|
| 45 |
+
"Tier 1 clinical benign/control": 1817,
|
| 46 |
+
"Tier 2 population tolerated moderate": 1940,
|
| 47 |
+
"Tier 2 population tolerated strong": 2065,
|
| 48 |
+
"Tier 3 functional-assay high-score control": 67,
|
| 49 |
+
"Tier 4 conservative synthetic fallback": 26751
|
| 50 |
+
},
|
| 51 |
+
"status": "ok",
|
| 52 |
+
"synthetic_fallback_rows": 26751,
|
| 53 |
+
"variants_per_isoform": 10
|
| 54 |
+
}
|
processed/variant_controls/tf_isoform_benign_controls_10_per_isoform_20260517/tf_isoform_benign_controls_10_per_isoform_20260517.vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|