Skip to content

Commit 04c21f9

Browse files
committed
Merge branch 'main' of https://github.com/jordandouglas/MutationTree into main
2 parents 0e93919 + de68ce4 commit 04c21f9

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# BeastMap
2-
A BEAST 2 package for counting the number of synonymous, non-synonymous, and indel mutations on each branch
3-
2+
A BEAST 2 package for counting the number of synonymous, non-synonymous, and indel mutations on each branch. The method first performs ancestral sequence reconstruction on the internal nodes, and then uses stochastic mapping to sample a mutation pathway along each branch. This all happens during MCMC, and the package is compatible with a wide range of existing BEAST 2 site, clock, and tree models.
43

4+
Warning: package is currently in pre-pre-release. It has passed the simulation studies, but the code is still quite volatile.
55

66
## Install
77

@@ -21,6 +21,9 @@ unzip -o tmp.zip
2121
```
2222

2323

24+
Or you can download the zip file directly from the releases section. Please make sure to install the `CodonSubstModels` package too, as that is a dependency.
25+
26+
2427
## Available counters
2528

2629
Each counter requires a ```BranchMutationSampler```, which will stochastically sample the mutations at the time of logging. This ensures that the various mutation summarisers below will be in harmony.
@@ -31,12 +34,12 @@ Counts the total number of substitutions per branch.
3134
```<sampler spec="beastmap.logger.mut.SubstitutionSum" sampler="@mutationsampler" />```
3235

3336
### SynonymousSubstSum
34-
Counts the total number of synonymous substitutions per branch. Requirements: **nucleotide** data. Options: code (default: universal); readingFrame (default: 1).
37+
Counts the total number of synonymous substitutions per branch. Requirements: **nucleotide** or **codon** data. Options: code (default: universal); readingFrame (default: 1).
3538

3639
```<sampler spec="beastmap.logger.mut.SynonymousSubstSum" sampler="@mutationsampler" code="universal" readingFrame="1"/>```
3740

3841
### NonSynonymousSubstSum
39-
Counts the total number of non-synonymous substitutions per branch. Requirements: **nucleotide** data. Options: code (default: universal); readingFrame (default: 1).
42+
Counts the total number of non-synonymous substitutions per branch. Requirements: **nucleotide** or **codon** data. Options: code (default: universal); readingFrame (default: 1).
4043

4144
```<sampler spec="beastmap.logger.mut.NonSynonymousSubstSum" sampler="@mutationsampler" code="universal" readingFrame="1"/>```
4245

@@ -56,7 +59,23 @@ Counts the total number of substitutions per branch (purine to pyrimidine or vic
5659
``` <sampler spec="beastmap.logger.mut.NucleotideTransitionCounter" sampler="@mutationsampler" />```
5760

5861

62+
### AminoAcidClassChanges
63+
Counts the total number of amino acid substitutions per branch such that the amino acid chnages to a different functional class. Requirements: **amino acid** data. These classes are based on the BLOSUM62 matrix non-polar: {IVLM}, amide/amine: {DENQ}, basic: {HKR}, aromatic: {FWY}, small/polar: {AST}, cysteine: {C}, glycine: {G}, proline: {P}.
64+
65+
``` <sampler spec="beastmap.logger.mut.AminoAcidClassChanges" sampler="@mutationsampler" />```
66+
67+
68+
### AminoAcidClassRemains
69+
Counts the total number of amino acid substitutions per branch such that the amino acid remains in the same functional class. Requirements: **amino acid** data.
5970

71+
``` <sampler spec="beastmap.logger.mut.AminoAcidClassRemains" sampler="@mutationsampler" />```
72+
73+
74+
### SubstitutionSummer
75+
76+
Takes one of the other per-branch counters and adds all the numbers together across the whole tree
77+
78+
``` <log spec="beastmap.logger.SubstitutionSummer" counter="@ID_OF_COUNTER" />```
6079

6180

6281
## Setting up counters in XML
@@ -70,11 +89,16 @@ Append the following loggers to the bottom of the XML file to count the number o
7089
<sampler id="SubstitutionSum" spec="beastmap.logger.mut.SubstitutionSum" sampler="@mutationsampler" />
7190
<sampler id="SynonymousSubstSum" spec="beastmap.logger.mut.SynonymousSubstSum" sampler="@mutationsampler" code="universal" readingFrame="1"/>
7291
<sampler id="NonSynonymousSubstSum" spec="beastmap.logger.mut.NonSynonymousSubstSum" sampler="@mutationsampler" code="universal" readingFrame="1"/>
73-
<sampler id="FromToSubstSum" spec="beastmap.logger.mut.FromToSubstSum" sampler="@mutationsampler" from="A" to="A" />
92+
<sampler id="FromToSubstSum" spec="beastmap.logger.mut.FromToSubstSum" sampler="@mutationsampler" from="A" to="G" />
7493
<sampler id="NucleotideTransitionCounter" spec="beastmap.logger.mut.NucleotideTransitionCounter" sampler="@mutationsampler" />
94+
<sampler id="NucleotideTransversionCounter" spec="beastmap.logger.mut.NucleotideTransversionCounter" sampler="@mutationsampler" />
95+
<sampler id="SubstitutionSumFiltered" spec="beastmap.logger.mut.SubstitutionSum" sampler="@mutationsampler" filter="2,1-99\3" />
96+
97+
<!-- This will log the ancestral sequences onto the tree -- it will make the tree files quite large so turn it off if you dont want it -->
98+
<sampler id="AncestralSequenceLogger" spec="beastmap.logger.AncestralSequenceLogger" sampler="@mutationsampler"/>
7599
76100
<sampler id="NucleotideTransversionCounter" spec="beastmap.logger.mut.NucleotideTransversionCounter">
77-
<sampler id="mutationsampler" spec="beastmap.evolution.BranchMutationSampler" tag="seq" useAmbiguities="true" >
101+
<sampler id="mutationsampler" spec="beastmap.evolution.BranchMutationSampler" tag="seq" useAmbiguities="true" substModelIsNodeDependent="false" burnin="50000" >
78102
<tree idref="tree" />
79103
<siteModel idref="siteModelID" />
80104
<branchRateModel idref="clockModelID" />
@@ -97,4 +121,4 @@ You can also place these loggers in the trace file as well as the tree file to e
97121

98122
## Examples
99123

100-
See the beastmap.xml file in examples.
124+
See the xml file in examples.

0 commit comments

Comments
 (0)