Can't install RAPInetMHCpan package on windows (bioinformatics)

Hi fellow coders,

I need to install a package called "RAPInetMHCpan" from github. I did so by executing the code:

remotes::install_github("elmerfer/RAPInetMHCpan")

which yielded the following error:

Downloading GitHub repo elmerfer/RAPInetMHCpan@HEAD
Skipping 1 packages not available: BiocParallel
Running R CMD build...

  • checking for file 'C:\Users\il7327\AppData\Local\Temp\RtmpaQ40aR\remotesb0c32c772f\elmerfer-RAPInetMHCpan-30f3d1e/DESCRIPTION' ... OK
  • preparing 'RAPInetMHCpan':
  • checking DESCRIPTION meta-information ... OK
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
    Omitted 'LazyData' from DESCRIPTION
  • building 'RAPInetMHCpan_0.1.0.tar.gz'
  • installing source package 'RAPInetMHCpan' ...
    ** using staged installation
    ** R
    Error in parse(outFile) :
    C:/Users/il7327/AppData/Local/Temp/Rtmp2Bkokb/R.INSTALL1b783b8d75bd/RAPInetMHCpan/R/GeneralRAPIFunctions.R:265:3: '}' inattendu(e)
    264:
    265: }
    ^
    ERROR: unable to collate and parse R files for package 'RAPInetMHCpan'
  • removing 'C:/DATA/R.Apps/R-4.1.1-win/library/RAPInetMHCpan'
    Warning message:
    In i.p(...) :
    installation of package ‘C:/Users/il7327/AppData/Local/Temp/RtmpaQ40aR/fileb0c6a16af9/RAPInetMHCpan_0.1.0.tar.gz’ had non-zero exit status

I interpreted this as a problem with the installation of the package "BiocParallel". I proceeded to install this package seperately (with help of another package called "BiocManager"), and it seems to have worked because when I execute the line:

library(BiocParallel)

there was no error.

Then I tried to install "RAPInetMHCpan" again with:

remotes::install_github("elmerfer/RAPInetMHCpan", dependencies = FALSE)

which again resulted in an error:

Downloading GitHub repo elmerfer/RAPInetMHCpan@HEAD
Running R CMD build...

  • checking for file 'C:\Users\il7327\AppData\Local\Temp\RtmpaQ40aR\remotesb0c4b1e6e13\elmerfer-RAPInetMHCpan-30f3d1e/DESCRIPTION' ... OK
  • preparing 'RAPInetMHCpan':
  • checking DESCRIPTION meta-information ... OK
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
    Omitted 'LazyData' from DESCRIPTION
  • building 'RAPInetMHCpan_0.1.0.tar.gz'
  • installing source package 'RAPInetMHCpan' ...
    ** using staged installation
    ** R
    Error in parse(outFile) :
    C:/Users/il7327/AppData/Local/Temp/RtmpGEhLxV/R.INSTALL1e28348e244f/RAPInetMHCpan/R/GeneralRAPIFunctions.R:265:3: '}' inattendu(e)
    264:
    265: }
    ^
    ERROR: unable to collate and parse R files for package 'RAPInetMHCpan'
  • removing 'C:/DATA/R.Apps/R-4.1.1-win/library/RAPInetMHCpan'
    Warning message:
    In i.p(...) :
    installation of package ‘C:/Users/il7327/AppData/Local/Temp/RtmpaQ40aR/fileb0c48a23b46/RAPInetMHCpan_0.1.0.tar.gz’ had non-zero exit status

which is trying to tell me, I believe, that the "BiocParallel" package installation is not the problem anymore.

My questions are:

  1. Am I correct in assuming that "BiocParallel" was successfully installed?
  2. Is this:
remotes::install_github("elmerfer/RAPInetMHCpan", dependencies = FALSE)

the right choice to install "RAPInetMHCpan" without having it trying to download "BiocParallel" again? Without dependencies = FALSE I get the same error as before my independant installation of "BiocParallel".
3. What can I do to install "RAPInetMHCpan"? I don't understand what the second error means, it looks like it has problem reading something in, or generating some kind of output.

Now: there are instructions on the authors' github page, but they didn't help. I know it says that it will run on Linux, but I'd really like to get it to work on windows. If this isnt possible: is there an easy way to install a Linux tool / shell and then somehow run it from there?

Any help would be greatly appreciated!

I tried to install it to see what I got.
remotes::install_github("elmerfer/RAPInetMHCpan", dependencies = F)
Same issue.

Installing package into ‘/home/...’
(as ‘lib’ is unspecified)
ERROR: dependency ‘BiocParallel’ is not available for package ‘RAPInetMHCpan’

Warning messages:
1: package ‘BiocParallel’ is not available for this version of R

So I tried installing 'BiocParallel' directly. No dice.
I'm assuming that 'BiocParallel' implements parallel compute. If RAPInetMHCpan relies on that functionality, and the parallel package has been neglected, it's unlikely you'll get RAPInetMHCpan to work without rolling back your R version to one that works with BiocParallel.

However, installing an old version of R and all the corresponding old packages (if you can get them all) doesn't sound like fun.

I dont think that installing "BiocParallel" is the problem here, I managed to do so with these instrucions:

It seemed to have worked

1 Like

The package repository specifically says

up to now only available for Linux, Mac in progress

This is because it is an R interface for system libraries only available for Unix like operating systems so it will be impossible to install in Windows.

The easiest solution would be to use RStudio Cloud which runs on Linux and even has a free tier, but you could also install your own instance in a virtual machine, docker container or cloud computing service.

Thanks for the clear answer, I will look into those potential Linux solutions.

Good point; I got BiocParallel installed on Ubuntu from candidaorelmex's helpful post.

Then I tried to install 'RAPInetMHCpan' again to see if I'd succeed. Looks like there's an issue with the R file 'GeneralRAPIFunctions.R'. It has an unpaired closing bracket on line 265, which makes the install fail.

Error in parse(outFile) :
/tmp/RtmpidSJsG/R.INSTALLb9fb01cc9705a/RAPInetMHCpan/R/GeneralRAPIFunctions.R:265:3: unexpected '}'
264:
265: }
^
ERROR: unable to collate and parse R files for package ‘RAPInetMHCpan’
* removing

I also see that error on your original above. If you let the author know on Github issues, it'd probably get fixed and you could install. Also, a dual boot with Linux Ubuntu is pretty quick. Took about an hour.
https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview

Thanks for this insight! I'll try to get in touch with the package's author, how awesome would it be if he'd fix this?:slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.