Generate XML reference for BEAST2.6.4

54 views
Skip to first unread message

Ksenia Safina

unread,
Jul 20, 2021, 2:24:53 PM7/20/21
to beast-users
Hello,

I am trying to generate the XML reference for BEASTv.2.6.4 by doing

java -cp lib/beast.jar  beast.app.DocMaker


It starts fine but then crashes with 
...
beast.evolution.alignment.AlignmentFromTrait => BEASTObject that performs calculations based on the State.<br/>Unordered set mapping keys to values<br/>Class representing alignment data<br/>Treats trait on taxa as single site alignment
beast.evolution.alignment.AlignmentFromTraitMap => BEASTObject that performs calculations based on the State.<br/>Unordered set mapping keys to values<br/>Class representing alignment data<br/>Creates and alignment of continuous data, such as a geographic location, from a trait set
beast.evolution.alignment.AscertainedAlignment => BEASTObject that performs calculations based on the State.<br/>Unordered set mapping keys to values<br/>Class representing alignment data<br/>Alignemnt that allows ascertainment correction
beast.evolution.alignment.FilteredAlignment => BEASTObject that performs calculations based on the State.<br/>Unordered set mapping keys to values<br/>Class representing alignment data<br/>Alignment based on a filter operation on another alignment
Exception in thread "main" java.lang.VerifyError: Bad access to protected data in getfield
Exception Details:
  Location:
    beast/evolution/alignment/PrunedAlignment.initAndValidate()V @120: getfield
  Reason:
    Type 'beast/evolution/alignment/PrunedAlignment' (current frame, stack[2]) is not assignable to 'beast/evolution/alignment/PrunedAlignment'
  Current Frame:
    bci: @120
    flags: { }
    locals: { 'beast/evolution/alignment/PrunedAlignment', 'beast/evolution/alignment/Alignment', 'beast/evolution/datatype/DataType$Base', 'java/util/List', 'java/util/List', 'beast/evolution/alignment/TaxonSet' }
    stack: { 'beast/evolution/alignment/PrunedAlignment', 'beast/evolution/datatype/DataType' }
  Bytecode:
    0000000: 2ab4 0007 b600 12c0 0013 4c2b b400 14b6
    0000010: 0012 c000 154d 2cc6 000f 2ab4 0016 2c2a
    0000020: b600 17a7 0012 2ab4 0018 2bb4 0019 b600
    0000030: 122a b600 172a b400 1a2b b400 1bb6 0012
    0000040: 2ab6 0017 2ab4 0011 b600 12c0 001c 4e2b
    0000050: b400 1db6 0012 c000 1c3a 042a b400 0bb6
    0000060: 0012 c000 1e3a 0519 04c6 000d 1904 b900
    0000070: 1f01 009a 01b9 2a2b b400 20b5 0021 2abb
    0000080: 000e 59b7 000f b500 222a bb00 0e59 b700
    0000090: 0fb5 0023 2bb4 0024 3a06 2bb6 0025 3a07
    00000a0: 1905 c600 6c03 3608 1508 2bb4 0024 b900
    00000b0: 1f01 00a2 0058 1905 1906 1508 b900 2602
    00000c0: 00c0 0027 b600 289c 003e 2ab4 0022 1907
    00000d0: 1508 b900 2602 00b9 0029 0200 572a b400
    00000e0: 232b b400 2a15 08b9 0026 0200 b900 2902
    00000f0: 0057 2ab4 002b 1906 1508 b900 2602 00b9
    0000100: 0029 0200 5784 0801 a7ff a0a7 009c 0336
    0000110: 0815 082b b400 2cb9 001f 0100 a200 8b19
    0000120: 0715 08b9 0026 0200 c000 1c3a 0919 09b9
    0000130: 002d 0100 3a0a 190a b900 2e01 0099 0064
    0000140: 190a b900 2f01 00c0 0030 3a0b 2ab4 0021
    0000150: 190b b600 31b9 0032 0200 be2a b400 21b9
    0000160: 0033 0100 9f00 3a2a b400 2219 09b9 0029
    0000170: 0200 572a b400 232b b400 2a15 08b9 0026
    0000180: 0200 b900 2902 0057 2ab4 002b 1906 1508
    0000190: b900 2602 00b9 0029 0200 57a7 0006 a7ff
    00001a0: 9884 0801 a7ff 6d2d b900 1f01 009e 0076
    00001b0: 0336 0815 082a b400 2bb9 001f 0100 a200
    00001c0: 65bb 000e 59b7 000f 3a09 2ab4 0022 1508
    00001d0: b900 2602 00c0 001c 3a0a 2db9 002d 0100
    00001e0: 3a0b 190b b900 2e01 0099 0026 190b b900
    00001f0: 2f01 00c0 0030 b600 3136 0c19 0919 0a15
    0000200: 0cb9 0026 0200 b900 2902 0057 a7ff d62a
    0000210: b400 2215 0819 09b9 0034 0300 5784 0801
    0000220: a7ff 932a b600 352a b600 36b1 2db9 001f
    0000230: 0100 9e00 2f2b b600 3736 06bb 000e 5915
    0000240: 06b7 0038 4e03 3607 1507 1506 a200 152d
    0000250: 1507 b800 39b9 0029 0200 5784 0701 a7ff
    0000260: eabb 000e 59b7 000f 3a06 1905 c600 4519
    0000270: 04b9 002d 0100 3a07 1907 b900 2e01 0099
    0000280: 002f 1907 b900 2f01 00c0 003a 3a08 1905
    0000290: 1908 b400 3bb6 0012 c000 27b6 0028 9c00
    00002a0: 0d19 0619 08b9 0029 0200 57a7 ffcd a700
    00002b0: 9d19 04b9 002d 0100 3a07 1907 b900 2e01
    00002c0: 0099 008a 1907 b900 2f01 00c0 003a 3a08
    00002d0: 1908 2bb4 0020 b600 3c3a 092b b400 20b9
    00002e0: 0033 0100 360a 0336 0b2d b900 2d01 003a
    00002f0: 0c19 0cb9 002e 0100 9900 4119 0cb9 002f
    0000300: 0100 c000 30b6 0031 360d 1909 150d b900
    0000310: 2602 00c0 0030 b600 319b 001d 1909 150d
    0000320: b900 2602 00c0 0030 b600 3115 0aa2 0009
    0000330: 0436 0ba7 0006 a7ff bb15 0b99 000d 1906
    0000340: 1908 b900 2902 0057 a7ff 722a b400 11b6
    0000350: 0012 c600 a303 3607 1507 1906 b900 1f01
    0000360: 00a2 0094 1906 1507 b900 2602 00c0 003a
    0000370: 3a08 1908 2bb4 0020 b600 3c3a 09bb 003d
    0000380: 59b7 003e 3a0a 2db9 002d 0100 3a0b 190b
    0000390: b900 2e01 0099 002c 190b b900 2f01 00c0
    00003a0: 0030 b600 3136 0c19 0a19 0915 0cb9 0026
    00003b0: 0200 b600 3f57 190a 102c b600 4057 a7ff
    00003c0: d019 0a19 0ab6 0041 0464 b600 4257 1906
    00003d0: 1507 bb00 3a59 1908 b400 3bb6 0012 c000
    00003e0: 2719 0ab6 0043 b700 44b9 0034 0300 5784
    00003f0: 0701 a7ff 662a 1245 1906 b600 462a b700
    0000400: 47b1                                   
  Stackmap Table:
    append_frame(@38,Object[#86],Object[#87])
    same_frame(@53)
    append_frame(@118,Object[#88],Object[#88],Object[#89])
    append_frame(@168,Object[#88],Object[#88],Integer)
    same_frame_extended(@261)
    chop_frame(@267,1)
    same_frame(@270)
    append_frame(@273,Integer)
    append_frame(@310,Object[#88],Object[#90])
    same_frame_extended(@414)
    chop_frame(@417,2)
    chop_frame(@423,1)
    append_frame(@435,Integer)
    append_frame(@482,Object[#88],Object[#88],Object[#90])
    chop_frame(@527,1)
    chop_frame(@547,3)
    chop_frame(@556,2)
    append_frame(@584,Integer,Integer)
    chop_frame(@609,2)
    append_frame(@632,Object[#88],Object[#90])
    same_frame(@683)
    chop_frame(@686,1)
    same_frame(@689)
    append_frame(@698,Object[#90])
    full_frame(@753,{Object[#91],Object[#86],Object[#87],Object[#88],Object[#88],Object[#89],Object[#88],Object[#90],Object[#92],Object[#88],Integer,Integer,Object[#90]},{})
    same_frame_extended(@822)
    chop_frame(@825,1)
    full_frame(@840,{Object[#91],Object[#86],Object[#87],Object[#88],Object[#88],Object[#89],Object[#88],Object[#90]},{})
    chop_frame(@843,1)
    append_frame(@856,Integer)
    full_frame(@910,{Object[#91],Object[#86],Object[#87],Object[#88],Object[#88],Object[#89],Object[#88],Integer,Object[#92],Object[#88],Object[#93],Object[#90]},{})
    chop_frame(@961,1)
    full_frame(@1013,{Object[#91],Object[#86],Object[#87],Object[#88],Object[#88],Object[#89],Object[#88]},{})

at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getConstructor0(Class.java:3342)
at java.base/java.lang.Class.newInstance(Class.java:556)
at beast.app.DocMaker.<init>(Unknown Source)
at beast.app.DocMaker.<init>(Unknown Source)
at beast.app.DocMaker.main(Unknown Source)


Am I doing it wrong?

Thanks,
Ksenia

Remco Bouckaert

unread,
Jul 21, 2021, 4:29:36 PM7/21/21
to beast...@googlegroups.com
Hi Ksenia,

It looks like the DocMaker tool has not been kept up to date with the latest version — I raised an issue (#988) put in some fixes and it runs now with the development code, so should be available in the next release. 

I updated the XML reference that includes the BEAST package but not any of the other packages, which you can find here: http://www.beast2.org/xml/index.html

If you are interested in a class in another package, there is the GetDescription app in the Babel package, which produces similar information but only for a single class. You can use that from the command line using

applauncher GetDescription -className babel.tools.CladeSetComparator

There should be an applauncher script in the BEAST 2 distribution. This produces this output in the terminal:

Class: babel.tools.CladeSetComparator
Match clades from two tree sets and print support for both sets so they can be plotted in an X-Y plot

CladeSetComparator has the following inputs:
tree (TreeFile): 2 or more source tree (set or MCC tree) files (optional, default: [])
tree1 (TreeFile): source tree (set or MCC tree) file (optional)
tree2 (TreeFile): source tree (set or MCC tree) file (optional)
out (OutFile): output file, or stdout if not specified (optional, default: [[none]])
svg (OutFile): svg output file. if not specified, no SVG output is produced. (optional, default: [[none]])
png (OutFile): png output file. if not specified, no PNG output is produced. (optional, default: [[none]])
burnin (Integer): percentage of trees to used as burn-in (and will be ignored) (optional, default: 10)
verbose (Boolean): print information about clades of interest, and if no output file is specified, all clade information (optional, default: true)

The list of inputs matches the attributes in the XML. 


By the way, this

applauncher GetDesc -class babel.tools.CladeSetComparator
or
applauncher GetDesc -c babel.tools.CladeSetComparator

will produce the same output — you can abbreviate the app name and arguments.

Cheers,

Remco

Ksenia Safina

unread,
Jul 22, 2021, 3:37:25 PM7/22/21
to beast-users
Hi Remco,

thanks a lot, that works! btw, applauncher -list produces a list of classes only for BEASTLabs and Babel, although I have other packages installed (and I can get their description with GetDesc).

Best,
Ksenia

Remco Bouckaert

unread,
Jul 22, 2021, 3:44:31 PM7/22/21
to beast...@googlegroups.com
Hi Ksenia,

Running applauncher -list does not list all classes in all BEAST packages, but only lists classes that are applications that can be launched with applauncher. 

The GetDescription app can produce a description not only the ones that can be launcher, but for any BEAST class in a package. However, you have to know the name of the class somehow.

DocMaker will produce documentation for all installed packages, but as you reported, has a bug in v2.6.4, which is fixed in the development code. You can build beast.jar (some instructions here http://www.beast2.org/2021/06/21/building-from-source.html) for the development code, or wait a little for the next release.

Cheers,

Remco

Reply all
Reply to author
Forward
0 new messages