<p>Yes, this exists, and can be efficiently generated by plink 2.0's <code>--export ind-major-bed</code> command.  (The third byte is 0 instead of 1, and the specification is otherwise identical to that of regular plink .bed files with samples and variants swapped.)</p>

CC BY-SA 4.0
2019-04-17T17:12:26.967Z
Thanks you. So the sample/variant-swapped binary file has the same .BED suffix? Does PLINK2 detect the file based on the third byte and is there a noticeable speedup when extracting a samples genotypes?
Scholar
CC BY-SA 4.0
2019-04-17T17:20:08.343Z
It has the same suffix, yes.

PLINK 1.9 and 2.0 automatically create temporary variant-major .bed files when they see a sample-major .bed file, since almost all the code assumes variant-major, so this never speeds up PLINK.  But it can be useful input for other programs.
Christopher Chang
CC BY-SA 4.0
2019-04-17T16:25:53.640Z
2019-04-17T16:33:05.700Z
2019-04-17T16:33:05.700Z
Christopher Chang
<p>I'm currently working with the PLINK file system to store large amounts of genotype data. </p>

<p>The plain format consists of three files, two files for storing phenotype and marker information as well as one file (.PED) containing the genotype matrix. </p>

<p>There exists a binary version of the .PED file (.BED), which stores the data in a number of consecutive byte blocks, with each block encoding the genotype of all samples for a specific marker. </p>

<p>While there exists a transposed version of the .PED file (.TPED) which is also supported by PLINK, I couldn't find out whether there also exists a transposed version of the binary .BED file. </p>

<p>Does it exist at all? Are there other file formats to compactly store a genotype matrix for fast sample / marker extraction?</p>

<gwas><plink><genotyping>
PLINK - Transposed BED file?
# PLINK - Transposed BED file?

(Asked by: username_0 on 2019-04-17)

I'm currently working with the PLINK file system to store large amounts of genotype data.

The plain format consists of three files, two files for storing phenotype and marker information as well as one file (.PED) containing the genotype matrix.

There exists a binary version of the .PED file (.BED), which stores the data in a number of consecutive byte blocks, with each block encoding the genotype of all samples for a specific marker.

While there exists a transposed version of the .PED file (.TPED) which is also supported by PLINK, I couldn't find out whether there also exists a transposed version of the binary .BED file.

Does it exist at all? Are there other file formats to compactly store a genotype matrix for fast sample / marker extraction?

**Tags:** gwas, plink, genotyping

---

## 1 answers

### Answer by username_1 on 2019-04-17. Score: 2 | Accepted answer

Yes, this exists, and can be efficiently generated by plink 2.0's `--export ind-major-bed` command. (The third byte is 0 instead of 1, and the specification is otherwise identical to that of regular plink .bed files with samples and variants swapped.)

> **Comments:**
> **username_0**: Thanks you. So the sample/variant-swapped binary file has the same .BED suffix? Does PLINK2 detect the file based on the third byte and is there a noticeable speedup when extracting a samples genotypes?  
> **username_1**: It has the same suffix, yes.  PLINK 1.9 and 2.0 automatically create temporary variant-major .bed files when they see a sample-major .bed file, since almost all the code assumes variant-major, so this never speeds up PLINK.  But it can be useful input for other programs.  

---

