AbeelLab / ptolemy

GNU General Public License v3.0
10 stars 2 forks source link

Problem with minimap2 when running ptolemy #5

Closed jlobatop closed 4 years ago

jlobatop commented 5 years ago

Hi, I downloaded ptolemy.jar, I constructed the file with the list of genomes and annotations but I am running in troubles when executing extract with that list, getting the following output:

java -jar ptolemy.jar extract -g genome_list.txt -o ptolemy_db
(Sun May 26 22:06:51 CEST 2019): Found 8 genome entries
(Sun May 26 22:06:51 CEST 2019): --Verifying paths
(Sun May 26 22:06:51 CEST 2019): Constructing database: 
(Sun May 26 22:06:51 CEST 2019): --EAEC_55989_CU928145
Exception in thread "main" java.io.IOException: Cannot run program "minimap2": error=2, No such file or directory
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
        at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:71)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:102)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$anonfun$runBuffered$1(ProcessBuilderImpl.scala:150)
        at scala.runtime.java8.JFunction0$mcI$sp.apply(JFunction0$mcI$sp.java:12)
        at scala.sys.process.ProcessLogger$$anon$1.buffer(ProcessLogger.scala:99)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.runBuffered(ProcessBuilderImpl.scala:150)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBuilderImpl.scala:116)
        at utilities.MinimapUtils.collectBestAlignments(MinimapUtils.scala:64)
        at utilities.MinimapUtils.collectBestAlignments$(MinimapUtils.scala:28)
        at build_db.Extract$.collectBestAlignments(Extract.scala:20)
        at build_db.Extract$.constructDataBase$1(Extract.scala:217)
        at build_db.Extract$.$anonfun$extract$38(Extract.scala:302)
        at build_db.Extract$.$anonfun$extract$38$adapted(Extract.scala:300)
        at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:122)
        at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:118)
        at scala.collection.immutable.List.foldLeft(List.scala:86)
        at build_db.Extract$.extract(Extract.scala:300)
        at build_db.Extract$.$anonfun$main$1(Extract.scala:59)
        at build_db.Extract$.$anonfun$main$1$adapted(Extract.scala:55)
        at scala.Option.map(Option.scala:146)
        at build_db.Extract$.main(Extract.scala:55)
        at cli.Ptolemy$.main(Ptolemy.scala:29)
        at cli.Ptolemy.main(Ptolemy.scala)
Caused by: java.io.IOException: error=2, No such file or directory
        at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
        ... 24 more

I first installed minimap from source, compiling it from GitHub. I verified that minimap2 is working by running the test command of: ./minimap2 -a test/MT-human.fa test/MT-orang.fa > test.sam which returned the success message. Moreover, I also constructed shell function so minimap2 will point to the compiled file regardless of the folder and I have ensured that I can run it within scripts. As I couldn't make it work, I tried to set the binary file from the releases page of minimap2 in the Ptolemy folder, the folder where I was storing the genomes and the folder I have selected as output, having the same problem again. I also tried to install it from bioconda, again with negative results. I would really appreciate any help anyone can provide in the topic!

jlobatop commented 4 years ago

Solved by adding the directory location of the minimap executable to the $PATH environment variable. One way to do so is by including:

export PATH="${PATH}:~/minimap2"

in the .bashrc file (replacing ~/minimap2 with your installation folder).