Aller au contenu

Utilisateur:Nicolallias/FASTQ format

Une page de Wikipédia, l'encyclopédie libre.

Le format FASTQ est un format de fichier texte pour stocker à la fois des séquences biologiques (souvent nucléotidiques) et les scores de qualité correspondant. La séquence et la qualité sont toutes deux encodée avec un seul caractère ASCII. Ce format a été initialement développé par le Wellcome Trust Sanger Institute afin de lier un fichier de séquence au FASTA avec ses données que qualité, mais est récemment devenu le standard de facto pour le stockage des sorties de séquenceurs à haut débit, comme le Illumina Genome Analyzer [1].

Format[modifier | modifier le code]

Un fichier FASTQ utilise en principe 4 lignes par séquence. La ligne 1 commence par un signe '@' suivit de l'identifiant de la séquence et éventuellement une description (comme un fichier au FASTA, avec un '@' au lieu d'un '>'). La ligne 2 est la séquence brute. La ligne 3 commence par un signe '+', parfois suivi par la répétition du titre (ligne 1). La ligne 4 est la qualité encodée correspondant à la séquence de la ligne 2, et doit contenir exactement le même nombre de symboles que la ligne 2.

Un FASTQ minimal :

@SEQ_ID
GATTTGGGGTTCAAAGCAGTATCGATCAAATAGTAAATCCATTTGTTCAACTCACAGTTT
+
!''*((((***+))%%%++)(%%%%).1***-+*''))**55CCF>>>>>>CCCCCCC65

La version originale (nommée Sanger FASTQ) autorisait le retour à la ligne dans la séquence et la qualité, mais ce comportement est peu recommandé car il complique la tâche de lecture du fichier (parsing en anglais) en raison du choix malavisé du '@' et du '+' (ces caractères peuvent en effet apparaître dans la qualité).

Illumina sequence identifiers[modifier | modifier le code]

Les séquences issues des plateformes Illumina utilisent cet identifiant :

@HWUSI-EAS100R:6:73:941:1973#0/1
HWUSI-EAS100RNom unique de l'instrument
6ligne de la plaque (flowcell lane)
73numéro de tile au sein de la ligne
941coordonnée 'x' du cluster au sein du tile
1973coordonnée 'y' du cluster au sein du tile
#0numéro d'index pour les échantillons multiplexés (0 sinon)
/1le membre de la paire, /1 ou /2 (uniquement en cas de paired-end ou de mate-pair reads)

Les versions du pipeline Illumina depuis la version 1.4 utilisent #NNNNNN au lieu de #0 pour l'identifiant de multiplex, où NNNNNN est la séquence de l'étiquette (tag) de multiplex.

Avec la version 1.8 de Casava, le format de la ligne '@' a changé :

@EAS139:136:FC706VJ:2:2104:15343:197393 1:Y:18:ATCACG
EAS139identifiant unique de l'instrument
136identifiant du run
FC706VJidentifiant de la plaque (flowcell)
2ligne de la plaque
2104numéro de tile au sein de la ligne
15343coordonée 'x' du cluster au sein du tile
197393coordonnée 'y' du cluster au sein du tile
1Le membre de la paire, 1 or 2 (uniquement en cas de paired-end ou de mate-pair)
Yindication de passage du filtre, Y indique une lecture (read) correct, N sinon
180 lorsque aucun des bit contrôles sont activés, sinon c'est un nombre
ATCACGIndex (étiquette nucléotidique) de la séquence

NCBI Sequence Read Archive[modifier | modifier le code]

Les fichiers FASTQ issus du NCBI/EBI Sequence Read Archive ont souvent une description, par exemple :

@SRR001666.1 071112_SLXA-EAS1_s_7:5:1:817:345 length=36
GGGTGATGGCCGCTGCCGATGGCGTCAAATCCCACC
+SRR001666.1 071112_SLXA-EAS1_s_7:5:1:817:345 length=36
IIIIIIIIIIIIIIIIIIIIIIIIIIIIII9IG9IC

