TIM or k81 substitution model

1,433 views
Skip to first unread message

黄勇

unread,
Dec 9, 2010, 10:09:26 PM12/9/10
to Beast


Hi all,

Does anyone have the xml code to implement The transitional (TIM) substitutiono or k81 model in BEAST? I found the substitution model code  on the web: http://beast.bio.ed.ac.uk/Substitution_model_code, but the error "Object with Id=ND2third.pyrimidine2purine already exists" happened when I run it in Beast 1.54 or 1.6.1.  It is similar for K81. I also did a search in this group and I did not find the code.

 <!-- The transitional (TIM) substitution model                     -->
 <gtrModel id="gene1.tim">
  <frequencies>
   <frequencyModel dataType="nucleotide">
    <alignment idref="alignment"/>
    <frequencies>
     <parameter id="gene1.frequencies" dimension="4"/>
    </frequencies>
   </frequencyModel>
  </frequencies>
  <rateAC>
   <parameter id="gene1.purine2pyrimidine" value="1.0" lower="0.0" upper="Infinity"/>
  </rateAC>
  <rateAG>
   <parameter id="gene1.ag" value="1.0" lower="0.0" upper="Infinity"/>
  </rateAG>
  <rateAT>
   <parameter id="gene1.pyrimidine2purine" value="1.0" lower="0.0" upper="Infinity"/>
  </rateAT>
  <rateCG>
   <parameter id="gene1.pyrimidine2purine" value="1.0" lower="0.0" upper="Infinity"/>
  </rateCG>
  <rateGT>
   <parameter id="gene1.purine2pyrimidine" value="1.0" lower="0.0" upper="Infinity"/>
  </rateGT>
 </gtrModel>

 

 

Thank you very much for any helps.

Yong Huang



Simon Ho

unread,
Dec 9, 2010, 10:50:52 PM12/9/10
to beast-users
Hi Yong,

You need to make a couple of minor edits to the XML code that you
included in your post. When referring to a parameter that has already
been named, you need to use idref= rather than id=. So you need to
replace the final two instances of id=, as shown below in the
corrected code.

Cheers,
Simon


<!-- The transitional (TIM) substitution model --
>
<gtrModel id="gene1.tim">
<frequencies>
<frequencyModel dataType="nucleotide">
<alignment idref="alignment"/>
<frequencies>
<parameter id="gene1.frequencies" dimension="4"/>
</frequencies>
</frequencyModel>
</frequencies>
<rateAC>
<parameter id="gene1.purine2pyrimidine" value="1.0" lower="0.0"
upper="Infinity"/>
</rateAC>
<rateAG>
<parameter id="gene1.ag" value="1.0" lower="0.0" upper="Infinity"/>
</rateAG>
<rateAT>
<parameter id="gene1.pyrimidine2purine" value="1.0" lower="0.0"
upper="Infinity"/>
</rateAT>
<rateCG>
<parameter idref="gene1.pyrimidine2purine" value="1.0" lower="0.0"
upper="Infinity"/>
</rateCG>
<rateGT>
<parameter idref="gene1.purine2pyrimidine" value="1.0" lower="0.0"
upper="Infinity"/>
</rateGT>
</gtrModel>


Joseph W. Brown

unread,
Dec 9, 2010, 11:08:29 PM12/9/10
to huan...@cib.ac.cn, Beast
Only the first use of "ND2third.pyrimidine2purine" should use "id="; subsequent uses should use "idref=". I will update the code on the page.

Joseph.

--
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.



_____________________________________________________
Joseph W. Brown
Post-doctoral Researcher, Harmon Laboratory
University of Idaho, Department of Biological Sciences
Box 443051
Moscow, Idaho 83844

黄勇

unread,
Dec 10, 2010, 1:59:50 AM12/10/10
to jose...@uidaho.edu, Beast

Hi,

I edits the XML code again, but BEAST has terminated with the error "Object with idref=ND2third.ac has not been previously declared" .

