简体   繁体   English

用R的系统调用调用Qiime

[英]calling Qiime with system call from R

Hej, HEJ,

When I try to call QIIME with a system call from R , ie 当我尝试使用R的系统调用来调用QIIME时,即

system2("macqiime")

R stops responding. R停止响应。 It's no problem with other command line programs though. 但是,其他命令行程序也没有问题。

can certain programs not be called from R via system2() ? 不能通过system2()R调用某些程序吗?

MacQIIME version: MacQIIME 1.8.0-20140103 MacQIIME版本:MacQIIME 1.8.0-20140103

Sourcing MacQIIME environment variables... 采购MacQIIME环境变量...

This is the same as a normal terminal shell, except your default python is DIFFERENT (/macqiime/bin/python) and there are other new QIIME-related things in your PATH. 除了您的默认python是DIFFERENT(/ macqiime / bin / python),并且PATH中还有其他与QIIME相关的新东西外,这与普通终端外壳相同。

(note that I am primarily interested to call QIIME from R Markdown with engine = "sh" which fails, too. But I strongly suspect the problems are related) (请注意,我主要有兴趣从R Markdown调用QIIME ,其engine = "sh"也会失败,但是我强烈怀疑问题是相关的)

In my experience, when you call Qiime from unix command line, it usually creates a virtual shell of it`s own to run its commands which is different from regular system commands like ls or mv. 以我的经验,当您从unix命令行调用Qiime时,它通常会创建自己的虚拟shell来运行其命令,这不同于ls或mv等常规系统命令。 I suspect you may not be able to run Qiime from within R unless you emulate that same shell or configuration Qiime requires. 我怀疑您可能无法从R内部运行Qiime,除非您模拟了Qiime所需的相同shell或配置。 I tried to run it from a python script and was not successful. 我试图从python脚本运行它,但未成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM