Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

FASTA format

From Wikipedia, the free encyclopedia
File format for DNA or protein sequences
FASTA format
Filename extensions
.fasta, .fas, .fa, .fna, .ffn, .faa, .mpfa, .frn
Internet media type
text/x-fasta
Uniform Type Identifier (UTI)no
Developed byDavid J. Lipman
William R. Pearson[1][2]
Initial release1985
Type of formatBioinformatics
Extended fromASCII forFASTA
Extended toFASTQ format[3]
Websitewww.ncbi.nlm.nih.gov/BLAST/fasta.shtml

Inbioinformatics andbiochemistry, theFASTA format is a text-basedformat for representing eithernucleotide sequences or amino acid (protein) sequences, in which nucleotides oramino acids are represented using single-letter codes.

The format allows for sequence names and comments to precede the sequences. It originated from theFASTA software package and has since become a near-universal standard inbioinformatics.[4]

The simplicity of FASTA format makes it easy to manipulate and parse sequences using text-processing tools andscripting languages.

Overview

[edit]

A sequence begins with a greater-than character (">") followed by a description of the sequence (all in a single line). The lines immediately following the description line are the sequence representation, with one letter per amino acid or nucleic acid, and are typically no more than 80 characters in length.

For example:

>MCHU - Calmodulin - Human, rabbit, bovine, rat, and chickenMADQLTEEQIAEFKEAFSLFDKDGDGTITTKELGTVMRSLGQNPTEAELQDMINEVDADGNGTIDFPEFLTMMARKMKDTDSEEEIREAFRVFDKDGNGYISAAELRHVMTNLGEKLTDEEVDEMIREADIDGDGQVNYEEFVQMMTAK*

Original format

[edit]

The original FASTA/Pearson format is described in the documentation for theFASTA suite of programs. It can be downloaded with any free distribution of FASTA (see fasta20.doc, fastaVN.doc, or fastaVN.me—where VN is the Version Number).

In the original format, a sequence was represented as a series of lines, each of which was no longer than 120 characters and usually did not exceed 80 characters. This probably was to allow for the preallocation of fixed line sizes in software: at the time most users relied onDigital Equipment Corporation (DEC)VT220 (or compatible) terminals which could display 80 or 132 characters per line.[5][6] Most people preferred the bigger font in 80-character modes and so it became the recommended fashion to use 80 characters or less (often 70) in FASTA lines. Also, the width of a standard printed page is 70 to 80 characters (depending on the font). Hence, 80 characters became the norm.[7]

The first line in a FASTA file started either with a ">" (greater-than) symbol or, less frequently, a ";"[8] (semicolon) was taken as a comment. Subsequent lines starting with a semicolon would be ignored by software. Since the only comment used was the first, it quickly became used to hold a summary description of the sequence, often starting with a unique library accession number, and with time it has become commonplace to always use ">" for the first line and to not use ";" comments (which would otherwise be ignored).

Following the initial line (used for a unique description of the sequence) was the actual sequence itself in the standard one-letter character string. Anything other than a valid character would be ignored (including spaces, tabulators, asterisks, etc...). It was also common to end the sequence with an "*" (asterisk) character (in analogy with use in PIR formatted sequences) and, for the same reason, to leave a blank line between the description and the sequence. Below are a few sample sequences:

;LCBO - Prolactin precursor - Bovine; a sample sequence in FASTA formatMDSKGSSQKGSRLLLLLVVSNLLLCQGVVSTPVCPNGPGNCQVSLRDLFDRAVMVSHYIHDLSSEMFNEFDKRYAQGKGFITMALNSCHTSSLPTPEDKEQAQQTHHEVLMSLILGLLRSWNDPLYHLVTEVRGMKGAPDAILSRAIEIEEENKRLLEGMEMIFGQVIPGAKETEPYPVWSGLPSLQTKDEDARYSAFYNLLHCLRRDSSKIDTYLKLLNCRIIYNNNC*>MCHU - Calmodulin - Human, rabbit, bovine, rat, and chickenMADQLTEEQIAEFKEAFSLFDKDGDGTITTKELGTVMRSLGQNPTEAELQDMINEVDADGNGTIDFPEFLTMMARKMKDTDSEEEIREAFRVFDKDGNGYISAAELRHVMTNLGEKLTDEEVDEMIREADIDGDGQVNYEEFVQMMTAK*>gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLVEWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLGLLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVILGLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGXIENY

