Segfault when running mini_test on new install

130 views
Skip to first unread message

Jon Sanders

unread,
Jun 2, 2016, 6:55:29 PM6/2/16
to Anvi'o
Hi Anvi'oans, 

Been having some trouble getting Anvi'o installed on our lab's cluster. I'd like to have it running in a conda environment so that it's user-installable (no sudo necessary), and so the following has just a little bit more extracurricular activity than usual, but it these commands work great on my mac.

The pip install works fine, but running the mini_test gives a segfault error when initializing the database. Any ideas?



#

#

# Anvo'o version ...

#

#


Anvi'o version ...............................: 1.2.3

Contigs DB version ...........................: 3

Profile DB version ...........................: 6

Samples information DB version ...............: 2

Auxiliary HDF5 DB version ....................: 1


#

#

# Initializing raw BAM files ...

#

#


Sorted BAM File ..............................: /home/jgsanders/git_sw/anvio/tests/sandbox/test-output/204-6M                                        

Indexed BAM File .............................: /home/jgsanders/git_sw/anvio/tests/sandbox/test-output/204-6M.bam                                    


Sorted BAM File ..............................: /home/jgsanders/git_sw/anvio/tests/sandbox/test-output/204-7M                                        

Indexed BAM File .............................: /home/jgsanders/git_sw/anvio/tests/sandbox/test-output/204-7M.bam                                    


Sorted BAM File ..............................: /home/jgsanders/git_sw/anvio/tests/sandbox/test-output/204-9M                                        

Indexed BAM File .............................: /home/jgsanders/git_sw/anvio/tests/sandbox/test-output/204-9M.bam                                    



#

#

# Generating an EMPTY contigs database ...

#

#


./run_mini_test.sh: line 24: 15049 Segmentation fault      (core dumped) anvi-gen-contigs-database -f contigs.fa -o test-output/CONTIGS.db -L 1000

(anvio)☕  barnacle:tests $ 



And the install code:

# Create conda env for anvio
conda create
-n anvio python=2 numpy hdf5 h5py
source activate anvio
conda install
-c biocore prodigal hmmer
condaenv
=/Users/jonsanders/Development/anaconda/envs/anvio
condabin
=${condaenv}/bin

# Cython
pip install
Cython

# GSL
cd $
{condaenv}
wget ftp
://ftp.gnu.org/gnu/gsl/gsl-latest.tar.gz
tar
-xzvf gsl-latest.tar.gz
cd gsl
-2.1/
./configure --prefix=${condaenv}
make
make install
# need to add the conda env lib and include to C assembler path to find GSL
export C_INCLUDE_PATH=$C_INCLUDE_PATH:${condaenv}/include/
export LIBRARY_PATH=$LIBRARY_PATH:${condaenv}/lib/

# install myRAST
cd $
{condabin}
TOP
=${condabin}/myRAST
mkdir myRAST
cd myRAST
wget http
://blog.theseed.org/downloads/sas.tgz
tar
-xzvf sas.tgz
TOP
=${condabin}/myRAST
cd $
{condabin}/myRAST/modules
./BUILD_MODULES
# Set myRAST Perl paths for Conda env
mkdir
-p ${condaenv}/etc/conda/activate.d
mkdir
-p ${condaenv}/etc/conda/deactivate.d
touch $
{condaenv}/etc/conda/activate.d/env_vars.sh
touch $
{condaenv}/etc/conda/deactivate.d/env_vars.sh
echo
'#!/bin/sh/' >> ${condaenv}/etc/conda/activate.d/env_vars.sh
echo
"export OLDMANPATH=\$PATH" >> ${condaenv}/etc/conda/activate.d/env_vars.sh
echo
"export PATH=\$PATH:${TOP}/bin" >> ${condaenv}/etc/conda/activate.d/env_vars.sh
echo
"export PERL5LIB=\$PERL5LIB:${TOP}/lib:${TOP}/modules/lib" >> ${condaenv}/etc/conda/activate.d/env_vars.sh
echo
'#!/bin/sh/' >> ${condaenv}/etc/conda/deactivate.d/env_vars.sh
echo
"export PATH=\$OLDMANPATH" >> ${condaenv}/etc/conda/deactivate.d/env_vars.sh
echo
"unset PERL5LIB" >> ${condaenv}/etc/conda/deactivate.d/env_vars.sh
echo
"unset OLDMANPATH" >> ${condaenv}/etc/conda/deactivate.d/env_vars.sh

# install anvio
pip install anvio







A. Murat Eren

unread,
Jun 2, 2016, 11:51:40 PM6/2/16
to an...@googlegroups.com
Hi Jon,

Can you try whether prodigal works? I feel like this error is coming from prodigal. 


Best,

--

A. Murat Eren (meren)
http://merenlab.org :: gpg

--
Anvi'o Paper: https://peerj.com/articles/1319/
Project Page: http://merenlab.org/projects/anvio/
Code Repository: https://github.com/meren/anvio
---
You received this message because you are subscribed to the Google Groups "Anvi'o" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anvio+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/anvio/f7de230f-7cd2-49e2-831f-683634a9795e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jon Sanders

unread,
Jun 3, 2016, 2:46:05 PM6/3/16
to Anvi'o
Prodigal seems fine!

