<p>I would not recommend the approach that you describe. I am not sure that I completely understand it. For example, metagenomic binning by e.g. MetaBAT is not a scaffolding operation, which returns a single sequence. Rather, they are methods to separate a pool of contigs into groups with similar sequence characteristics indicating they come from the same genome.</p>
<p>It sounds like you already have a group of contigs from each genome, you just want them to all be part of a single sequence in a FASTA file, as would be suggested by your interest in the reference-guided scaffolding approach scaffold_builder.</p>
<p>I would propose that you instead use a tool like <a href="https://ecogenomics.github.io/GTDBTk/commands/classify.html" rel="nofollow noreferrer">GTDBtk</a> to place each of your genomes (each represented by a multifasta of contigs, which is the expected input) into an existing taxonomic tree, and then use their placements in that tree as a model of the taxonomy of your genomes, rather than trying to infer it de novo. I assure you that it is a high quality phylogeny that no one will criticize, and it avoids the possibility of introducing errors into your phylogeny through problematic scaffolding operations.</p>
<p>I would suggest reading <a href="https://ecogenomics.github.io/GTDBTk/index.html" rel="nofollow noreferrer">GTDBtk documentation</a> for more information.</p>
<h2>A narrower answer to the original question</h2>
<p>I realized that there is an answer to the question of binning contigs without any additional information. I do not recommend it as I think it would give you positively wrong answers because you are starting with your genomes already binned, and it would not provide you with scaffolds, which I think is what you actually want. But there is a way to perform this task.</p>
<p><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2745766/" rel="nofollow noreferrer">You can compute tetranucleotide frequencies from contigs and use them to cluster arbitrary sets of contigs into genomes or other groupings based on similarities.</a> This has a significant rate of error, but it does more or less work. It's an older approach.</p>

