marbl / metAMOS

A metagenomic and isolate assembly and analysis pipeline built with AMOS
http://marbl.github.io/metAMOS
Other
93 stars 45 forks source link

wrong architecture error #154

Closed knightjar closed 7 years ago

knightjar commented 10 years ago

I'm attempting to run metAMOS on Mac OSX 10.9.4

While the install mostly seemed okay* resulting in binaries I can run tests on, the install output had this near the end:

failed to import Cython: dlopen(/Users/knightjar/Documents/oddments/software/metAmos/metAMOS-1.5rc3/Utilities/python/lib/python/Cython-0.20.2-py2.7-macosx-10.9-intel.egg/Cython/Compiler/Scanning.so, 2): no suitable image found. Did find: /Users/knightjar/Documents/oddments/software/metAmos/metAMOS-1.5rc3/Utilities/python/lib/python/Cython-0.20.2-py2.7-macosx-10.9-intel.egg/Cython/Compiler/Scanning.so: mach-o, but wrong architecture error: Cython does not appear to be installed

I get something similar when I use run_pipeline_test.sh (see output below, where I guess some of the warnings relate to this too? e.g. pysam) and if I run python INSTALL.py cython.

When I first saw cython-related errors in INSTALL.py output I did explicitly install cython on the machine (using pip install cython), which may or may not be part of the issue.

Any assistance appreciated. Googling suggests there might be ways round such errors involving compiler flags or deleting wrong versions of things, but I'm not sure where to start here (apart from with the frozen binary, where I have separate problems there with temporary files getting deleted, which I'm so far failing to resolve by attempting to increase the automatic wipe period in /etc/periodic.conf ).

Thanks!

Chris

*only a network/tar problem with the minikraken database. Many thanks to Sergey for assistance in getting this far. Key points being a) to install llvm-gcc42 and mp-gcc48 via macports. b) make sure these are used via 'port select gcc mp-gcc48' and I used a symbolic link from /usr/bin/cc pointing to gcc

end of output from run_pipeline_test.sh:

Could not import pysam, disabling. Could not import psutil, disabling. Error: cannot find BLAST DB directory, expected it in /Users/knightjar/Documents/oddments/software/metAmos/metAMOS-1.5rc3/Utilities/DB/. Disabling blastdb dependent programs Warning: Celera Assembler is not found, some functionality will not be available Warning: BLASR is not found, some functionality will not be available Warning: Newbler is not found, some functionality will not be available Warning: SparseAssembler is not found, some functionality will not be available Warning: MetaGeneMark is not found, some functionality will not be available Warning: Prokka is not found, some functionality will not be available Warning: SignalP+ is not found, some functionality will not be available Warning: PHmmer is not found, some functionality will not be available Warning: PhyloSift was not found, will not be available

Warning: EA-UTILS is not found, some functionality will not be available Warning: ALE is not found, some functionality will not be available Warning: CGAL is not found, some functionality will not be available Warning: REAPR is not found, some functionality will not be available Warning: FRCbam is not found, some functionality will not be available Warning: FreeBayes is not found, some functionality will not be available Warning: QUAST is not found, some functionality will not be available Warning: MPI is not available, some functionality may not be available ImportError: dlopen(/Users/knightjar/Documents/oddments/software/metAmos/metAMOS-1.5rc3/Utilities/python/lib/python/pysam-0.6-py2.7-macosx-10.9-intel.egg/csamtools.so, 2): no suitable image found. Did find: /Users/knightjar/Documents/oddments/software/metAmos/metAMOS-1.5rc3/Utilities/python/lib/python/pysam-0.6-py2.7-macosx-10.9-intel.egg/csamtools.so: mach-o, but wrong architecture

treangen commented 9 years ago

hi Chris,

When I first saw cython-related errors in INSTALL.py output I did explicitly install cython on the machine >(using pip install cython), which may or may not be part of the issue.

can you attach the output from the Cython specific INSTALL.py errors?

thanks

ponomarevsy commented 7 years ago

I would be interested in solving this error as well: "Could not import pysam, disabling." Pysam is installed in both Anaconda and Python but for some reason is not recognized by the "run_pipeline_test.sh" script:

