[BioC] RMAGEML and JVM

Martin Morgan mtmorgan at fhcrc.org
Tue Jul 10 16:52:29 CEST 2007


"Michaela Gündel" <michaela.guendel at googlemail.com> writes:

> Dear list,
>
> creating a microarray workflow for my Master Thesis, I am facing a
> problem concerning the RMAGEML package.
>
> I am constructing the workflow from Java using the BioC packages. I set
> up an Rengine in Java and from this, I call R commands using
> Rengine.eval(). The problem I am facing now is that I want to read in
> MIAME compliant data with the RMAGEML package, which, from R directly,
> works perfectly. However, the problem is that the package creates a JVM
> which of course does not work calling it from an already existing JVM.
>
> Is there any way of
> - either using the existing JVM in the importMAGEOM function (there:
> mageOM <- .Call("newRMAGESTK", directory, ..rmagemlJVM at jvmptr, PACKAGE =
> "RMAGEML") )

Definitely getting your hands dirty, but the key seems to be in
.createJVM and the line

    jvmptr <- .Call("arji_createJVM", classpath, PACKAGE = "RMAGEML")

The corresponding C code invokes the jvm with appropriate class path
and other options

	res = JNI_CreateJavaVM( &jvm, (void**)&env, &vm_args);

and then makes it into an R external pointer and returns it

    retptr = R_MakeExternalPtr( jvm, JavaVM_type_tag, R_NilValue );
	return(retptr);

Seems like you'd like to replace this with your own C level function
that discovers the JVM

     res = JNI_GetCreatedJavaVMs(&jvm, 1, &l);
    
(this is from the source for the rJava package,
rJava/jri/src/Rcallbacks.c). Return this as an external pointer

    retptr = R_MakeExternalPtr( jvm, JavaVM_type_tag, R_NilValue );
	return(retptr);

and then patch .createJVM or importMAGEOM to use your new C call.

Of course I haven't tried this ;)

Martin

> - or reading the MAGEML document using MAGE-STK and converting the input
> from the then Java object to an R object that I can read into R (I am
> working with RGLists mainly)?
>
> Your help is very much appreciated!
>
> I am using:
>> sessionInfo()
> R version 2.5.0 (2007-04-23)
> i686-pc-linux-gnu
>
> locale:
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] "tcltk" "splines" "tools" "stats" "graphics" "grDevices"
> [7] "utils" "datasets" "methods" "base"
>
> other attached packages:
> convert RMAGEML marray tkWidgets DynDoc widgetTools
> "1.10.0" "2.10.0" "1.14.0" "1.14.0" "1.14.0" "1.12.0"
> genefilter survival limma goCluster Biobase
> "1.14.1" "2.31" "2.10.5" "1.4.0" "1.14.0"
>
> Thanks a lot in advance,
>
> Michaela
>
> -- 
> Michaela Guendel
>
> Fraunhofer Institute for Algorithms and Scientific Computing (SCAI)
> Department of Bioinformatics
> Schloss Birlinghoven
> D-53754 Sankt Augustin, Germany
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
Martin Morgan
Bioconductor / Computational Biology
http://bioconductor.org



More information about the Bioconductor mailing list