Dans cet exemple, il y a un identifiant assigné par le NCBI et la description contient l'identifiant original de Solexa/Illumina (comme décrit précédemment) plus la longueur du read.

Il est à noter que le NCBI a convertit ces données FASTQ depuis le format d'encodage Solexa/Illumina vers le standard Sanger (voir les encodage ci-dessous).

Variations[modifier | modifier le code]

Qualité[modifier | modifier le code]

Une valeur de qualité Q est un entier correspondant à p (c'est-à-dire, la probabilité que la base déterminée(lors du Basecall) ne corresponde pas à la vraie base, c'est la probabilité d'erreur). Deux équations différentes ont été utilisées. La première est le standard de Sanger pour déterminer la fidélité dans la détermination des bases, aussi connue comme Phred quality score:

Le pipeline Solexa (c'est-à-dire, le logiciel livré avec le Genome Analyzer) utilisait initialement une méthode différente, encodant p/(1-p) au lieu de la probabilité p:

TODO: traduire la suite !

Although both mappings are asymptotically identical at higher quality values, they differ at lower quality levels (i.e., approximately p > 0.05, or equivalently, Q < 13).

Relationship between Q and p
Relationship between Q and p using the Sanger (red) and Solexa (black) equations (described above). The vertical dotted line indicates p = 0.05, or equivalently, Q ≈ 13.

At times there has been disagreement about which mapping Illumina actually uses. The user guide (Appendix B, page 122) for version 1.4 of the Illumina pipeline states that: "The scores are defined as Q=10*log10(p/(1-p)) [sic], where p is the probability of a base call corresponding to the base in question"[2]. In retrospect, this entry in the manual appears to have been an error. The user guide (What's New, page 5) for version 1.5 of the Illumina pipeline lists this description instead: "Important Changes in Pipeline v1.3 [sic]. The quality scoring scheme has changed to the Phred [i.e., Sanger] scoring scheme, encoded as an ASCII character by adding 64 to the Phred value. A Phred score of a base is: =-10 (e), where e is the estimated probability of a base being wrong[3].

Encoding[modifier | modifier le code]

  • Sanger format can encode a Phred quality score from 0 to 93 using ASCII 33 to 126 (although in raw read data the Phred quality score rarely exceeds 60, higher scores are possible in assemblies or read maps). Also used in SAM format[4]. Coming to the end of February 2011, Illumina's newest version (1.8) of their pipeline CASAVA will directly produce fastq in Sanger format, according to the announcement on seqanswers.com forum[5].
  • Solexa/Illumina 1.0 format can encode a Solexa/Illumina quality score from -5 to 62 using ASCII 59 to 126 (although in raw read data Solexa scores from -5 to 40 only are expected)
  • Illumina 1.3+ format can encode a Phred quality score from 0 to 62 using ASCII 64 to 126 (although in raw read data Phred scores from 0 to 40 only are expected).
  • The Phred scores 0 to 2 in Illumina 1.5+ have a slightly different meaning. The values 0 and 1 are no longer used and the value 2, encoded by ASCII 66 "B", is used also at the end of reads as a Read Segment Quality Control Indicator [6]. The Illumina manual[7] (page 30) states the following: If a read ends with a segment of mostly low quality (Q15 or below), then all of the quality values in the segment are replaced with a value of 2 (encoded as the letter B in Illumina's text-based encoding of quality scores)... This Q2 indicator does not predict a specific error rate, but rather indicates that a specific final portion of the read should not be used in further analyses. Also, the quality score encoded as "B" letter may occur internally within reads at least as late as pipeline version 1.6, as shown in the following example:
@HWI-EAS209_0006_FC706VJ:5:58:5894:21141#ATCACG/1
TTAATTGGTAAATAAATCTCCTAATAGCTTAGATNTTACCTTNNNNNNNNNNTAGTTTCTTGAGATTTGTTGGGGGAGACATTTTTGTGATTGCCTTGAT
+HWI-EAS209_0006_FC706VJ:5:58:5894:21141#ATCACG/1
efcfffffcfeefffcffffffddf`feed]`]_Ba_^__[YBBBBBBBBBBRTT\]][]dddd`ddd^dddadd^BBBBBBBBBBBBBBBBBBBBBBBB

An alternative interpretation of this ASCII encoding has been proposed[8]. Also, in Illumina runs using PhiX controls, the character 'B' was observed to represent an "unknown quality score". The error rate of 'B' reads was roughly 3 phred scores lower the mean observed score of a given run.

For raw reads, the range of scores will depend on the technology and the base caller used, but will typically be up to 40. Recent Illumina chemistry changes have resulted in reported quality scores of 41, which has broken various scripts and tools expecting an upper bound of 40. For aligned sequences and consensuses higher scores are common.

  SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.....................................................
  ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
  ...............................IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII......................
  .................................JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ......................
  LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................................................
  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
  |                         |    |        |                              |                     |
 33                        59   64       73                            104                   126

 S - Sanger        Phred+33,  raw reads typically (0, 40)
 X - Solexa        Solexa+64, raw reads typically (-5, 40)
 I - Illumina 1.3+ Phred+64,  raw reads typically (0, 40)
 J - Illumina 1.5+ Phred+64,  raw reads typically (3, 40)
    with 0=unused, 1=unused, 2=Read Segment Quality Control Indicator (bold) 
    (Note: See discussion above).
 L - Illumina 1.8+ Phred+33,  raw reads typically (0, 41)

Color space[modifier | modifier le code]

For SOLiD data, the sequence is in color space, except the first position. The quality values are those of the Sanger format. Alignment tools differ in their preferred version of the quality values: some include a quality score (set to 0, i.e. '!') for the leading nucleotide, others do not. The sequence read archive includes this quality score.

File extension[modifier | modifier le code]

There is no standard file extension for a FASTQ file, but .fq, .fastq, and .txt are commonly used.

Format converters[modifier | modifier le code]

  • Biopython version 1.51 onwards (interconverts Sanger, Solexa and Illumina 1.3+)
  • EMBOSS version 6.1.0 patch 1 onwards (interconverts Sanger, Solexa and Illumina 1.3+)
  • BioPerl version 1.6.1 onwards (interconverts Sanger, Solexa and Illumina 1.3+)
  • BioRuby version 1.4.0 onwards (interconverts Sanger, Solexa and Illumina 1.3+)
  • BioJava version 1.7.1 to 1.8.x (interconverts Sanger, Solexa and Illumina 1.3+)
  • MAQ can convert from Solexa to Sanger (use this patch to support Illumina 1.3+ files).
  • fastx_toolkit The included fastq_quality_converter program can convert Illumina to Sanger

See also[modifier | modifier le code]

References[modifier | modifier le code]

  1. Cock et al (2009) The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants. Nucleic Acids Research, doi:10.1093/nar/gkp1137
  2. Sequencing Analysis Software User Guide: For Pipeline Version 1.4 and CASAVA Version 1.0, dated April 2009 PDF
  3. Sequencing Analysis Software User Guide: For Pipeline Version 1.5 and CASAVA Version 1.0, dated August 2009 PDF
  4. Sequence/Alignment Map format Version 1.0, dated August 2009 PDF
  5. Seqanswer's topic of skruglyak, dated January 2011 website
  6. Illumina Quality Scores, Tobias Mann, Bioinformatics, San Diego, Illumina [1]
  7. [Using Genome Analyzer Sequencing Control Software, Version 2.6, Catalog # SY-960-2601, Part # 15009921 Rev. A, November 2009]http://watson.nci.nih.gov/solexa/Using_SCSv2.6_15009921_A.pdf
  8. SolexaQA project website

External links[modifier | modifier le code]

  • MAQ webpage discussing FASTQ variants
  • Galaxy fastq tools
  • Fastx toolkit collection of command line tools for Short-Reads FASTA/FASTQ files preprocessing
  • Fastqc quality control tool for high throughput sequence data
  • PRINSEQ can be used for QC and to filter, reformat, or trim sequence data (web-based and command line versions)

{{DEFAULTSORT:Fastq Format}} [[Category:Bioinformatics]] [[Category:Biological sequence format]]