bedatadriven / renjin

JVM-based interpreter for the R language for the statistical analysis.
https://www.renjin.org
GNU General Public License v2.0
513 stars 82 forks source link

xcms package #218

Closed tomas-pluskal closed 8 years ago

tomas-pluskal commented 8 years ago

Hi! Thanks for doing a great job developing renjin!

I am interested in running the bioconductor xcms package under JVM. I saw the package (http://packages.renjin.org/package/org.renjin.bioconductor/xcms) depends on mzR package, which currently fails to build under renjin: http://packages.renjin.org/package/org.renjin.bioconductor/mzR/2.4.1/build/14

I am not sure how to interpret the error message: the member classes must be defined: not true of "C++Object". Is this something that will likely be fixed in the future, or is this a show stopper error that means this package will never be available under renjin?

akbertram commented 8 years ago

Well, never say never, but there are a number of "todos" I see quickly with the mzR package:

  1. It uses C++Object, which I think is a Rcpp runtime class. We have a fork of Rcpp with just the barebones need to compile most C++ packages, so we would need to add this back in.
  2. It has a System Dependency on NetCDF, which would need to be first compiled to JVM bytecode and then made available to the package during build time. Our build system doesn't currently consider System Dependencies at all, so this would also need to be added.
  3. Not including NetCDF, the mzr package looks to have about 1 million + lines of C++ code, which I imagine includes lots of I/O given the nature of the package, so we would need to flesh out support in GCC Bridge to handle I/O. The focus on compiling C/C++ code up to now has been on numerical computation heavy code.

Depending on how motivated you are to use xcms, you could also fork xcms, mzR or both and chop out the bits that you don't need and that don't currently work. There are also a number of good java libraries for these file formats that could wrapped in an R API that's compatible with that of mzR. That's essentially what my colleague Maarten-Jan has started with the renjin-xml2 package.

I'm going to close this ticket as it touches on more than one issues:

Like I said above, I'd expect to see further issues with compilation once these two issues are resolved.

tomas-pluskal commented 8 years ago

Ok, thanks a lot for the explanation!