Module 1 · From DNA to array data · step 9 of 11
1.9A map of genetic file formats
In short
We follow genetic files from laboratory measurements to analysis results. We compare what the formats store and the checks they need so we can choose suitable files and avoid mixing incompatible information.
What you do
Command
No code to run. This is a reading-only step.
You need
Step 1.8. The invented examples are optional reading aids, separate from the classroom dataset.
What we do
Reading, about 7 minutes. You can come back to it later.
Follow the files from an instrument to an association result.
Why
A file format (opens in a new tab) defines how information is stored. A text file (opens in a new tab) contains readable characters. A binary file encodes records as bytes. A pipeline (opens in a new tab) is a sequence of processing steps. Different instruments can reach the same analysis format.
IDAT (opens in a new tab) stores Illumina array fluorescence and scanner information. It precedes genotype calling.
BPM/CSV manifest (opens in a new tab) describes array probes and sites. BPM is binary; CSV is text with values separated by commas.
EGT cluster file (opens in a new tab) stores Illumina calling clusters (opens in a new tab), the signal groups used to assign genotypes. It is not a sample genotype matrix.
GTC (opens in a new tab) stores a sample's Illumina genotype calls and related measurements. It is a binary output of calling software. DRAGEN Array converts GTC to VCF (opens in a new tab).
Final Report (opens in a new tab) is a configurable Illumina text export. Rows usually describe sample-marker measurements; the selected columns must be checked.
CEL (opens in a new tab) stores probe intensities from Thermo Fisher/Affymetrix arrays. It needs the matching array definitions and calling software. Axiom analysis software (opens in a new tab) exports PLINK, VCF or text for later analysis.
BCL (opens in a new tab) stores Illumina sequencing base calls and quality information by instrument cycle. Sample separation produces read files for downstream analysis.
FASTQ (opens in a new tab) stores each read's identifier, sequence and base-quality characters. It does not normally say where the read belongs in the genome.
POD5 and FAST5 (opens in a new tab) store Oxford Nanopore raw signals and metadata (opens in a new tab), the information describing a measurement. POD5 replaces legacy FAST5. Basecalling (opens in a new tab) translates signals into sequence reads.
SAM/BAM/CRAM (opens in a new tab) store reads and their alignments (opens in a new tab), the proposed matches to a reference. Sequence Alignment/Map (SAM) is text. Binary Alignment/Map (BAM) is compressed binary. BAM can also hold reads before alignment. An unaligned BAM (uBAM) (opens in a new tab) stores read sequences and qualities without genomic placements. PacBio HiFi reads are delivered in unaligned BAM (opens in a new tab). ONT Dorado writes a BAM file by default (opens in a new tab); without an alignment step, those reads are unaligned. So both PacBio and ONT produce an unaligned BAM file. The file ends in .bam, and people often call it uBAM or .ubam. CRAM is a BAM-like format that is smaller. It stores each read as its differences from a reference genome (opens in a new tab) sequence instead of repeating the full sequence. To read a CRAM file you need the same reference that was used to write it. The CRAM specification (opens in a new tab) describes the details. BAI/CSI and CRAI are indexes (opens in a new tab), small companion files that help retrieve a region.
gVCF (opens in a new tab) means genomic Variant Call Format. It is a VCF convention for one sample's variant evidence and reference blocks. A reference block describes a stretch represented as non-variant. It is not simply a list of variant sites.
VCF/BCF (opens in a new tab) store variants, alleles and sample fields. Variant Call Format (VCF) is text. Its binary counterpart is BCF. bgzip (opens in a new tab) compresses data in independently readable blocks. Tabix indexes sorted genomic text, including compressed VCF; TBI or CSI is the companion index.
Hail MatrixTable and VariantDataset (opens in a new tab) are directory-based stores for large analyses. MatrixTable separates variant rows, sample columns and entry values. VariantDataset keeps variant data and reference blocks separately to avoid expanding every reference call.
BGEN (opens in a new tab) stores genotypes or genotype probabilities (opens in a new tab), the probabilities of possible calls, in a compact binary format. A separate .sample file can describe samples; some BGEN files also embed identifiers. A .bgi index (opens in a new tab) supports fast lookup of variants in the matching BGEN file.
GEN (opens in a new tab) is a text probability format. It usually gives three probabilities per sample for each two-allele site, plus variant and allele fields.
PED/MAP (opens in a new tab) is an older PLINK text pair. PED has one row per sample with allele pairs; MAP lists variants in the same order.
TPED/TFAM (opens in a new tab) is the transposed PLINK text pair. TPED has one row per variant; TFAM gives the sample order.
BED/BIM/FAM (opens in a new tab) is the older PLINK binary genotype set. BED stores calls, BIM variants and FAM samples. It is unrelated to UCSC BED.
PGEN/PVAR/PSAM (opens in a new tab) is the PLINK 2 native set. PGEN stores calls and can also store dosages; PVAR describes variants and PSAM describes samples.
UCSC BED (opens in a new tab) is a text format for genomic intervals. Its start is zero-based and its end is excluded.
GFA (opens in a new tab) describes sequence graphs. Segments and links can represent alternative paths through a genome.
FASTA/FAI (opens in a new tab) stores named sequences and their byte index. A contig (opens in a new tab) is a continuous sequence, such as our invented toy1.
GWAS-SSF (opens in a new tab) standardises association summary statistics for sharing. It requires defined columns and study metadata, not just a renamed table.
| Format group | Typical producer | Text or binary | Content | Pipeline position |
|---|---|---|---|---|
| IDAT; BPM/CSV; EGT; GTC; Final Report | Illumina scanner and array software | Binary, except CSV and Final Report | Signals; probe definitions; clusters; calls; exported table | Array measurement to called genotypes |
| CEL | Thermo Fisher array software | Binary in common current uses; older text variants exist | Probe intensities | Before array calling |
| BCL | Illumina sequencer software | Binary | Cycle-level calls and qualities | Before read export |
| FASTQ; unaligned BAM (uBAM) | Basecaller, sample separation software, PacBio HiFi or ONT Dorado | FASTQ text; uBAM binary | Reads, qualities and optional read annotations | Before alignment |
| POD5; FAST5 | ONT instrument software | Binary | Raw signals and read metadata | Before basecalling |
| SAM; BAM; CRAM; BAI/CSI/CRAI | Basecalling or alignment software and SAMtools | SAM text; others binary | Reads, optional alignments and region indexes | Before or after alignment, then variant calling |
| gVCF; VCF; BCF; TBI/CSI | Variant callers, BCFtools and imputation tools | VCF/gVCF text; BCF and indexes binary | Reference blocks, variants, calls or probabilities | Calling to analysis |
| MatrixTable; VariantDataset | Hail | Binary directory stores | Distributed variant, sample and entry data | Large-scale processing |
| BGEN; BGI; GEN; sample | Imputation and conversion software | BGEN/BGI binary; GEN/sample text | Probabilities, variant index and sample descriptions | Imputation to association |
| PED/MAP; TPED/TFAM | PLINK | Text | Calls and identities | Older analysis exchange |
| BED/BIM/FAM | PLINK | BED binary; BIM/FAM text | Calls and identities | Compact called-genotype analysis |
| PGEN/PVAR/PSAM | PLINK 2 | PGEN binary; PVAR/PSAM text, optionally compressed | Calls, dosages and identities | Current PLINK analysis |
| UCSC BED | Annotation software | Text | Half-open intervals | Region annotation |
| GFA | Genome assembly software | Text | Sequence graph segments and links | Assembly and complex variation |
| FASTA/FAI | Reference providers and SAMtools | Text | Sequences and byte offsets | Reference input |
| GWAS-SSF | Association tools plus a formatter | Text, usually compressed | Effects, uncertainty and study metadata | Result sharing |
Four checks apply across formats. A genome build (opens in a new tab) names the reference version. A file extension does not prove its build. Coordinates (opens in a new tab) may count from zero or one. VCF position 100001 corresponds to UCSC BED interval [100000,100001). Illumina TOP/BOT (opens in a new tab) is a probe (opens in a new tab) convention, not automatically the reference forward strand; see 2.5. Compression (opens in a new tab) reduces file size. An index accelerates access but must match the exact sorted file. Renaming .gz does not turn ordinary gzip into bgzip.
Vendor format documentation: Illumina array inputs (opens in a new tab), scanner outputs (opens in a new tab), TOP/BOT definition (opens in a new tab), Thermo Fisher CEL descriptions (opens in a new tab) and ONT POD5 (opens in a new tab).
Specifications: GA4GH file specifications (opens in a new tab), PLINK formats (opens in a new tab), BGEN 1.2 (opens in a new tab), Hail MatrixTable (opens in a new tab), Hail VariantDataset (opens in a new tab), GWAS Catalog GWAS-SSF (opens in a new tab).
References: FASTQ, PMID 20015970 (opens in a new tab); SAM/BAM, PMID 19505943 (opens in a new tab); VCF, PMID 21653522 (opens in a new tab); tabix, PMID 21208982 (opens in a new tab); BGEN, DOI 10.1101/308296 (opens in a new tab).
Illustration in preparation
Expected result
Show the expected result
You can place a file before or after calling. You can name its companion metadata files and check its coordinate convention.
If something goes wrong
If something goes wrong
Check the producer and file header. Do not identify a format from its extension alone. Do not open a binary file as if it were a spreadsheet.
Quick check
Are a PLINK BED file and a UCSC BED file interchangeable?
Show the answer
No. One stores binary genotype calls. The other is a text list of genomic intervals.
Files created
None.