MGHome page

GWAS course

Course map

0 of 64 steps done

Start with step 0.1Install R

Saved in this browser only.

Step 1.9

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

Read this page. There is no code to run.

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 groupTypical producerText or binaryContentPipeline position
IDAT; BPM/CSV; EGT; GTC; Final ReportIllumina scanner and array softwareBinary, except CSV and Final ReportSignals; probe definitions; clusters; calls; exported tableArray measurement to called genotypes
CELThermo Fisher array softwareBinary in common current uses; older text variants existProbe intensitiesBefore array calling
BCLIllumina sequencer softwareBinaryCycle-level calls and qualitiesBefore read export
FASTQ; unaligned BAM (uBAM)Basecaller, sample separation software, PacBio HiFi or ONT DoradoFASTQ text; uBAM binaryReads, qualities and optional read annotationsBefore alignment
POD5; FAST5ONT instrument softwareBinaryRaw signals and read metadataBefore basecalling
SAM; BAM; CRAM; BAI/CSI/CRAIBasecalling or alignment software and SAMtoolsSAM text; others binaryReads, optional alignments and region indexesBefore or after alignment, then variant calling
gVCF; VCF; BCF; TBI/CSIVariant callers, BCFtools and imputation toolsVCF/gVCF text; BCF and indexes binaryReference blocks, variants, calls or probabilitiesCalling to analysis
MatrixTable; VariantDatasetHailBinary directory storesDistributed variant, sample and entry dataLarge-scale processing
BGEN; BGI; GEN; sampleImputation and conversion softwareBGEN/BGI binary; GEN/sample textProbabilities, variant index and sample descriptionsImputation to association
PED/MAP; TPED/TFAMPLINKTextCalls and identitiesOlder analysis exchange
BED/BIM/FAMPLINKBED binary; BIM/FAM textCalls and identitiesCompact called-genotype analysis
PGEN/PVAR/PSAMPLINK 2PGEN binary; PVAR/PSAM text, optionally compressedCalls, dosages and identitiesCurrent PLINK analysis
UCSC BEDAnnotation softwareTextHalf-open intervalsRegion annotation
GFAGenome assembly softwareTextSequence graph segments and linksAssembly and complex variation
FASTA/FAIReference providers and SAMtoolsTextSequences and byte offsetsReference input
GWAS-SSFAssociation tools plus a formatterText, usually compressedEffects, uncertainty and study metadataResult 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

Alt text: Three data journeys connect array signals, sequencing reads and imputed probabilities to analysis files and association summary statistics; reference sequences support alignment and calling.

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.