rambaut / beast-mcmc

Automatically exported from code.google.com/p/beast-mcmc
0 stars 0 forks source link

bug of unique attribute in pattern lists #570

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Dear Andrew,

Besides those, there is another bug regarding unique attribute in pattern
lists for multi-partition case. From the 2nd partition,
PatternListGenerator starts to pass unique=false [line 50] to create an
instance of SitePatterns(..., boolean unique) [line 118], and then
patterns.getPatternCount() [line 121] returns the number of sites but not
the number of patterns as BEAST 1.6 did.

I am not sure whether this will affect BEAST, at least, it is confusing
users with an incorrect information in the comments of pattern lists
section in the xml. The example below shows correct npatterns for 26 but
not 29, 47, 53, because the latter has unique="false".

I do not know when we should assign unique=false, but it should not be a
default value for multi-partition case, so that npatterns would be same as
BEAST 1.6.

<!-- The unique patterns from 1 to end
   -->
    <!-- npatterns=144
   -->
    <patterns id="26.patterns" from="1">
        <alignment idref="alignment1"/>
    </patterns>

    <!-- The patterns from 1 to end
   -->
    <!-- npatterns=601
   -->
    <patterns id="29.patterns" from="1" unique="false">
        <alignment idref="alignment2"/>
    </patterns>

    <!-- The patterns from 1 to end
   -->
    <!-- npatterns=819
   -->
    <patterns id="47.patterns" from="1" unique="false">
        <alignment idref="alignment3"/>
    </patterns>

    <!-- The patterns from 1 to end
   -->
    <!-- npatterns=621
   -->
    <patterns id="53.patterns" from="1" unique="false">
        <alignment idref="alignment4"/>
    </patterns>

Cheers,
Walter

Original issue reported on code.google.com by dong.w.xie@gmail.com on 2 Feb 2012 at 10:30

GoogleCodeExporter commented 9 years ago

Original comment by ramb...@gmail.com on 2 Feb 2012 at 11:03