(anvio)☕  barnacle:Cv58 $ head -n 1000 contigs.fasta > test.fasta
(anvio)☕  barnacle:Cv58 $ prodigal < test.fasta > out
-------------------------------------
PRODIGAL v2.6.2 [February, 2015]         
Univ of Tenn / Oak Ridge National Lab
Doug Hyatt, Loren Hauser, et al.     
-------------------------------------
Request:  Single Genome, Phase:  Training
Reading in the sequence(s) to train...

Warning:  ideally Prodigal should be given at least 100000 bases for training.
You may get better results with the -p meta option.

59940 bp seq created, 55.21 pct GC
Locating all potential starts and stops...3817 nodes
Looking for GC bias in different frames...frame bias scores: 1.05 0.31 1.63
Building initial set of genes to train from...done!
Creating coding model and scoring nodes...done!
Examining upstream regions and training starts...done!
-------------------------------------
Request:  Single Genome, Phase:  Gene Finding
Finding genes in sequence #1 (59940 bp)...done!

A. Murat Eren

unread,
Jun 3, 2016, 3:59:20 PM6/3/16
to an...@googlegroups.com
Interesting. Could it be sqlite3?

Can you try to run this please:

python -c 'import anvio.db; db = anvio.db.DB("delete.db", 1, new_database = True); db.disconnect();'


​I hope it gives a segfault.​


​Best,​

--

A. Murat Eren (meren)
http://merenlab.org :: gpg

Jon Sanders

unread,
Jun 4, 2016, 10:24:57 PM6/4/16
to Anvi'o
Ding ding ding!

(anvio)☕  barnacle:~ $ python -c 'import anvio.db; db = anvio.db.DB("delete.db", 1, new_database = True); db.disconnect();'
Segmentation fault (core dumped)

...I tried installing a new sqlite3 binary higher up in the $PATH for this environment, which doesn't seem to fix it. 

-j

Jon Sanders

unread,
Jun 6, 2016, 6:16:15 PM6/6/16
to Anvi'o
OK, got it sorted out!

sqlite was, it turns out, a bit of a red herring. But it got me going down the right path!

Going through Python imports, we traced it back to importing the Tree class from ete2. Evidently this was conflicting somehow with one of the other package installs (my guess is the GSL setup I had going). 

For reference, here's the final set of commands that worked for me. This should install everything locally and safely in a conda environment:

# Create conda env for anvio

conda create
-n anvio python=2 numpy hdf5 h5py Cython scipy django scikit-learn requests

source activate anvio

conda install
-c etetoolkit ete2

conda install
-c biocore prodigal

conda install
-c ioos gsl=2.1


# Set conda environment path variables
condaenv
=/home/jgsanders/miniconda/envs/anvio
condabin
=${condaenv}/bin

cd $
{condabin}

# install HMMER
wget http
://eddylab.org/software/hmmer3/3.1b2/hmmer-3.1b2-linux-intel-x86_64.tar.gz
tar
-xzvf hmmer-3.1b2-linux-intel-x86_64.tar.gz
ln
-s hmmer-3.1b2-linux-intel-x86_64/binaries/* .


Thanks,
-jon

A. Murat Eren

unread,
Jun 6, 2016, 6:33:26 PM6/6/16
to an...@googlegroups.com
Hey Jon!

Thank you very much for the update. I am glad you managed to make it work.

We will soon release anvi'o v2, I hope it will not be too much work to get it running ;)


Best,


--

A. Murat Eren (meren)
http://merenlab.org :: gpg

--
Anvi'o Paper: https://peerj.com/articles/1319/
Project Page: http://merenlab.org/projects/anvio/
Code Repository: https://github.com/meren/anvio
---
You received this message because you are subscribed to the Google Groups "Anvi'o" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anvio+un...@googlegroups.com.

c.hof...@usp.br

unread,
Aug 14, 2020, 11:53:21 AM8/14/20
to Anvi'o
Dear Forum (and perhaps most specifically, Jon),

I'm trying to install Anvi'o 6.2 and all goes well up to the (in)famous mini test, where I'm getting segmentation fault errors. 

When installing the 6.2 as per instructions, i get this error:

(anvio-6.2) christian.hoffmann@scm00:~> anvi-self-test --suite mini
Inconsistency detected by ld.so: dl-open.c: 583: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!

(anvio-6.2) christian.hoffmann@scm00:~> anvi-self-test --debug
Segmentation fault


Now, when I install the Master, things go a bit further: 

(anvio-master) christian.hoffmann@scm00:~>   anvi-self-test --suite mini
:: Generating an EMPTY contigs database ...
./run_mini_test.sh: line 17: 20435 Segmentation fault      anvi-gen-contigs-database -f $files/contigs.fa -o $output_dir/CONTIGS.db -L 1000 --project-name "Contigs DB for anvi'o mini self-test"

Config Error: According to the exit code ('139'),


(anvio-master) christian.hoffmann@scm00:~> anvi-self-test --debug

AVAILABLE HMM SOURCES
===============================================
* This contigs db does not have HMMs :/
./run_all_tests.sh: line 43: 21187 Segmentation fault      anvi-db-info $output_dir/CONTIGS.db

Traceback for debugging
================================================================================
  File "/home/iaf/christian.hoffmann/github/anvio/bin/anvi-self-test", line 97, in <module>
    main(args)
  File "/home/iaf/christian.hoffmann/github/anvio/bin/anvi-self-test", line 71, in main
    "is short and we all can worry just a bit less." % str(exitcode))
================================================================================

I can send more info, but I'm not sure what info I need to sent. 

Any help will be great!
Thanks
Chris
Reply all
Reply to author
Forward
0 new messages