diff --git a/lphy-base/src/main/java/lphy/base/evolution/alignment/CharSetBlock.java b/lphy-base/src/main/java/lphy/base/evolution/alignment/CharSetBlock.java index 91588db3..e19646d8 100644 --- a/lphy-base/src/main/java/lphy/base/evolution/alignment/CharSetBlock.java +++ b/lphy-base/src/main/java/lphy/base/evolution/alignment/CharSetBlock.java @@ -7,6 +7,8 @@ /** * Parse charset, especially codon position expressions. + * It should follow the Nexus Format (Maddison et al. 1997). + * */ public class CharSetBlock { diff --git a/lphy-base/src/main/java/lphy/base/evolution/alignment/MetaDataAlignment.java b/lphy-base/src/main/java/lphy/base/evolution/alignment/MetaDataAlignment.java index 324807fa..7bee64c2 100644 --- a/lphy-base/src/main/java/lphy/base/evolution/alignment/MetaDataAlignment.java +++ b/lphy-base/src/main/java/lphy/base/evolution/alignment/MetaDataAlignment.java @@ -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/"}) diff --git a/tutorials/RSV2.lphy b/tutorials/RSV2.lphy index 0c875539..39660895 100644 --- a/tutorials/RSV2.lphy +++ b/tutorials/RSV2.lphy @@ -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 }