rockt / SETH

SNP Extraction Tool for Human Variations
rockt.github.com/SETH
Other
27 stars 16 forks source link

Wrong mutation type recognized #6

Closed Erechtheus closed 8 years ago

Erechtheus commented 10 years ago

Description:

The mutation "p.F55>L" is recognized by the SETHNER-component, but is uncorrectly tagged as INSDEL alltough it should be a SUBSTITION. The problem only occurs using the inexact grammar.

It seems the problem occurs in the SETHNER.scala line 274 lazy val ProteinIndel:P = AALoc ~ (if(strictNomenclature)("delins"|"insdel") else ("delins"|"insdel"|">") ^^ { InsDelString() }) ~ ((AA.+ ^^ { MutatedString() }) | Number) Removing the ">" fixes the problem, but the mutation is than no longer recognized

Minimal Java- example:

    SETHNER sethner = new SETHNER(false);
    List<MutationMention> result = sethner.extractMutations("p.F55>L");
    for (MutationMention mutation : result) {
        System.out.println(mutation);
    }
    System.out.println("Extracted " + result.size() + " mutations.");

Test-code: https://github.com/rockt/SETH/blob/master/src/test/java/de/hu/berlin/wbi/issues/Issue6Test.java