gabrielaltay commited on
Commit
0523eb7
·
verified ·
1 Parent(s): c334e9e

Add TCGA-LUAD (585 patients) + full GDC dictionary-derived schema + TcgaHfPatient pydantic reference impl + dictionary version capture

Browse files
README.md CHANGED
@@ -17,6 +17,10 @@ configs:
17
  data_files:
18
  - split: train
19
  path: TCGA-DLBC/*.parquet
 
 
 
 
20
  ---
21
 
22
  # TCGA Patients (Open Access)
@@ -24,9 +28,13 @@ configs:
24
  **Open-access** TCGA patient data from the NCI Genomic Data Commons (GDC).
25
  One HuggingFace subset per TCGA project; one row per patient.
26
 
27
- - **Projects included:** `TCGA-CHOL`, `TCGA-DLBC`
28
- - **Generated:** 2026-05-04 03:21:55 UTC
29
  - **Source:** NCI GDC `/cases` endpoint, open-access tier only.
 
 
 
 
30
  - **GDC data release:** Data Release 45.0 - December 04, 2025
31
 
32
  ## GDC data model primer
@@ -46,36 +54,30 @@ case one patient (TCGA-XX-1234)
46
  └── aliquot a vial of that analyte handed off for sequencing
47
  ```
48
 
49
- In this dataset we **flatten portions and analytes away**, since they're
50
- mostly physical-prep grouping. Each row's `samples` field is `list<sample>`,
51
- and each sample carries an `aliquots` list directly. The DNA/RNA distinction
52
- is preserved on each aliquot via the `analyte_type` field (hoisted from the
53
- parent analyte).
54
-
55
- **Tumor vs normal.** Somatic variant calling (e.g. open-access MAFs) compares
56
- a **tumor sample** against a matched **normal sample** from the same patient
57
- to identify mutations acquired by the tumor. The normal usually comes from
58
- blood (`Blood Derived Normal`) or adjacent healthy tissue (`Solid Tissue
59
- Normal`). Each variant carries the aliquot UUIDs of both members of the pair.
60
-
61
- **Sample types** you will see in this dataset:
62
- - `Primary Tumor` the index tumor at diagnosis
63
- - `Solid Tissue Normal` adjacent histologically normal tissue
64
- - `Blood Derived Normal` — the patient's matched blood
65
- - `Bone Marrow Normal`, `Recurrent Tumor`, `Metastatic`, ... (less common in TCGA)
66
-
67
- **Analyte types** drive what assays an aliquot supports:
68
- - `DNA` aliquots → WXS / WGS / methylation array / SNP array
69
- - `RNA` aliquots RNA-Seq / miRNA-Seq
70
-
71
- **GDC file taxonomy** (used to identify what's in each `samples_*` column):
72
- - `data_category`: the broad bucket (e.g. *Simple Nucleotide Variation*,
73
- *Transcriptome Profiling*).
74
- - `data_type`: the specific data product (e.g. *Masked Somatic Mutation*,
75
- *Gene Expression Quantification*). **Our top-level molecular columns are
76
- named `samples_<data_type_snake_case>`** so the source product is
77
- unambiguous.
78
- - `experimental_strategy`: the underlying assay (e.g. *WXS*, *RNA-Seq*).
79
 
80
  **Reference Python implementation:** the `tcga2hf` package on GitHub ships a
81
  fully-typed pydantic `TcgaHfPatient` model that mirrors this schema and adds
 
17
  data_files:
18
  - split: train
19
  path: TCGA-DLBC/*.parquet
20
+ - config_name: TCGA-LUAD
21
+ data_files:
22
+ - split: train
23
+ path: TCGA-LUAD/*.parquet
24
  ---
25
 
26
  # TCGA Patients (Open Access)
 
28
  **Open-access** TCGA patient data from the NCI Genomic Data Commons (GDC).
29
  One HuggingFace subset per TCGA project; one row per patient.
30
 
31
+ - **Projects included:** `TCGA-CHOL`, `TCGA-DLBC`, `TCGA-LUAD`
32
+ - **Generated:** 2026-05-04 05:19:32 UTC
33
  - **Source:** NCI GDC `/cases` endpoint, open-access tier only.
34
+ - **Schema:** derived from the [GDC Data Dictionary][gdc-dict]; the live
35
+ dictionary snapshot the GDC was serving when the data was fetched is
36
+ hashed into each project's `gdc_status.json` (and stored alongside the raw
37
+ data on the producer side, not shipped with the parquet).
38
  - **GDC data release:** Data Release 45.0 - December 04, 2025
39
 
40
  ## GDC data model primer
 
54
  └── aliquot a vial of that analyte handed off for sequencing
55
  ```
56
 
57
+ We preserve this hierarchy verbatim each `samples[i]` carries
58
+ `portions[j].analytes[k].aliquots[m]` exactly as the GDC returns it. No
59
+ flattening, no field hoisting; portion- and analyte-level fields like
60
+ `is_ffpe`, `a260_a280_ratio`, and `normal_tumor_genotype_snp_match` are
61
+ preserved. The `TcgaHfPatient` reference implementation (below) provides
62
+ flat-aliquot convenience views over this tree.
63
+
64
+ **Top-level molecular columns** are named `samples_<gdc_data_type_snake_case>`
65
+ (e.g. `samples_masked_somatic_mutation`, `samples_gene_expression_quantification`).
66
+ Each entry carries FK fields back to the patient's `samples[].portions[].analytes[].aliquots[]`
67
+ so cross-modality joins are local to the row.
68
+
69
+ **Timeline anchor is uniform per the GDC dictionary.** Every `days_to_*` field
70
+ is documented as days from the case's `index_date` (a top-level field on each
71
+ row; for TCGA usually `"Diagnosis"`). `TcgaHfPatient.timeline()` returns every
72
+ dated event for the patient on this single anchor — clinical (consent →
73
+ diagnosis treatments follow-ups lost-to-follow-up death) plus
74
+ biospecimen (`sample_procurement` from `days_to_sample_procurement`,
75
+ `bcr_receipt` from `days_to_collection`).
76
+
77
+ For some TCGA cases `days_to_collection` exceeds `days_to_death`. We don't
78
+ attempt to reinterpret these — we surface the count via
79
+ `TcgaHfPatient.consistency_check()` as `bcr_receipts_after_death` and leave
80
+ interpretation to the consumer.
 
 
 
 
 
 
81
 
82
  **Reference Python implementation:** the `tcga2hf` package on GitHub ships a
83
  fully-typed pydantic `TcgaHfPatient` model that mirrors this schema and adds
TCGA-CHOL/train.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b261c92f2a1d02c1412cbb1b9fdc381c8a9c9e0e4967ee93f1547f1b8702da1f
3
- size 51303188
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7aabe3f746dfc5d79f895443e98ad06bad6955119ed8ea3c6608f5ffd749f7a1
3
+ size 51390111
TCGA-DLBC/train.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c08c0c1eaae44aa1fc0de45a6c6002b1f99a0ebdfe321081176eea16afc92002
3
- size 57772197
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99dc3160cd608ebfb06b266d95be670301e9fd13cc461a7c5fc75d22b777e67d
3
+ size 57869184
TCGA-LUAD/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84c5a93057d09405d95a11a442b4ba00ba444a6c1b22e68db1bdb65fe2fd6e46
3
+ size 788972385