Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pxbd time #2

Closed
blackrim opened this issue Mar 3, 2013 · 11 comments
Closed

pxbd time #2

blackrim opened this issue Mar 3, 2013 · 11 comments
Labels

Comments

@blackrim
Copy link
Member

blackrim commented Mar 3, 2013

There is an error in the time calculation for the birth death calculator that gets negative branch lengths

@josephwb
Copy link
Member

josephwb commented Mar 4, 2013

Death was cast to an int in processing cmd line args; changed to float. I don't think this was the problem responsible for neg branch lengths, but I cannot recreate the problem now. However, do get seg fault on some parameter combinations (e.g. ./pxbd -e 10 -b 0.5 -t 1). Perhaps allow -e OR -t, not both.

@blackrim
Copy link
Member Author

blackrim commented Mar 4, 2013

agreed about OR. hm that could be it. lets close and open again when the problem comes back.

@blackrim blackrim closed this as completed Mar 4, 2013
@blackrim blackrim reopened this Mar 24, 2013
@blackrim
Copy link
Member Author

Still getting a bunch of negative branch lengths

@josephwb
Copy link
Member

Do you have an example that will generate this (b, d, e/t, and seed)?

@blackrim
Copy link
Member Author

how do you mean? birth death extant time and seed? can only do birth death
time seed or birth death extant seed
should be pxbd -b 1 -d 0.1 -t 5 -s 1 or pxbd -b 1 -d 0.1 -e 5 -s 1

On Tue, Jun 23, 2015 at 10:55 AM, Joseph W. Brown notifications@github.com
wrote:

Do you have an example that will generate this (b, d, e/t, and seed)?


Reply to this email directly or view it on GitHub
#2 (comment).

@josephwb
Copy link
Member

Yeah, the "e/t" was supposed to mean e or t.

I just meant a combination that generates negative branch lengths so it could be identified and fixed.

@blackrim
Copy link
Member Author

Oh, I see. I don't have an example that does that.

On Tue, Jun 23, 2015 at 11:27 AM, Joseph W. Brown notifications@github.com
wrote:

Yeah, the "e/t" was supposed to mean e or t.

I just meant a combination that generates negative branch lengths so it
could be identified and fixed.


Reply to this email directly or view it on GitHub
#2 (comment).

@josephwb
Copy link
Member

Ok, I can set up a loop to try and find an example.

@josephwb
Copy link
Member

josephwb commented Apr 1, 2016

I tried a bunch of iterations of:

./pxbd -b 0.5 -d 0.45 -e 10000 -o oot.tre && grep ":-" oot.tre

(including different parameter values) and cannot recreate the problem.

@josephwb
Copy link
Member

josephwb commented Apr 1, 2016

pxbd now has a nreps option:

./pxbd -h
Birth-death simulator.

Usage: pxbd [OPTION]... 

 -e, --extant=INT    number of extant species, alt to time
 -t, --time=INT      depth of the tree, alt to extant
 -b, --birth=DOUBLE  birth rate, default=1
 -d, --death=DOUBLE  death rate, default=0
 -n, --nreps         number of replicates, default=1
 -o, --outf=FILE     output file, stout otherwise
 -s, --showd         show dead taxa
 -x, --seed=INT      random number seed, clock otherwise
     --help          display this help and exit
     --version       display version and exit

This should help in the search for negative edge lengths. However, I've simulated a ton and have not hit anything yet.

@josephwb
Copy link
Member

josephwb commented Jun 7, 2016

I think this is behaving correctly. Closing.

@josephwb josephwb closed this as completed Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants