Skip to content

Commit

Permalink
better comments on charset
Browse files Browse the repository at this point in the history
  • Loading branch information
walterxie committed Nov 16, 2023
1 parent 2422221 commit d099112
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Parse charset, especially codon position expressions.
* It should follow the Nexus Format (Maddison et al. 1997).
* <a href="https://doi.org/10.1093/sysbio/46.4.590"/>
*/
public class CharSetBlock {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void setChronoUnit(ChronoUnit chronoUnit) {
"If the string doesn't match charset's syntax, then check if the string matches " +
"a defined name in the nexus file. Otherwise it is an error. " +
"The string is referred to one partition at a call, but can be multiple blocks, " +
"such as d.charset(\"2-457\\3 660-896\\3\").",
"such as a dummy example: d.charset([\"2-457\\3\", \"660-896\\3\", \"1-.\\3\"]).",
narrativeName = "character set",
category = GeneratorCategory.TAXA_ALIGNMENT,
examples = {"twoPartitionCoalescentNex.lphy","https://linguaphylo.github.io/tutorials/time-stamped-data/"})
Expand Down
3 changes: 2 additions & 1 deletion tutorials/RSV2.lphy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ data {
options = {ageDirection="forward", ageRegex="s(\d+)$"};
D = readNexus(file="data/RSV2.nex", options=options);
taxa = D.taxa();
codon = D.charset(["3-629\3","1-629\3", "2-629\3"]);
// codon positions
codon = D.charset(["1-.\3", "2-.\3", "3-.\3"]);
L = codon.nchar();
n=length(codon); // 3 partitions
}
Expand Down

0 comments on commit d099112

Please sign in to comment.