BEAUti and partition data in NEXUS files

5,655 views
Skip to first unread message

Derek Braun

unread,
Oct 4, 2012, 3:05:37 PM10/4/12
to beast...@googlegroups.com
Does BEAUti import partition data from NEXUS files?

I tried a sample file but this did not work. The sequences imported, but not the partition data.

I ask, because there are a few different ways to define partitions in NEXUS files, and I was wondering if perhaps certain NEXUS commands were supported.

Thanks!

Eduardo Castro Nallar

unread,
Oct 4, 2012, 3:24:18 PM10/4/12
to beast...@googlegroups.com
It does! I always use it by creating a charset within a mrbayes block. For example for a virus dataset consisting on 5 genes:

begin mrbayes;

charset VP1 = 1-2274;
charset VP2 = 2275-4116;
charset VP3 = 4117-5310;
charset lta = 5311-8967;
charset sta = 8968-9882;

end;

You simply stick something like this at the end of the data block.

Eduardo

valerie soza

unread,
Oct 4, 2012, 3:09:39 PM10/4/12
to beast...@googlegroups.com
Hi Derek

I did not have luck importing a partitioned nexus file into Beauti so I wound up just importing the datasets separately into one Beauti file to generate an xml file with all the partitions.

-Valerie

Derek

unread,
Oct 6, 2012, 3:55:52 PM10/6/12
to beast...@googlegroups.com
Thank you, everyone!

All of the solutions I received involved using CHARSET name = X-YYY; commands to define each partition.

In summary, two people have said that it didn't work for them regardless. One person said that it worked if the CHARSET commands were inside of an ASSUMPTIONS block. Two people have said it works in MRBAYES blocks.

I found in a NEXUS specification that CHARSET commands belong inside of a SETS block.

Seems like it is a bit touch and go.. then again, most of these things are. Thanks again!

Derek

Andrew Rambaut

unread,
Oct 7, 2012, 3:00:40 AM10/7/12
to beast...@googlegroups.com
Hi Everyone,

BEAUti will import CHARSETs from ASSUMPTIONS, MRBAYES and PAUP blocks. If anyone has an example Nexus file that fits this but doesn't work, email it to me and I will take a look. I will add an issue that it should be looking for these in 'SETS' blocks as well.

Andrew

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/beast-users/-/9CuWQtwIaAAJ.
To post to this group, send email to beast...@googlegroups.com.
To unsubscribe from this group, send email to beast-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beast-users?hl=en.

___________________________________________________________________
 Andrew Rambaut                
 Institute of Evolutionary Biology       University of Edinburgh
 Ashworth Laboratories                         Edinburgh EH9 3JT
 EMAIL - a.ra...@ed.ac.uk                TEL - +44 131 6508624  

valerie soza

unread,
Oct 8, 2012, 12:36:02 PM10/8/12
to beast...@googlegroups.com, a.ra...@ed.ac.uk
Hi Andrew

I originally tried importing the attached nexus with character sets defined using a "Sets" block but got an error message: error parsing imported file -- dr.evolution.io.Importer$ImportException match character in first sequences.

So, then, I just imported the data sets individually into Beauti. Let me know if you see where the error is coming from. Thanks!

-Valerie


From: a.ra...@ed.ac.uk
Subject: Re: BEAUti and partition data in NEXUS files
Date: Sun, 7 Oct 2012 08:00:40 +0100
To: beast...@googlegroups.com
-- You received this message because you are subscribed to the Google Groups "beast-users" group. To post to this group, send email to beast...@googlegroups.com. To unsubscribe from this group, send email to beast-users...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/beast-users?hl=en.
trnV.ndhC.rpl16.ITS.ETS.B.nex

Rupert Collins

unread,
Apr 22, 2013, 3:38:28 PM4/22/13
to beast...@googlegroups.com
Hi Madalaine.

This format works for me to divide a single gene into three codon positions:

BEGIN SETS;
charset 1cp = 1-1339\3;
charset 2cp = 2-1340\3;
charset 3cp = 3-1341\3;
END;


On 15 April 2013 01:45, <madalai...@gmail.com> wrote:
Hi Team, 

So I have read through this discussion and I created a Nexus file with the charset block at the bottom stating the partitions I want, however when I load it into BEAUti, I get no recognition of partitions. I don't have error messages, but I also don't have anything telling me it has partitioned the file. I hope someone can help. 

Cheers, 
Madalaine.



--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.

To post to this group, send email to beast...@googlegroups.com.

