merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
423 stars 144 forks source link

Another error in mini test #208

Closed jcthrash closed 8 years ago

jcthrash commented 8 years ago

Hello, I've successfully installed anvio (no errors during installation), but running the mini test causes the following problem- it can't be run without sudo, even in my Downloads directory (which is weird), and then when I use sudo, it errors with command not found:

$ ./run_mini_test.sh

#
#
# Creating the output directory ...
#
#

mkdir: test-output: Permission denied
thrashc-1:tests JCThrash$ sudo ./run_mini_test.sh

#
#
# Creating the output directory ...
#
#

#
#
# Anvo'o version ...
#
#

./run_mini_test.sh: line 12: anvi-profile: command not found

Thanks in advance!

meren commented 8 years ago

Good to hear that it is installed!

You should never need to use sudo to run mini_test. Very interesting. Can you please tell me what is the output of this command:

anvi-refine -v
jcthrash commented 8 years ago

$ anvi-refine -v -bash: anvi-refine: command not found

meren commented 8 years ago

Can you please run this command and provide the output:

pip show -f anvio > /tmp/_output && head -n 100 /tmp/_output && rm /tmp/_output
jcthrash commented 8 years ago
thrashc-1:~ JCThrash$ pip show -f anvio > /tmp/_output && head -n 100 /tmp/_output && rm /tmp/_output
---
Metadata-Version: 1.1
Name: anvio
Version: 1.2.0
Summary: An interactive analysis and visualization platform for 'omics data. See https://merenlab.org/projects/anvio for more information
Home-page: https://meren.github.io/projects/anvio/
Author: anvi'o Authors
Author-email: a.murat.eren@gmail.com
License: GPLv3+
Location: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Requires: bottle, pysam, hcluster, ete2, scipy, scikit-learn, django, cython, h5py
Files:
  ../../../bin/00_README.txt
  ../../../bin/anvi-cluster-with-concoct
  ../../../bin/anvi-compute-completeness
  ../../../bin/anvi-experimental-organization
  ../../../bin/anvi-export-genes-table
  ../../../bin/anvi-export-splits-and-coverages
  ../../../bin/anvi-gen-contigs-database
  ../../../bin/anvi-gen-network
  ../../../bin/anvi-gen-samples-info-database
  ../../../bin/anvi-gen-variability-matrix
  ../../../bin/anvi-gen-variability-profile
  ../../../bin/anvi-get-db-table-as-matrix
  ../../../bin/anvi-get-sequences-for-hmm-hits
  ../../../bin/anvi-get-short-reads-from-bam
  ../../../bin/anvi-import-collection
  ../../../bin/anvi-init-bam
  ../../../bin/anvi-interactive
  ../../../bin/anvi-matrix-to-newick
  ../../../bin/anvi-merge
  ../../../bin/anvi-populate-genes-table
  ../../../bin/anvi-populate-search-table
  ../../../bin/anvi-profile
  ../../../bin/anvi-refine
  ../../../bin/anvi-report-linkmers
  ../../../bin/anvi-script-convert-annotation-db-to-contigs-db
  ../../../bin/anvi-script-gen_stats_for_single_copy_genes.R
  ../../../bin/anvi-script-gen_stats_for_single_copy_genes.README
  ../../../bin/anvi-script-gen_stats_for_single_copy_genes.py
  ../../../bin/anvi-script-gen_stats_for_single_copy_genes.sh
  ../../../bin/anvi-script-generate-auxiliary-data-from-summary-cp
  ../../../bin/anvi-script-get-collections-as-tab-delimited-matrix.py
  ../../../bin/anvi-script-get-prot-sequences.py
  ../../../bin/anvi-script-remove-short-contigs-from-fasta
  ../../../bin/anvi-script-upgrade-contigs-db-v2-to-v3
  ../../../bin/anvi-script-upgrade-profile-db-v4-to-v5
  ../../../bin/anvi-script-upgrade-profile-db-v5-to-v6
  ../../../bin/anvi-summarize
  anvio-1.2.0-py2.7.egg-info
  anvio-1.2.0-py2.7.egg-info/PKG-INFO
  anvio-1.2.0-py2.7.egg-info/SOURCES.txt
  anvio-1.2.0-py2.7.egg-info/dependency_links.txt
  anvio-1.2.0-py2.7.egg-info/requires.txt
  anvio-1.2.0-py2.7.egg-info/top_level.txt
  anvio/__init__.py
  anvio/__init__.pyc
  anvio/auxiliarydataops.py
  anvio/auxiliarydataops.pyc
  anvio/bamops.py
  anvio/bamops.pyc
  anvio/ccollections.py
  anvio/ccollections.pyc
  anvio/clustering.py
  anvio/clustering.pyc
  anvio/clusteringconfuguration.py
  anvio/clusteringconfuguration.pyc
  anvio/columnprofile.so
  anvio/completeness.py
  anvio/completeness.pyc
  anvio/concoct.py
  anvio/concoct.pyc
  anvio/constants.py
  anvio/constants.pyc
  anvio/contigops.py
  anvio/contigops.pyc
  anvio/data/__init__.py
  anvio/data/__init__.pyc
  anvio/data/clusterconfigs/README.md
  anvio/data/clusterconfigs/merged/cov
  anvio/data/clusterconfigs/merged/tnf
  anvio/data/clusterconfigs/merged/tnf-cov
  anvio/data/clusterconfigs/single/tnf
  anvio/data/clusterconfigs/single/tnf-ab-cov
  anvio/data/hmm/Alneberg_et_al/genes.hmm.gz
  anvio/data/hmm/Alneberg_et_al/genes.txt
  anvio/data/hmm/Alneberg_et_al/kind.txt
  anvio/data/hmm/Alneberg_et_al/notes.txt
  anvio/data/hmm/Alneberg_et_al/reference.txt
  anvio/data/hmm/Campbell_et_al/genes.hmm.gz
  anvio/data/hmm/Campbell_et_al/genes.txt
  anvio/data/hmm/Campbell_et_al/kind.txt
  anvio/data/hmm/Campbell_et_al/reference.txt
  anvio/data/hmm/Creevey_et_al/genes.hmm.gz
  anvio/data/hmm/Creevey_et_al/genes.txt
  anvio/data/hmm/Creevey_et_al/kind.txt
  anvio/data/hmm/Creevey_et_al/reference.txt
  anvio/data/hmm/Dupont_et_al/genes.hmm.gz
  anvio/data/hmm/Dupont_et_al/genes.txt
  anvio/data/hmm/Dupont_et_al/kind.txt
