Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add kraken2 taxonomy option #29

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ results/
testing/
testing*
*.pyc
test_data/kraken_viral_db/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool
### Taxonomic classification

- Sequence classification ([`Kaiju`](https://github.com/bioinformatics-centre/kaiju/))
- (**WIP**) Sequence classification ([`Kraken2`](https://github.com/DerrickWood/kraken2))
- Sequence classification ([`Kraken2`](https://github.com/DerrickWood/kraken2))
- Visualization ([`Krona`](https://github.com/marbl/Krona/wiki))

### Functional annotation
Expand Down
8 changes: 8 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ process {
]
}

withName: KRAKEN2_KRAKEN2 {
publishDir = [
path: { "${params.outdir}/taxonomy/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: KRONA_KTIMPORTTEXT {
publishDir = [
path: { "${params.outdir}/taxonomy/${meta.id}" },
Expand Down
23 changes: 11 additions & 12 deletions docs/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,36 @@ Choose to skip pipeline steps

| Parameter | Description | Type | Default | Required | Hidden |
|-----------|-----------|-----------|-----------|-----------|-----------|
| `host_fasta` | | `string` | None | | |
| `host_fasta` | Host FASTA to use for decontamination | `string` | | | |
| `bowtie2_db` | Pre-built bowtie2 index. Directory where index is located. | `string` | | | |

## Alignment



| Parameter | Description | Type | Default | Required | Hidden |
|-----------|-----------|-----------|-----------|-----------|-----------|
| `reference_fasta` | Path to FASTA genome file. | `string` | None | | |
| `diamond_db` | Path to pre-built DIAMOND db. | `string` | None | | |
| `reference_fasta` | Path to FASTA genome file. | `string` | | | |
| `diamond_db` | Path to pre-built DIAMOND db. | `string` | | | |

## Taxonomy



| Parameter | Description | Type | Default | Required | Hidden |
|-----------|-----------|-----------|-----------|-----------|-----------|
| `kaiju_db` | | `string` | None | True | |
| `kaiju_db` | Kaiju database | `string` | | True | |
| `kraken2_db` | Kraken2 database | `string` | | | |
| `run_kaiju` | Run Kaiju classifier | `boolean` | True | | |
| `run_kraken2` | Run Kraken2 classifier | `boolean` | | | |

## Functional



| Parameter | Description | Type | Default | Required | Hidden |
|-----------|-----------|-----------|-----------|-----------|-----------|
| `id_mapping` | Path to ID mapping file to be used for the Functional annotation | `string` | None | True | |
| `id_mapping` | Path to ID mapping file to be used for the Functional annotation | `string` | | True | |
| `minimum_bitscore` | Minimum bitscore of a match to be used for annotation | `integer` | 50 | | |
| `minimum_pident` | Minimum identity of a match to be used for annotation | `integer` | 80 | | |
| `minimum_alen` | Minimum alignment length of a match to be used for annotation | `integer` | 50 | | |
Expand All @@ -78,7 +82,7 @@ Reference genome related files and options required for the workflow.
| `genome` | Name of iGenomes reference. <details><summary>Help</summary><small>If using a reference genome configured in the pipeline using iGenomes, use this parameter to give the ID for the reference. This is then used to build the full paths for all required reference genome files e.g. `--genome GRCh38`. <br><br>See the [nf-core website docs](https://nf-co.re/usage/reference_genomes) for more details.</small></details>| `string` | | | |
| `igenomes_base` | Directory / URL base for iGenomes references. | `string` | s3://ngi-igenomes/igenomes | | True |
| `igenomes_ignore` | Do not load the iGenomes reference config. <details><summary>Help</summary><small>Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config`.</small></details>| `boolean` | | | True |
| `fasta` | | `string` | None | | |
| `fasta` | | `string` | | | |

## Max job request options

Expand Down Expand Up @@ -110,9 +114,4 @@ Less common options for the pipeline, typically set in a config file.
| `tracedir` | Directory to keep pipeline Nextflow logs and reports. | `string` | ${params.outdir}/pipeline_info | | True |
| `validate_params` | Boolean whether to validate parameters against the schema at runtime | `boolean` | True | | True |
| `show_hidden_params` | Show all params when using `--help` <details><summary>Help</summary><small>By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters.</small></details>| `boolean` | | | True |

## Other parameters

| Parameter | Description | Type | Default | Required | Hidden |
|-----------|-----------|-----------|-----------|-----------|-----------|
| `schema_ignore_params` | | `string` | genomes | | |
| `schema_ignore_params` | | `string` | genomes | | True |
12 changes: 12 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@
"installed_by": ["modules"],
"patch": "modules/nf-core/kaiju/kaiju2table/kaiju-kaiju2table.diff"
},
"kraken2/kraken2": {
"branch": "master",
"git_sha": "8fc1d24c710ebe1d5de0f2447ec9439fd3d9d66a",
"installed_by": ["modules"],
"patch": "modules/nf-core/kraken2/kraken2/kraken2-kraken2.diff"
},
"krakentools/kreport2krona": {
"branch": "master",
"git_sha": "8fc1d24c710ebe1d5de0f2447ec9439fd3d9d66a",
"installed_by": ["modules"],
"patch": "modules/nf-core/krakentools/kreport2krona/krakentools-kreport2krona.diff"
},
"krona/ktimporttext": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/kraken2/kraken2/environment.yml

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

14 changes: 14 additions & 0 deletions modules/nf-core/kraken2/kraken2/kraken2-kraken2.diff

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

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

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

78 changes: 78 additions & 0 deletions modules/nf-core/kraken2/kraken2/meta.yml

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

6 changes: 6 additions & 0 deletions modules/nf-core/krakentools/kreport2krona/environment.yml

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

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/krakentools/kreport2krona/main.nf

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

40 changes: 40 additions & 0 deletions modules/nf-core/krakentools/kreport2krona/meta.yml

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

5 changes: 5 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ params {

// References
kaiju_db = null
kraken2_db = null
diamond_db = null
reference_fasta = null
genome = null
Expand All @@ -30,6 +31,10 @@ params {
host_fasta = null
bowtie2_db = null

// Taxonomy
run_kaiju = true
run_kraken2 = false

// Functional
id_mapping = null
minimum_bitscore = 50
Expand Down
Loading
Loading