|
1 | 1 | morph-models |
2 | 2 | ============ |
3 | 3 |
|
4 | | -Models for dealing with standard discrete morphological data. |
| 4 | +Models for discrete morphological character data in [BEAST 3](https://github.com/CompEvol/beast3). |
5 | 5 |
|
6 | | -Aiming at MK and MKv models from Lewis, 2001 (http://sysbio.oxfordjournals.org/content/50/6/913.short) |
| 6 | +Implements the Lewis MK and MKv substitution models (Lewis, 2001), along with ordinal and nested ordinal variants for ordered character data. |
7 | 7 |
|
8 | | -A tutorial is available [here](http://www.beast2.org/morphological-models/) |
| 8 | +## Modules |
| 9 | + |
| 10 | +- **beast-morph-models** — core substitution models and alignment classes (depends on `beast-base`) |
| 11 | +- **beast-morph-models-fx** — BEAUti integration (depends on `beast-fx`) |
| 12 | + |
| 13 | +## Substitution models |
| 14 | + |
| 15 | +| Class | Description | |
| 16 | +|-------|-------------| |
| 17 | +| `LewisMK` | Equal or user-specified frequency Mk model | |
| 18 | +| `Ordinal` | Tridiagonal rate matrix for ordered characters | |
| 19 | +| `NestedOrdinal` | Nested ordinal rate matrix (state 0 transitions to all others) | |
| 20 | + |
| 21 | +## Building |
| 22 | + |
| 23 | +BEAST 3 dependencies are resolved from [GitHub Packages](https://github.com/CompEvol/beast3/packages) (or Maven Central, if published there). For GitHub Packages, add a [personal access token](https://github.com/settings/tokens) (classic) with `read:packages` scope to `~/.m2/settings.xml`: |
| 24 | + |
| 25 | +```xml |
| 26 | +<settings> |
| 27 | + <servers> |
| 28 | + <server> |
| 29 | + <id>github</id> |
| 30 | + <username>YOUR_GITHUB_USERNAME</username> |
| 31 | + <password>YOUR_GITHUB_PAT</password> |
| 32 | + </server> |
| 33 | + </servers> |
| 34 | +</settings> |
| 35 | +``` |
| 36 | + |
| 37 | +Then build morph-models: |
| 38 | + |
| 39 | +```bash |
| 40 | +cd ~/Git/morph-models |
| 41 | +mvn compile |
| 42 | +mvn test -pl beast-morph-models |
| 43 | +``` |
| 44 | + |
| 45 | +Alternatively, you can install BEAST 3 from source (no GitHub auth needed): |
| 46 | + |
| 47 | +```bash |
| 48 | +cd ~/Git/beast3 |
| 49 | +mvn install -DskipTests |
| 50 | +``` |
| 51 | + |
| 52 | +## Running |
| 53 | + |
| 54 | +```bash |
| 55 | +# Validate an XML |
| 56 | +mvn -pl beast-morph-models exec:exec -Dbeast.args="-validate examples/M3982.xml" |
| 57 | + |
| 58 | +# Run an analysis |
| 59 | +mvn -pl beast-morph-models exec:exec -Dbeast.args="-overwrite examples/M3982.xml" |
| 60 | +``` |
| 61 | + |
| 62 | +## Examples |
| 63 | + |
| 64 | +- `examples/M3982.xml` — Anolis lizard morphological analysis using BEAST 3 spec classes |
| 65 | +- `examples/legacy-2.7/` — original BEAST 2.7 XML files (some require external packages) |
| 66 | + |
| 67 | +## Releasing |
| 68 | + |
| 69 | +### ZIP / CBAN |
| 70 | + |
| 71 | +The existing `release.sh` script builds a BEAST package ZIP and optionally |
| 72 | +creates a GitHub release for submission to [CBAN](https://github.com/CompEvol/CBAN): |
| 73 | + |
| 74 | +```bash |
| 75 | +./release.sh # build ZIP only |
| 76 | +./release.sh --release # build ZIP + create GitHub release |
| 77 | +``` |
| 78 | + |
| 79 | +### Maven Central |
| 80 | + |
| 81 | +```bash |
| 82 | +mvn clean deploy -Prelease |
| 83 | +``` |
| 84 | + |
| 85 | +This builds the JARs (with `version.xml` embedded for service discovery), generates |
| 86 | +sources and javadoc JARs, signs everything with GPG, and uploads to Maven Central. |
| 87 | + |
| 88 | +BEAST 3 users can then install with: |
| 89 | + |
| 90 | +``` |
| 91 | +Package Manager > Install from Maven > io.github.compevol:beast-morph-models:1.3.0 |
| 92 | +``` |
| 93 | + |
| 94 | +Or from the command line: |
| 95 | + |
| 96 | +```bash |
| 97 | +packagemanager -maven io.github.compevol:beast-morph-models:1.3.0 |
| 98 | +``` |
| 99 | + |
| 100 | +## References |
| 101 | + |
| 102 | +Lewis, P. O. (2001). A likelihood approach to estimating phylogeny from discrete morphological character data. *Systematic Biology*, 50(6), 913–925. |
0 commit comments