Published September 9, 2024 | Version v3

.bed / .bim / .fam files, for 1kg, converted from the raw data on the PLINK website

Authors/Creators

Description

# Download the hg38 genome reference files from the PLINK website
RUN wget -L https://www.dropbox.com/s/j72j6uciq5zuzii/all_hg38.pgen.zst
RUN wget -L https://www.dropbox.com/scl/fi/fn0bcm5oseyuawxfvkcpb/all_hg38_rs.pvar.zst?rlkey=przncwb78rhz4g4ukovocdxaz -O all_hg38.pvar.zst
RUN wget -L https://www.dropbox.com/scl/fi/u5udzzaibgyvxzfnjcvjc/hg38_corrected.psam?rlkey=oecjnk4vmbhc8b1p202l0ih4x -O all_hg38.psam

# Download the hg38 related samples file from the PLINK website
RUN wget -L https://www.dropbox.com/s/4zhmxpk5oclfplp/deg2_hg38.king.cutoff.out.id

# Decompress the genome reference files
RUN /plink-ng-master/2.0/bin/plink2 --zst-decompress all_hg38.pgen.zst all_hg38.pgen
RUN rm all_hg38.pgen.zst

RUN /plink-ng-master/2.0/bin/plink2 --pfile all_hg38 vzs --allow-extra-chr --chr 1-22 --max-alleles 2 --remove deg2_hg38.king.cutoff.out.id --memory 6000 --make-bed --out 1kg_hg38

# Replace rsIDs with chr:pos:ref:alt
RUN awk 'BEGIN{OFS="\t"} {print $1,$1":"$4":"$6":"$5,$4,$6,$5}' 1kg_hg38.bim > 1kg_hg38_clean.bim
RUN mv 1kg_hg38_clean.bim 1kg_hg38.bim
 
# Apply PLINK filtering (mAF > 0.1%, HWE p-value <1e-12, keep SNPs only)
/plink-ng-master/2.0/bin/plink2 --bfile 1kg_hg38 --maf 0.001 --hwe 1e-12 --snps-only --make-bed --out 1kg_hg38_filtered --memory 6000
 
# Compress output files
gzip 1kg_hg38_filtered.* -v --force
 

Files

1kg_hg38_population.txt

Files (2.0 GB)

Name Size
md5:cbd771123ee07f7164cdb48f790fada6
1.8 GB Download
md5:2a5a7ff89eca645e84812ac32291840b
185.6 MB Download
md5:17b7337c86cebd424ddb95034c42205b
7.2 kB Download
md5:15e35d7761511d875659f117b68deef6
611 Bytes Download
md5:9216de12b7d955df0f03b316d98b9d48
51.3 kB Preview Download
md5:347bd41da492c53545c80279a56e8431
5.0 kB Download
md5:58d1d957ea59f3b8507c4968e8166e07
16.9 kB Preview Download