A multiple-sequence FASTA format, or multi-FASTA format, would be obtained by concatenating several single-sequence FASTA files in one file. This does not imply a contradiction with the format as only the first line in a FASTA file may start with a ";" or ">", forcing all subsequent sequences to start with a ">" in order to be taken as separate sequences (and further forcing the exclusive reservation of ">" for the sequence definition line). Thus, the examples above would be a multi-FASTA file if taken together.

Modern bioinformatics programs that rely on the FASTA format expect the sequence headers to be preceded by ">". The sequence is generally represented as "interleaved", or on multiple lines as in the above example, but may also be "sequential", or on a single line. Running different bioinformatics programs may require conversions between "sequential" and "interleaved" FASTA formats.

Description line

[edit]

The description line (defline) or header/identifier line, which begins with ">", gives a name and/or a unique identifier for the sequence, and may also contain additional information. In a deprecated practice, the header line sometimes contained more than one header, separated by a ^A (Control-A) character. In the originalPearson FASTA format, one or more comments, distinguished by a semi-colon at the beginning of the line, may occur after the header. Some databases and bioinformatics applications do not recognize these comments and followthe NCBI FASTA specification. An example of a multiple sequence FASTA file follows:

>SEQUENCE_1MTEITAAMVKELRESTGAGMMDCKNALSETNGDFDKAVQLLREKGLGKAAKKADRLAAEGLVSVKVSDDFTIAAMRPSYLSYEDLDMTFVENEYKALVAELEKENEERRRLKDPNKPEHKIPQFASRKQLSDAILKEAEEKIKEELKAQGKPEKIWDNIIPGKMNSFIADNSQLDSKLTLMGQFYVMDDKKTVEQVIAEKEKEFGGKIKIVEFICFEVGEGLEKKTEDFAAEVAAQL>SEQUENCE_2SATVSEINSETDFVAKNDQFIALTKDTTAHIQSNSLQSVEELHSSTINGVKFEEYLKSQIATIGENLVVRRFATLKAGANGVVNGYIHTNGRVGVVIAAACDSAEVASKSRDLLRQICMH

NCBI identifiers

[edit]

TheNCBI defined a standard for the unique identifier used for the sequence (SeqID) in the header line. This allows a sequence that was obtained from a database to be labelled with a reference to its database record. The database identifier format is understood by the NCBI tools likemakeblastdb andtable2asn. The following list describes the NCBI FASTA defined format for sequence identifiers.[9]

TypeFormat(s)Example(s)
local (i.e. no database reference)lcl|integer

lcl|string

lcl|123

lcl|hmm271

