Problems installing some R packages

438 views
Skip to first unread message

Katie Marwick

unread,
Sep 28, 2020, 5:09:42 AM9/28/20
to PRSice
Hello again,
I am now trying to practice with the toy dataset. However, I am struggling to install all the required R packages. See the code I have entered and the error log below. 

kmarwick@kmarwick-VirtualBox:~/PRSice$ Rscript PRSice.R --dir . \
> --prsice ./PRSice \
>     --base TOY_BASE_GWAS.assoc \
>     --target TOY_TARGET_DATA \
>     --thread 1 \
>     --stat OR \
>     --binary-target T
Trying to install ggplot2 in ./lib
Trying to install data.table in ./lib
Trying to install optparse in ./lib
sh: 1: ./PRSice: not found
Error: 
In addition: Warning message:
In system2(argv_c$prsice, command) : error in running command
Execution halted

I can see I have R installed (v3.6.3) and run it from the command terminal (I used the PRSice code to install it last week sometime). I tried downloading the ggplot2 package directly but I wasn't sure what directory it should be written in for PRSice to be able to access it.
 
Warning in install.packages("ggplot2") :
  'lib = "/usr/local/lib/R/site-library"' is not writable

Any advice? Is the problem that I downloaded R using PRSice script before I had managed to install PRSice?

Many thanks in advance,
Katie


Sam Choi

unread,
Sep 28, 2020, 10:18:21 AM9/28/20
to PRSice
As long as you install it with R, PRSice should in theory be able to access the data.

There are 2 problem in this script:
1. It seems like the PRSice executable isn't in your current directory. You should provide the path to PRSice executable.
2. Based on the log, PRSice should have already helped you to install ggplot2 in ./lib, so you shouldn't need to be worry about the installation of ggplot2 unless you want to use it somewhere else.

Sam

Katie Marwick

unread,
Sep 28, 2020, 10:31:49 AM9/28/20
to PRSice
Hi Sam,
Sorry to be dim, but how can I find my PRSice executable file? What file ending should it have?

I thought it would be in the ~/PRSice folder as that is where the build was done (see below - I reran the install code). I've attached a screenshot of what is there in case that is helpful.

Katie


kmarwick@kmarwick-VirtualBox:~/PRSice/build$ cmake ../
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kmarwick/PRSice/build
kmarwick@kmarwick-VirtualBox:~/PRSice/build$ make
[  8%] Built target bgen
[ 16%] Built target gzstream
[ 32%] Built target utility
[ 44%] Built target plink
[ 64%] Built target genotyping
[ 76%] Built target regression
[ 92%] Built target prsice_lib
[100%] Built target PRSice
kmarwick@kmarwick-VirtualBox:~/PRSice/build$ 

PRSice directory.JPG

Katie Marwick

unread,
Sep 28, 2020, 11:29:37 AM9/28/20
to PRSice
Hi again
So I found a file called PRSice_linux in my download folder (from the PRSice website) and extracted that and saved it in the PRSice folder I attached the screenshot of. 

Now I have been able to run the quickstart code below successfully. 

Rscript PRSice.R --dir . \

    --prsice ./PRSice_linux \   #modified to show different executable filename

    --base TOY_BASE_GWAS.assoc \

    --target TOY_TARGET_DATA \

    --thread 1 \

    --stat OR \

    --binary-target T


So problem solved for now. 
Katie
Reply all
Reply to author
Forward
0 new messages