rockt / SETH

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

Insdels are classified as type "null" #7

Closed Erechtheus closed 7 years ago

Erechtheus commented 9 years ago

Insdels following the human mutation nomenclature are correctly identified, but are tagged as type "null" instead of "DELETETION_INSERTION". Behaviour can only be observed when using the exact backus naur grammar. Fuzzy grammar identifies the correct mutation type. Bug might be related to Bug#6.

To reproduce this bug:

import java.util.List;

import de.hu.berlin.wbi.objects.MutationMention;
import seth.SETH;

public class Test {

    /**
     * @param args
     */
    public static void main(String[] args) {
        String mutationString ="p.Glu746_Thr751delinsAla";

        //Incorrect Type
        SETH sethExact = new SETH("resources/mutations.txt", true, true); 
        List<MutationMention> ms = sethExact.findMutations(mutationString);
        for(MutationMention m : ms){
            System.out.println(m.getText() + " type=" +m.getType());
        }   

        //Correct Type
        SETH sethInexact = new SETH("resources/mutations.txt", false, true); 
        ms = sethInexact.findMutations(mutationString);
        for(MutationMention m : ms){
            System.out.println(m.getText() + " type=" +m.getType());
        }   
    }
}

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