CC BY-SA 4.0
2022-05-17T14:25:01.633Z
Sorry for the delay Maximilian Press. Thanks for your comments. I will try to use the GTDBTk way. I really appreciate your knowledge. I will try to go ahead and overcome this situation. Many thanks.
MagíBC
CC BY-SA 4.0
2022-05-06T22:56:22.627Z
2022-05-07T04:09:47.257Z
2022-05-07T04:09:47.257Z
Maximilian Press
<p>Thank you another time @Maximilian Press. Yes, GTDB-Tk it's a robust software but although the merging of archaea and bacteria taxa is still a current research topic, I have succeed with another tool that permits me obtaining an unique tree (including archea and bacteria).</p>
<p>If I work with GTDB-Tk I've obtained one tree for archaea and other for bacteria. Then to use it in phyloseq I must work with two independent phyloseq objects which is nice also but my purpose of building a tree from shotgun is only to permits me to calculate diversities based on phylogeny.</p>
<p>As alternative that works it was the following:
to construct a phylogenetic tree from Kaiju I used the 40 marker proteins that is based on the proGenomes database used by kaiju (<a href="https://progenomes.embl.de/data/proGenomes2.1_markerGenes.tar.gz" rel="nofollow noreferrer">https://progenomes.embl.de/data/proGenomes2.1_markerGenes.tar.gz</a>) and then I've used the ETE-Toolkit(<a href="http://etetoolkit.org/" rel="nofollow noreferrer">http://etetoolkit.org/</a>) software to construct the tree in Newick format that I can integrate into a phyloseq object.</p>
<p>I post here if someone can help my strategy. It has been no easy (unless for a dummie as me) to construct a phylogenetic tree from Kaiju's taxonomic classifier.</p>

CC BY-SA 4.0
2022-05-26T07:05:55.727Z
2022-05-26T07:05:55.727Z
MagíBC
<p>For some weeks I'm fighting with an issue about phylogenetic tree building to use in a phyloseq object in order to calculate beta-diversity metrics that takes into account phylogenetic distance.</p>
<p>I’m trying to create a phylogenetic tree from the representative genomes of <a href="https://progenomes.embl.de/data/repGenomes/" rel="nofollow noreferrer">proGenomes v.2.1 database</a>. However, I do not have a representative genome for each taxa id. In contrast, I have a multifasta files for more than 100 contigs for each taxa ID (file freeze12.contigs.representatives.fasta.gz).</p>
<p>For each taxaID (the first numbers in each header of the multifasta file is NCBI taxon ID), I would like to bin the contigs into the biggest scaffold possible, and then perform an alignment (through MUSCLE as examples) followed by RaXML-NG to construct a Newick tree.</p>
<p>However, I cannot find any software for binning contigs with only the contigs as inputs. <a href="https://bitbucket.org/berkeleylab/metabat/src/master/" rel="nofollow noreferrer">MetaBAT</a> needs bam files from shotgun read mappings to the contigs in question (not present in the proGenomes database). I found another software (<a href="https://github.com/metageni/Scaffold_builder" rel="nofollow noreferrer">Scaffold_builder</a>), but it needs a representative reference genome. And in microbiology I have more than 100 complete genomes for each NCBI tax id...</p>
<p>For this reason, I ask here an open question if exists some software that can perform of contigs taking into account only a multifasta file of contigs?</p>

<phylogenetics><phylogeny><scaffold>
Phylogenetic tree building from proGenomes database for shotgun metagenomics
# Phylogenetic tree building from proGenomes database for shotgun metagenomics

(Asked by: username_0 on 2022-05-02)

For some weeks I'm fighting with an issue about phylogenetic tree building to use in a phyloseq object in order to calculate beta-diversity metrics that takes into account phylogenetic distance.

I’m trying to create a phylogenetic tree from the representative genomes of [proGenomes v.2.1 database](https://progenomes.embl.de/data/repGenomes/). However, I do not have a representative genome for each taxa id. In contrast, I have a multifasta files for more than 100 contigs for each taxa ID (file freeze12.contigs.representatives.fasta.gz).

For each taxaID (the first numbers in each header of the multifasta file is NCBI taxon ID), I would like to bin the contigs into the biggest scaffold possible, and then perform an alignment (through MUSCLE as examples) followed by RaXML-NG to construct a Newick tree.

However, I cannot find any software for binning contigs with only the contigs as inputs. [MetaBAT](https://bitbucket.org/berkeleylab/metabat/src/master/) needs bam files from shotgun read mappings to the contigs in question (not present in the proGenomes database). I found another software ([Scaffold\_builder](https://github.com/metageni/Scaffold_builder)), but it needs a representative reference genome. And in microbiology I have more than 100 complete genomes for each NCBI tax id...

For this reason, I ask here an open question if exists some software that can perform of contigs taking into account only a multifasta file of contigs?

**Tags:** phylogenetics, phylogeny, scaffold

---

## 2 answers

### Answer by username_1 on 2022-05-06. Score: 1

I would not recommend the approach that you describe. I am not sure that I completely understand it. For example, metagenomic binning by e.g. MetaBAT is not a scaffolding operation, which returns a single sequence. Rather, they are methods to separate a pool of contigs into groups with similar sequence characteristics indicating they come from the same genome.

It sounds like you already have a group of contigs from each genome, you just want them to all be part of a single sequence in a FASTA file, as would be suggested by your interest in the reference-guided scaffolding approach scaffold\_builder.

I would propose that you instead use a tool like [GTDBtk](https://ecogenomics.github.io/GTDBTk/commands/classify.html) to place each of your genomes (each represented by a multifasta of contigs, which is the expected input) into an existing taxonomic tree, and then use their placements in that tree as a model of the taxonomy of your genomes, rather than trying to infer it de novo. I assure you that it is a high quality phylogeny that no one will criticize, and it avoids the possibility of introducing errors into your phylogeny through problematic scaffolding operations.

I would suggest reading [GTDBtk documentation](https://ecogenomics.github.io/GTDBTk/index.html) for more information.

## A narrower answer to the original question

I realized that there is an answer to the question of binning contigs without any additional information. I do not recommend it as I think it would give you positively wrong answers because you are starting with your genomes already binned, and it would not provide you with scaffolds, which I think is what you actually want. But there is a way to perform this task.

[You can compute tetranucleotide frequencies from contigs and use them to cluster arbitrary sets of contigs into genomes or other groupings based on similarities.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2745766/) This has a significant rate of error, but it does more or less work. It's an older approach.

> **Comments:**
> **username_0**: Sorry for the delay Maximilian Press. Thanks for your comments. I will try to use the GTDBTk way. I really appreciate your knowledge. I will try to go ahead and overcome this situation. Many thanks.  

---

### Answer by username_0 on 2022-05-26. Score: 0

Thank you another time @Maximilian Press. Yes, GTDB-Tk it's a robust software but although the merging of archaea and bacteria taxa is still a current research topic, I have succeed with another tool that permits me obtaining an unique tree (including archea and bacteria).

If I work with GTDB-Tk I've obtained one tree for archaea and other for bacteria. Then to use it in phyloseq I must work with two independent phyloseq objects which is nice also but my purpose of building a tree from shotgun is only to permits me to calculate diversities based on phylogeny.

As alternative that works it was the following:
to construct a phylogenetic tree from Kaiju I used the 40 marker proteins that is based on the proGenomes database used by kaiju (<https://progenomes.embl.de/data/proGenomes2.1_markerGenes.tar.gz>) and then I've used the ETE-Toolkit(<http://etetoolkit.org/>) software to construct the tree in Newick format that I can integrate into a phyloseq object.

I post here if someone can help my strategy. It has been no easy (unless for a dummie as me) to construct a phylogenetic tree from Kaiju's taxonomic classifier.


---