GenInfo backbone seqidbbs|integerbbs|123
GenInfo backbone moltypebbm|integerbbm|123
GenInfo import IDgim|integergim|123
GenBankgb|accession|locusgb|M73307|AGMA13GT
EMBLemb|accession|locusemb|CAM43271.1|
PIRpir|accession|namepir||G36364
SWISS-PROTsp|accession|namesp|P01013|OVAX_CHICK
patentpat|country|patent|sequence-numberpat|US|RE33188|1
pre-grant patentpgp|country|application-number|sequence-numberpgp|EP|0238993|7
RefSeqref|accession|nameref|NM_010450.1|
general database reference
(a reference to a database that's not in this list)
gnl|database|integer

gnl|database|string

gnl|taxon|9606

gnl|PID|e1632

GenInfo integrated databasegi|integergi|21434723
DDBJdbj|accession|locusdbj|BAC85684.1|
PRFprf|accession|nameprf||0806162C
PDBpdb|entry|chainpdb|1I4L|D
third-partyGenBanktpg|accession|nametpg|BK003456|
third-partyEMBLtpe|accession|nametpe|BN000123|
third-partyDDBJtpd|accession|nametpd|FAA00017|
TrEMBLtr|accession|nametr|Q90RT2|Q90RT2_9HIV1

The vertical bars ("|") in the above list are not separators in the sense of theBackus–Naur form but are part of the format. Multiple identifiers can be concatenated, also separated by vertical bars.

Sequence representation

[edit]

Following the header line, the actual sequence is represented. Sequences may beprotein sequences ornucleic acid sequences, and they can contain gaps or alignment characters (seesequence alignment). Sequences are expected to be represented in the standardIUB/IUPACamino acid andnucleic acid codes, with these exceptions: lower-case letters are accepted and are mapped into upper-case; a single hyphen or dash can be used to represent a gap character; and in amino acid sequences, U and * are acceptable letters (see below). Numerical digits are not allowed but are used in some databases to indicate the position in the sequence. The nucleic acid codes supported are:[10][11][12]

Nucleic Acid CodeMeaningMnemonic
AAAdenine
CCCytosine
GGGuanine
TTThymine
UUUracil
(i)iinosine (non-standard)
RA or G (I)puRine
YC, T or UpYrimidines
KG, T or Ubases which areKetones
MA or Cbases withaMino groups
SC or GStrong interaction
WA, T or UWeak interaction
Bnot A (i.e. C, G, T or U)B comes after A
Dnot C (i.e. A, G, T or U)D comes after C
Hnot G (i.e., A, C, T or U)H comes after G
Vneither T nor U (i.e. A, C or G)V comes after U
NA C G T UNucleic acid
-gap of indeterminate length

The amino acid codes supported (22 amino acids and 3 special codes) are:

Amino Acid CodeMeaning
AAlanine
BAspartic acid (D) orAsparagine (N)
CCysteine
DAspartic acid
EGlutamic acid
FPhenylalanine
GGlycine
HHistidine
IIsoleucine
JLeucine (L) orIsoleucine (I)
KLysine
LLeucine
MMethionine/Start codon
NAsparagine
OPyrrolysine (rare)
PProline
QGlutamine
RArginine
SSerine
TThreonine
USelenocysteine (rare)
VValine
WTryptophan
YTyrosine
ZGlutamic acid (E) orGlutamine (Q)
Xany
*translation stop
-gap of indeterminate length

FASTA file

[edit]

Filename extension

[edit]

There is no standardfilename extension for a text file containing FASTA formatted sequences. The table below shows each extension and its respective meaning.

ExtensionMeaningNotes
fasta, fas, fa[13]generic FASTAAny generic FASTA file
fnaFASTA nucleic acidUsed generically to specify nucleic acids
ffnFASTA nucleotide of gene regionsContains coding regions for a genome
faaFASTA amino acidContains amino acid sequences
mpfaFASTA amino acidsContains multiple protein sequences
frnFASTAnon-coding RNAContains non-coding RNA regions for a genome, e.g. tRNA, rRNA

Compression

[edit]

The compression of FASTA files requires a specific compressor to handle both channels of information: identifiers and sequence. For improved compression results, these are mainly divided into two streams where the compression is made assuming independence. For example, the algorithm MFCompress[14] performs lossless compression of these files using context modelling and arithmetic encoding. Genozip,[15] a software package for compressing genomic files, uses an extensible context-based model. Benchmarks of FASTA file compression algorithms have been reported by Hosseini et al. in 2016,[16] and Kryukov et al. in 2020.[17]

Encryption

[edit]

The encryption of FASTA files can be performed with various tools, including Cryfa and Genozip. Cryfa uses AES encryption and also enables data compression.[18][19] Similarly, Genozip can encrypt FASTA files with AES-256 during compression.[15]

Extensions

[edit]

FASTQ format is a form of FASTA format extended to indicate information related to sequencing. It is created by theSanger Centre in Cambridge.[3]

A2M/A3M are a family of FASTA-derived formats used forsequence alignments. In A2M/A3M sequences, lowercase characters are taken to mean insertions, which are then indicated in the other sequences as the dot (".") character. The dots can be discarded for compactness without loss of information. As with typical FASTA files used in alignments, the gap ("-") is taken to mean exactly one position.[20] A3M is similar to A2M, with the added rule that gaps aligned to insertions can too be discarded.[21]

Working with FASTA files

[edit]

A plethora of user-friendly scripts are available from the community to perform FASTA file manipulations. Online toolboxes, such as FaBox[22] or the FASTX-Toolkit within Galaxy servers, are also available.[23] These can be used to segregate sequence headers/identifiers, rename them, shorten them, or extract sequences of interest from large FASTA files based on a list of wanted identifiers (among other available functions). A tree-based approach to sorting multi-FASTA files (TREE2FASTA[24]) also exists based on the coloring and/or annotation of sequences of interest in the FigTree viewer. Additionally, theBioconductorBiostrings package can be used to read and manipulate FASTA files inR.[25]

Several online format converters exist to rapidly reformat multi-FASTA files to different formats (e.g. NEXUS, PHYLIP) for use with different phylogenetic programs, such as the converter available on phylogeny.fr.[26]

See also

[edit]
  • TheFASTQ format, used to represent DNA sequencer reads along with quality scores.
  • TheSAM andCRAM formats, used to represent genome sequencer reads that have been aligned to genome sequences.
  • The GVF format (Genome Variation Format), an extension based on theGFF3 format.

References

[edit]
  1. ^Lipman DJ, Pearson WR (March 1985). "Rapid and sensitive protein similarity searches".Science.227 (4693):1435–41.Bibcode:1985Sci...227.1435L.doi:10.1126/science.2983426.PMID 2983426.Closed access icon
  2. ^Pearson WR, Lipman DJ (April 1988)."Improved tools for biological sequence comparison".Proceedings of the National Academy of Sciences of the United States of America.85 (8):2444–8.Bibcode:1988PNAS...85.2444P.doi:10.1073/pnas.85.8.2444.PMC 280013.PMID 3162770.
  3. ^abCock PJ, Fields CJ, Goto N, Heuer ML, Rice PM (April 2010)."The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants".Nucleic Acids Research.38 (6):1767–71.doi:10.1093/nar/gkp1137.PMC 2847217.PMID 20015970.
  4. ^"What is FASTA format?".Zhang Lab.Archived from the original on 2022-12-04. Retrieved2022-12-04.
  5. ^Landsteiner, mass:werk, Norbert (2019-02-20)."(Now Go Bang!) Raster CRT Typography (According to DEC)".Now Go Bang! — mass:werk / Blog. Retrieved2024-03-15.{{cite web}}: CS1 maint: multiple names: authors list (link)
  6. ^"VT220 Built-in Glyphs".VT100. Retrieved2024-03-15.
  7. ^"Why is 80 characters the 'standard' limit for code width?".Software Engineering Stack Exchange. Retrieved2024-03-15.
  8. ^"FASTA Database Format".www.loc.gov. 2023-08-01. Retrieved2024-03-15.
  9. ^NCBI C++ Toolkit Book. National Center for Biotechnology Information. Retrieved2018-12-19.
  10. ^Tao Tao (2011-08-24)."Single Letter Codes for Nucleotides".[NCBI Learning Center].National Center for Biotechnology Information. Archived fromthe original on 2012-09-14. Retrieved2012-03-15.
  11. ^"IUPAC code table". NIAS DNA Bank. Archived fromthe original on 2011-08-11.
  12. ^"anysymbol".MAFFT - a multiple sequence alignment program.
  13. ^"Alignment Fileformats". 22 May 2019. Retrieved22 May 2019.
  14. ^Pinho AJ, Pratas D (January 2014)."MFCompress: a compression tool for FASTA and multi-FASTA data".Bioinformatics.30 (1):117–8.doi:10.1093/bioinformatics/btt594.PMC 3866555.PMID 24132931.
  15. ^abLan, Divon; Tobler, Ray; Souilmi, Yassine; Llamas, Bastien (2021-02-15)."Genozip: a universal extensible genomic data compressor".Bioinformatics.37 (16):2225–2230.doi:10.1093/bioinformatics/btab102.ISSN 1367-4803.PMC 8388020.PMID 33585897.
  16. ^Hosseini, Morteza; Pratas, Diogo; Pinho, Armando J. (2016)."A Survey on Data Compression Methods for Biological Sequences".Information.7 (4): 56.doi:10.3390/info7040056.ISSN 2078-2489.
  17. ^Kryukov K, Ueda MT, Nakagawa S, Imanishi T (July 2020)."Sequence Compression Benchmark (SCB) database—A comprehensive evaluation of reference-free compressors for FASTA-formatted sequences".GigaScience.9 (7) giaa072.doi:10.1093/gigascience/giaa072.PMC 7336184.PMID 32627830.
  18. ^Pratas D, Hosseini M, Pinho A (2017). "Cryfa: a tool to compact and encrypt FASTA files".11th International Conference on Practical Applications of Computational Biology & Bioinformatics (PACBB). Advances in Intelligent Systems and Computing. Vol. 616. Springer. pp. 305–312.doi:10.1007/978-3-319-60816-7_37.ISBN 978-3-319-60815-0.
  19. ^Hosseini, Morteza; Pratas, Diogo; Pinho, Armando J (2019-01-01). Berger, Bonnie (ed.)."Cryfa: a secure encryption tool for genomic data".Bioinformatics.35 (1):146–148.doi:10.1093/bioinformatics/bty645.ISSN 1367-4803.PMC 6298042.PMID 30020420.
  20. ^"Description of A2M alignment format".SAMtools. Archived fromthe original on 2022-08-15.
  21. ^"soedinglab/hh-suite: reformat.pl".GitHub. 20 November 2022.
  22. ^Villesen, P. (2007)."FaBox: an online toolbox for fasta sequences".Molecular Ecology Notes.7 (6):965–968.doi:10.1111/j.1471-8286.2007.01821.x.ISSN 1471-8278.
  23. ^Blankenberg D, Von Kuster G, Bouvier E, Baker D, Afgan E, Stoler N, Galaxy Team, Taylor J, Nekrutenko A (2014)."Dissemination of scientific software with Galaxy ToolShed".Genome Biology.15 (2): 403.doi:10.1186/gb4161.PMC 4038738.PMID 25001293.
  24. ^Sauvage T, Plouviez S, Schmidt WE, Fredericq S (March 2018)."TREE2FASTA: a flexible Perl script for batch extraction of FASTA sequences from exploratory phylogenetic trees".BMC Research Notes.11 (1): 403.doi:10.1186/s13104-018-3268-y.PMC 5838971.PMID 29506565.
  25. ^Pagès, H; Aboyoun, P; Gentleman, R; DebRoy, S (2018)."Biostrings: Efficient manipulation of biological strings".Bioconductor.org. R package version 2.48.0.doi:10.18129/B9.bioc.Biostrings.
  26. ^Dereeper A, Guignon V, Blanc G, Audic S, Buffet S, Chevenet F, Dufayard JF, Guindon S, Lefort V, Lescot M, Claverie JM, Gascuel O (July 2008)."Phylogeny.fr: robust phylogenetic analysis for the non-specialist".Nucleic Acids Research.36 (Web Server issue): W465–9.doi:10.1093/nar/gkn180.PMC 2447785.PMID 18424797.

External links

[edit]
Databases
Software
Other
Institutions
Organizations
Meetings
File formats
Related topics
Retrieved from "https://en.wikipedia.org/w/index.php?title=FASTA_format&oldid=1314136788"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp