Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems Running Example on Vignette #2

Closed
ngwali opened this issue Jan 29, 2019 · 4 comments
Closed

Problems Running Example on Vignette #2

ngwali opened this issue Jan 29, 2019 · 4 comments

Comments

@ngwali
Copy link

ngwali commented Jan 29, 2019

Hello Solarius Team;

Sorry for disturbing you guys. In have issues using solarius
after a succesful install in R on my MACbook. Firstly, I tried running
the examples on the vignette, but failed at certain point,
but do not seem to figure out why?

nature of problem

load data and check out ID names

library(solarius)
data(dat30)
matchIdNames(names(dat30))
id famid mo fa sex
"ID" "FAMID" "MO" "FA" "SEX"

basic (univariate) polygenic model

mod <- solarPolygenic(trait1 ~ age + sex, dat30,)
sh: solar: command not found
Error in system("solar", input = cmd, intern = result, ignore.stdout = ignore.stdout, :
error in running command
Error in df2solar(data, dir) :
file.exists(file.path(dir, "phi2.gz")) is not TRUE

Please could you help me out? I will be greatful.

Best Regards

@variani
Copy link
Member

variani commented Jan 29, 2019

Hi,

The error message (its first lines) suggests that you don't have SOLAR installed on your machine, or the "solar" command is not found.

You can check the section on how to install SOLAR (in the same vignette).

Andrey

@ngwali
Copy link
Author

ngwali commented Jan 29, 2019

Hello;

Thank you for your early response. Sir I did Installed the SOLAR software from Github.
Before Calling the solar library; I had already installed solarius
from github upfront as specified by the vignette.

Now to proof that I did, I uninstalled solarius again
and installed it again, then call the solar function
e.g
#Installing solar again from github

library(devtools)
install_github("ugcd/solarius")
Downloading GitHub repo ugcd/solarius@master
✔ checking for file ‘/private/var/folders/31/7h6056hj67g1kjfrcgv2w5j00000gn/T/RtmpYQasAQ/remotes948264cf184/ugcd-solarius-301361a/DESCRIPTION’ ...
─ preparing ‘solarius’: (2.3s)
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘solarius/docs/figures’
Removed empty directory ‘solarius/docs’
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘solarius_0.3.2.tar.gz’

  • installing source package ‘solarius’ ...
    ** R
    ** data
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    No man pages found in package ‘solarius’
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
  • DONE (solarius)

Now Running the Example in Vignette

####univariate polygenic model

load data set

library(solarius)
data(dat30)
mod1 <- solarPolygenic(trait1 ~ 1, dat30)
sh: solar: command not found
Error in system("solar", input = cmd, intern = result, ignore.stdout = ignore.stdout, :
error in running command
Error in df2solar(data, dir) :
file.exists(file.path(dir, "phi2.gz")) is not TRUE

bivariate polygenic model

mod2 <- solarPolygenic(trait1 + trait2 ~ 1, dat30, polygenic.options = '-testrhoe -testrhog')
sh: solar: command not found
Error in system("solar", input = cmd, intern = result, ignore.stdout = ignore.stdout, :
error in running command
Error in df2solar(data, dir) :
file.exists(file.path(dir, "phi2.gz")) is not TRUE

Thank you

@variani
Copy link
Member

variani commented Jan 29, 2019

Does the command solar in the terminal work for you?

In our package we just call solar with the system function, as one would call any other program from terminal. An example code in R:

system("pwd")
system("solar")

Also note, that our R package is not supported in Windows.

@variani
Copy link
Member

variani commented Jan 29, 2019

Now I see that you run code in the Mac computer. It seems you need to add the solar to your path and assign the alias "solar".

To check it works, open terminal and type "solar".

@variani variani closed this as completed Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants