Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mattheww95 authored Oct 23, 2023
2 parents b5b3064 + 1fd326f commit 2038b8d
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 131 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Mikrokondo is a tidy workflow for performing routine bioinformatic tasks like, read pre-processing, assessing contamination, assembly and quality assessment of assemblies. It is easily configurable, provides dynamic dispatch of species specific workflows and produces common outputs.

## Is mikrokondo right for me?
Mikrokondo takes in either, Illumina, Nanopore or Pacbio data (Pacbio data only partially tested). You can also use mikrokondo for hybrid assemblies or even pass it pre-assembled assembled genomes. Additionally, mikrokondo required minimal upfront knowledge of your sample.
Mikrokondo takes in either, Illumina, Nanopore or Pacbio data (Pacbio data only partially tested). You can also use mikrokondo for hybrid assemblies or even pass it pre-assembled genomes to handle annotation for you. Additionally, mikrokondo required minimal upfront knowledge of your sample.

# Installation

Expand Down Expand Up @@ -51,8 +51,8 @@ Under the usage section you can find example commands, instructions for configur
- [GTDB Mash Sketch](https://zenodo.org/record/8408361): required for speciation and determination if sample is metagenomic
- [Decontamination Index](https://zenodo.org/record/8408557): Required for decontamination of reads (it is simply a minimap2 index)
- [Kraken2 nt database](https://benlangmead.github.io/aws-indexes/k2): Required for binning of metagenommic data and is an alternative to using Mash for speciation
- [Bakta database](https://zenodo.org/record/7669534): Running Bakta is optional and there is a light database option, however the full one is recommended. You will have to unzip and un-tar the database for usage.
- [StarAMR database](https://github.com/phac-nml/staramr#database-build): Running StarAMR is optional and requires downloading the StarAMR databases. Also if you wish to avoid downloading the database, the container for StarAMR has a database included which mikrokondo will default to using if one is not specified.
- [Bakta database](https://zenodo.org/record/7669534): Running Bakta is optional and there is a light database option, however the full one is recommended. You will have to unzip and un-tar the database for usage. You can skip running Bakta however making the requirement of downloading this database **optional**.
- [StarAMR database](https://github.com/phac-nml/staramr#database-build): Running StarAMR is optional and requires downloading the StarAMR databases. Also if you wish to avoid downloading the database, the container for StarAMR has a database included which mikrokondo will default to using if one is not specified making this requirement **optional**.

### Fields to update with resources
The above downloadable resources must be updated in the following places in your `nextflow.config`. The spots to update in the params section of the `nextflow.config` are listed below:
Expand Down Expand Up @@ -108,6 +108,7 @@ Three test profile with example data are provided and can be run like so:

- Swap Seqtk with Rasusa for down sampling
- Integrate nf-validate
- Trim pilon prefix added to contigs by pilon

## Citations

Expand Down
4 changes: 2 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@ process {

}

withName: ABRICATE_RUN {
withName: ABRICATE {
errorStrategy = 'ignore'

ext.containers = params.abricate
stageInMode = params.stage_in_mode
publishDir = [
[
Expand Down
4 changes: 3 additions & 1 deletion docs/usage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ If as an example if, the `--quast.min_contig_lenth` parameter would be written a
Note: Parameters that are bolded are ones that can be freely changed. Sensible defaults are provided however

### Abricate
Screens contigs for antimicrobial and virulence genes.
Screens contigs for antimicrobial and virulence genes. If you wish to use a different Abricate database you may need to update the container you use.

- abricate
- singularity: Abricate singularity container
- docker: Abricate docker container
- **args**: Can be a string of additional command line arguments to pass to abricate
- report_tag: This field determines the name of the Abricate output in the final summary file. Do no touch this unless doing pipeline development.
- header_p: This field tells the report module that the Abricate output contains headers. Do no touch this unless doing pipeline development.
Expand Down
5 changes: 0 additions & 5 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
"https://github.com/nf-core/modules.git": {
"modules": {
"nf-core": {
"abricate/run": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"custom/dumpsoftwareversions": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
Expand Down
27 changes: 27 additions & 0 deletions modules/local/abricate.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/// Abricate module


process ABRICATE {
tag "$meta.id"
label 'process_medium'
container "${workflow.containerEngine == 'singularity' || workflow.containerEngine == 'apptainer' ? task.ext.containers.get('singularity') : task.ext.containers.get('docker')}"


input:
tuple val(meta), path(assembly)

output:
tuple val(meta), path("*.txt"), emit: report
path "versions.yml", emit: versions

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
abricate $assembly $args --threads $task.cpus > ${prefix}.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
abricate: \$(echo \$(abricate --version 2>&1) | sed 's/^.*abricate //' )
END_VERSIONS
"""
}
34 changes: 0 additions & 34 deletions modules/nf-core/abricate/run/main.nf

This file was deleted.

43 changes: 0 additions & 43 deletions modules/nf-core/abricate/run/meta.yml

This file was deleted.

4 changes: 3 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ params {
max_cpus = 16
max_time = '240.h'

abricate_params {
abricate {
singularity = "https://depot.galaxyproject.org/singularity/abricate%3A1.0.1--ha8f3691_1"
docker = "quay.io/biocontainers/abricate:1.0.1--ha8f3691_1"
args = ""
report_tag = "Abricate"
header_p = true
Expand Down
71 changes: 32 additions & 39 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1414,20 +1414,6 @@
"type": "integer",
"default": 100
},
"abricate_params.args": {
"type": "string",
"hidden": true
},
"abricate_params.report_tag": {
"type": "string",
"default": "Abricate",
"hidden": true
},
"abricate_params.header_p": {
"type": "boolean",
"default": true,
"hidden": true
},
"raw_reads.high_precision": {
"type": "boolean",
"hidden": true
Expand Down Expand Up @@ -1731,26 +1717,6 @@
"default": true,
"hidden": true
},
"shigatyper.docker": {
"type": "string",
"default": "quay.io/biocontainers/shigatyper:2.0.1--pyhdfd78af_0",
"hidden": true
},
"shigatyper.tsv_ext": {
"type": "string",
"default": ".tsv",
"hidden": true
},
"shigatyper.report_tag": {
"type": "string",
"default": "Subtyping",
"hidden": true
},
"shigatyper.header_p": {
"type": "boolean",
"default": true,
"hidden": true
},
"kraken_bin.fasta_ext": {
"type": "string",
"default": "_binned.fasta.gz",
Expand Down Expand Up @@ -2569,11 +2535,6 @@
"default": "https://depot.galaxyproject.org/singularity/shigeifinder:1.3.2--pyhdfd78af_0",
"hidden": true
},
"shigatyper.singularity": {
"type": "string",
"default": "https://depot.galaxyproject.org/singularity/shigatyper%3A2.0.1--pyhdfd78af_0",
"hidden": true
},
"flye_read_type": {
"type": "string",
"default": "hq",
Expand All @@ -2597,6 +2558,38 @@
"type": "string",
"default": "docker://python/python:3.10.4-alpine3.16",
"hidden": true
},
"abricate.singularity": {
"type": "string",
"default": "https://depot.galaxyproject.org/singularity/abricate%3A1.0.1--ha8f3691_1",
"hidden": true
},
"abricate.docker": {
"type": "string",
"default": "quay.io/biocontainers/abricate:1.0.1--ha8f3691_1",
"hidden": true
},
"abricate.args": {
"type": "string",
"hidden": true
},
"abricate.report_tag": {
"type": "string",
"default": "Abricate",
"hidden": true
},
"abricate.header_p": {
"type": "string",
"default": "true",
"hidden": true
},
"shigeifinder.container_version": {
"type": "string",
"default": "1.3.2"
},
"shigeifinder.report_tag": {
"type": "string",
"default": "ShigeifinderSubtyping"
}
}
}
6 changes: 3 additions & 3 deletions subworkflows/local/annotate_genomes.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// annotate genomes
include { BAKTA_ANNOTATE } from '../../modules/local/bakta_annotate.nf'
include { ABRICATE_RUN } from "../../modules/nf-core/abricate/run/main.nf"
include { ABRICATE } from "../../modules/local/abricate.nf"
include { MOBSUITE_RECON } from "../../modules/local/mob_recon.nf"
include { STARAMR } from "../../modules/local/staramr.nf"
include { STARAMR_DUMP_DB_VERSIONS } from "../../modules/local/staramr_version.nf"
Expand Down Expand Up @@ -46,11 +46,11 @@ workflow ANNOTATE_GENOMES {
}

if(!params.skip_abricate){
abricated = ABRICATE_RUN(contig_data)
abricated = ABRICATE(contig_data)
abricate_report = abricated.report
versions = versions.mix(abricated.versions)
reports = reports.mix(abricated.report.map{
meta, report -> tuple(meta, params.abricate_params, report);
meta, report -> tuple(meta, params.abricate, report);
})
}

Expand Down

0 comments on commit 2038b8d

Please sign in to comment.