Closed stevenhurwitt closed 4 years ago
The zip file is empty. Unable to test.
Please download the most recent version of iMRMC = 1.2.2. It has better error reporting.
The most likely reasons are that your Java version is too old or not installed at all.
fake88_nurse6_n252_delta15.zip
Non-empty zip file is attached. I'm using iMRMC, 1.2.2 in R, where can I update the java version? I suspect that's the problem. When I download the DIDSR-iMRMC.zip file I can't find the .jar application.
Edit: the version on my machine is iMRMC-v4.0.3
Look online to update your java version.
The jar file is available as one of the assets of the release:
It is also included in the R package.
You can find it when you install the iMRMC R package. Here it is installed on my computer.
= Test iMRMC-v4.0.2.jar = The data you sent doesn't appear to work "as expected" with iMRMC-v4.0.3.jar.
The problem is that the first column of your file ("ImageNo") is not expected. When I added BEGIN DATA: and removed the "ImageNo" column iMRMC-v4.0.3.jar completed successfully.
= Test in R =
Everything looks fine here.
library(iMRMC)
result <- doIMRMC(fileName = "fake88_nurse6_n252_delta15.csv", workDir = "workDir")
print(result$perReader$AUCA)
df <- read.csv("fake88_nurse6_n252_delta15.csv")
head(df)
result <- doIMRMC(df, workDir = "workDir")
print(result$perReader$AUCA)
yeah, sorry, i have a different file i use for the java app.
what is your "workDir" defined as? Is there a specific location the java app outputs these files? If so I could probably just point it to there as a workaround.
when i try to just invoke the java app in R i get the following warning:
pkgPath <- path.package("iMRMC", quiet = FALSE)
iMRMCjarFullPath <- file.path(pkgPath, "java", iMRMCjar)
iMRMCjar <- "iMRMC-v4.0.3.jar"
iMRMCjarFullPath <- file.path(pkgPath, "java", iMRMCjar)
system2( "java", args = c("-jar", iMRMCjarFullPath, fileName, file.path(workDir, "imrmcDir")), stdout = FALSE, stderr = TRUE)
warning:
[1] "a total of 0 lines in header" "ERROR: No truth for case " " row = 2 " [4] " readerID = 1 " " caseID = Reader1 " " modalityID = Actual101 " [7] ""
despite the fact that row2 has a truth case right below it:
a little confused about what could be causing this. it also creates the file 'input.imrmc' in my temp directory but does not make the /imrmcDir, presumably because of this warning. again, java app works fine.
edit: also for what it's worth the issue persists on both my linux and windows machines, yet to test it on mac osx
Thanks for the feedback.
The problem is with the format of your data. Look closely at the warning you provide. " caseID = Reader1 " That's not right.
When working directly with the file input mode in R, it must adhere to the format expected by the java program. Check the user manual.
When working with a data frame in R, you need a data frame with specific column names: readerID, caseID, modalityID, score. Your column names were different and you had an extra column (ImageNo).
I have added some more error checks and allow the data to include extra columns (when working with a data frame in R). Try the new package iMRMC_1.2.3.tar.gz in the current release.
ahhh ok i'll reformat and try it, thanks for your help!
ok, now that it's working here is a short tutorial on how to build some additional functionality into the R package (mainly to replicate and extend the Java app). Please let me know if you have any critiques/suggestions, it's a little sparse.
Updated data with correct variable names is attached: fake88_nurse6_n252_delta15.zip
Here is the link to the RPub: https://rpubs.com/stevenhurwitt/610294
Thanks for this. We will evaluate (@DevinHFD). Assuming AOK, the best place for this might be as a wiki page for others to follow. Happy to give you full credit. We are moving to recode the analysis methods with native R rather than using the java app engine. So maybe there will be an opportunity to build a new related function.
Brandon
Thanks for linking me here (@brandon-gallas ) and also thanks for the tutorial (@stevenhurwitt ). I will go through the package and transfer the java code to R.
Getting an error running the R package on my new machine (using R 4.0.0) using the following:
fake = read.csv("fake88_nurse6_n252_delta15.csv", header = T, sep = ",")
result = doIMRMC(fake)
error says:
Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'C:\Users\steve\AppData\Local\Temp\RtmpuY95Mo/imrmcDir/AUCperReader.csv': No such file or directory
Dataset is attached. fake88_nurse6_n252_delta15.zip
Note that running the .jar file works as expected.