Error importing nexus files to Beauti

1,389 views
Skip to first unread message

Karen Poole

unread,
Jan 22, 2014, 12:27:39 PM1/22/14
to beast...@googlegroups.com
Hi all,

When I try to import my data into Beauti, I get the following error message: "Error parsing imported file: dr.evolution.io.Importer$ImportException: Expecting ';' after sequences data, has '?' in line 57."

Line 57 is the last line of my data matrix, so it has quite a few question marks.  I've tried moving the semi-colon at the end of the data matrix around just to see if I can import the file, with no results.  I have no trouble importing the example files, and I can open the file with my data in other programs.  Any ideas as to what the problem might be?

In case this info is helpful, my data was compiled in Mesquite.  I exported the nexus file from there, both in MrBayes and simplified nexus formats.  Neither one worked.

Thanks,
Karen

Natalia

unread,
Jan 22, 2014, 3:02:37 PM1/22/14
to beast...@googlegroups.com
Hello Karen,
I am by no means an expert in this, but I had similar errors and there were caused by the taxon names not being identical in all of my partitions. It seems though that you just have one partition. Also, Mesquite adds sometimes elements that are not recognized from other programs such as the symbols command before the character matrix. If you want, you can send your nexus file and I will have a look. 
Natalia

Karen Poole

unread,
Jan 23, 2014, 9:38:55 PM1/23/14
to beast...@googlegroups.com
Thanks Natalia,

You're right that I only have one partition at the moment, so that shouldn't be the issue.  I'm attaching the nexus file here--if you can see what's wrong with it I'd really appreciate it!

Karen
opod.txt

Natalia Chousou-Polydouri

unread,
Jan 23, 2014, 10:45:13 PM1/23/14
to beast...@googlegroups.com
Hello Karen,
I think I found the problem. I think it is the way you code polymorphisms {0 1}. I replaced a character on a binary matrix of mine with the above notation and I got pretty much an identical error. Without the polymorphism, the file is imported fine in beauti.
Unfortunately, I don't know how beast can read polymorphic states. Maybe there is a different notation for polymorphism for the standard datatype? Or you should define a new state for the polymorphism (like the ambiguity codes in DNA) and replace this notation in your file. Then in order for the ambiguities/polymorphism to be taken into account and not be treated as missing data, you should check the use ambiguities box.
sorry for not being able to help more,
Natalia


--
You received this message because you are subscribed to a topic in the Google Groups "beast-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beast-users/8-NvKgYI930/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at http://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/groups/opt_out.

Karen Poole

unread,
Jan 23, 2014, 11:10:41 PM1/23/14
to beast...@googlegroups.com
Yes--that's the problem!  I tested it by replacing the polymorphisms with question marks, and was able to import the file.  I'll look into different ways of coding those states (likely using separate states to represents polymorphisms).

Thanks so much for your help!
Karen

Manabu Sakamoto

unread,
Jan 19, 2015, 6:38:14 AM1/19/15
to beast...@googlegroups.com
Hello,

Did this issue get resolved? I'm having exactly the same problem; I can't import NEXUS file into BEAUTi because of multi-state characters.

many thanks,
Manabu

Manabu Sakamoto

unread,
Jul 13, 2016, 10:45:48 AM7/13/16
to beast-users
Just as a follow up in case anyone wanted an answer to this issue, I figured out that multistate characters need to be in curly braces "{ }" instead of parentheses "( )" in order for NEXUS files to be read into BEAUti. 

Nicole Veto

unread,
May 16, 2017, 1:40:40 AM5/16/17
to beast-users
Hi everyone,

I had the same problem. But, how I didn't the have these characters between {} or [], Manabu warned about the spaces in the taxons name. Now everything is working normally.

Cheers,

Nicole
Reply all
Reply to author
Forward
0 new messages