The extensible NEXUS file format is widely used in phylogenetics, evolutionary biology, and bioinformatics. It stores information about taxa, morphological character states, DNA and protein sequence alignments, distances, and phylogenetic trees. The NEXUS format also allows the storage of data that can facilitate analyses, such as sets of characters or taxa. Many popular phylogenetic programs, including PAUP*,PAUP* — Phylogenetic Analysis Using Parsimony *and other methods MrBayes,MrBayes Mesquite,Mesquite: A modular system for evolutionary analysis MacClade,MacClade and SplitsTree, Huson and Bryant, Application of Phylogenetic Networks in Evolutionary Studies, Mol Biol Evol (2005) 23 (2): 254-267. https://doi.org/10.1093/molbev/msj030 use this format. Nexus file names typically have the extension .nxs or .nex .
Syntax A NEXUS file is made out of a fixed header #NEXUS followed by multiple blocks. Each block starts with BEGIN block_name; and ends with END;. The keywords are case-insensitive. Comments are enclosed inside square brackets .Detailed NEXUS specification Each of the pre-defined types of blocks may appear only once. +Block NameDescriptionTAXASpecifies the OTUs (operational taxonomic units) in data setCHARACTERSSpecifies the character data (e.g., homologous morphological characters or a multiple sequence alignment)DATAEquivalent to a CHARACTERS block that includes the NewTaxa subcommand in the Dimensions commandTREESStores trees in Newick formatDISTANCESStores distance matricesSETSAssigns names to sets of characters (CHARSET) or OTUs (TAXSET)ASSUMPTIONSAssumptions about the data or directions regarding data treatment (e.g., the character exclusion status) The following example NEXUS uses the TAXA, CHARACTERS, and TREES blocks:
#NEXUS Begin TAXA; Dimensions ntax=4; TaxLabels Alpha Beta Gamma Delta; End;
Begin CHARACTERS; Dimensions nchar=15; Format datatype=dna missing=? gap=- matchchar=.; Matrix [ When a position is a "matchchar", it means that it is the same as the first entry at the same position. ] Alpha Beta Gamma [ same as atgttagctag-tgg ] Delta
End;
Begin TREES; Tree tree1 = ((Alpha,Beta),Gamma,Delta); END;
See also Newick format NeXML format phyloXML
References
External links NEXUS file format — detailed explanation with many examples NEXUS format — a good description of the format and its uses in the field Nexus to phyloXML converter NeXML Nexus to Fasta converter