merenlab / anvio

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

anvi-cluster-contigs error #1270

Closed val92loz closed 4 years ago

val92loz commented 5 years ago

anvi-self-test --suite mini ran fine without errors.

     (anvio-6) PH-N332-N07:05_ANNOTATIONS valery$ anvi-self-test --version
      Anvi'o version ...............................: esther (v6)
      Profile DB version ...........................: 31
      Contigs DB version ...........................: 14
      Pan DB version ...............................: 13
      Genome data storage version ..................: 6
      Auxiliary data storage version ...............: 2
      Structure DB version .........................: 1 

Hi, I am using MacOS to run anvi'o 6. I installed anvi'o using the following commands:

conda create -n anvio-6 python=3.6
source activate anvio-6
conda install -y anvio=6
conda install -y diamond=0.9.14

I am trying to run the anvi-cluster-contigs command but I keep getting an error that says that concoct is not on my path.

Config Error: An anvi'o function needs 'concoct' to be installed on your system, but it    
              doesn't seem to appear in your path :/ If you are certain you have it on your
              system (for instance you can run it by typing 'concoct' in your terminal     
              window), you may want to send a detailed bug report. Sorry!        

I tried running it on the MPI cluster but I got the same config error saying that concoct wasn't on my path. I installed concoct on my home directory using the 'conda install concoct' command. When I submitted the job again, I got the following error:

Contigs DB ...................................: /home/vlozada/metagenomics_04-18-2019/Co-assembly_FMT_Dietary/03_CONTIGS/Coassembly.contigs.db
Profile DB ...................................: SAMPLES-MERGED/PROFILE.db
Contigs Mode .................................: False
* If you publish results from this workflow, please do not forget to cite
Johannes Alneberg, Brynjar Sm\xe1ri Bjarnason, Ino de Bruijn, Melanie Schirmer,
Joshua Quick, Umer Z Ijaz, Leo Lahti, Nicholas J Loman, Anders F Andersson &
Christopher Quince. 2014. Binning metagenomic contigs by coverage and
composition. Nature Methods, doi: 10.1038/nmeth.3103
Traceback (most recent call last):
 File "/home/vlozada/miniconda3/envs/anvio-6/bin/anvi-cluster-contigs", line 196, in <module>
   clusters = binning_module.cluster(input_files, sub_args, threads=args.num_threads, splits_mode=splits_mode)
 File "/home/vlozada/miniconda3/envs/anvio-6/lib/python3.6/site-packages/anvio/drivers/concoct.py", line 124, in cluster
   *utils.serialize_args(args, use_underscore=True)]
 File "/home/vlozada/miniconda3/envs/anvio-6/lib/python3.6/site-packages/anvio/utils.py", line 182, in serialize_args
   if param in translate:
TypeError: argument of type 'NoneType' is not iterable

Also, I changed the script to use '--driver binsanity' but it gives me the same error.

tenguzame commented 5 years ago

Hello, I'm getting the very same error with all the drivers installed.

meren commented 5 years ago

thank you @val92loz and @tenguzame. We will address this as soon as we can and update anvi'o stable version with a minor release. Apologies for the hiccup.

Best wishes,

meren commented 5 years ago

@val92loz, @tenguzame, can you please send me the output of what happens when you run concoct in your terminal?

tenguzame commented 5 years ago

Here's the error message it throws at me:

usage: concoct [-h] [--coverage_file COVERAGE_FILE] [--composition_file COMPOSITION_FILE] [-c CLUSTERS] [-k KMER_LENGTH] [-t THREADS] [-l LENGTH_THRESHOLD] [-r READ_LENGTH] [--total_percentage_pca TOTAL_PERCENTAGE_PCA] [-b BASENAME] [-s SEED] [-i ITERATIONS] [--no_cov_normalization] [--no_total_coverage] [--no_original_data] [-o] [-d] [-v] concoct: error: No input data supplied, add file(s) using --coverage_file and/or --composition_file

Il 17 ott 2019 20:15, "A. Murat Eren" notifications@github.com ha scritto:

@val92lozhttps://github.com/val92loz, @tenguzamehttps://github.com/tenguzame, can you please send me the output of what happens when you run concoct in your terminal?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/merenlab/anvio/issues/1270?email_source=notifications&email_token=AGIPRDKDCY2JKNSVHGQBQB3QPCTVHA5CNFSM4JBDMOX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBRBE5Y#issuecomment-543298167, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGIPRDO5BUMTIX6OONP66ADQPCTVHANCNFSM4JBDMOXQ.