meren commented 8 years ago

All seems correct, but the Python binaries are not in your PATH environment variable.

Do you remember whether you run this after installing Python with macports?

sudo port select --set python python27
jcthrash commented 8 years ago

Hrm. Weird.

Yes, I did run that command:

thrashc-1:~ JCThrash$ sudo port select --set python python27 Password: Selecting 'python27' for 'python' succeeded. 'python27' is now active. thrashc-1:~ JCThrash$ which python /opt/local/bin/python

meren commented 8 years ago

Can you open a new terminal and see whether anvi-profile -v works there or not?

If it doesn't, can you please share this output:

echo $PATH
jcthrash commented 8 years ago

Doesn’t seem to. Here’s all the output:

thrashc-1:~ JCThrash$ anvi-profile -v -bash: anvi-profile: command not found thrashc-1:~ JCThrash$ echo $PATH /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/JCThrash/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

meren commented 8 years ago

Well. One quick solution is to add this line into your ~/.bash_profile or ~/.bashrc file:

export PATH=$PATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin

On the other hand I've been researching about why your PATH variable is not properly set. I haven't seen this before.

Can you please share the output of this:

port notes python27
jcthrash commented 8 years ago

Ok, understood. Here is the output. Should I change the path now?

$ port notes python27 python27 has the following notes: To make this the default Python or Python 2 (i.e., the version run by the 'python' or 'python2' commands), run one or both of:

  sudo port select --set python python27
  sudo port select --set python2 python27
jcthrash commented 8 years ago

Ok, I changed the path and it seems to work fine, except for two things:

  1. I still have to use sudo
  2. Even though Chrome is my default browser, it tried to use Safari
meren commented 8 years ago

OK. You are using sudo, because the tests directory that installed on your computer is trying to write to a protected area. And probably when you use sudo, it doesn't use your user's' preferences (such as the default browser).

Instead, can you try this please:

cd /tmp
git clone -b v1.2.0  --depth=1 https://github.com/meren/anvio.git
cd anvio/tests
./run_mini_test
jcthrash commented 8 years ago

Ok, this worked all the way to the end, and opened the Chrome browser, which had the editing functions, but no image.

meren commented 8 years ago

Did you click "Draw"? :)

image

jcthrash commented 8 years ago

No. Ha! Sorry. I've been so concerned with getting everything running I've not read how to use the interface yet! Thanks!

meren commented 8 years ago

I've not read how to use the interface yet!

Although it would have been great, unfortunately there is no tutorial to introduce people to the interface. I hope you will be able to find your way intuitively, and we will manage to generate such documentation at some point :)

Thanks for your patience.

Best wishes,

jcthrash commented 8 years ago

Thanks for all your help!

-jct

On Oct 9, 2015, at 16:39, A. Murat Eren notifications@github.com wrote:

I've not read how to use the interface yet!

Although it would have been great, unfortunately there is no tutorial to introduce people to the interface. I hope you will be able to find your way intuitively, and we will manage to generate such documentation at some point :)

Thanks for your patience.

Best wishes,

— Reply to this email directly or view it on GitHub.