Marcos

unread,
May 6, 2013, 2:06:27 PM5/6/13
to beast...@googlegroups.com
Hello. I am having issues working with partitions  BEAUti v1.75.  When I tried to open a concatenated nexus file that was partitioned using CHARSETS or when I try to add the partitions as separate NEXUS files, I am not able to assign different models to the partitions.  I have attached two print screens using the Primates.nex file, provided as an example that is part of the distribution.  Note that the file has 2 charsets ( firsthalf and secondhalf )  and that, on the first screen, all options are filled with 'firsthalf'.  If I use the pull-down menus, that is still the only option that shows up.  Something similar happens when I open the 'Sites' tab (screenshot_2).  I can only assign a model to the 'firsthalf' partition, the other is simply ignored.  i get the same thing whether I am running BEAUTi under Linux or Windows.  Any ideas?

Thanks in advance.
screenshot_1.jpg
screenshot_2.jpg

Mike Bayly

unread,
May 6, 2013, 5:21:00 PM5/6/13
to beast...@googlegroups.com
Hi Marcus,

On the partitions screen if you highlight both partitions you should then be able to select "Unlink subst. Models" etc.  Once you have done this you should be able to assign separate models on the sites screen and other relevant bits.

Mike



From: beast...@googlegroups.com [beast...@googlegroups.com] on behalf of Marcos [msbar...@gmail.com]
Sent: Tuesday, 7 May 2013 4:06 AM
To: beast...@googlegroups.com

Subject: Re: BEAUti and partition data in NEXUS files
--

Marcos

unread,
May 7, 2013, 9:19:11 AM5/7/13
to beast...@googlegroups.com
That worked, thanks for the tip!


Em quinta-feira, 4 de outubro de 2012 16h05min46s UTC-3, Derek escreveu:

egor...@ucr.edu

unread,
Jul 9, 2013, 6:28:00 PM7/9/13
to beast...@googlegroups.com
Hi, 

I've been having a similar problem with getting my dataset to import already partitioned. I have the following in my nexus file:


BEGIN SETS;

CHARSET 18s_EINSI_pir   =   1 -  983;
CHARSET 16s_EINSI_pir   =   984 -  1582;
CHARSET D2_EINSI_pir   =   1583 -  2408;
CHARSET Wg_EINSI_pir   =   2409 -  2802;
CHARSET D3_EINSI_pir   =   2803 -  3522;
CHARSET Dfd_EINSI_pir   =   3523 -  4217;


END;
 

It is in my SETS block currently. But the same error appears no matter where I put it under a mrbayes block or the assumptions block. I'm using BEAUti v.1.7.5. Is there something I'm missing? I've spent two days trying to get a nexus file that will import properly. 

Thanks in advance for any help. 

Best,
Eric Gordon
2013-07-09 03.24.55 pm.png

egor...@ucr.edu

unread,
Jul 9, 2013, 6:30:47 PM7/9/13
to beast...@googlegroups.com
Oops, since my attachment didn't work the error message reads: "Error parsing imported file: dr.evolution.io.importer$ImportException: CharSet,18s_EINSI_pir, unable to be parsed" 


On Thursday, October 4, 2012 12:05:46 PM UTC-7, Derek wrote:

Andrew Rambaut

unread,
Jul 10, 2013, 3:34:35 AM7/10/13
to beast...@googlegroups.com
Try removing the spaces from the nucleotide range:

CHARSET 18s_EINSI_pir   =   1-983;
CHARSET 16s_EINSI_pir   =   984-1582;
CHARSET D2_EINSI_pir   =   1583-2408;
CHARSET Wg_EINSI_pir   =   2409-2802;
CHARSET D3_EINSI_pir   =   2803-3522;
CHARSET Dfd_EINSI_pir   =   3523-4217;

The spaces should be allowed so I will add a bug report to the website.

Andrew

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
<2013-07-09 03.24.55 pm.png>

egor...@ucr.edu

unread,
Jul 10, 2013, 11:53:47 AM7/10/13
to beast...@googlegroups.com
Wow, I can't believe it was as simple as that! Thanks so much for your help. The spaces added in is the way that SequenceMatrix (and possibly Mesquite as well) exported a nexus file.


On Thursday, October 4, 2012 12:05:46 PM UTC-7, Derek wrote:

Christian Rinke

unread,
Feb 13, 2014, 12:21:12 AM2/13/14
to beast...@googlegroups.com
I am having a similar problem with BEAUti 1.8.0. No error message, but no partitions are imported.
Thanks, Chris

