Nexus file

{{Short description|File format used in bioinformatics}}

{{for|the NeXus format used in neutron, x-ray, and muon scattering|Nexus (data format)}}

{{Infobox file format

| name = Nexus format

| icon =

| iconcaption =

| screenshot =

| caption =

|_noextcode = on

| extensions = usually {{code|.nex}} or {{code|.nxs}}

|_nomimecode = on

| mime =

| type_code =

| uniform_type =

| conforms_to =

| magic = {{code|'#NEXUS\n'}}

| developer = Maddison DR, Swofford DL, Maddison WP

| released = {{start date and age|df=yes|paren=yes|1997|12}}

| latest_release_version =

| latest_release_date =

| genre = bioinformatics

| container_for =

| contained_by =

| extended_from =

| extended_to =

| standard =

| open = Yes

| url =

}}

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.{{cite journal |doi=10.1093/sysbio/46.4.590 |vauthors=Maddison DR, Swofford DL, Maddison WP |title=NEXUS: An extensible file format for systematic information |journal=Systematic Biology |volume=46 |issue=4 |year=1997 |pages=590–621 |pmid=11975335|doi-access=free }} 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*,[http://paup.csit.fsu.edu/index.html PAUP*] {{Webarchive|url=https://web.archive.org/web/20060903115314/http://paup.csit.fsu.edu/index.html |date=2006-09-03 }} — Phylogenetic Analysis Using Parsimony *and other methods MrBayes,[http://mrbayes.csit.fsu.edu/ MrBayes] Mesquite,[http://mesquiteproject.wikispaces.com/ Mesquite: A modular system for evolutionary analysis] MacClade,[http://macclade.org/index.html 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 {{code|[...]}}.[http://informatics.nescent.org/wiki/NEXUS_Specification Detailed NEXUS specification] Each of the pre-defined types of blocks may appear only once.

class="wikitable"

|+

!Block Name

!Description

TAXA

|Specifies the OTUs (operational taxonomic units) in data set

CHARACTERS

|Specifies the character data (e.g., homologous morphological characters or a multiple sequence alignment)

DATA

|Equivalent to a CHARACTERS block that includes the NewTaxa subcommand in the Dimensions command

TREES

|Stores trees in Newick format

DISTANCES

|Stores distance matrices

SETS

|Assigns names to sets of characters (CHARSET) or OTUs (TAXSET)

ASSUMPTIONS

|Assumptions 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 {{DNA sequence|atgctagctagctcg}}

Beta {{DNA sequence|......??...-.a.}}

Gamma {{DNA sequence|...t.......-.g.}} [ same as atgttagctag-tgg ]

Delta {{DNA sequence|...t.......-.a.}}

;

End;

Begin TREES;

Tree tree1 = ((Alpha,Beta),Gamma,Delta);

END;

See also

References

{{reflist}}