Two metagenomes with different contigs database: rerun and make common contigs db or not?

43 views
Skip to first unread message

Christos Ch.

unread,
Feb 4, 2020, 3:50:48 AM2/4/20
to Anvi'o
Hello to the group!

After the suggestion of Dr Eren I am copy pasting the discussion we had in the Anvi'o User Tutorial (http://merenlab.org/2016/06/22/anvio-tutorial-v2)

To give you some background: I have two metagenomic samples (one marine water sample and an adjacent microbial mat). I want to compare their content in microbial taxa and metabolic pathways. I would love to hear your suggestions.

Christos Ch.

Hi anvio team!

I have two metagenomic samples that I work with that I want to compare. Up to anvi-merge, I have performed everything separately, and its sample has its own contigs database. Will their profiles merge? Or do I have to make one common contigs.db and redo everything? If that's the case, can"anvi-gen-contigs-database" take multiple fasta as input?


A. Murat Eren

Hey Christos Ch., only profile databases that are profiled using the same contigs database will merge.

If your contigs databases are describing contigs that are assembled, you have three options. One, identify genomes in each metagenome, put them together, dereplicate, create a contigs db from non-redundant genomes, recruit reads from both profiles, merge them. Two, put all assembled contigs from two metagenomes together, assemble contigs in both assemblies again, recruit reads from both profiles, merge. Three, co-assemble the short reads in two metagenomes, use resulting contigs to recruit reads, profile, merge.

All have their disadvantages and advantages given a gazillion factors :)

 
Christos Ch.

Thank you for your answer!

I will a follow up on your answer, but let me give some additional info. My metagenomes are not big enough to get genomes out of them. Also, they are ecologically quite distinct as they come from different habitats, so I always need to be able to tell which contig came from which sample/metagenome. Furthermore, both contigs databases are from assembled contigs.

Your second proposed approach is not feasible, since I have tried a cross assembly between the two metagenomes, but I wasn't able to, due to HPC reasons.

As for the third approach, when you say short reads, do you mean short contigs? If yes, then how short?

Finally, about the first approach: how to do all these things?

Thank you for your time and suggestions!


A. Murat Eren

Perhaps this is better to start from here: How do you want to compare your metagenomes? At what level of resolution, and why? What is the research question?

Can you please consider sending an e-mail to the Anvi'o Google Group that (1) describes your data very briefly (so people don't have to ask the questions I asked you here), and (2) includes the questions I asked in the previous paragraph?

I think it would be a much better way to get some opinions.

Thank you and best wishes,

 

A. Murat Eren

unread,
Feb 5, 2020, 9:37:30 AM2/5/20
to Anvi'o
Hey Christos,

Here is a quick response. If you ask me, there are no good ways of doing this. With one sample from two distinct habitats, it is very difficult to reach to robust conclusions, but still, data are data :) So, if you insist on using anvi'o for this, this is what I would have done. For each metagenome separately:

- Assemble reads
- Map reads back (and get BAM files)
- Generate a contigs database from the assembly
- Run anvi-run-hmms, anvi-run-hmm-cogs, anvi-run-scg-taxonomy on the contigs database
- Profile BAM
- Add default collection to profile (anvi-script-add-default-collection)
- Run anvi-summarize with --init-gene-coverages on your profile using the default collection

The last step will give you an output that includes each function, and the coverage of the genes that encode them. As you can imagine you can create functional profiles from this info.

- Run anvi-estimate-genome-taxonomy with --compute-scg-coverages

This will give you a taxonomic profile (albeit it is quite experimental).

After this, you can merge taxonomic and functional profiles from both independent steps I listed above. You can visualize them, do stats, etc.

At some point you can run anvi-display-contigs-stats on both of your contigs databases at the same time to look at assembly statistics.

You can also use anvi-get-sequences-for-hmm-hits on both contigs databases to get a single SCG (i.e., from Bacteria_71 SCG collection) and build phylogenomic trees to see if there are branches that are occupied only in one of your metagenomes. There are a gazillion things to do really.

If you go through this route, keep us posted, and there may be additional/better ideas.


Best,
--

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


--
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/09139947-a74f-45e1-a86d-5c33f585aa24%40googlegroups.com.

Christos Ch.

unread,
Feb 11, 2020, 2:16:25 PM2/11/20
to Anvi'o
Thank you for your detailed answer.

I am trying to work through it.

Before posting this thread I had already ran for each metagenome separately:

--kegg/ghostkoala
--anvi-run-ncbi-cogs
--imported kaiju & centrifuge taxonomic annotation

DO you believe there might be a confict there?

A. Murat Eren

unread,
Feb 11, 2020, 3:00:55 PM2/11/20
to Anvi'o
No conflicts :)
--

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

--
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.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages