You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/AliSim.md
+24-14Lines changed: 24 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -558,29 +558,39 @@ This example simulates a new alignment under the Juke-Cantor model from the inpu
558
558
559
559
Pre-define mutations
560
560
----------------------------
561
-
AliSim allows users to pre-define mutations that occur at some specific branches along the tree. To do so, one needs to: (1) specify an ancestral sequence at the root of the tree by adding `--root-seq <ALN_FILE>,<SEQ_NAME>` to the execution command; then (2) specify those mutations in the input tree file.
561
+
AliSim allows users to pre-define mutations that occur at some specific branches along the tree. To do so, one can specify those mutations via either a separate file or an input tree file.
562
562
563
-
Assuming that we have an alignment named `root_aln.phy`, which contains the ancestral sequence `S1` as in the following. (Note that `S2` and `S3` are not mandatorily presented).
563
+
### Pre-define mutations via a separate file
564
+
Given a tree file `tree_example.nwk`
565
+
566
+
(T1:0.2,(T2:0.3,T4:0.1)I1:0.4,T3:0.1);
564
567
565
-
3 40
566
-
S1 GTTTACTGGCAGATTTTCATAGATGATGTAAGATCAGACA
567
-
S2 GTTTACAGGCATATTTTCATAGATGATGTAAGTTCAGACA
568
-
S3 GTTTACTGGCAGATTTTCATTGATGATGTAAGATCAGACA
568
+
One can specify some predefined mutations in a separate file `mutations.txt` as in the following.
569
569
570
-
One can specify a list of pre-defined mutations that occur at each branch using `[&mutations={<list_of_mutations>}]` in the tree file. Mutations in the list are separated by a comma `,` as in the following tree file `tree_mutations.nwk`.
Each line starts with a `<node name>`, followed by a tab `\t`, and ends up with a `<list_of_mutations>`. Mutations in the list are separated by a comma `,`. The above file `mutations.txt` specifies:
574
+
575
+
* Three mutations `C39G` (i.e., C is substituted by G at site 39), `T17A`, and `G25C` occur along the branch connecting (the internal) node `I1` and its parent node (i.e., the root node);
576
+
* Two mutations `C25A` and `A5G` occur along the branch connecting node `T2` and its parent node (i.e., node `I1').
575
577
576
-
* Three mutations `C39G` (i.e., C is substituted by G at site 39), `T17A`, and `G25C` occur along the branch connecting the root node and the internal node `I1`;
577
-
* Two mutations `C25A` and `A5G` occur along the branch connecting the internal node `I1` and taxon `T2`.
will simulate an alignment with 4 sequences (i.e., T1, T2, T3, and T4) under the [Jukes-Cantor model](http://doi.org/10.1016/B978-1-4832-3211-9.50009-7) where sites 5, 17, 25, and 39 are substituted according to the above pre-defined mutations.
584
+
585
+
### Pre-define mutations via the input tree file
586
+
Another option to specify mutations is using the input tree. One can specify a list of mutations that occur at each branch using the syntax `[&mutations={<list_of_mutations>}]`. To reproduce the above example (in *Pre-define mutations via a separate file* section), one can specify the tree file `tree_mutations.nwk` as in the following.
will simulate an alignment with 4 sequences (each with 40 sites) under the [Jukes-Cantor model](http://doi.org/10.1016/B978-1-4832-3211-9.50009-7) where sites 5, 17, 25, and 39 are substituted according to the above pre-defined mutations.
0 commit comments