jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
346 stars 81 forks source link

test_install.pl: Error with minimap2 and kmer-db #856

Open Selucote82 opened 1 week ago

Selucote82 commented 1 week ago

Dear SqueezeMeta developers,

Recently I requested the SqueezeMeta installation to the Admins of the Supercomputing center we use, but when I got ready to use the SM tool two errors appeared after launching test_install.pl:

Scalar value @args[-1] better written as $args[-1] at /home/jlgonzalez/.conda/envs/squeezemeta-1.6.3/bin/test_install.pl line 208.

Checking the OS linux OK

Checking that tree is installed tree --help OK

Checking that ruby is installed ruby -h OK

Checking that java is installed java -h OK

Checking that all the required perl libraries are available in this environment perl -e 'use Term::ANSIColor' OK perl -e 'use DBI' OK perl -e 'use DBD::SQLite::Constants' OK perl -e 'use Time::Seconds' OK perl -e 'use Tie::IxHash' OK perl -e 'use Linux::MemInfo' OK perl -e 'use Getopt::Long' OK perl -e 'use File::Basename' OK perl -e 'use DBD::SQLite' OK perl -e 'use Data::Dumper' OK perl -e 'use Cwd' OK perl -e 'use XML::LibXML' OK perl -e 'use XML::Parser' OK perl -e 'use Term::ANSIColor' OK

Checking that all the required python libraries are available in this environment python3 -h OK python3 -c 'import numpy' OK python3 -c 'import scipy' OK python3 -c 'import matplotlib' OK python3 -c 'import dendropy' OK python3 -c 'import pysam' OK python3 -c 'import Bio.Seq' OK python3 -c 'import pandas' OK python3 -c 'import sklearn' OK python3 -c 'import nose' OK python3 -c 'import cython' OK python3 -c 'import future' OK

Checking that all the required R libraries are available in this environment R -h OK R -e 'library(doMC)' OK R -e 'library(ggplot2)' OK R -e 'library(data.table)' OK R -e 'library(reshape2)' OK R -e 'library(pathview)' OK R -e 'library(DASTool)' OK R -e 'library(SQMtools)' OK

Checking binaries spades.py OK metabat2 OK jgi_summarize_bam_contig_depths OK samtools OK bwa OK sh: línea 1: 459382 Violación de segmento /lustre/home/jlgonzalez/.conda/envs/squeezemeta-1.6.3/SqueezeMeta/bin/minimap2 --version > /dev/null 2>&1 minimap2 NOT OK ERROR: Error running /lustre/home/jlgonzalez/.conda/envs/squeezemeta-1.6.3/SqueezeMeta/bin/minimap2 --version diamond OK hmmsearch OK cd-hit-est OK sh: línea 1: 459390 Instrucción ilegal (`core' generado) kmer-db -h > /dev/null 2>&1 kmer-db NOT OK ERROR: Error running kmer-db -h aragorn OK mothur OK

Checking that SqueezeMeta is properly configured...

SqueezeMeta doesn't know where the databases are located!

If you didn't download them yet please run:

* perl /lustre/home/jlgonzalez/.conda/envs/squeezemeta-1.6.3/SqueezeMeta/utils/install_utils/make_databases.pl /download/path/
    (To download the latest source data and compile the databases in your server)

* perl /lustre/home/jlgonzalez/.conda/envs/squeezemeta-1.6.3/SqueezeMeta/utils/install_utils/download_databases.pl /download/path/
    (To download a pre-compiled version of the database, which is much quicker)

If the databases are already present in your server, you can configure this installation of SqueezeMeta with:

* perl /lustre/home/jlgonzalez/.conda/envs/squeezemeta-1.6.3/SqueezeMeta/utils/install_utils/configure_nodb.pl /path/to/db
    (Where /path/to/db is the path to the "db" folder generated when downloading the databases)

WARNING: Some SqueezeMeta dependencies could not be found in your environment or failed to execute!

Thank you for your suggestions!

fpusan commented 1 week ago

There are two separate issues here:

Selucote82 commented 1 week ago

May be the problem was that the distribution is a Red Hat 8.5.0-3. I'm using ONT reads too, so all the stars have aligned.

Thank you!

fpusan commented 1 week ago

Heh, ok, let's see if we can get that working. First let's see if the minimap2 binary from conda would work. Within your SqueezeMeta conda environment, you can try:

conda install -c bioconda minimap2
which minimap2 # this should point to the bin dir within your conda environment
minimap2 --version # hopefully this doesnt segfault and you get the version number
Selucote82 commented 1 week ago

Sure! The minimap2 version is 2.28-r1209, the same I have outside SqueezeMeta env.

The really good thing (I don't know why/how) is that now, after coming to launch test_install.pl, the former error on kmer-db has disappear (not the case for minimap2).

It would be so mad if I "softlinked" the minimap2 binary to the SqueezeMeta bin path?

fpusan commented 1 week ago

Exactly, a soft symlink to /lustre/home/jlgonzalez/.conda/envs/squeezemeta-1.6.3/SqueezeMeta/bin should work. Or you can edit the /lustre/home/jlgonzalez/.conda/envs/squeezemeta-1.6.3/SqueezeMeta/scripts/SqueezeMeta_conf_original.pl file (and also the /lustre/home/jlgonzalez/.conda/envs/squeezemeta-1.6.3/SqueezeMeta/scripts/SqueezeMeta_conf.pl file if present). And modify the line $minimap2_soft = "$installpath/bin/minimap2"; to $minimap2_soft = "minimap2"; This will make SqueezeMeta use the minimap2 binary in your PATH (in this case the one from conda) instead of the one in the SqueezeMeta/bin directory

Selucote82 commented 6 days ago

Sorry for the delay,

Indeed, the error disappeared, but the kmer-db error message came up again. I'm going to do the same I did with minimap2 and what you suggested, after building the database. So thank you for your help!