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

Unexpected behaviors for --size-for-MAG and --min-completion-for-MAG in anvi-rename-bins #675

Closed jmiyoshi closed 6 years ago

jmiyoshi commented 6 years ago

Hi,

I'm using Anvi'o ver. 3. I experienced unexpected behaviors in the program, anvi-rename-bins. I tried to define metagenomic bins with >70% completion and >2 Mbp in length as MAGs and rename the MAGs. However, some bins that satisfied this criterion did not get renamed as MAGs and other bins that did not satisfy this criterion were renamed as MAGs.

FYI, what I ran was;

$ anvi-rename-bins -c CONTIGS.db -p PROFILE.db --collection-to-read CONCOCT_c25 --collection-to-write FINAL --use-SCG-averages --call-MAGs --size-for-MAG 2 --min-completion-for-MAG 70 --max-redundancy-for-MAG 10 --prefix O_PUP --report-file FINAL.txt

Thank you.

Jun

meren commented 6 years ago

This sounds very important and we should look into this before the new release.

tdelmont commented 6 years ago

One part of the problem might be due to the bins displaying high levels of redundancy:

Here is the rule:

Jun, could you please make sure the unexpected behaviors in not linked to bins with redundancy > 10%.

Regarding the bins unexpectedly renamed as MAGs, could you please provide an example that includes length, completion and redundancy?

Thank you,

Tom

On Mon, Dec 18, 2017 at 9:16 PM, A. Murat Eren notifications@github.com wrote:

This sounds very important and we should look into this before the new release.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/merenlab/anvio/issues/675#issuecomment-352529475, or mute the thread https://github.com/notifications/unsubscribe-auth/AH8mWfB5eBfzBV7PfICxElYO7b7jSLWGks5tBrn5gaJpZM4RF6FR .

jmiyoshi commented 6 years ago

Hi Tom, I doublechecked my result with anvi-interactive collection mode and confirmed the unexpected behaviors (some bins do not satisfy the criterion get renamed as MAGs) occur in bins with redundancy <10%. For example, one bin named "MAG" has (1) length: 2910588, (2) completion: 37.4%, and (3) redundancy: 5.03%, on the other hand, another "MAG" bin has (1) length: 2278657, (2) completion: 98.5%, and (3) redundancy: 1.43%. I also found a bin with (1) length: 2645767, (2) completion: 89.9%, and (3) redundancy: 10.7% is renamed as "Bin" correctly. It seems Anvi'o does not take % of completion into account, but I'm not sure. Thank you so much! Jun

ozcan commented 6 years ago

Hi @jmiyoshi, We finally solved this issue, we removed both --use-SCG-averages and --use-highest-completion-score options now anvi-rename-bins should work as expected. The default behavior is to use highest completion score now.