Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 5 new columns ({'split', 'study', 'label', 'n_fragments', 'sample_id'}) and 2 missing columns ({'bytes', 'md5'}).

This happened while the csv dataset builder was generating data using

hf://datasets/jing-z/leaf1-pretraining-cfdna/samples.tsv (at revision a24b75fccf9dd25ff864c78950b33138bb50e671), ['hf://datasets/jing-z/leaf1-pretraining-cfdna@a24b75fccf9dd25ff864c78950b33138bb50e671/checksums.tsv', 'hf://datasets/jing-z/leaf1-pretraining-cfdna@a24b75fccf9dd25ff864c78950b33138bb50e671/samples.tsv']

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1848, in _prepare_split_single
                  writer.write_table(table)
                  ~~~~~~~~~~~~~~~~~~^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 784, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                  ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 795, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              sample_id: string
              file: string
              study: string
              label: string
              split: string
              n_fragments: int64
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 955
              to
              {'file': Value('string'), 'md5': Value('string'), 'bytes': Value('int64')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1694, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1850, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
                  ...<4 lines>...
                  )
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 5 new columns ({'split', 'study', 'label', 'n_fragments', 'sample_id'}) and 2 missing columns ({'bytes', 'md5'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/jing-z/leaf1-pretraining-cfdna/samples.tsv (at revision a24b75fccf9dd25ff864c78950b33138bb50e671), ['hf://datasets/jing-z/leaf1-pretraining-cfdna@a24b75fccf9dd25ff864c78950b33138bb50e671/checksums.tsv', 'hf://datasets/jing-z/leaf1-pretraining-cfdna@a24b75fccf9dd25ff864c78950b33138bb50e671/samples.tsv']
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

file
string
md5
string
bytes
int64
EE85723.hg38.frag_filtered.bed.gz
9bab1d4a7cf12e8caeb2a9078cf7e602
62,233,325
EE85724.hg38.frag_filtered.bed.gz
4f78ea907a269bd2fde1bc9c0a6b3ea1
86,087,053
EE85725.hg38.frag_filtered.bed.gz
f3e320733034225bd9a8d9c21b65e39a
131,336,130
EE85726.hg38.frag_filtered.bed.gz
f2c6b46f944eec402f5dcacfb15d333a
97,419,964
EE85727.hg38.frag_filtered.bed.gz
393f5e9d537da2ae7f022443c77fd125
55,513,153
EE85728.hg38.frag_filtered.bed.gz
6a5a0462ba06c554e7f001ce748a12b0
149,865,898
EE85729.hg38.frag_filtered.bed.gz
cc7aa51f7ef5f01e5753951801c1d047
105,879,045
EE85730.hg38.frag_filtered.bed.gz
4572b6e696bb3dde7c08a1a238f3bff7
147,381,013
EE85731.hg38.frag_filtered.bed.gz
c70cb3c98b7009b30eadcd9ab6ff8111
63,472,117
EE85732.hg38.frag_filtered.bed.gz
f6a2eaf36f3603d1a2433ffa0b5f8bd2
98,353,778
EE85733.hg38.frag_filtered.bed.gz
7313d8f8898a8c60e24403ca3df7ebf5
48,830,791
EE85734.hg38.frag_filtered.bed.gz
c312a4efe3efbc83ad1b804d38c7d85c
28,912,875
EE85735.hg38.frag_filtered.bed.gz
f1f8a27901b835991fbf3e5c6dab2213
128,365,418
EE85736.hg38.frag_filtered.bed.gz
6449b2f33f2ad5035929bab5f0ce4812
150,009,228
EE85737.hg38.frag_filtered.bed.gz
5df949eb2696972e786dab3d4c834697
46,684,456
EE85738.hg38.frag_filtered.bed.gz
ca62766d232353ee76cccc5cb6300ef3
117,381,073
EE85739.hg38.frag_filtered.bed.gz
4017bd092fe7f255f1ac35b2f3ee6ec6
16,915,731
EE85740.hg38.frag_filtered.bed.gz
8952a7e462c0120acc00d0fabc13320e
164,512,821
EE85741.hg38.frag_filtered.bed.gz
df315321d130199e9ec5687f1d737b87
61,034,463
EE85742.hg38.frag_filtered.bed.gz
fa0ac4fd5ee58015fba2634a5634271e
111,736,682
EE85743.hg38.frag_filtered.bed.gz
84f657acea55148858f0c8486b7f57ab
46,753,316
EE85744.hg38.frag_filtered.bed.gz
c15f82a8b91489dc2400ffa0fda8ff3f
129,907,311
EE85745.hg38.frag_filtered.bed.gz
f179a8236ec8c5ab2950c089f0dbe39e
150,160,506
EE85746.hg38.frag_filtered.bed.gz
9c21246b0baced42059df5483e36fec6
53,432,624
EE85747.hg38.frag_filtered.bed.gz
1a79ec3f82428e4b060804ba21fcf1f0
141,631,288
EE85748.hg38.frag_filtered.bed.gz
e4e364bfcaa05456d95cf139124b165e
139,284,676
EE85749.hg38.frag_filtered.bed.gz
704bd0f59378498924c890b9d4f10408
93,491,377
EE85750.hg38.frag_filtered.bed.gz
83bde0b51c53b0b99604646fdbdb3d76
59,078,597
EE85751.hg38.frag_filtered.bed.gz
0bc18713bfed08278da92571488a31cf
115,587,593
EE85752.hg38.frag_filtered.bed.gz
1cfb8f00e2e3bf0967cc4fba282d2c28
53,417,082
EE85753.hg38.frag_filtered.bed.gz
8b2f08f95a7e8ac87699e1b30ea28bc8
40,592,342
EE85754.hg38.frag_filtered.bed.gz
7821e0865fe6a01e26a44c82372e7b2e
211,042,382
EE85755.hg38.frag_filtered.bed.gz
83158a4d0581aff1765f79450620299a
144,742,736
EE85756.hg38.frag_filtered.bed.gz
54555c5e8e89698317f00a69b0ab3982
229,833,198
EE85757.hg38.frag_filtered.bed.gz
17360eb9e52672299baefa5b342f6052
172,208,778
EE85758.hg38.frag_filtered.bed.gz
a29ff64e1dac69dfc8cd4a13908c59b7
216,165,520
EE85759.hg38.frag_filtered.bed.gz
a5e34e541117b0b9086253830fb3176e
210,218,031
EE85760.hg38.frag_filtered.bed.gz
d7598408902b275ad4a4af10384aacb6
155,284,201
EE85761.hg38.frag_filtered.bed.gz
f76f5f0706a005f217240443ee3ec855
181,722,703
EE85762.hg38.frag_filtered.bed.gz
90e723136f2b8ab322329f6219ebb4cc
172,353,240
EE85763.hg38.frag_filtered.bed.gz
c5f7590a650364d0a5e612f9bfa4c0cf
159,064,315
EE85764.hg38.frag_filtered.bed.gz
5d3d97d82e4c8411c646bdf747ed73a7
151,233,608
EE85765.hg38.frag_filtered.bed.gz
51591460c2435f716f32ed9f284c1d7b
180,425,071
EE85766.hg38.frag_filtered.bed.gz
0c8271a564d9f83a07ffe2e45396f09d
169,167,631
EE85767.hg38.frag_filtered.bed.gz
5130342dacb1928ddbd9b8139ab358ea
164,726,789
EE85768.hg38.frag_filtered.bed.gz
7101bbfc3f5f78dafd4db847d788f2db
180,378,720
EE85769.hg38.frag_filtered.bed.gz
488eebc3afdf4a20ea70134991e4264b
210,709,917
EE85770.hg38.frag_filtered.bed.gz
f7e136471b95ec0c96b5bb88890f06d8
226,356,209
EE85771.hg38.frag_filtered.bed.gz
0df6ab17133d36edfbf44557b61422a3
163,242,069
EE85772.hg38.frag_filtered.bed.gz
5b0a026888894e7c276c08ae50dbddc9
184,246,828
EE85773.hg38.frag_filtered.bed.gz
212d1f4134cf48e87ab9d149383cc7c9
243,380,263
EE85774.hg38.frag_filtered.bed.gz
648c6425cd9166cb0581c5a92b2445e1
156,327,049
EE85775.hg38.frag_filtered.bed.gz
e3d33468f4f45dacdca2fa5896016df5
175,174,158
EE85776.hg38.frag_filtered.bed.gz
8a806dc3dd28308d43f247a653f4750d
148,093,486
EE85777.hg38.frag_filtered.bed.gz
0cc380a30682594726dd4e6d026833a0
208,215,230
EE85779.hg38.frag_filtered.bed.gz
d796afadc83fe25aa02514c7f33fb832
160,581,847
EE85780.hg38.frag_filtered.bed.gz
8ac0ecaa58677c4c6acc7c403273e02d
161,428,436
EE85781.hg38.frag_filtered.bed.gz
69fe53962d582e68c6db96586b104919
188,648,274
EE85783.hg38.frag_filtered.bed.gz
ba5e1a191f54c6a30966e3624db78d99
167,733,117
EE85784.hg38.frag_filtered.bed.gz
205c087d101bb06b60b8d652927a5857
205,979,772
EE85785.hg38.frag_filtered.bed.gz
0d6e31dc7486503e2a96128c72ba4ef4
190,772,042
EE85786.hg38.frag_filtered.bed.gz
8ca709f4fa18388ddc360653d1c3f81e
245,257,339
EE85787.hg38.frag_filtered.bed.gz
6ee75c0f4ed5415925a3ffe481ff2444
263,089,507
EE85788.hg38.frag_filtered.bed.gz
b0903966d4c709ec87630d45385d1852
143,188,712
EE85789.hg38.frag_filtered.bed.gz
6bbf51fdd4538640f86df3013191b8bf
211,252,750
EE85790.hg38.frag_filtered.bed.gz
f5cc365ea91f8e8beaaeb3857d90544a
185,759,261
EE85791.hg38.frag_filtered.bed.gz
9b2301850011ad3672561691ad0fa12a
166,505,565
EE85792.hg38.frag_filtered.bed.gz
a746abfc6cc38ac3e6276066993dab5d
217,998,290
EE85793.hg38.frag_filtered.bed.gz
586e6947eea62b9b467c8ff3f20635df
153,746,649
EE85794.hg38.frag_filtered.bed.gz
38336540dbd69471b7440c870722c9b4
256,107,655
EE85795.hg38.frag_filtered.bed.gz
5d06f9e89f8b420c0ea934a40481ad7e
165,772,368
EE85796.hg38.frag_filtered.bed.gz
a10431da9f103f9ae2deaeb604e2b905
207,132,530
EE85797.hg38.frag_filtered.bed.gz
ec4e0a2727a9ba679e2f1850eb243ca1
176,883,620
EE85798.hg38.frag_filtered.bed.gz
8b1f51e651f3f338c982b6f62ff72081
213,194,328
EE85799.hg38.frag_filtered.bed.gz
00d8e023bfa0f892958827997825e8cd
269,177,485
EE85800.hg38.frag_filtered.bed.gz
11bee7cdd9820a1026e565519cade496
155,152,453
EE85802.hg38.frag_filtered.bed.gz
3617f9d0ecfecd251f0f8441203a512b
122,500,625
EE85805.hg38.frag_filtered.bed.gz
cd11ba7372e670ef0c8c1277a6e36eec
244,912,569
EE85806.hg38.frag_filtered.bed.gz
a936141834d72b39d0753b5720e30280
200,123,004
EE85807.hg38.frag_filtered.bed.gz
39933a7ef64ec606b649f2d073728bb8
199,016,954
EE85808.hg38.frag_filtered.bed.gz
b93d24c6c9dc65155d7dd1193b3fef99
237,165,436
EE85809.hg38.frag_filtered.bed.gz
b9d2773512016e2a3e62eb0cab85873b
137,232,585
EE85810.hg38.frag_filtered.bed.gz
4e6bf2b4c824815c9b6771b3336e64e1
156,190,880
EE85811.hg38.frag_filtered.bed.gz
eda51383dd48f214766efab1f031bf34
216,902,137
EE85812.hg38.frag_filtered.bed.gz
0f45ece6c8bab0fcf9064105130ae94e
188,429,538
EE85813.hg38.frag_filtered.bed.gz
f9fa034d2b362d644f337f1a042f98b0
419,063,452
EE85814.hg38.frag_filtered.bed.gz
a6bf2406e75181220a61b41b28e98e19
243,366,241
EE85815.hg38.frag_filtered.bed.gz
28c2c563ffcf2fab3ac1e1a22826f3d3
243,351,618
EE85816.hg38.frag_filtered.bed.gz
fe1dfe1bcfaec6f9fc472e7fa565a052
243,861,439
EE85817.hg38.frag_filtered.bed.gz
3b6eee25e828dfb2b2c8f18bef97ff09
151,422,649
EE85818.hg38.frag_filtered.bed.gz
087c8ce243edf3fe78bc9cf74bcca38e
205,812,274
EE85821.hg38.frag_filtered.bed.gz
8121800f88ab17483b214ce926c4704a
211,247,609
EE85822.hg38.frag_filtered.bed.gz
7d1a0edafb27ed52a736320d60fdbbc4
161,408,888
EE85823.hg38.frag_filtered.bed.gz
908a2b9e2dd3215d5a1bd84ec0d601bf
167,512,839
EE85825.hg38.frag_filtered.bed.gz
bc7a1ac7fa60ffd0cd1779d3eab500e1
168,831,386
EE85826.hg38.frag_filtered.bed.gz
269b8b257fc1441362df6c57dbaa8afb
115,957,694
EE85827.hg38.frag_filtered.bed.gz
82d07d479756ea15cb8dbe9eaedf6118
200,666,024
EE85828.hg38.frag_filtered.bed.gz
f1f03e6b43fcd9ba25408981c06218c1
132,594,187
EE85829.hg38.frag_filtered.bed.gz
1218c96731f050f2421db6243d824b17
163,826,060
EE85830.hg38.frag_filtered.bed.gz
31132ff9df16c463d19d08b081af1b21
178,389,001
End of preview.

LEAF-1 pretraining corpus — cfDNA fragments (hg38)

This dataset contains the cell-free DNA (cfDNA) portion of the pretraining corpus of LEAF-1. The sample manifest and checksums of this dataset are also archived on Zenodo (10.5281/zenodo.23195009). The other portions of the pretraining corpus: scATAC-seq on Zenodo (10.5281/zenodo.23176597); TCGA ATAC-seq is controlled access, its manifest and processing code are on Zenodo (10.5281/zenodo.23195360).

2,301 plasma cfDNA samples from four published studies, one BED file per sample, 211 GB compressed (984 GB uncompressed), 34.0 billion fragments in total.

Contents

file n description
EE<id>.hg38.frag_filtered.bed.gz 2,301 filtered fragment BED, bgzip-compressed
indexes.tar 1 the 2,301 EE<id>.hg38.frag_filtered.bed.index sparse line-offset indexes (see below)
samples.tsv 1 one row per sample: FinaleDB id, study, label, LEAF-1 train/test split, fragment count
checksums.tsv 1 md5 and size of every file in this dataset
README.md 1 this file

Usage

  • To reproduce LEAF-1 pretraining: decompress every file first (ls *.bed.gz | xargs -P 16 -n 1 bgzip -d; ~984 GB uncompressed in total). The LEAF-1 data loader reads the uncompressed .bed files together with the .bed.index sidecars from indexes.tar, which must sit next to the corresponding .bed file with the same basename; the samples.tsv split column reproduces the train/test partition.
  • For any other use: no decompression is needed. The files are plain gzip and can be streamed with zcat / gzip.open(), or indexed with tabix -p bed <file> for region queries.

Download everything with the Hugging Face CLI:

hf download jing-z/leaf1-pretraining-cfdna --repo-type dataset --local-dir leaf1-cfdna

BED format

Five tab-separated columns, no header, one fragment per line:

chr1	792519	792775	30	-

chrom, start (0-based), end (exclusive), mapq, strand. Coordinates are on GRCh38/hg38. This is the FinaleDB .frag layout; the mapq and strand columns are carried over unchanged and are not used by LEAF-1.

Compression

Files are compressed with bgzip (htslib). They are standard gzip streams — gunzip, zcat and Python's gzip.open() all work. Because bgzip is block-based, each file can also be indexed with tabix for random access without full decompression.

The .bed.index files in indexes.tar are the sparse indexes used by the LEAF-1 data loader: one line per 1,000 fragments, line_number cumulative_byte_offset. These offsets refer to the uncompressed .bed file and are only valid after bgzip -d / gunzip. They are not offsets into the compressed stream. If you do not use the LEAF-1 loader you can ignore them and use tabix instead.

Verification

md5sum <file>          # compare with column 2 of checksums.tsv

Every compressed file was verified at packaging time: the md5 of the decompressed stream was compared with the md5 of the original filtered BED, and all 2,301 matched.

Provenance

Upstream source

All fragments were downloaded from FinaleDB (Zheng et al., 2021, Bioinformatics 37(16):2502–2503, doi:10.1093/bioinformatics/btaa919; http://finaledb.research.cchmc.org/), which provides uniformly reprocessed, hg38-aligned fragment files for published cfDNA sequencing studies. Sample identifiers (EE<id>) are FinaleDB entry ids. The 2,301 samples come from:

study n samples
Adalsteinsson et al., 2017, Nat Commun 8:1324 1,508 breast and prostate cancer
Cristiano et al., 2019, Nature 570:385–389 537 seven cancer types, healthy
Jiang et al., 2015, PNAS 112:E1317–E1325 225 liver cancer, hepatitis B, cirrhosis, healthy
Sun et al., 2019, Genome Res 29:418–427 31 colorectal cancer, liver transplant

Please cite FinaleDB and the original studies when reusing these files.

Processing

Starting from the FinaleDB EE<id>.hg38.frag.gz files, the following filters were applied, in order:

  1. mapping quality ≥ 30 (column 4);
  2. fragment length ≥ 20 bp;
  3. no overlap with the ENCODE hg38 blacklist v2 (bedtools intersect -v).

No other transformation was applied. The filtered BEDs are the direct input to the LEAF-1 pretraining pipeline, which retrieves flanking genomic context from the hg38 FASTA at training time. samples.tsv records which samples were in the pretraining train (2,070) and held-out test (231) partitions.

License and citation

Data: CC BY 4.0.

If you use this dataset, please cite the LEAF-1 paper, FinaleDB, and the original studies listed above.

Downloads last month
1,870