trvrb / stem

Picking influenza stem strains
http://bedford.io/projects/stem/
0 stars 0 forks source link

MaskedPatterns negation maybe reversed #1

Closed trvrb closed 10 years ago

trvrb commented 10 years ago

@rambaut ---

Here are initial results for the 4 way rate split between:

This was from running H3N2_stem_partition.xml:

graph

This appears backwards compared to the results of Wolf et al. 2006:

wolf

They find epitopes are much faster than nonepitopes by almost 10x ratio. We have a ratio of ~3X in favor of nonepitope sites. Within epitope sites they find the trunk faster than side branches. In nonepitope sites, we find the trunk faster than side branches.

Here is the bit of code from MaskedPatternParser:

for (char c : maskString.toCharArray()) {
    if (Character.isDigit(c)) {
        if (k >= mask.length) {
            break;
        }
        mask[k] = (c == '0' ? negativeMask : !negativeMask);
        k++;
    }
}

Does it look like negativeMask could be reversed?

rambaut commented 10 years ago

The code looks correct to me. If the maskString has character 0 then the site is included if negativeMask is true, not otherwise. If the maskString has character 1 then it will be included if the negativeMark is false.

trvrb commented 10 years ago

Yeah. Sorry I just noticed this. I had: <maskedPatterns id="epitopePatterns" negative="true"> and <maskedPatterns id="nonepitopePatterns" negative="false">. It was my XML.

Good to know things are working (more or less --- trends at the moment weaker than what Wolf et al. found).