mkirsche / Jasmine

Jasmine: SV Merging Across Samples
MIT License
180 stars 17 forks source link

Problem with output_genotypes parameter #9

Closed mldmort closed 3 years ago

mldmort commented 3 years ago

Hi,

I've noticed that when I'm running Jasmine with parameter: --output_genotypes I get an error as following:

Exception in thread "main" java.lang.NullPointerException
    at AddGenotypes.addGenotypes(AddGenotypes.java:150)
    at PipelineManager.addGenotypes(PipelineManager.java:191)
    at Main.postprocess(Main.java:91)
    at Main.main(Main.java:27)

And Jasmine does not finish the job, and writes just part of the calls in the output file. Without --output_genotypes Jasmine doesn't have any problems and finishes, but doesn't output genotypes in the merged output VCF file.

I only have these genotypes in my VCF files (generated by Sniffles):

0/0
0/1
1/1

Any idea what can be the problem? Thanks,

mkirsche commented 3 years ago

Thanks for pointing this out! I have updated the code to better handle duplicate IDs, and this should be resolved in the conda version as well. Please let me know if you still have issues with this!

wdecoster commented 3 years ago

Hi,

I just had this same error using Jasmine version 1.0.11 when using jasmine with --output_genotypes.

Wouter

mkirsche commented 3 years ago

Hi Wouter,

Thanks for letting me know - I'll look into it! Could you please let me know what other parameters you used as well as the full error message with stack trace? They'd be very helpful for identifying the cause of the error.

Thanks! Melanie

wdecoster commented 3 years ago

Hi Melanie,

Of course, I was a little too quick: I ran jasmine file_list=$file_list out_file=$out threads=8 --output_genotypes --normalize_type --pre_normalize and got this error:

Exception in thread "main" java.lang.NullPointerException at AddGenotypes.addGenotypes(AddGenotypes.java:61) at PipelineManager.addGenotypes(PipelineManager.java:191) at Main.postprocess(Main.java:91) at Main.main(Main.java:27)

VCFs were from CuteSV, then I ran iris, and used the output thereof for jasmine.

Like @mldmort the issue was solved when removing --output_genotypes

Thanks for looking into this!

Wouter

mkirsche commented 3 years ago

Hi Wouter,

It looks like this particular error occurred when Jasmine was run with --output_genotypes and one or more of the input VCFs had no variants in it (i.e., only a header). I pushed an update which should handle that case, so I'm hoping that fixes it for you! If you're running from source you should be able to try it out, but if not it will be updated for the next release. Please let me know if you're still encountering the error!

Thanks, Melanie

wdecoster commented 3 years ago

Hi Melanie,

I can already confirm that there was one VCF without any variants, and removing that one also solved the error! So problem solved it seems.

Cheers, Wouter

mkirsche commented 3 years ago

Awesome thanks for confirming that!