HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> Local dndS rates
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1134050849

Message started by Antonio on Dec 8th, 2005 at 6:07am

Title: Local dndS rates
Post by Antonio on Dec 8th, 2005 at 6:07am
Dear Sergei, I am sorry for disturbing you once again. I would like to use Hyphy to do a local likelihood optimization of a codon model via script and then study the tree branches. The optimization should be the same as if I do at the console:

open data-> select all--> data partition--> def codon model + def tree + def substitution model + def parameters as local... then build and optimize.

I think that when I am doing such analysis via script as in dNdSrateAnalysis.bf the parameterization is global as is in the model files (.mdl) used inside the script (??). Thus, how can I do a local analysis via script using for example just an MG94 model or a MG94REV model?

All these questions with I am “torturing” you are because we are interesting in comparing BL lengths (NS and Syn scalings) in some serial sampling (i.e. comparing time-1 branches with time-4 branches) and to do this I think we need local parameterization. Of course we can do it via console but we are working with several files. In any case, I promise you that if some day we have the script to do the whole analysis  :P (get the likelihood model, the syn and nonsyn scaled trees and finally the BL comparison for a set of sequences and trees) of course we will share it with everyone via the Hyphy web if you are interested.

Thank you very much.
,
Antonio

Title: Re: Local dndS rates
Post by Antonio on Dec 9th, 2005 at 3:16am
Dear Sergei, at this point it seems I have managed to arrange some of my problems. Thank you very much and sorry for all the inconveniences. You will heard of us when we have the final version of the script.

thankyou very much and all the best for you,
:)
Antonio

Title: Re: Local dndS rates
Post by Sergei on Dec 9th, 2005 at 10:54am
Dear Antonio,

I am glad you were able to find a solution. When I want to pump a bunch of analyses through HyPhy (using standard tools for each), I usually use Python scripts to scan directories for input files, and then pipe input to HyPhy via a bash hack as shown in Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login

Hope this helps,
Sergei

Title: Re: Local dndS rates
Post by Antonio on Dec 11th, 2005 at 2:56pm
Thankyou very much Sergei. By the way, is it possible in hyphy to identify string patterns? say, " P1_1_"  in strings such as "P1_1_1" or "P1_1_5"?
:)
,
Antonio

Title: Re: Local dndS rates
Post by Sergei on Dec 12th, 2005 at 10:01am
Dear Antonio,


wrote on Dec 11th, 2005 at 2:56pm:
Thankyou very much Sergei. By the way, is it possible in hyphy to identify string patterns? say, " P1_1_"  in strings such as "P1_1_1" or "P1_1_5"?
:)


Yes, you can use regular expressions matching for strings. Take a look at the documentation Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Loginfor the $,^,% commands to match patterns.

If you want to locate all defined variables matching a regular expression, use something like

Code (]
GetInformation(vars,"^P1_1_[0-9):

+");
fprintf (stdout, "\nMatched ", Columns (vars), " variables\n");
for (k=0; k<Columns (vars); k=k+1)
{
       fprintf (stdout, "Variable ",k+1," : ", vars[k], "\n");
}

Here, vars will be a row vector of variables which matched the description.

Cheers,
Sergei

Title: Re: Local dndS rates
Post by Antonio on Dec 19th, 2005 at 8:17am
thank you,

Antonio

HyPhy message board » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.