BEAUti command line

1,386 views
Skip to first unread message

Francesco Cicconardi

unread,
Aug 11, 2014, 9:29:35 AM8/11/14
to beast...@googlegroups.com
Dear all,

I'd like to run a *BEAST analysis using several loci. Using the graphical interface of BEAUti would be very very time consuming and not very reproducible. Is there a batch way to create the xml file?

thanks
F

Axel Barlow

unread,
Aug 11, 2014, 10:46:55 AM8/11/14
to beast...@googlegroups.com
We ran into a similar problem when we needed to run the same analysis but with many different sets of individuals. So we generated a starting xml in beauti with the first taxon set,  then generated a perl script to automatically replace the relevant taxon elements and sequences within the xml with new ones. Then we could generate a whole bunch of different xml files in an automated fashion. These were run in beast from the command line.

There may be different/better approaches, but this is the what we came up with. I'd be really interested to hear how other people have tackled this.

Regards, Axel.
--
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.
Visit this group at http://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.

-- 

óÔÔò ʕ·͡ᴥ·ʔ óÔÔò      óÔÔò ʕ·͡ᴥ·ʔ óÔÔò      óÔÔò ʕ·͡ᴥ·ʔ óÔÔò

Dr. Axel Barlow

Institute for Biochemistry and Biology
University of Potsdam
Karl-Liebknecht-Str. 24-25
14476 Potsdam (Golm)
Germany

email: axel.ba...@gmail.com
phone: +49 3319776327

Francesco Cicconardi

unread,
Aug 11, 2014, 12:35:06 PM8/11/14
to beast...@googlegroups.com
Hi Axel,

I was thinking at the same approach, but in my case I don't have to replace xml section, rather building a brand new xml file more or less from scratch... Is there anything easier?

Best
F

Andrew Rambaut

unread,
Aug 11, 2014, 12:44:12 PM8/11/14
to beast...@googlegroups.com
There is a tool called BEASTgen which you can use to create templates and then apply multiple datasets to them using a command line:


It is very general purpose so you can use it to create BEAST, MrBayes or other files. There are some example templates in the package and some
brief instructions. 

Andrew

Batsi

unread,
Jul 16, 2020, 1:40:02 PM7/16/20
to beast-users
hi, thank you for the BEASTgen application. I have a fasta alignment with sequence names in the following format: accession_location_subtype_year

I have pasted first block on my xml code below. I first ran without the "${taxon.location}" and I got my xml, but it did not assign the dates correctly. I then added the "${taxon.location}" and I got an error that it is null or missing. I wanted to ask how I can format in the template to retrieve the location and year correctly.

<!-- The list of taxa to be analysed (can also include dates/ages).          -->
<!-- ntax=${taxon_count}                                                                 -->
<taxa id="taxa">
  <#list taxa as taxon>
  <taxon id="${taxon.id}">
    <date value="${taxon.date}" direction="forwards" units="years"/>
    <attr name="location">
      "${taxon.location}"
    </attr>
  </taxon>
  </#list>
</taxa>



On Monday, 11 August 2014 12:44:12 UTC-4, rambaut wrote:
There is a tool called BEASTgen which you can use to create templates and then apply multiple datasets to them using a command line:


It is very general purpose so you can use it to create BEAST, MrBayes or other files. There are some example templates in the package and some
brief instructions. 

Andrew
On 11 Aug 2014, at 17:35, Francesco Cicconardi <fran...@gmail.com> wrote:

Hi Axel,

I was thinking at the same approach, but in my case I don't have to replace xml section, rather building a brand new xml file more or less from scratch... Is there anything easier?

Best
F
2014-08-11 16:46 GMT+02:00 Axel Barlow <axel.b...@gmail.com>:
We ran into a similar problem when we needed to run the same analysis but with many different sets of individuals. So we generated a starting xml in beauti with the first taxon set,  then generated a perl script to automatically replace the relevant taxon elements and sequences within the xml with new ones. Then we could generate a whole bunch of different xml files in an automated fashion. These were run in beast from the command line.

There may be different/better approaches, but this is the what we came up with. I'd be really interested to hear how other people have tackled this.

Regards, Axel.




On 11.08.2014 15:29, Francesco Cicconardi wrote:
Dear all,

I'd like to run a *BEAST analysis using several loci. Using the graphical interface of BEAUti would be very very time consuming and not very reproducible. Is there a batch way to create the xml file?

thanks
F
--
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...@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/d/optout.

-- 

óÔÔò ʕ·͡ᴥ·ʔ óÔÔò      óÔÔò ʕ·͡ᴥ·ʔ óÔÔò      óÔÔò ʕ·͡ᴥ·ʔ óÔÔò

Dr. Axel Barlow

Institute for Biochemistry and Biology
University of Potsdam
Karl-Liebknecht-Str. 24-25
14476 Potsdam (Golm)
Germany

email: axel.b...@gmail.com
phone: +49 3319776327

--
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...@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/d/optout.

--
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...@googlegroups.com.

Batsi

unread,
Jul 16, 2020, 6:16:45 PM7/16/20
to beast-users

So I managed to get the dates right using:
beastgen.jar -date_order -4 -date_prefix _ beastTemplate.template seqs_final.fas seqs_final.xml

The only thing left is assigning the location.

Regards,

Batsi
Reply all
Reply to author
Forward
0 new messages