» conda list pysam          
# packages in environment at /XXX/YYY
/envs/metAMOSenv:
#
pysam                     0.9.1.4                  py35_0    bioconda

» pip list pysam
pysam (0.9.1.4)

» ./test_kraken.sh
Could not import pysam, disabling.
Could not import pysam, disabling.
Warning: BLASR is not found, some functionality will not be available
Warning: Newbler is not found, some functionality will not be available
Warning: MetaGeneMark is not found, some functionality will not be available
Warning: SignalP+ is not found, some functionality will not be available
Warning: PHmmer is not found, some functionality will not be available
Warning: MPI is not available, some functionality may not be available
Project directory already exists, please specify another
Alternatively, use runPipeline to run an existing project
Could not import pysam, disabling.
Could not import pysam, disabling.
[Steps to be skipped]:  set(['FunctionalAnnotation', 'FindRepeats'])
Starting metAMOS pipeline
Could not import pysam, disabling.
Found psutil in /XXX/YYY/__init__.pyc
Warning: BLASR is not found, some functionality will not be available
Warning: Newbler is not found, some functionality will not be available
Warning: MetaGeneMark is not found, some functionality will not be available
Warning: SignalP+ is not found, some functionality will not be available
Warning: PHmmer is not found, some functionality will not be available
Warning: MPI is not available, some functionality may not be available
[Available RAM: 264 GB]
        *ok
[Available CPUs: 32]
        *ok
ImportError: No module named pysam
skoren commented 7 years ago

This could be a version incompatibility with pysam installed on your system and expected by metaMOS (it has only been tested with version 0.6). You can try removing it from your path and letting metAMOS installation download its own version instead.

ponomarevsy commented 7 years ago

Thanks for your feedback! It turned out that the installer's pysam path was outdated, so metAMOS could not install its' own version of the package. So, I had to make this change to the INSTALL.py script:

os.system("curl -L http://pysam.googlecode.com/files/pysam-0.6.tar.gz -o ./pysam.tar.gz")

   os.system("wget https://pypi.python.org/packages/de/03/02934438b204565bc5231f38a11da840a3c3e4b2beac8c8770d675770668/pysam-0.9.1.4.tar.gz#md5=a7e0e9cbc972618cde7aea54894067d6 .")
   os.system("mv pysam-0.9.1.4.tar.gz pysam.tar.gz")

That did the trick, and metAMOS finished all tests successfully.

ponomarevsy commented 7 years ago

Hi Sergey,

I have noticed that most of the "metAMOS/1.5rc3/AMOS/Linux-x86_64/bin" scripts have nonexistent "/fs/wrenhomes/sergek" bin and lib paths defined. Do I have to change these paths manually to the current location to make these scripts work?

» grep "/fs/wrenhomes/sergek" *
ace2contig:use lib "/fs/wrenhomes/sergek/amos-git//lib";
agp2amos:use lib "/fs/wrenhomes/sergek/amos-git//lib";
amos2ace:use lib "/fs/wrenhomes/sergek/amos-git//lib";
amos2frg:use lib "/fs/wrenhomes/sergek/amos-git//lib";
amos2mates:use lib "/fs/wrenhomes/sergek/amos-git//lib";
amos2sq:use lib "/fs/wrenhomes/sergek/amos-git//lib";
AMOScmp:#!/fs/wrenhomes/sergek/amos-git//bin/runAmos -C
AMOScmp:BINDIR=/fs/wrenhomes/sergek/amos-git//bin
AMOScmp-shortReads:#!/fs/wrenhomes/sergek/amos-git//bin/runAmos -C
AMOScmp-shortReads:BINDIR=/fs/wrenhomes/sergek/amos-git//bin
AMOScmp-shortReads-alignmentTrimmed:#!/fs/wrenhomes/sergek/amos-git//bin/runAmos -C
AMOScmp-shortReads-alignmentTrimmed:BINDIR=/fs/wrenhomes/sergek/amos-git//bin
amosvalidate:#!/fs/wrenhomes/sergek/amos-git//bin/runAmos -C
amosvalidate:BINDIR=/fs/wrenhomes/sergek/amos-git//bin
...
skoren commented 7 years ago

Sorry for missing this question, no, metAMOS will add the needed library path for you, you don't need to edit the files.