My code for the substitution modle:

 <!-- The transitional (TIM) substitution model                     -->

 <gtrModel id="ND2third.tim">


  <frequencies>
   <frequencyModel dataType="nucleotide">
    <alignment idref="alignment"/>
    <frequencies>

     <parameter id="ND2third.frequencies" dimension="4"/>
    </frequencies>
   </frequencyModel>
  </frequencies>
  <rateAC>
   <parameter id="ND2third.purine2pyrimidine" value="1.0" lower="0.0" upper="Infinity"/>
  </rateAC>
  <rateAG>
   <parameter id="ND2third.ag" value="1.0" lower="0.0" upper="Infinity"/>
  </rateAG>
  <rateAT>
   <parameter id="ND2third.pyrimidine2purine" value="1.0" lower="0.0" upper="Infinity"/>
  </rateAT>
  <rateCG>
   <parameter idref="ND2third.pyrimidine2purine"/>
  </rateCG>
  <rateGT>
   <parameter idref="ND2third.purine2pyrimidine"/>
  </rateGT>
 </gtrModel>

 

Thank you very much

 

Yong Huang.




 

-----原始邮件-----
发件人: "Joseph W. Brown" <jose...@uidaho.edu>
发送时间: 2010年12月10日 星期五
收件人: huan...@cib.ac.cn
抄送: Beast <beast...@googlegroups.com>
主题: Re: TIM or k81 substitution model
To unsubscribe from this group, send email to beast-users+unsub...@googlegroups.com.

黄勇

unread,
Dec 10, 2010, 3:15:27 AM12/10/10
to Joseph W. Brown, Beast

Hi,

Yes. I  only edit the xml code for this model. I uesd the version 1.6.1 .  May be  the version wrong? If it cannot run using this model,   I will use GTR instead.

 

Cheers.

Yong Huang.



 


In this instance, it seems you did not declare "ND2third.ac" before using it. This is odd, as it does not match the code you attach below.
Joseph.

Simon Ho

unread,
Dec 10, 2010, 4:46:19 AM12/10/10
to beast-users
Hi Yong,

You also need to edit the operators, priors, and the list of
parameters to be written to the logfile.
This can be done easily by making these additional changes:
1) Replace "ND2third.ac" with "ND2third.purine2pyrimidine" throughout
your file
2) Replace "ND2third.at" with "ND2third.pyrimidine2purine" throughout
your file
3) Delete the instances of "ND2third.cg" and "ND2third.gt" from the
operators, priors, and list of parameters to be written to the
logfile.

Cheers,
Simon
> 发件人: "Joseph W. Brown" <josep...@uidaho.edu>
> 发送时间: 2010年12月10日 星期五
> 收件人:huangy...@cib.ac.cn
> For more options, visit this group athttp://groups.google.com/group/beast-users?hl=en.
>
> _____________________________________________________
> Joseph W. Brown
> Post-doctoral Researcher, Harmon Laboratory
> University of Idaho, Department of Biological Sciences
> Box 443051
> Moscow, Idaho 83844
> josep...@uidaho.edu
>
> --
> 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 athttp://groups.google.com/group/beast-users?hl=en.
>
> _____________________________________________________
> Joseph W. Brown
> Post-doctoral Researcher, Harmon Laboratory
> University of Idaho, Department of Biological Sciences
> Box 443051
> Moscow, Idaho 83844
> josep...@uidaho.edu

Aron

unread,
Jan 7, 2013, 6:42:24 PM1/7/13
to beast...@googlegroups.com, huan...@cib.ac.cn
I am also having problems implementing TIM2+I+G into beast.  It will not allow an additional rate (CT).  I would like to add the following parameters:

freqA = 0.3383 
   freqC = 0.1718 
   freqG = 0.0827 
   freqT = 0.4072 
   R(a) [AC] =  0.6109
   R(b) [AG] =  7.4295
   R(c) [AT] =  0.6109
   R(d) [CG] =  1.0000
   R(e) [CT] =  6.4079
   R(f) [GT] =  1.0000
   p-inv = 0.4830
   gamma shape = 0.5550

Any help is much appreciated!

Aron @ UIUC

Gerald Schneeweiss

unread,
Jan 8, 2013, 5:35:35 AM1/8/13
to beast...@googlegroups.com
Hi Aron,

you can specify any of the six rates as the one all other rates are
relative to; in BEAST it's by default rateCT, but you can change that to
rateGT; your example would like something like this (also remove the
operators and priors for those rates which are fixed, at least for
rateCG):

