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
how can I properly get installed admixr into R? error: qpDstat when D #63
Comments
Dear Carlos,
Someone else may be able to help, but admixr is not supported by the
lab. Can you contact the authors.
…On Sun, Apr 26, 2020 at 5:04 AM Carlos Z ***@***.***> wrote:
After I installed AdmixTools into Ubuntu, I followed this tutorial in R:
https://bodkan.net/admixr/articles/tutorial.html
I couldn't successfully complete the installation since I got this warning
error when I download the package:
install.packages("devtools") devtools::install_github("bodkan/admixr", ref
= "v0.7.1", force = TRUE)
** testing if installed package can be loaded from final location
Warning in system("command -v qpDstat", ignore.stdout = TRUE) :
error in running command
If I forced the installation and modified $PATH, and admixr library is
downloaded. I can run functions (i.e. eigenstrat(prefix), download_data).
Nonetheless, when I try to make the D function, it recalled the non
installed qpDstat and I can move ahead:
sh: 1: qpDstat: not found
Error in parsers[[cmd]](log_lines, ...) : attempt to apply non-function
In addition: Warning message:
In system(paste(cmd, "-p", par_file, ">", log_file)) :
error in running command
Can you kindly help me on this? How can I sort this issue out?
Many thanks in advance,
Carlos.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#63>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEE77B7X7IV6IMCDZ734ORLROP2JBANCNFSM4MREK66A>
.
|
Dear Nick and Carlos, I am a PhD student of Janet Kelso at the MPI in Leipzig and the developer of the admixr package. I stumbled upon this issue by accident. @carlosug Please don't hesitate to open this issue on the admixr issue tracker: https://github.com/bodkan/admixr/issues I will do my best to help as soon as I can. In general, however, the error message Nick, in case there are more admixr-related issues that people submit here, feel free to send them over to https://github.com/bodkan/admixr/issues Best regards, Martin |
Hi Martin,
Many thanks for your reply!
I was not able to figure out what exactly is the issue. The library
ADMIXTOOL seems to be well installed in R but I can't use the qpDstat
function. Although I changed mypath to $mypath as suggested in R warning
message, I continue with the same issue: qpDstat is not found.
[image: image.png]
Thanks for your support anyways,
Carlos!
*Carlos Utrilla Guerrero.*
----------------------------------------------------------------------------------------------------
*Mobile: +352661187604*
*Linkedin*: https://www.linkedin.com/in/carlos-utrilla-guerrero/
<https://www.linkedin.com/in/carlos-utrilla-guerrero-97ba7b31/>
*Academia.edu: *https://manchester.academia.edu/CarlosUtrillaGuerrero
*Personal blog*: https://carlosug.github.io/
El mié., 13 may. 2020 a las 11:45, Martin Petr (<notifications@github.com>)
escribió:
… Dear Nick and Carlos,
I am a PhD student of Janet Kelso at the MPI in Leipzig and the developer
of the admixr package.
I stumbled upon this issue by accident.
@carlosug <https://github.com/carlosug> Please don't hesitate to open
this issue on the admixr issue tracker:
https://github.com/bodkan/admixr/issues I will do my best to help as soon
as I can.
In general, however, the error message sh: 1: qpDstat: not found strongly
indicates the ADMIXTOOLS is *not* in the $PATH or, at the very least,
that R doesn't see it there. I think testing if you see a path to
ADMIXTOOLS binaries in the list obtained by running Sys.getenv("PATH")
from R is a good start.
Nick, in case there are more admixr-related issues that people submit
here, feel free to send them over here:
https://github.com/bodkan/admixr/issues
Best regards,
Martin
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMA7DPLRAKNAZKJ3U5NP763RRJT2LANCNFSM4MREK66A>
.
|
Hi Carlos, Glad to see that I still managed to reach you even after a couple of weeks since you submitted this issue. I'm having trouble figuring out what's going on just based on your description. Would you mind doing these couple of things step by step for me, reporting what you get?
What I get on my computer is
Which means that qpDstat is in the PATH and I can run it like so from the command line (as one normally does without the admixr package):
(Note that I'm on the latest version of Admixtools - your output might differ slightly).
Note that I removed lot of irrelevant PATHs from the output - If I understand your problem correctly (and its cause), you should not see the qpDstat path in the output of Which leads to...
I wonder if you even have the Admixtools libraries in the |
Hello!
Thank for your reply! I really appreciate your support!
Here my answers:
1. When I run it `which qpDstat' [also tried with $ whereis] in cmd it
doesn't output anything. Even if the executable (and also qpDstat) are
stored in /bin folder:
[image: image.png]
[image: image.png]
Then, once I checked in R the system environment, I got a weird path:
[image: image.png]
See how it is my folder structure in my device:
[image: image.png]
[image: image.png]
I have basic knowledge of linux and cmd/bash folder structure, that is why
I can't clearly see the issue!
Have a nice day,
Carlos.
*Carlos Utrilla Guerrero.*
----------------------------------------------------------------------------------------------------
*Mobile: +352661187604*
*Linkedin*: https://www.linkedin.com/in/carlos-utrilla-guerrero/
<https://www.linkedin.com/in/carlos-utrilla-guerrero-97ba7b31/>
*Academia.edu: *https://manchester.academia.edu/CarlosUtrillaGuerrero
*Personal blog*: https://carlosug.github.io/
El lun., 18 may. 2020 a las 10:20, Martin Petr (<notifications@github.com>)
escribió:
… Hi Carlos,
Glad to see that I still managed to reach you even after a couple of weeks
since you submitted this issue.
I'm having trouble figuring out what's going on just based on your
description. Would you mind doing these couple of things step by step for
me, reporting what you get?
1. In your terminal (not R), run which qpDstat.
What I get on my computer is
Martins-MacBook-Pro:~
$ which qpDstat
/Users/martin_petr/local/bin/qpDstat
Which means that qpDstat is in the PATH and I can run it like so from the
command line (as one normally does without the admixr package):
$ qpDstat
Usage: qpDstat [options] <file>
-h ... Print this message and exit.
-L <val> ... use <val> as low value.
-H <val> ... use <val> as high value.
-p <file> ... use parameters from <file> .
-v ... print version and exit.
-V ... toggle verbose mode ON.
(Note that I'm on the latest version of Admixtools - your output might
differ slightly).
1. Open R and run library(admixr) - if I get what you're saying, you
get the following warning?
> library(admixr)
ADMIXTOOLS binaries could not be found in your $PATH.
Consider modifying the $PATH variable in your .Renviron file
(you can run 'echo "PATH=$PATH" > .Renviron' in the shell).
1. Still in R, run Sys.getenv("PATH"):
> Sys.getenv("PATH")
[1] "<...>:/Users/martin_petr/local/bin:<...>"
Note that I removed lot of irrelevant PATHs from the output - <...>. Most
importantly, note that the PATH list includes the path do the qpDstat
command I found in the step 1 above.
In case your problem, you should not see the qpDstat path in the output of
Sys.getenv("PATH") at all.
Which leads to...
1.
Close the R terminal, open it again. Try setting the PATH from R
manually based on the output of what you see in step 1. In my case, that
would be Sys.setenv(PATH = "/Users/martin_petr/local/bin")
2.
Try running library(admixr) again *in the same R session you ran 4. in*.
If everything works as it should, you should not get the warning again. We
can then continue from this, figuring out why editing your .Renviron
file as is recommended doesn't work.
------------------------------
I wonder if you even have the Admixtools libraries in the $PATH in the
first place? If not, even if you follow the library(admixr) warning, this
won't do anything. But that's probably getting ahead of ourselves... and is
easy to fix if that turns out to be so.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMA7DPN6WQZPMFRH6S6WBULRSDVVVANCNFSM4MREK66A>
.
|
This is not an ADMIXTOOLS (or admixr) problem but a question of unix
paths.
Try
/bin/qpDstat -v
Should just print version #. If OK then you executable is fine. Now you
have to put /bin in your path
I don't think I can help more.
Nick
…On Thu, May 21, 2020 at 6:00 AM Carlos Z ***@***.***> wrote:
Hello!
Thank for your reply! I really appreciate your support!
Here my answers:
1. When I run it `which qpDstat' [also tried with $ whereis] in cmd it
doesn't output anything. Even if the executable (and also qpDstat) are
stored in /bin folder:
[image: image.png]
[image: image.png]
Then, once I checked in R the system environment, I got a weird path:
[image: image.png]
See how it is my folder structure in my device:
[image: image.png]
[image: image.png]
I have basic knowledge of linux and cmd/bash folder structure, that is why
I can't clearly see the issue!
Have a nice day,
Carlos.
*Carlos Utrilla Guerrero.*
----------------------------------------------------------------------------------------------------
*Mobile: +352661187604*
*Linkedin*: https://www.linkedin.com/in/carlos-utrilla-guerrero/
<https://www.linkedin.com/in/carlos-utrilla-guerrero-97ba7b31/>
*Academia.edu: *https://manchester.academia.edu/CarlosUtrillaGuerrero
*Personal blog*: https://carlosug.github.io/
El lun., 18 may. 2020 a las 10:20, Martin Petr ***@***.***
>)
escribió:
> Hi Carlos,
>
> Glad to see that I still managed to reach you even after a couple of
weeks
> since you submitted this issue.
>
> I'm having trouble figuring out what's going on just based on your
> description. Would you mind doing these couple of things step by step for
> me, reporting what you get?
>
> 1. In your terminal (not R), run which qpDstat.
>
> What I get on my computer is
>
> Martins-MacBook-Pro:~
> $ which qpDstat
> /Users/martin_petr/local/bin/qpDstat
>
> Which means that qpDstat is in the PATH and I can run it like so from the
> command line (as one normally does without the admixr package):
>
> $ qpDstat
> Usage: qpDstat [options] <file>
> -h ... Print this message and exit.
> -L <val> ... use <val> as low value.
> -H <val> ... use <val> as high value.
> -p <file> ... use parameters from <file> .
> -v ... print version and exit.
> -V ... toggle verbose mode ON.
>
> (Note that I'm on the latest version of Admixtools - your output might
> differ slightly).
>
> 1. Open R and run library(admixr) - if I get what you're saying, you
> get the following warning?
>
> > library(admixr)
> ADMIXTOOLS binaries could not be found in your $PATH.
> Consider modifying the $PATH variable in your .Renviron file
> (you can run 'echo "PATH=$PATH" > .Renviron' in the shell).
>
>
> 1. Still in R, run Sys.getenv("PATH"):
>
> > Sys.getenv("PATH")
> [1] "<...>:/Users/martin_petr/local/bin:<...>"
>
> Note that I removed lot of irrelevant PATHs from the output - <...>. Most
> importantly, note that the PATH list includes the path do the qpDstat
> command I found in the step 1 above.
>
> In case your problem, you should not see the qpDstat path in the output
of
> Sys.getenv("PATH") at all.
>
> Which leads to...
>
> 1.
>
> Close the R terminal, open it again. Try setting the PATH from R
> manually based on the output of what you see in step 1. In my case, that
> would be Sys.setenv(PATH = "/Users/martin_petr/local/bin")
> 2.
>
> Try running library(admixr) again *in the same R session you ran 4. in*.
> If everything works as it should, you should not get the warning again.
We
> can then continue from this, figuring out why editing your .Renviron
> file as is recommended doesn't work.
>
> ------------------------------
>
> I wonder if you even have the Admixtools libraries in the $PATH in the
> first place? If not, even if you follow the library(admixr) warning, this
> won't do anything. But that's probably getting ahead of ourselves... and
is
> easy to fix if that turns out to be so.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#63 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AMA7DPN6WQZPMFRH6S6WBULRSDVVVANCNFSM4MREK66A
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEE77B2VRWB3TGONKW3C35LRST3UBANCNFSM4MREK66A>
.
|
I got the same problem as @carlosug . All of the above comments help me a lot. But one problem remains unsolved. I post my details as follows: I have installed admixtools using conda, the link is [https://bioconda.github.io/recipes/admixtools/README.html?highlight=admixtool] It has been installed to the base environment of miniconda3, the structure of my files :
The path of my "pqDstat", and it seems to work well:
I added the path to R using Rstudio. In the console window, I typed: Then I loaded admixr. NO warning messages But when I loaded data and tried to run a test, some errors poped up:
I am very sure that data has been prepared according to the tutorial by @bodkan. Except I change the path of data. The related codes are:
Two files were found in the indicated path: Hope to hear more about this issue. Great thanks to the authors of both packages for saving me from brain-burn searching and digging : ) |
Hi all, Sorry for a late reply - I've been very busy with revisions to my paper with no time for development/support work. @carlosug The fact that even step 1 fails indicates that the ADMIXTOOLS binaries are not actually in the $PATH variable of your system. I would love to help you out with the compilation and setup but unfortunately have currently no capacity to do that. :( I would advise to go to some Unix/Linux forum (https://unix.stackexchange.com/, Ubuntu forum, depending on what you use) and ask there, possibly linking to this discussion. You need someone to help you: 1) compile the software properly, 2) add it to your PATH variable. At the barest minimum, even running @ningyusino First of all, I don't personally use (ana)conda for maintaining R. I have very little experience with it (whenever I tried it it seemed to introduce more problems than it actually tries to solve) but it's great news you got it all working. I should probably give it another shot! This, however, is the important bit:
This indicates that you're running Windows? I wasn't aware that ADMIXTOOLS is supported on Windows. Is Windows your main system? Is this where you're running qpDstat and others? I haven't used windows in 10 years and I have no idea what it can or cannot do know in terms of using unix utilities. My guess would be that the command fails because of the last slash is forward ( In principle, I can see if I find a quick and easy way to make the parsing of outputs OS-independent. Assuming this is where the issue really is. One thing you could do is to check whether the file is really where it's supposed to be ( Let's continue the discussion here: bodkan/admixr#57 So that we're not cluttering Nick's ADMIXTOOLS-specific issue tracker. Thanks. Martin |
After I installed AdmixTools into Ubuntu, I followed this tutorial in R: https://bodkan.net/admixr/articles/tutorial.html
I couldn't successfully complete the installation since I got this warning error when I download the package:
install.packages("devtools") devtools::install_github("bodkan/admixr", ref = "v0.7.1", force = TRUE)
** testing if installed package can be loaded from final location
Warning in system("command -v qpDstat", ignore.stdout = TRUE) :
error in running command
If I forced the installation and modified $PATH, and
admixr
library is downloaded. I can run functions (i.e. eigenstrat(prefix), download_data). Nonetheless, when I try to make the D function, it recalled the non installedqpDstat
and I can move ahead:sh: 1: qpDstat: not found
Error in parsers[[cmd]](log_lines, ...) : attempt to apply non-function
In addition: Warning message:
In system(paste(cmd, "-p", par_file, ">", log_file)) :
error in running command
Can you kindly help me on this? How can I sort this issue out?
Many thanks in advance,
Carlos.
The text was updated successfully, but these errors were encountered: