Illumina / interop

C++ Library to parse Illumina InterOp files
http://illumina.github.io/interop/index.html
GNU General Public License v3.0
75 stars 26 forks source link

Bindings for Java #320

Closed rich7409 closed 1 year ago

rich7409 commented 1 year ago

Hi. I see through the code lines like:

%pragma(java) jniclasscode=%{ )

and

#if defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGPYTHON)

All our integration code between the sequencers and Clarity is written in Java, and it would be very helpful if this library also had bindings for that language. Since there is at least a smattering of references to it, I'm wondering if it would be hard to learn SWIG to write a binding of our own. Was a Java binding once part of the deployment and since removed? If so, did it hit insurmountable problems?

Thanks, Richard.

ezralanglois commented 1 year ago

Hi Rich,

Yes, we did have a version of InterOp supporting Clarity with Java bindings. We ran into memory issues with the Java binding in general case (not the specific case used by Clarity). So, to mitigate the risk, we removed it from the public version.

We made a mistake trying to bind everything to these languages rather than targeting specific use-cases. If we had done that, then we could probably have safely targeted more languages with a reasonable automated testing framework.

Perhaps SWIG 4.0 addresses these issues we found in the Java binding.

We never found issues with the Python or C# binding.

rich7409 commented 1 year ago

Ok, good to know and thanks for replying. Would there be any plan to try again with other language bindings or will you be sticking with C# and Python only?

ezralanglois commented 1 year ago

The testing is the big burden. Every language requires rewriting all the unit tests and regression tests. I think if you put in a request with Illumina Support we can scope out the work required.

rich7409 commented 1 year ago

Ok. For now I'm using the Python bindings and the SciLifeLab's Clarity API, which seems to do the job. If this becomes problematic we only need a subset of the functionality of your library so could write the bits we need in Java, since the binary formats are documented. For now we're ok.

Thanks for the information.