HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> date stamp sequences?
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1372120563

Message started by JDB on Jun 24th, 2013 at 5:36pm

Title: date stamp sequences?
Post by JDB on Jun 24th, 2013 at 5:36pm
Hi,

I was wondering if there is an option to date stamp sequences in HYPHY. In other words, I want to constrain the time for the tip nodes based on known sampling dates. I have been unable to find documentation of how to do this.

Thanks,
Jesse

Title: Re: date stamp sequences?
Post by Sergei on Jun 24th, 2013 at 8:53pm
Hi Jesse,

I have some code for doing this but it's not very user-friendly. HyPhy isn't naturally suited for including date stamped sequences, so there are two basic solutions

[list bull-redball]
  • Mangle sequence names to include date information (a la TipDate, as in tip_name_1994, or some_id_2002-04-21), and then parse those into dates using string manipulations in HyPhy. For an example of this, see _tipDater.ibf inside TemplateBatchFiles.
  • Provide date information in separate files, e.g.


    Code (]
    tipname1, date1
    tipname2, date2
    ...
    [/code):

    and read them in using, e.g. the ReadCSVTable function

    [code]

    LoadFunctionLibrary ("ReadDelimitedFiles");

    date_info = ReadCSVTableText (filename, 0);




    Once you have read the dates in, and mapped them to tips, then you could include this information in the evolutionary model, although remember that for reversible models (at least as implemented in HyPhy), substitution rates and evolutionary times are confounded, so you'll need to impose some sort of a clock constraint.

    HTH,
    Sergei

  • Title: Re: date stamp sequences?
    Post by JDB on Jun 27th, 2013 at 11:28am
    Thanks Sergei. What is the command to include the dates in the evolutionary model?

    Thanks,
    Jesse

    Title: Re: date stamp sequences?
    Post by Sergei on Jul 1st, 2013 at 3:15pm
    Hi Jesse,

    Unfortunately, there is no single command. HyPhy doesn't make it easy to using dating information. If you tell me how you were planning to use them, I may point you to a working example.

    Sergei

    Title: Re: date stamp sequences?
    Post by JDB on Jul 12th, 2013 at 8:56am
    Hi Sergei,

    I am doing this for influenza sequences. I have a set of dates for the tips, and so I want to be able to maximize the likelihood of the branch lengths and substitution model while holding these tip positions constant.

    If you can point me to an example, that would be great.

    Thanks,
    Jesse

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