begin assumptions;
charset gene_1 = 1-118;
charset gene_2 = 118-421;
charset gene_3 = 421-601;
charset gene_4 = 601-756;
charset gene_5 = 756-924;
charset gene_6 = 924-1117;
charset gene_7 = 1117-1226;
charset gene_8 = 1226-1317;
charset gene_9 = 1317-1543;
charset gene_10 = 1543-1684;
charset gene_11 = 1684-2099;
charset gene_12 = 2099-2295;
charset gene_13 = 2295-2373;
charset gene_14 = 2373-2904;
charset gene_15 = 2904-3112;
charset gene_16 = 3112-3200;
charset gene_17 = 3200-3328;
charset gene_18 = 3328-3431;
charset gene_19 = 3431-3607;
charset gene_20 = 3607-3763;
charset gene_21 = 3763-4361;
charset gene_22 = 4361-4894;
charset gene_23 = 4894-4990;
charset gene_24 = 4990-5103;
charset gene_25 = 5103-5273;
charset gene_26 = 5273-5406;
charset gene_27 = 5406-5531;
charset gene_28 = 5531-5733;
charset gene_29 = 5733-5851;
charset gene_30 = 5851-6551;
charset gene_31 = 6551-6770;
charset gene_32 = 6770-6908;
charset gene_33 = 6908-7009;
charset gene_34 = 7009-7127;
charset gene_35 = 7127-7362;
charset gene_36 = 7362-7719;
charset gene_37 = 7719-7902;
charset gene_38 = 7902-8064;
end;

Christian Rinke

unread,
Feb 14, 2014, 5:05:39 PM2/14/14
to beast...@googlegroups.com
I am having the same problem with my file, any help is appreciated:

begin assumptions;
charset gene_1_of38MDM = 1-117;
charset gene_2_of38MDM = 118-420;
charset gene_3_of38MDM = 421-600;
charset gene_4_of38MDM = 601-755;
charset gene_5_of38MDM = 756-923;
charset gene_6_of38MDM = 924-1116;
charset gene_7_of38MDM = 1117-1225;
charset gene_8_of38MDM = 1226-1316;
charset gene_9_of38MDM = 1317-1542;
end;

No partitions are imported and no error message is displayed in BEAUti.
Thanks,
Chris

Message has been deleted

Andrew Rambaut

unread,
Feb 20, 2014, 2:24:34 AM2/20/14
to beast...@googlegroups.com
Dear Chris,

I added this exact to the bottom of one of my nexus files and it imported OK with all the partitions
present. 

Does the file import if you don't have this block? 

If you can send me the complete XML I will try and find out what the issue is.

Andrew


Andrew Rambaut

unread,
Feb 20, 2014, 2:33:10 AM2/20/14
to beast...@googlegroups.com
The first time a member posts a message it is moderated (to save you from spam bots). However,
it can sometimes take a little while for a moderator to release the messages. Once we confirm 
you want to post about BEAST, all subsequent posts from that email address have no moderation. 

Andrew

On 14 Feb 2014, at 22:30, Christian Rinke <christi...@gmail.com> wrote:

Who is moderating this forum and deleting all my messages???!!!!

Christian Rinke

unread,
Feb 21, 2014, 3:02:20 PM2/21/14
to beast...@googlegroups.com
Hi Andrew,
Thanks for your reply. It seems I have an issue with the latest BEAUti version.
I was using  1.8.0, and switching to 1.7.5 saved all my issues.
The 38 partitions loaded fine!
And the "this is not a bifurcating tree" error which I got when importing a strictly bifurcating tree is gone also.

File is attached.
Thanks, Chris
38x_partitions.nex

Niloofar Vaghefi

unread,
May 16, 2017, 1:40:38 AM5/16/17
to beast-users
Thanks Chris!
I had the same problem with BEAUTi 2, but I downloaded version 1.7.5 and the same nexus file was imported with no problems.

Cheers,
Niloofar

Remco Bouckaert

unread,
May 17, 2017, 4:04:08 PM5/17/17
to beast...@googlegroups.com
For future reference — after checking with Niloofar, it turns out that in BEAUti 2.4.6, spaces are required around the equal sign, so

charset gene_1_of38MDM = 1-117;

if fine but

charset gene_1_of38MDM=1-117;

if problematic. This will be fixed in the next release.

Cheers, Remco


Reply all
Reply to author
Forward
0 new messages