The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
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 ({'pgen_compressed_bytes', 'pvar_compressed_bytes', 'pgen_file', 'chromosome', 'pvar_file'}) and 2 missing columns ({'metric', 'value'}).
This happened while the csv dataset builder was generating data using
hf://datasets/madhavajay/1kgp-bv-all/results/qc_file_summary.tsv (at revision 43ad04b827a977808c0ec1f80990ff79b60035a2), ['hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_dataset_summary.tsv', 'hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_file_summary.tsv', 'hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_population_counts.tsv', 'hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_sample_summary.tsv', 'hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_superpopulation_counts.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.12/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
writer.write_table(table)
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 765, in write_table
self._write_table(pa_table, writer_batch_size=writer_batch_size)
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 773, in _write_table
pa_table = table_cast(pa_table, self._schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
chromosome: string
pgen_file: string
pvar_file: string
pgen_compressed_bytes: int64
pvar_compressed_bytes: int64
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 894
to
{'metric': Value('string'), 'value': 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 1361, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 940, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1683, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1839, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
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 ({'pgen_compressed_bytes', 'pvar_compressed_bytes', 'pgen_file', 'chromosome', 'pvar_file'}) and 2 missing columns ({'metric', 'value'}).
This happened while the csv dataset builder was generating data using
hf://datasets/madhavajay/1kgp-bv-all/results/qc_file_summary.tsv (at revision 43ad04b827a977808c0ec1f80990ff79b60035a2), ['hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_dataset_summary.tsv', 'hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_file_summary.tsv', 'hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_population_counts.tsv', 'hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_sample_summary.tsv', 'hf://datasets/madhavajay/1kgp-bv-all@43ad04b827a977808c0ec1f80990ff79b60035a2/results/qc_superpopulation_counts.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.
metric string | value int64 |
|---|---|
total_samples | 3,202 |
male_count_sex_1 | 1,598 |
female_count_sex_2 | 1,603 |
pgen_file_count | 26 |
pvar_file_count | 26 |
pgen_compressed_bytes | 3,396,903,111 |
pvar_compressed_bytes | 2,880,454,741 |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
null | null |
total_samples | 3,202 |
male_count_sex_1 | 1,598 |
female_count_sex_2 | 1,603 |
unknown_or_other_sex_count | 1 |
sex_code_1_count | 1,598 |
sex_code_2_count | 1,603 |
sex_code_NA_count | 1 |
null | null |
null | null |
null | null |
null | null |
null | null |
1000 Genomes Phase 3 GRCh38 PLINK2 Dataset
Local package of the PLINK 2.0-hosted 1000 Genomes phase 3 GRCh38 files.
The dataset is stored in PLINK 2 format:
.pgen.zst: compressed genotype data.pvar.zst: compressed variant metadatahg38_corrected.psam: sample metadata
See SOURCE.md for source and citation notes.
See SCHEMA.md for machine-readable frontmatter and human-readable schema
documentation.
See LICENSE for data-use and license notes.
Contents
Directory layout:
README.md
SOURCE.md
LICENSE
SCHEMA.md
data/
hg38_corrected.psam
chr1_hg38.pgen.zst
chr1_hg38_rs.pvar.zst
...
scripts/
qc_summary.py
plink2_qc_pca.sh
results/
qc_sample_summary.tsv
qc_population_counts.tsv
qc_superpopulation_counts.tsv
qc_variant_summary.tsv
qc_dataset_summary.tsv
expected_files.txt is the complete file manifest.
Sample Metadata
data/hg38_corrected.psam contains one row per sample.
#IID PAT MAT SEX SuperPop Population
HG00096 0 0 1 EUR GBR
Columns:
#IID: sample/participant IDPAT,MAT: parental sample IDs when knownSEX: PLINK sex code, usually1=male,2=female, other/0=unknownSuperPop: super-population labelPopulation: sub-population label
The .pvar.zst files contain variant metadata. The .pgen.zst files contain
genotypes in the sample order defined by the .psam.
Validate Files
scripts/verify_downloads.sh
This checks:
- all manifest files are present
- there are no
.aria2partial markers - every
.zstfile is a valid zstd stream hg38_corrected.psamis readable
Produce Basic QC Summaries
python3 scripts/qc_summary.py
This writes TSV files under results/:
qc_sample_summary.tsvqc_population_counts.tsvqc_superpopulation_counts.tsvqc_file_summary.tsvqc_dataset_summary.tsv
The default run reports the main practical checks:
- total samples
- male/female/unknown counts
- super-population counts
- population counts
- number of
.pgen.zstand.pvar.zstfiles - compressed file sizes
It does not scan every variant row by default.
For per-chromosome variant row counts and estimated diploid allele slots, run:
python3 scripts/qc_summary.py --variant-counts
This adds variant_count and estimated_diploid_allele_slots to the summaries.
For exact INFO-derived allele totals (AC/AN) and SNV/non-SNV summaries, run:
python3 scripts/qc_summary.py --full-info-scan
Both variant-count modes stream every row of every .pvar.zst file and can take
several minutes. Use PLINK 2 for genotype-level missingness, MAF, HWE, and LD
pruning.
Deprecated older outputs may be removed and regenerated by rerunning the script. Current default outputs are:
results/qc_sample_summary.tsv
results/qc_population_counts.tsv
results/qc_superpopulation_counts.tsv
results/qc_file_summary.tsv
results/qc_dataset_summary.tsv
PLINK2 QC/PCA Example
scripts/plink2_qc_pca.sh
The script builds temporary uncompressed per-chromosome files under
work_plink2_qc/, merges autosomes, applies common QC filters, performs LD
pruning, and writes outputs under results/ prefixed with plink2_qc_*.
Default thresholds:
BV_GENO=0.05
BV_MIND=0.10
BV_MAF=0.01
BV_HWE_P=1e-4
BV_INDEP_WINDOW=50
BV_INDEP_STEP=5
BV_INDEP_R2=0.2
Override them on the command line:
BV_GENO=0.02 BV_MAF=0.05 scripts/plink2_qc_pca.sh
Requirements:
zstdplink2
The PLINK2 workflow is intentionally an example pipeline. Review the filter choices for your cohort and analysis goal before publishing results.
- Downloads last month
- 106