anvi-profile not producing result

169 views
Skip to first unread message

Michael26

unread,
Jan 17, 2019, 5:36:07 AM1/17/19
to Anvi'o
Hello All. I am following the Anvi'o metagenomics tutorial to analyze my data.  I am running my analysis using my desktop computer (ubuntu 16.04). I installed anvio following this command: conda install -c bioconda -c conda-forge anvio diamond bwa


anvi-self-test --version

Anvi'o version ...............................: margaret (vunknown)
Profile DB version ...........................: 30
Contigs DB version ...........................: 12
Pan DB version ...............................: 12
Genome data storage version ..................: 6
Auxiliary data storage version ...............: 2
Structure DB version .........................: 1


I used anvi-init-bam to sort and index my bam files, and generate contigs database with anvi-gen-contigs-database. I am now trying to create an Anvio profile but got no result. Based on the tutorial, the command should create something like a PROFILE.db on my /path/to/directory/. Kindly clarify if there is something wrong with my command or why is this not creating a result. I attached here a screenshot of the terminal after running anvi-profile hoping that it may help. Thank you in advance.

Here is the command. 

mmbl@mmbl:/media/mmbl/micorobyo.microbes/Meta.shared/spades/06_CONCOCT$ anvi-profile -i Hamb711.bam -c Hambcontigs_database20000.db  -o Hamb711_profile -S Hamb711 --list-contigs -T 2


anvi-profile.txt
Screenshot from 2019-01-17 18-31-35.png

A. Murat Eren

unread,
Jan 17, 2019, 8:53:57 AM1/17/19
to Anvi'o
Because you are using the flag --list-contigs. Please read the help menu of the program. 

Plus, your contigs database seems to contain many very short contigs. Unless this is something on purpose, you should have removed short fragments from your FASTA file prior to generating your contigs database. 

Best, 

--
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/c2c92007-2020-45d6-9921-7fab3458e59a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael26

unread,
Jan 17, 2019, 7:07:17 PM1/17/19
to Anvi'o
Hello Meren. Thank you for the reply. Will try to remove --list-contigs and see if it works. 

Just a clarification, i removed sequences shorther than 500bp using anvi-script-reformat-fasta then, proceed with mapping. technically, my sam and bam files contain sequeces as short as 500bp. Is 500bp still too short for binning? Then, If I will remove sequences <1000bp using anvi-script-reformat-fasta, so that I only have sequences longer than 1000bp. Will it afffect the contigs database if I used the sam and bam files with 500bp sequences?

A. Murat Eren

unread,
Jan 17, 2019, 10:10:52 PM1/17/19
to Anvi'o
In my opinion it is a good idea to remove anything less than 1,000 unless there is a specific reason to keep very short fragments.

Best,
--

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


Michael26

unread,
Jan 21, 2019, 5:51:27 AM1/21/19
to Anvi'o
Hello Meren. This is in relation to the previous question. Removing --list-contigs seems working aith the anvio-profile. But I am getting the error below. I tried to google the error and I am not sure what is causing the error. Thank you. 


anvi-self-test --version

Anvi'o version ...............................: margaret (vunknown)
Profile DB version ...........................: 30
Contigs DB version ...........................: 12
Pan DB version ...............................: 12
Genome data storage version ..................: 6
Auxiliary data storage version ...............: 2
Structure DB version .........................: 1


mmbl@mmbl:/media/mmbl/micorobyo.microbes/Meta.shared/spades/05_mapping.1kbp$ anvi-profile -i Hamb711.bam -c Hambcontigs1kbp_database.db -o Hamb711_profile/ -W -S HAmb711 --min-contig-length 1000
Contigs DB .........................: Initialized: Hambcontigs1kbp_database.db (v. 12)
[21 Jan 19 12:41:19 Initializing] Creating the output directory ...             


                                                                                
WARNING
=====================================
Amino acid linkmer frequencies will not be characterized for this profile.

anvio ..............................: unknown
profiler_version ...................: 30
sample_id ..........................: HAmb711
description ........................: None
profile_db .........................: /media/mmbl/micorobyo.microbes/Meta.shared/spades/05_mapping.1kbp/Hamb711_profile/PROFILE.db
contigs_db .........................: True
contigs_db_hash ....................: hasha552039f
cmd_line ...........................: /home/mmbl/miniconda3/bin/anvi-profile -i Hamb711.bam -c Hambcontigs1kbp_database.db -o Hamb711_profile/ -W -S HAmb711 --min-contig-length 1000
merged .............................: False
blank ..............................: False
split_length .......................: 20,000
min_contig_length ..................: 1,000
max_contig_length ..................: 9,223,372,036,854,775,807
min_mean_coverage ..................: 0
clustering_performed ...............: False
min_coverage_for_variability .......: 10
skip_SNV_profiling .................: False
profile_SCVs .......................: False
report_variability_full ............: False

WARNING
=====================================
Your minimum contig length is set to 1,000 base pairs. So anvi'o will not take
into consideration anything below that. If you need to kill this an restart your
analysis with another minimum contig length value, feel free to press CTRL+C.

input_bam ..........................: Hamb711.bam                               
output_dir .........................: /media/mmbl/micorobyo.microbes/Meta.shared/spades/05_mapping.1kbp/Hamb711_profile
total_reads_mapped .................: 76,820,203
num_contigs ........................: 83,356
num_contigs_after_M ................: 83,356
num_splits .........................: 83,728
total_length .......................: 246,677,447
[21 Jan 19 12:41:51 Profiling using 1 thread] Processed 76500 of 83356 con (...)Process Process-2:
Traceback (most recent call last):
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/mmbl/miniconda3/lib/python3.6/site-packages/anvio/profiler.py", line 613, in profile_contig_worker
    output_queue.put(contig)
  File "<string>", line 2, in put
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/managers.py", line 757, in _callmethod
    kind, result = conn.recv()
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/connection.py", line 383, in _recv
    raise EOFError
EOFError
Traceback (most recent call last):
  File "/home/mmbl/miniconda3/bin/anvi-profile", line 79, in <module>
    profiler._run()
  File "/home/mmbl/miniconda3/lib/python3.6/site-packages/anvio/profiler.py", line 261, in _run
    self.profile()
  File "/home/mmbl/miniconda3/lib/python3.6/site-packages/anvio/profiler.py", line 674, in profile
    contig = output_queue.get()
  File "<string>", line 2, in get
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/managers.py", line 756, in _callmethod
    conn.send((self._id, methodname, args, kwds))
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/connection.py", line 404, in _send_bytes
    self._send(header + buf)
  File "/home/mmbl/miniconda3/lib/python3.6/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
Reply all
Reply to author
Forward
0 new messages