<rateAC>
<parameter id="my.ac" value="0.6109"/>
</rateAC>
<rateAG>
<parameter id="my.ag" value="7.4295" />
</rateAG>
<rateAT>
<parameter idref="my.ac"/>
</rateAT>
<rateCG>
<parameter id="my.cg" value="1.0" />
</rateCG>
<rateCT>
<parameter id="my.ct" value="6.4079" />
</rateCT>

Cheers,
Gerald


> I am also having problems implementing TIM2+I+G into beast. It will not
> allow an additional rate (CT). I would like to add the following
> parameters:
>

Bin Ginger

unread,
Mar 18, 2013, 10:03:54 PM3/18/13
to beast...@googlegroups.com, huan...@cib.ac.cn
黄勇你好:我是BEAST的一个初学者,有些问题我一直想不明白,有时论坛上问了也没见回答。所以我想请教你一下,我用Mrbayes生成的树为什么与BEAST treeAnnotator 产生的树拓扑结构为什么总是不一样?应该怎样改呢?你可以告诉我在哪里找到答案吗?谢谢。期待你的帮助~~
 

在 2010年12月10日星期五UTC+8上午11时09分26秒,黄勇写道:

Bin Ginger

unread,
Mar 18, 2013, 10:05:24 PM3/18/13
to beast...@googlegroups.com, huan...@cib.ac.cn
如此的冒昧还请你见谅。
在 2013年3月19日星期二UTC+8上午10时03分54秒,Bin Ginger写道:
Message has been deleted

C.-j. Mei

unread,
Mar 18, 2013, 10:26:42 PM3/18/13
to beast...@googlegroups.com, huan...@cib.ac.cn
Hi, there,
 
   If you guys would like maximize response, it's better to use a language most people can understand. In addition to that, the question needs to be a little more clear so that people can see clearly what kind of help can be offered. Now, I can only guess that you guys want to know how to generate xml input using TIM or K81 model. We have a platform in ASU to generate xml input using all 82 substitutional models with jModelTested optimized parameters. If that's your question, the problem is already resolved. Otherwise, please re-state your question so that people may offer better help.
 
   C.-J.
 
   ASU.EDU

--
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.

Julian W Tang

unread,
Mar 18, 2013, 10:31:28 PM3/18/13
to beast...@googlegroups.com
Actually, Chinese Mandarin is the world's most widely spoken language - English is a very poor 2nd: http://listverse.com/2008/06/26/top-10-most-spoken-languages-in-the-world/
 
Julian



 

Date: Mon, 18 Mar 2013 22:26:42 -0400
Subject: Re: TIM or k81 substitution model
From: cjm...@gmail.com
To: beast...@googlegroups.com
CC: huan...@cib.ac.cn

Alexei Drummond

unread,
Mar 18, 2013, 10:39:53 PM3/18/13
to beast...@googlegroups.com
Hi Julian,

I didn't know you liked to troll on occasion! But you should be careful of your sources. Not all estimates agree with the link you have posted. At least one set of current estimates on this web site has English as the top (http://en.wikipedia.org/wiki/List_of_languages_by_total_number_of_speakers) with 1.5 billion speakers.

Regardless, I am sure the statistic you quote would be reversed if you only considered scientists, wouldn't you agree?

More to the point, (written) English is a lot easier to learn a little of and I certainly can't answer any queries posted in Mandarin and I don't think that Andrew Rambaut can either :-)

Cheers
Alexei

Julian W Tang

unread,
Mar 18, 2013, 10:58:13 PM3/18/13
to beast...@googlegroups.com
Hey Alexei, I'm a faithful reader of beast-users but most of the posts are not relevant to me ;)
 
Yes, I'm sure you can find any statistic from any source nowadays on the internet to support any point you want to make. But, I'm not sure whether the definition of actually being able to 'speak' a particular language has been agreed upon However, yes, perhaps written English seems to be the most widely used language for science, worldwide.
 
And just to add something useful to this post, as one of the founders of Biomatters, Professor Drummond, when is Geneious going to incorporate more sophisticated evolutionary models into its core software without the need to use plugins?!
 
Julian



 

Subject: Re: TIM or k81 substitution model
Date: Tue, 19 Mar 2013 15:39:53 +1300
To: beast...@googlegroups.com

Rubing C

unread,
Mar 19, 2013, 12:18:23 AM3/19/13
to beast...@googlegroups.com
Hi guys,

