The FASTA parser/unparser combo is a bit screwed up. Here's the problem it was trying to solve: FASTA definition lines can be quite longish with all sorts of potentially important information hidden in there (descriptions, identifiers, names) so we don't want to throw that away. On the other hand, the potential length, with multiple words and punctuation in it, could make it problematic to go from FASTA to NEXUS, for example. The current "fix" for this was to copy the definition line to a special field ($seq->get_generic('fasta_def_line')) but this is a bit buggy when attempting to roundtrip. Give this some attention.
The most sensible way to deal with this, and the one that causes the least amount of surprise, is to simply copy the whole definition line to get/set name and have users deal with the length.
The FASTA parser/unparser combo is a bit screwed up. Here's the problem it was trying to solve: FASTA definition lines can be quite longish with all sorts of potentially important information hidden in there (descriptions, identifiers, names) so we don't want to throw that away. On the other hand, the potential length, with multiple words and punctuation in it, could make it problematic to go from FASTA to NEXUS, for example. The current "fix" for this was to copy the definition line to a special field ($seq->get_generic('fasta_def_line')) but this is a bit buggy when attempting to roundtrip. Give this some attention.