mrunyan1 commited on
Commit
a2a6348
·
verified ·
1 Parent(s): 4e290f5

Add files using upload-large-folder tool

Browse files
HAEC185_sQTL_credible_sets_splaire_scores.tsv.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc64aebc14e50d75d69c0976545fe45573c79cf89e0ad2a990c390d26956b462
3
+ size 29976117
README.md CHANGED
@@ -1,3 +1,124 @@
1
  ---
2
  license: cc-by-4.0
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ task_categories:
4
+ - other
5
+ tags:
6
+ - splicing
7
+ - genomics
8
+ - sqtl
9
+ - variant-effect-prediction
10
  ---
11
+
12
+ # SPLAIRE scores for HAEC185 sQTL credible sets
13
+
14
+ SPLAIRE-ref and SPLAIRE-var variant effect predictions for all variants in the HAEC185 sQTL credible sets.
15
+
16
+ ## Files
17
+
18
+ - `HAEC185_sQTL_credible_sets_splaire_scores.tsv.gz` — per-credible-set-row summary (146,362 rows × 80 columns, 29 MB)
19
+ - `h5/cs_all.splaire.ref.h5` — full ref/alt per-position scores from SPLAIRE-ref (86,549 unique variants, 26 GB)
20
+ - `h5/cs_all.splaire.var.h5` — full ref/alt per-position scores from SPLAIRE-var (same variants, 26 GB)
21
+
22
+ The TSV is the summary used for most downstream analysis. The H5s hold the raw per-position score arrays the TSV is derived from — use them if you need scores at custom positions or other aggregations.
23
+
24
+ ## Source data
25
+
26
+ 146,362 variant-phenotype rows in the HAEC185 sQTL credible sets, deduplicated to 86,549 unique (variant, strand) pairs. Each pair scored with both SPLAIRE models. Input window 20,001 bp centered on each variant, 10,001 output positions covering ±5 kb.
27
+
28
+ ## Indel handling
29
+
30
+ Indels are scored by substituting the alt allele into the genomic sequence and adjusting the window length. After prediction, alt outputs are realigned to ref coordinates following the SpliceAI/Pangolin convention — insertions collapsed by max across extra positions, deletions padded with zeros.
31
+
32
+ ## H5 contents
33
+
34
+ Each H5 contains five datasets (variant at center index 5000 of the 10,001-position window):
35
+
36
+ | dataset | shape | dtype | meaning |
37
+ |---|---|---|---|
38
+ | `cls_ref` | (86549, 10001, 3) | float32 | classifier softmax (neither, acceptor, donor), ref allele |
39
+ | `cls_alt` | (86549, 10001, 3) | float32 | same, alt allele |
40
+ | `reg_ref` | (86549, 10001) | float32 | regression SSU (sigmoid, 0-1), ref allele |
41
+ | `reg_alt` | (86549, 10001) | float32 | same, alt allele |
42
+ | `var_key` | (86549,) | vlen UTF-8 string | variant identifier (`chr:pos:ref:alt`), sorted by (chrom, var_pos) |
43
+
44
+ Use `var_key` to align H5 rows back to `variant_id` in the TSV.
45
+
46
+ ## TSV columns
47
+
48
+ First 8 from the original credible sets file:
49
+
50
+ `gene`, `phenotype`, `ensembl_id`, `variant_id`, `credible_set_number`, `posterior_inclusion_probability`, `chr`, `strand`
51
+
52
+ 72 score columns, organized as:
53
+
54
+ ### Max/min delta per variant (36 columns)
55
+
56
+ For each model (`splaire`, `splaireVar`) and head (`don`, `acc`, `ssu`):
57
+
58
+ | column | meaning |
59
+ |---|---|
60
+ | `{model}_{head}_max_inc` | largest positive delta (alt − ref) in the 10 kb window |
61
+ | `{model}_{head}_max_inc_off` | offset from the variant (bp) |
62
+ | `{model}_{head}_max_inc_pos` | genomic coordinate of the max increase |
63
+ | `{model}_{head}_max_dec` | largest negative delta (alt − ref) |
64
+ | `{model}_{head}_max_dec_off` | offset from the variant (bp) |
65
+ | `{model}_{head}_max_dec_pos` | genomic coordinate of the max decrease |
66
+
67
+ ### Scores at intron coordinates (36 columns)
68
+
69
+ For each model, head, and leafcutter junction coordinate (`istart` = intron start, `iend` = intron end):
70
+
71
+ | column | meaning |
72
+ |---|---|
73
+ | `{model}_{head}_{coord}_ref` | ref score at this boundary |
74
+ | `{model}_{head}_{coord}_alt` | alt score at this boundary |
75
+ | `{model}_{head}_{coord}_delta` | alt − ref at this boundary |
76
+
77
+ Values are NaN when the intron boundary falls outside the ±5 kb scored window (~87% of rows).
78
+
79
+ ## Models
80
+
81
+ - `splaire` — SPLAIRE-ref, trained on reference genome sequences
82
+ - `splaireVar` — SPLAIRE-var, trained on sequences containing personal genetic variants
83
+
84
+ Each is a 5-fold ensemble of dilated CNNs. Predictions are averaged across folds.
85
+
86
+ ## Output heads
87
+
88
+ - `don` — donor splice site probability (classifier softmax index 2)
89
+ - `acc` — acceptor splice site probability (classifier softmax index 1)
90
+ - `ssu` — splice site usage (regression sigmoid, 0-1)
91
+
92
+ ## Usage
93
+
94
+ ```python
95
+ import pandas as pd
96
+ import h5py
97
+ from huggingface_hub import hf_hub_download
98
+
99
+ tsv = hf_hub_download(
100
+ repo_id="mrunyan1/splaire-haec-sqtl-credible-sets",
101
+ filename="HAEC185_sQTL_credible_sets_splaire_scores.tsv.gz",
102
+ repo_type="dataset",
103
+ )
104
+ df = pd.read_csv(tsv, sep="\t")
105
+ print(df.shape) # (146362, 80)
106
+
107
+ # load full per-position scores for one model
108
+ h5_path = hf_hub_download(
109
+ repo_id="mrunyan1/splaire-haec-sqtl-credible-sets",
110
+ filename="h5/cs_all.splaire.ref.h5",
111
+ repo_type="dataset",
112
+ )
113
+ with h5py.File(h5_path, "r") as f:
114
+ var_keys = f["var_key"][:]
115
+ cls = f["cls_ref"][0] # (10001, 3) softmax track for first variant
116
+ ssu = f["reg_ref"][0] # (10001,) SSU track for first variant
117
+ ```
118
+
119
+ ## Download
120
+
121
+ ```bash
122
+ pip install huggingface_hub
123
+ hf download --repo-type dataset mrunyan1/splaire-haec-sqtl-credible-sets
124
+ ```
h5/cs_all.splaire.ref.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62e277bcc9a214ccd722e8ae66b4b64b92ac18fcd6051bd84cbff180bd27c635
3
+ size 27703311856
h5/cs_all.splaire.var.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1345df3a1cbcab1ffb785e01c6c73040ce25dbad40272ecab2359a282ae3f94
3
+ size 27703311856
upload.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ """upload splaire-haec-sqtl-credible-sets to huggingface hub. resumable, parallel."""
3
+
4
+ from pathlib import Path
5
+ from huggingface_hub import HfApi, upload_large_folder
6
+
7
+ REPO_ID = "mrunyan1/splaire-haec-sqtl-credible-sets"
8
+ STAGING = Path("/scratch/runyan.m/hf_uploads/splaire-haec-sqtl-credible-sets")
9
+
10
+ api = HfApi()
11
+
12
+ # expects repo already created on the hub. uncomment to create:
13
+ # api.create_repo(repo_id=REPO_ID, repo_type="dataset", exist_ok=True, private=False)
14
+
15
+ # upload everything in STAGING. handles LFS automatically, resumable across retries
16
+ upload_large_folder(
17
+ folder_path=str(STAGING),
18
+ repo_id=REPO_ID,
19
+ repo_type="dataset",
20
+ num_workers=4,
21
+ print_report=True,
22
+ )
upload.sbatch ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ #SBATCH --job-name=hf_upload_sqtl_cs
3
+ #SBATCH --partition=short
4
+ #SBATCH --time=24:00:00
5
+ #SBATCH --nodes=1
6
+ #SBATCH --ntasks=1
7
+ #SBATCH --cpus-per-task=4
8
+ #SBATCH --mem=8G
9
+ #SBATCH --output=/scratch/runyan.m/logs/hf_upload_sqtl_cs_%j.out
10
+ #SBATCH --error=/scratch/runyan.m/logs/hf_upload_sqtl_cs_%j.err
11
+
12
+ set -e
13
+
14
+ cd /scratch/runyan.m/hf_uploads/splaire-haec-sqtl-credible-sets
15
+ /scratch/runyan.m/conda_envs/splaire_env/bin/python upload.py