Judged from the content of the first email, I think Bin Ginger sent it out to beast-users by mistake. His email only addressed to Yong Huang, a Chinese subscriber of beast-user group. It was a misunderstanding.

As all the other beast-users group subscriber, I receive many emails each day from this mail-list. I'm sure most of us wish to keep our discussions focused on science.

So I would like to translate Bin's question in case other people may be interested. Basically he said that he often cannot get the consistent tree topologies based on Mr. Bayes and BEAST. He wonder what caused that and what to do with it.

Personally I haven't noticed this kind of problem, maybe I did not need to care about the detail branches. But I am not surprised that if different BEAST run's will generate slightly different tree topologies, as summarized by MCC tree. I think the first thing to do is to check the credibility (posterior probability or bootstrap) when comparing topologies to make sure if the difference is 'real'.

Hope it helps!

Best wishes,
Rubing

C.-j. Mei

unread,
Mar 19, 2013, 6:11:19 AM3/19/13
to rubin...@gmail.com, beast...@googlegroups.com
Thank you very much for your translation and constructive response. It was me who induced the argument. I was trying to help and attract more help by suggesting to use a language most subscribers here can understand, especially those from the development group. But thoughtlessly, I hurt some people's feeling. I'm very sorry for that. Thank you for fixing it.
 
Take care.
 
C.-J.
 

Andrew Rambaut

unread,
Mar 19, 2013, 6:45:03 AM3/19/13
to beast...@googlegroups.com
Dear All,

The posting of an entirely Mandarin message was in error and nobody was at fault - although I was disappointed that BEAST and TreeAnnotator don't have Mandarin characters yet.

The official language of this mailing list is English. This is primarily because it is the largest intersection of the languages that people on the mailing list might speak (and we have people from many countries on the list).

We would obviously like to avoid having dialogues on the mailing list in other languages (whatever the global prevalence) because it would fragment the community and exclude people (many of whom English is also not their first language).

Andrew


> Actually, Chinese Mandarin is the world's most widely spoken language - English is a very poor 2nd: http://listverse.com/2008/06/26/top-10-most-spoken-languages-in-the-world/

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

Jose Tavera

unread,
Mar 19, 2013, 1:04:20 PM3/19/13
to beast...@googlegroups.com
Dear C.-J.
I'm interested in the ASU platform to generate xml inputs, however I haven't been able to find it, can you please post the link.

Thanks

Jose

Rubing C

unread,
Mar 19, 2013, 2:08:44 PM3/19/13
to C.-j. Mei, beast...@googlegroups.com
Hi C.-J.,

I perfectly understood your good intention. I was not really trying to blame anyone for not discussing science, I just hoped people not to take things personally and over-response this language issue. I'm not very good at mediating, and I guess I made people involved in this discussion awkward, too! Sorry for that!

Rubing

C.-j. Mei

unread,
Mar 19, 2013, 3:09:28 PM3/19/13
to beast...@googlegroups.com
Bellow is an email I responded to another subscribe. Apparently, the ASU firewall is still preventting outside access from using ASU email server which emails the result link back to user. For small number of users, I may forward the result (changji...@asu.edu). Just make the submission-Id the email address, replace "@" with "_at_" so that it can be identified who is who.

_______________________________________________________________________________
  Follow the URL:
 
 
and generate a ID to log yourself in. Select "PhyloGeoGraphy". Then, in the page at the up-right corner, select "jModel Test" in the "Computation Type" drop down list. Click "submit" to submit the computation. You'll receive your result link via email after the computation finishes as such computation usually take some time, from a few minutes to several days. Be sure to fill in a correct email address in order to obtain the result.
 
For generating a XML, we've gone beyond simple BEAST computation and we have only geography computation choices, as you can see from the "computation type", discrete or continuous. For phylogeography computations, the corresponding information has to be included. I attached a sample sequence file for you to prepare your sequence set. We can process FASTA format only for now. There should not be any space in the sequence name. Otherwise, the names will be trimmed from the space after alignment (which is not our code). Let's start from there. Let me know if you have further question.
 
ASU suffered a serials of computer virus attacks lately so that the school IT tightened network security restrictions. Many failings are due to those restrictions. Let me know if you have any difficulty. Let's knock it down one by one.
 
Take care.
__________________________________________________________________________________

C.-J.
ASU
Reply all
Reply to author
Forward
0 new messages