<p>I am looking for instructions on creating a custom-made kraken2 catalogue from the sequences of my choice and the corresponding phylogenetic tree in newick notation.</p>
<p>I will appreciate an input on whether/how it can be done. <a href="https://github.com/DerrickWood/kraken2/wiki/Manual#custom-databases" rel="nofollow noreferrer">The prescription provided in the kraken2 manual</a> seems to assume that sequences and phylogeny originate from the NCBI. <a href="https://github.com/leylabmpi/Struo2" rel="nofollow noreferrer">Struo2</a> extends this to GTDB sequences. However, in my case the sequences are collections of concatenated genes (i.e., not full genomes), provided by a third party.</p>
<p><strong>Remark:</strong> (in response to comments) I don't <em>need</em> to work with newick format - I have the tree in newick format. So converting it to <code>dmp</code> might be a part of the answer.</p>

CC BY-SA 4.0
2023-04-19T19:54:52.000Z
Newick has a lot of different ways to represent data, so it's helpful to know specifically what your input data looks like. When asking a question, it's helpful to provide both example input and example output. You've provided good information on the output side through the link, but no information on the input format.
gringer
CC BY-SA 4.0
2023-04-20T08:11:01.323Z
@gringer Does kraken2 need this information? The question is not about solving my particular research problem (which is off topic?), but about creating a kraken2 catalogue from sequences and phylogeny, other than those readily provided by NCBI or GTDB (via Struo). [contd.]
Roger V.
CC BY-SA 4.0
2023-04-20T08:11:11.100Z
You seem to be suggesting, that, once phylogeny is converted to `dmp` format, the problem is easily resolved - if that's the case, then state this explicitly, specify the tools for converting newick to dmp, and the minimal information that a newick tree should contain for creating a meaningful kraken2 catalogue. The would make for a nice answer, and useful for other users that stumble on the same problem.
Roger V.
CC BY-SA 4.0
2023-04-20T20:20:17.167Z
I'm not trying to give answers, just clarify the question. My comments are more generally applicable to all questions on this site: a good question for StackExchange has a specific, well-defined input, and a well-defined output. All I'm trying to do is make sure that this question will receive good answers.
gringer
CC BY-SA 4.0
2023-04-20T20:23:05.750Z
Yes, phylogeny is important. Kraken2 is a phylogenetic mapper, and uses the tree structure to work out the best match when it cannot be assigned reliably to a single species.
gringer
<gene><k-mer><ncbi>
Custom-made kraken2 catalogue
# Custom-made kraken2 catalogue

(Asked by: username_0 on 2023-04-18)

I am looking for instructions on creating a custom-made kraken2 catalogue from the sequences of my choice and the corresponding phylogenetic tree in newick notation.

I will appreciate an input on whether/how it can be done. [The prescription provided in the kraken2 manual](https://github.com/DerrickWood/kraken2/wiki/Manual#custom-databases) seems to assume that sequences and phylogeny originate from the NCBI. [Struo2](https://github.com/leylabmpi/Struo2) extends this to GTDB sequences. However, in my case the sequences are collections of concatenated genes (i.e., not full genomes), provided by a third party.

**Remark:** (in response to comments) I don't *need* to work with newick format - I have the tree in newick format. So converting it to `dmp` might be a part of the answer.

**Tags:** gene, k-mer, ncbi
> **Comments:**
> **username_1**: Newick has a lot of different ways to represent data, so it's helpful to know specifically what your input data looks like. When asking a question, it's helpful to provide both example input and example output. You've provided good information on the output side through the link, but no information on the input format.  
> **username_0**: @gringer Does kraken2 need this information? The question is not about solving my particular research problem (which is off topic?), but about creating a kraken2 catalogue from sequences and phylogeny, other than those readily provided by NCBI or GTDB (via Struo). [contd.]  
> **username_0**: You seem to be suggesting, that, once phylogeny is converted to `dmp` format, the problem is easily resolved - if that's the case, then state this explicitly, specify the tools for converting newick to dmp, and the minimal information that a newick tree should contain for creating a meaningful kraken2 catalogue. The would make for a nice answer, and useful for other users that stumble on the same problem.  
> **username_1**: I'm not trying to give answers, just clarify the question. My comments are more generally applicable to all questions on this site: a good question for StackExchange has a specific, well-defined input, and a well-defined output. All I'm trying to do is make sure that this question will receive good answers.  
> **username_1**: Yes, phylogeny is important. Kraken2 is a phylogenetic mapper, and uses the tree structure to work out the best match when it cannot be assigned reliably to a single species.  

---

## 0 answers

