Error in bp-analyze

10 views
Skip to first unread message

Pascal Title

unread,
Sep 21, 2023, 2:40:06 PM9/21/23
to bali-phy-users
Hi,

I'm on macOS and installed Bali-Phy via homebrew. It tells me the version that installed is 4.0-beta5.
When I run the test:
bali-phy 25.fasta --iter=150
bali-phy 25.fasta --iter=150
bp-analyze 25-1 25-2

the two runs seem to work, but the bp-analyze command returns the following:

Creating new directory 'Results' for summary files.
Summarizing distribution of numerical parameters: done.
Analyzing scalar variables: Traceback (most recent call last):
File "/opt/homebrew/bin/bp-analyze", line 2295, in <module>
analysis = Analysis(args, mcmc_outputs, args.outdir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/bin/bp-analyze", line 838, in __init__
self.summarize_numerical_parameters()
File "/opt/homebrew/bin/bp-analyze", line 1176, in summarize_numerical_parameters
self.min_ESS = min(self.ESS.values())
^^^^^^^^^^^^^^^^^^^^^^
ValueError: min() arg is an empty sequence

Any advice?
Thanks!
-Pascal Title

Benjamin Redelings

unread,
Sep 21, 2023, 3:19:21 PM9/21/23
to bali-ph...@googlegroups.com

Hi Pascal,

Thanks for reporting that.  It looks like the issue is that beta5 includes a column for the trees as newick strings in the log file, and the tool for parsing the log files expects only numbers.  In beta6 the log file no longer includes the strings, so everything works fine...  let me see if I can update the homebrew package to 4.0-beta6, and perhaps also make the parsing of the log file more robust.

-BenRI

--
You received this message because you are subscribed to the Google Groups "bali-phy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bali-phy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bali-phy-users/6d064de5-2711-4447-b645-e69f058e4ccen%40googlegroups.com.

Benjamin Redelings

unread,
Sep 21, 2023, 7:39:24 PM9/21/23
to bali-ph...@googlegroups.com

OK, I've submitted a package for 4.0-beta6 to homebrew.  It looks like it will be accepted into homebrew in a day or two.

-BenRI

Pascal Title

unread,
Sep 21, 2023, 7:48:41 PM9/21/23
to bali-ph...@googlegroups.com
Thanks Ben! I’ll keep an eye out and report back. 

--
Pascal Title, PhD
Assistant Professor
pronouns: he/him
Department of Ecology & Evolution | Stony Brook University
https://www.pascaltitle.com
You received this message because you are subscribed to a topic in the Google Groups "bali-phy-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bali-phy-users/Q6YzzC0RS3s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bali-phy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bali-phy-users/741e9b56-9446-452c-a962-70a718f44a9c%40gmail.com.

Pascal Title

unread,
Sep 22, 2023, 9:55:10 AM9/22/23
to bali-ph...@googlegroups.com
This looks like it works now, with homebrew BaliPhy v4.0-beta6.

bp-analyze 25-1 25-2
Can't find ormolu or hindent -- not formatting Haskell code.

Creating new directory 'Results' for summary files.
Summarizing distribution of numerical parameters: done.
Analyzing scalar variables: done.

Summarizing topology distribution: done.
Drawing trees: c50 c66 c80 c90 c95 c99 c100 greedy MAP . done.

Generate mixing diagnostics for topologies ... done.
Generate SRQ plot for partitions: done.
Generate SRQ plot for c50 tree: done.

Generate MDS plots of topology burnin: done.
Computing initial alignments: command: 'alignment-cat' '-e' '25-1/C1.P1.initial.fasta' > 'Results/Work/P1.initial-unordered.fasta'
 exit: 1


Thanks for the quick fix!

--
Pascal Title, PhD
Assistant Professor
pronouns: he/him
Department of Ecology & Evolution | Stony Brook University
https://www.pascaltitle.com

Pascal Title

unread,
Sep 22, 2023, 10:15:51 AM9/22/23
to bali-ph...@googlegroups.com
Actually, I’m not sure if this is expected or not, but this is what I see now when I run the following (lots of "All paths have probability 0”): 

bali-phy 25.fasta --iter=150

Created directory "25-1" for output files.
T:topology ~ uniform on tree topologies
T:lengths ~ iidMap(branches(tree), gamma(0.5, 2/num_branches(tree)))

Partition P1:
 file = 25.fasta
 alphabet = RNA
 subst = tn93 (S1)
 indel = rs07 (I1)
 scale ~ gamma(0.5, 2) (Scale1)

Substitution model S1 priors:
 tn93:kappaPur ~ log_normal(log(2), 0.25)
 tn93:kappaPyr ~ log_normal(log(2), 0.25)
 tn93:pi ~ symmetric_dirichlet_on(letters(@a), 1)

Insertion/deletion model I1 priors:
 rs07:rate ~ log_laplace(-4, 0.707)
 rs07:mean_length ~ shifted_exponential(10, 1)

Run info written to "25-1/C1.run.json"

Beginning MCMC computations.
 - Sampled numerical parameters logged to "25-1/C1.log" as TSV
 - Sampled trees logged to "25-1/C1.trees"
 - Sampled alignments logged to "25-1/C1.P<partition>.fastas"

BAli-Phy does NOT detect how many iterations is sufficient:
 You need to monitor convergence and kill it when done.
 Maximum number of iterations set to 150.

You can examine 'C1.log' using BAli-Phy tool statreport (command-line) or the BEAST program Tracer (graphical).
See the manual at http://www.bali-phy.org/README.xhtml for further information.
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 1 j=0
sample_two_nodes_base( ): All paths have probability 0!
Pr = 0 i = 2 j=0

Work:
 start: Fri Sep 22 10:10:49 2023
 end: Fri Sep 22 10:11:34 2023
 total (elapsed) time: 44s (44.934s)
 total (CPU) time: 41s (41.400s)

--
Pascal Title, PhD
Assistant Professor
pronouns: he/him
Department of Ecology & Evolution | Stony Brook University
https://www.pascaltitle.com

Benjamin Redelings

unread,
Sep 22, 2023, 10:19:28 AM9/22/23
to bali-ph...@googlegroups.com

That's actually fine.  I'll probably hide that message in the next release.  It just means that some proposed topologies have very low probabilities that underflow to zero.

-BenRI

Reply all
Reply to author
Forward
0 new messages