Data
What is FASTQ?
FASTQ is a widely used text format that pairs sequencer read sequences with per-base quality scores. A common record has an identifier beginning with `@`, a sequence, a `+` separator, and a quality string whose length matches the sequence. FASTQ has no single formal specification, and incompatible quality encodings exist, including Sanger Phred+33 and historical Solexa/Illumina variants. Files commonly use `.fastq` or `.fq` and may be externally compressed, for example with gzip. FASTQ usually stores reads before alignment; it does not serve the same role as SAM/BAM alignment records with reference positions.
When to choose this format
- Keeping read identifiers, sequences, and corresponding base qualities together
- Submitting read data to archives such as NCBI SRA
When to avoid this format
- Recording alignment positions on a reference genome
- Storing only a reference or assembled sequence without quality values
Common uses
- Passing sequencing reads and per-base quality scores between analysis steps
- Storing unaligned reads, including paired-end data, before downstream analysis
Features
- Associates each sequencing read with a quality value for each base
- A common four-line representation uses an `@` identifier, sequence, `+` line, and quality string
- Quality scores such as Phred are encoded as ASCII using different offsets and score systems
- Paired-end reads may be stored in matching files or interleaved
Advantages and disadvantages
Advantages
- Keeps sequences and qualities together for many sequencing tools and archives
- Text is compressible and widely used to exchange reads across instruments and pipeline stages
- Headers can carry read identifiers and platform-specific information
Disadvantages
- Quality-encoding variants are not interchangeable, and the offset cannot be reliably inferred from characters alone
- Text files can be large and require suitable parsers and compression support
- It does not by itself describe alignments, reference coordinates, variant calls, or full sample metadata
Open and convert
How to open
Use a sequencing tool that supports the file's FASTQ variant. Check the `@` identifier, sequence and quality lengths, `+` line, quality scheme such as Phred+33 or Phred+64, and the instrument or pipeline documentation. For paired-end data, verify read order and identifiers across both files. Read gzip-compressed files with a compatible tool or decompress them.
How to convert
To change quality encoding, identify the original Phred or Solexa score system and ASCII offset, decode numeric scores correctly, then re-encode them. Exporting only sequences to FASTA discards quality values. Producing aligned SAM/BAM data is a separate mapping workflow using a reference and analysis software, not a filename change.
Cautions
- Phred+33 and historical Phred+64/Solexa encodings assign different meanings to quality characters. Do not infer the scheme from a filename or character range alone; consult instrument, software, or dataset documentation.
- Paired-end files must retain read order and identifier/read-number correspondence. Validate them against the receiving pipeline's rules.
- FASTQ may contain human genetic data, pathogen or research sequences, and sample identifiers. Review privacy, consent, research ethics, and access controls before sharing.
- Some tools handle multiline records or platform-specific headers beyond the common four-line layout. Check the variant expected by your parser and archive.
FAQ
How is FASTQ different from FASTA?
FASTQ associates per-base quality scores with a sequence. FASTA usually stores an identifier and sequence but no quality values.
Do all FASTQ files use the same quality encoding?
No. Phred+33 is widely used, but historical Phred+64 and Solexa variants exist. Confirm the producer and score scheme.
Is FASTQ aligned data?
Usually not. FASTQ stores reads and quality scores; mapping positions on a reference are represented in alignment formats such as SAM, BAM, or CRAM.
Compare
Related uses and checks
References and specifications
- National Center for Biotechnology Information — NCBI SRA File Format Guide
- Nucleic Acids Research — The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants
- Global Alliance for Genomics and Health / Large Scale Genomics Work Stream — HTS format specifications