Skip to content

Instantly share code, notes, and snippets.

@tgvaughan
Created August 13, 2014 02:50
Show Gist options
  • Save tgvaughan/b63b98573a7ac2eb1815 to your computer and use it in GitHub Desktop.
Save tgvaughan/b63b98573a7ac2eb1815 to your computer and use it in GitHub Desktop.
Example trait file for examples/nexus/Flu.nex included with BEAST 2.
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
@alexeid
Copy link

alexeid commented Aug 13, 2014

The times don't seem to represent the dates? Shouldn't it look something like:

traits time
TREESPARROW_HENAN_1_2004 2004
HUMAN_VIETNAM_CL105_2005 2005
TREESPARROW_HENAN_4_2004 2004
CHICKEN_HEBEI_326_2005 2005
CHICKEN_HONGKONG_915_1997 1997
VIETNAM_3062_2004 2004
GOOSE_HONGKONG_W355_1997 1997
DUCK_HONGKONG_Y283_1997 1997
DUCK_VIETNAM_376_2005 2005
MALLARD_VIETNAM_16_2003 2003
CHICKEN_THAILAND_KANCHANABURI_CK_160_2005 2005
DUCK_GUANGZHOU_20_2005 2005
CK_HK_WF157_2003 2003
SWINE_ANHUI_2004 2004
DUCK_VIETNAM_272_2005 2005
HONGKONG_1997_1998 1998
GOOSE_SHANTOU_2216_2005 2005
TREESPARROW_HENAN_3_2004 2004
PEREGRINEFALCON_HK_D0028_2004 2004
TREESPARROW_HENAN_2_2004 2004
HONGKONG_538_1997 1997

@scarpino
Copy link

I wasn't able to use the guess dates, from file option using either of these trait files and the flu.nex example.

@tgvaughan
Copy link
Author

Hi Alexei, I was just trying to illustrate a way of getting non-zero tip heights from a file - not any particular dates. (Scarpino's not interested in the Flu data anyway.) Scarpino, unfortunately pasting into gist has stripped out the tabs somehow, so this doesn't work. If you have a text file with tabs separating the two columns and a header up the top, it should work though. (Indeed this one did work, prior to it being mangled by my web browser!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment