GATK 3.6 api: GATK cannot find my Walker when I use a java lambda / Filter ?

lindenblindenb FranceMember ✭✭

Hi all,
I'ts cross-posted on SO: http://stackoverflow.com/questions/41678374

I've written a custom plugin for GATK 3.6

$ javac -version
javac 1.8.0_60

My walker was compiled but wasn't found/loaded by GATK while it was in the classpath and a similar tool was working without any problem. By removing some part of the code, I've narrowed the problem to the following line which was the cause of my problem (see filter ) :

(...)
ctx.getAlleles().stream().filter(T->!(T.isSymbolic() || T.isNoCall())).mapToInt(new ToIntFunction<Allele>() {
    public int applyAsInt(Allele value) {return value.length();};
    });
(...)

My plugin is loaded ( I can see it with -T MyPugin --help) if I change the line above to :

(...)
ctx.getAlleles().stream().mapToInt(new ToIntFunction<Allele>() {
        public int applyAsInt(Allele value) {return value.length();};
    });
(...)

It's also loaded if the line is:

final Predicate<Allele> afilter = new Predicate<Allele>() {
    @Override
    public boolean test(Allele a) {
        return !(a.isNoCall() || a.isSymbolic());
    }
};
ctx.getAlleles().stream().filter(afilter).mapToInt(new ToIntFunction<Allele>() {
        public int applyAsInt(Allele value) {return value.length();};
    });

why ?

Best Answer

Answers

Sign In or Register to comment.