#nexus

[!
***************************************************
* This NEXUS file is designed to test the NCL by  *
* presenting it with several different variants   *
* of the CHARACTERS block.  After each variant,   *
* a special 'showall' comment directs the nexus   *
* reader to spit out the contents of all blocks   *
* currently stored.  The file reference.txt holds *
* the output expected (use the DOS command fc or  *
* the UNIX command diff to compare your output to * 
* reference.txt to see if your implementation is  * 
* working correctly.                              *
***************************************************
]

begin taxa;
  dimensions ntax=6;
  taxlabels
	'P. fimbriata'
	'P. robusta'
	'P. americana'
	'P. myriophylla'
	'P. polygama'
	'P. macrophylla'
  ;
end;

[!
*************
* Standard  *
*************
]
begin characters;
  dimensions nchar=45;
  format datatype=dna missing=? gap=-;
  matrix
	P._fimbriata    acctcggcttaacgaacctcggcttaacgaacctcggcttaacga
	P._robusta      acctcggcttaaccaacctcggcttaacgaacctcggcttaacga
	P._americana    acgtcgctttca---acgtcgctttcaccaacgtcgctttcacca
	P._myriophylla  acgtcgctttca---acgtcgctttcaccaacgtc?ctttcacca
	P._polygama     acgtcgctctcaccaacgtcgctttcaccaacgtc?ctttcacca
	P._macrophylla  acgtcgctctcaccaacgtcgctttcaccaacgtcgctttcacca
  ;
end;

[&showall]

[!
**********
* Tokens *
**********
]
begin characters;
  dimensions nchar=3;
  charstatelabels
	1 'leaf margins' / entire fimbriate,
	2 'flower color' / 'white to cream' crimson,
	3 'breeding system' / hermaphroditic gynomonoecious gynodioecious dioecious
  ;
  format tokens;
  matrix
	P._fimbriata    fimbriate  crimson         gynomonoecious
	P._robusta      fimbriate  crimson         gynomonoecious
	P._americana    entire     white_to_cream  hermaphroditic
	P._myriophylla  entire     white_to_cream  hermaphroditic
	P._polygama     entire     white_to_cream  dioecious
	P._macrophylla  entire     crimson         gynodioecious
  ;
end;

[&showall]

[!
***********
* Symbols *
***********
]
begin characters;
  dimensions nchar=3;
  charstatelabels
	1 'leaf margins' / entire fimbriate,
	2 'flower color' / 'white to cream' crimson,
	3 'breeding system' / hermaphroditic gynomonoecious gynodioecious dioecious
  ;
  format notokens symbols="0123";
  matrix
	P._fimbriata    111
	P._robusta      111
	P._americana    000
	P._myriophylla  000
	P._polygama     003
	P._macrophylla  012
  ;
end;

[&showall]

[!
*****************************
* Interleaved, missing taxa *
*****************************
]
begin characters;
  dimensions ntax=4 nchar=15;
  format datatype=dna interleave;
  matrix
	P._fimbriata    acctcggc
	P._robusta      acctcggc
	P._americana    acgtcgct
	P._myriophylla  acgtcgct

	P._fimbriata    ttaacga
	P._robusta      ttaacca
	P._americana    ctcacca
	P._myriophylla  ttcacca
  ;
end;

[&showall]

[!
****************
** transposed **
****************
]

begin characters;
  dimensions nchar=15;
  format datatype=dna transpose;
  matrix
      site_1   aaaaaa
      site_2   cccccc
      site_3   ccggcc
      site_4   tttttt
      site_5   cccccc
      site_6   gggggg
      site_7   ggcccc
      site_8   cctttt
      site_9   ttcttt
      site_10  tttttt
      site_11  aacccc
      site_12  aaaaaa
      site_13  cccccc
      site_14  gcccgg
      site_15  aaaaaa
  ;
end;


