HajkD / LTRpred

De novo annotation of young retrotransposons
https://hajkd.github.io/LTRpred/
GNU General Public License v2.0
46 stars 8 forks source link

"sh: usearch: command not found Error: It seems like you don't have USEARCH installed" #4

Closed CristianRiccio closed 6 years ago

CristianRiccio commented 6 years ago

Hi,

When I run this command:

LTRpred(genome.file = system.file("Hsapiens_ChrY.fa", package = "LTRpred"))

I get the following error:

sh: usearch: command not found
Error: It seems like you don't have USEARCH installed locally on your machine or the PATH variable to the USEARCH program is not set correctly. Please consult the Installation vignette or http://drive5.com/usearch/download.html for details on how to install USEARCH.

But I have installed USEARCH. I even used it on random fasta files:

usearch -cluster_fast c_elegans.PRJNA13758.WS263.genomic.fa -id 0.9 -centroids c_elegans.PRJNA13758.WS263.genomic.fa

and it ran (albeit with a memory error). I have added the folder in which usearch is located to my PATH variable and added the whole path to USEARCH to my PATH variable. Note that I have renamed the executable to usearch.

I work on Mac OSX and I have installed version 10.0.240 of USEARCH.

HajkD commented 6 years ago

Hi @CristianRiccio

Could you please send me the output of your R console when you run the command:

system("usearch -version")

In my case, I get usearch v8.1.1861_i86osx32 which means that usearch is installed/linked at /usr/local/bin/.

After you sent me your output I am happy to try helping you troubleshoot :)

Cheers, Hajk

CristianRiccio commented 6 years ago

In Rstudio:

system("usearch -version")
sh: usearch: command not found

In the Terminal (on MacOS X):

usearch -version
usearch v10.0.240_i86osx32

In R running in the Terminal:

system("usearch -version")
usearch v10.0.240_i86osx32

In R opened in the Terminal:

library(LTRpred)
Warning message:
package ‘LTRpred’ was built under R version 3.4.4
LTRpred(genome.file = system.file("Hsapiens_ChrY.fa", package = "LTRpred"))

 *** caught segfault ***
address 0x18, cause 'memory not mapped'

Traceback:
 1: dyn.load(file, DLLpath = DLLpath, ...)
 2: library.dynam(lib, package, package.lib)
 3: loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
 4: namespaceImport(ns, loadNamespace(i, c(lib.loc, .libPaths()),     versionCheck = vI[[i]]), from = package)
 5: loadNamespace(name)
 6: doTryCatch(return(expr), name, parentenv, handler)
 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 8: tryCatchList(expr, classes, parentenv, handlers)
 9: tryCatch(loadNamespace(name), error = function(e) stop(e))
10: getNamespace(ns)
11: asNamespace(ns)
12: getExportedValue(pkg, name)
13: stringr::str_detect
14: test_installation_gt()
15: LTRpred(genome.file = system.file("Hsapiens_ChrY.fa", package = "LTRpred"))

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

In Rstudio:

LTRpred(genome.file = system.file("Hsapiens_ChrY.fa", package = "LTRpred"))
sh: usearch: command not found
Error: It seems like you don't have USEARCH installed locally on your machine or the PATH variable to the USEARCH program is not set correctly. Please consult the Installation vignette or http://drive5.com/usearch/download.html for details on how to install USEARCH.

My R version is 3.4.4 in Rstudio and 3.4.1 in R opened in the Terminal. I didn't know Rstudio could use another version of R than the Terminal. So, I installed the latest version: 3.5.1. I tried the LTRpred() function again and this time, I got:

LTRpred(genome.file = system.file("Hsapiens_ChrY.fa", package = "LTRpred"))
sh: vsearch: command not found
Error: It seems like you don't have VSEARCH installed locally on your machine or the PATH variable to the VSEARCH program is not set correctly. Please consult the Installation vignette or https://github.com/torognes/vsearch ufor details on how to install VSEARCH.

I will go ahead and install VSEARCH and let you know how it goes.

CristianRiccio commented 6 years ago

I installed vsearch with conda and the LTRpred() function worked! It's now running on my genome file. I'll read your documentation but I'll probably be back for more questions. Thanks.

HajkD commented 6 years ago

I am happy to hear that it works now.

Cheers, Hajk