CompEvol / beast2

Bayesian Evolutionary Analysis by Sampling Trees
www.beast2.org
GNU Lesser General Public License v2.1
241 stars 84 forks source link

Beauti 2 - Guess Dates - Read From File not working #190

Closed scarpino closed 8 years ago

scarpino commented 10 years ago

I have been unable to use the "read from file" option to load sampling dates. Please provide an example file or easier to parse instructions.

rbouckaert commented 10 years ago

When you click on the question mark next to "Read from file" (at the far right), a dialog with the file description pops up. Does this needs further clarification?

On Tue, 2014-08-12 at 15:15 -0700, scarpino wrote:

I have been unable to use the "read from file" option to load sampling dates. Please provide an example file or easier to parse instructions.

— Reply to this email directly or view it on GitHub.

scarpino commented 10 years ago

Yes, I have tried essentially every seemingly plausible iteration, but nothing ever changes in Beauti. The example included when clicking on th "?" does not actually contain dates. I've performed a fairly thorough search through tutorials/wikis/issues/users guides/etc and found only one reference to loading dates from a file (see below). It's clear that both parties involved in that post figured it out, but they don't actually explain how to properly format the file.

https://code.google.com/p/beast2/issues/detail?id=14

tgvaughan commented 10 years ago

Hi @scarpino, I agree the example is a little opaque and the *BEAST example seems a little out-of place, although I suspect that this is because this trait guess dialog is also used elsewhere. Thanks for pointing this out though. In the meantime, I've tried using this time trait file (https://gist.github.com/tgvaughan/b63b98573a7ac2eb1815) with to place the samples in examples/nexus/Flu.nex, and it seems to work with BEAST v2.1.3. Note that tabs are used as delimiters.

Does this help?

I'll see about improving that documentation.

scarpino commented 10 years ago

I tried using examples/nexus/Flu.nex and https://gist.github.com/tgvaughan/b63b98573a7ac2eb1815 but nothing changes in Beauti. The easiest solution for me was to modify the xml directly.

rbouckaert commented 10 years ago

It looks like the file with times referred to is not tab-delimited, but space delimited (maybe github converts tabs so they come out as spaces). If you change all spaces to tabs, as in the attached, BEAUti recognises the times as expected.

A better way to report such an easily made mistake would be nice.

On Wed, 2014-08-13 at 09:01 -0700, scarpino wrote:

I tried using examples/nexus/Flu.nex and https://gist.github.com/tgvaughan/b63b98573a7ac2eb1815 but nothing changes in Beauti. The easiest solution for me was to modify the xml directly.

— Reply to this email directly or view it on GitHub.

traits time TREESPARROW_HENAN_1_2004 1 HUMAN_VIETNAM_CL105_2005 2 TREESPARROW_HENAN_4_2004 3 CHICKEN_HEBEI_326_2005 4 CHICKEN_HONGKONG_915_1997 5 VIETNAM_3062_2004 6 GOOSE_HONGKONG_W355_1997 7 DUCK_HONGKONG_Y283_1997 8 DUCK_VIETNAM_376_2005 9 MALLARD_VIETNAM_16_2003 10 CHICKEN_THAILAND_KANCHANABURI_CK_160_2005 11 DUCK_GUANGZHOU_20_2005 12 CK_HK_WF157_2003 13 SWINE_ANHUI_2004 14 DUCK_VIETNAM_272_2005 15 HONGKONG_1997_1998 16 GOOSE_SHANTOU_2216_2005 17 TREESPARROW_HENAN_3_2004 18 PEREGRINEFALCON_HK_D0028_2004 19 TREESPARROW_HENAN_2_2004 20 HONGKONG_538_1997 2