val92loz commented 5 years ago

I got the same error.

usage: concoct [-h] [--coverage_file COVERAGE_FILE]
               [--composition_file COMPOSITION_FILE] [-c CLUSTERS]
               [-k KMER_LENGTH] [-t THREADS] [-l LENGTH_THRESHOLD]
               [-r READ_LENGTH] [--total_percentage_pca TOTAL_PERCENTAGE_PCA]
               [-b BASENAME] [-s SEED] [-i ITERATIONS]
               [--no_cov_normalization] [--no_total_coverage]
               [--no_original_data] [-o] [-d] [-v]
concoct: error: No input data supplied, add file(s) using --coverage_file <cov_file> and/or --composition_file <comp_file>
meren commented 5 years ago

Great. Thank you both very much. I wanted to make sure you both had working versions of concoct. I think I solved the issue with 5c320ea9cf172afd8aa3dc87d9b96b300f2bdf08. Although it is not in the stable version. If you like, you could try to follow the master branch if you are feeling particularly adventurous: http://merenlab.org/2016/06/26/installation-v2/#following-the-active-codebase-youre-a-wizard-arry

Otherwise you can make that change manually on your anvi'o installation if you know a little Python.

Otherwise you can wait for anvi'o v6.1 which we plan to release soon.

Best wishes,

andrewsonin commented 5 years ago

@meren I came across the same error, and it seems that your fix solves it.

val92loz commented 5 years ago

Hi @meren,

I make the change manually to the anvi'o installation but it still doesn't run properly.

When I ran the anvi-cluster-contigs using concoct I got the following error.

Co-assembly_FMT_Dietary valery$ anvi-cluster-contigs -p 04_MAPPING/SAMPLES-MERGED/PROFILE.db -c 03_CONTIGS/Coassembly.contigs.db -C CONCOCT_34 --driver concoct 
Contigs DB ...................................: 03_CONTIGS/Coassembly.contigs.db
Profile DB ...................................: 04_MAPPING/SAMPLES-MERGED/PROFILE.db
Contigs Mode .................................: False

* If you publish results from this workflow, please do not forget to cite
Johannes Alneberg, Brynjar Smári Bjarnason, Ino de Bruijn, Melanie Schirmer,
Joshua Quick, Umer Z Ijaz, Leo Lahti, Nicholas J Loman, Anders F Andersson &
Christopher Quince. 2014. Binning metagenomic contigs by coverage and
composition. Nature Methods, doi: 10.1038/nmeth.3103

Traceback (most recent call last):                                                                                                       
  File "/Users/valery/miniconda3/envs/anvio-6/bin/anvi-cluster-contigs", line 196, in <module>
    clusters = binning_module.cluster(input_files, sub_args, threads=args.num_threads, splits_mode=splits_mode)
  File "/Users/valery/miniconda3/envs/anvio-6/lib/python3.6/site-packages/anvio/drivers/concoct.py", line 134, in cluster
    with open(os.path.join(self.temp_path, 'clustering_gt%s.csv' % threshold), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/mq/hbllcd0j2014zy6hbfwpbxg80000gp/T/tmpesvpr6hc/clustering_gt1000.csv'

I tried using binsanity but it terminated the command after some time passed

anvi-cluster-contigs -p 04_MAPPING/SAMPLES-MERGED/PROFILE.db -c 03_CONTIGS/Coassembly.contigs.db -C CONCOCT_34 --driver binsanity -T 3
Contigs DB ...................................: 03_CONTIGS/Coassembly.contigs.db
Profile DB ...................................: 04_MAPPING/SAMPLES-MERGED/PROFILE.db
Contigs Mode .................................: False

* If you publish results from this workflow, please do not forget to cite  Graham
ED, Heidelberg JF, Tully BJ. (2017) BinSanity: unsupervised clustering of
environmental microbial assemblies using coverage and affinity propagation.
PeerJ 5:e3035 https://doi.org/10.7717/peerj.3035

[22 Oct 19 10:51:24 Binsanity] Running using 3 threads...                                                                                

Config Error: command was terminated
meren commented 5 years ago

Hi @val92loz, we clearly didn't test this program enough :( I also found some inconsistencies in its results. I will suggest you to use these tools externally and import results to anvi'o with the program anvi-import-collection :(