chrchang / plink-ng

A comprehensive update to the PLINK association analysis toolset. Beta testing of the first new version (1.90), focused on speed and memory efficiency improvements, is finishing up. Development is now focused on building out support for multiallelic, phased, and dosage data in PLINK 2.0.

Home Page:https://www.cog-genomics.org/plink/2.0/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarification in `pgen_spec`: what bytes goes into "variant record length" in PGEN header?

biona001 opened this issue · comments

Hello again,

In example 2.2.6, what are the bytes for 37636-168707? All I could infer is that each variant requires 2 bytes to store, so given 2^16 variants, we need to reserve 2*2^16 = 131072 bytes, starting from byte 37636.

But what should those 131072 bytes be?

“variant record byte lengths”

So if the body of variant record #0 occupies 200 bytes, and the body of variant record #1 occupies 400 bytes, bytes 37636-37639 are 0xc8 0x00 0x90 0x01.

Ah, got it. Thank you again.