Skip to content

Commit

Permalink
Merge pull request #30 from nf-core/add-kraken
Browse files Browse the repository at this point in the history
Add Kraken2 database build
  • Loading branch information
jfy133 authored Apr 11, 2024
2 parents ae17e0d + e52525a commit db16f00
Show file tree
Hide file tree
Showing 38 changed files with 1,111 additions and 49 deletions.
4 changes: 4 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@

> Menzel, P., Ng, K. L., & Krogh, A. (2016). Fast and sensitive taxonomic classification for metagenomics with Kaiju. Nature Communications, 7, 11257. https://doi.org/10.1038/ncomms11257
- [Kraken2](https://doi.org/10.1186/s13059-019-1891-0)

> Wood, D. E., Lu, J., & Langmead, B. (2019). Improved metagenomic analysis with Kraken 2. Genome Biology, 20(1), 257. https://doi.org/10.1186/s13059-019-1891-0
- [MALT](https://doi.org/10.1038/s41559-017-0446-6)

> Vågene, Å. J., Herbig, A., Campana, M. G., Robles García, N. M., Warinner, C., Sabin, S., Spyrou, M. A., Andrades Valtueña, A., Huson, D., Tuross, N., Bos, K. I., & Krause, J. (2018). Salmonella enterica genomes from victims of a major sixteenth-century epidemic in Mexico. Nature Ecology & Evolution, 2(3), 520–528. https://doi.org/10.1038/s41559-017-0446-6
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

## Introduction

**nf-core/createtaxdb** is a bioinformatics pipeline that constructs metagenomic classifier databases from the same input reference genome set for multiple classifiers and profilers in a highly automated and parallelised manner.
**nf-core/createtaxdb** is a bioinformatics pipeline that constructs custom metagenomic classifier databases from the same input reference genome set for multiple classifiers and profilers in a highly automated and parallelised manner.

<!-- TODO nf-core:
Complete this sentence with a 2-3 sentence summary of what types of data the pipeline ingests, a brief overview of the
Expand All @@ -35,6 +35,7 @@
- [Centrifuge](https://doi.org/10.1101/gr.210641.116)
- [DIAMOND](https://doi.org/10.1038/nmeth.3176)
- [Kaiju](https://doi.org/10.1038/ncomms11257)
- [Kraken2](https://doi.org/10.1186/s13059-019-1891-0)
- [MALT](https://doi.org/10.1038/s41559-017-0446-6)

## Usage
Expand Down
1 change: 0 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ process {

withName: 'MALT_BUILD' {
ext.args = { "--sequenceType ${params.malt_sequencetype}" }

}

}
2 changes: 2 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ params {
build_kaiju = true
build_malt = true
build_centrifuge = true
build_kraken2 = true

accession2taxid = 'https://raw.githubusercontent.com/nf-core/test-datasets/createtaxdb/data/taxonomy/nucl_gb.accession2taxid'
nucl2taxid = 'https://raw.githubusercontent.com/nf-core/test-datasets/createtaxdb/data/taxonomy/nucl2tax.map'
prot2taxid = 'https://raw.githubusercontent.com/nf-core/test-datasets/createtaxdb/data/taxonomy/prot.accession2taxid.gz'
nodesdmp = 'https://raw.githubusercontent.com/nf-core/test-datasets/createtaxdb/data/taxonomy/nodes.dmp'
Expand Down
1 change: 1 addition & 0 deletions conf/test_nothing.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ params {
build_kaiju = false
build_malt = false
build_centrifuge = false
build_kraken2 = false

}
18 changes: 18 additions & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
- [Centrifuge](#centrifuge) - Database files for Centrifuge
- [DIAMOND](#diamond) - Database files for DIAMOND
- [Kaiju](#kaiju) - Database files for Kaiju
- [Kraken2](#kraken2) - Database files for Kraken2
- [MALT](#malt) - Database files for MALT

### MultiQC
Expand Down Expand Up @@ -92,6 +93,23 @@ The `dmnd` file can be given to one of the DIAMOND alignment commands with `diam

The `fmi` file can be given to Kaiju itself with `kaiju -f <your_database>.fmi` etc.

### Kraken2

[Kraken2](https://ccb.jhu.edu/software/kraken2/) is a taxonomic classification system using exact k-mer matches to achieve high accuracy and fast classification speeds.

<details markdown="1">
<summary>Output files</summary>

- `kraken2/`
- `<db_name>/`
- `hash.k2d`: Kraken2 hash database file
- `opts.k2d`: Kraken2 opts database file
- `taxo.k2d`: Kraken2 taxo database file

</details>

The resulting `<db_name>/` directory can be given to Kraken2 itself with `kraken2 --db <your_database_name>` etc.

### MALT

[MALT](https://software-ab.cs.uni-tuebingen.de/download/malt) is a fast replacement for BLASTX, BLASTP and BLASTN, and provides both local and semi-global alignment capabilities.
Expand Down
18 changes: 17 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,24 @@ workflow NFCORE_CREATETAXDB {
//
// WORKFLOW: Run pipeline
//
ch_samplesheet = samplesheet
ch_taxonomy_namesdmp = file(params.namesdmp)
ch_taxonomy_nodesdmp = file(params.nodesdmp)
ch_accession2taxid = file(params.accession2taxid)
ch_nucl2taxid = file(params.nucl2taxid)
ch_prot2taxid = file(params.prot2taxid)
ch_malt_mapdb = file(params.malt_mapdb)


CREATETAXDB (
samplesheet
ch_samplesheet,
ch_taxonomy_namesdmp,
ch_taxonomy_nodesdmp,
ch_accession2taxid,
ch_nucl2taxid,
ch_prot2taxid,
ch_malt_mapdb,

)

emit:
Expand Down
20 changes: 20 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,26 @@
"git_sha": "b29f6beb86d1d24d680277fb1a3f4de7b8b8a92c",
"installed_by": ["modules"]
},
"gunzip": {
"branch": "master",
"git_sha": "3a5fef109d113b4997c9822198664ca5f2716208",
"installed_by": ["modules"]
},
"kaiju/mkfmi": {
"branch": "master",
"git_sha": "7365564c402cbd01e9407810730efd10039997a3",
"installed_by": ["modules"]
},
"kraken2/add": {
"branch": "master",
"git_sha": "ca87ad032a62f025f0c373facacef2df0c5411b2",
"installed_by": ["fasta_build_add_kraken2"]
},
"kraken2/build": {
"branch": "master",
"git_sha": "ca87ad032a62f025f0c373facacef2df0c5411b2",
"installed_by": ["fasta_build_add_kraken2"]
},
"malt/build": {
"branch": "master",
"git_sha": "7d3bac628092d1aead36960c4b6ae41302a9f797",
Expand All @@ -54,6 +69,11 @@
},
"subworkflows": {
"nf-core": {
"fasta_build_add_kraken2": {
"branch": "master",
"git_sha": "a4d1e13a2da05307deb65a87d501aa6520162dcd",
"installed_by": ["subworkflows"]
},
"utils_nextflow_pipeline": {
"branch": "master",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/gunzip/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions modules/nf-core/gunzip/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions modules/nf-core/gunzip/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions modules/nf-core/gunzip/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions modules/nf-core/gunzip/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions modules/nf-core/gunzip/tests/tags.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions modules/nf-core/kraken2/add/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions modules/nf-core/kraken2/add/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit db16f00

Please sign in to comment.