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

Add sccmec module #384

Merged
merged 5 commits into from
Jan 22, 2025
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
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added ska filepath to yaml
- Added optional read downsampling using seqtk
- Added `tbGradingRulesBed` to IGV track
- Added module NanoPlot to check quality of raw reads from ONT
- Added fastq as a process to `bacterial_base.nf`
- Added hostile as a process to `bacterial_base.nf`
- Added module `nanoplot` to check quality of raw reads from ONT
- Added module `fastq` to check qc of strep samples
- Added module `hostile` to remove human reads
- Added module `sccmec` for typing of SCCmec cassettes in assemblies of Staphylococcus species

### Fixed

Expand Down
4 changes: 4 additions & 0 deletions configs/nextflow.base.config
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ process {
container = "${params.containerDir}/bonsai-prp.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/analysis_metadata", mode: 'copy', overwrite: true ]
}
withName: sccmec {
container = "${params.containerDir}/sccmec.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/sccmec", mode: 'copy', overwrite: true ]
}
withName: seqtk_sample {
container = "${params.containerDir}/seqtk.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/seqtk_sample", mode: 'copy', overwrite: true ]
Expand Down
4 changes: 4 additions & 0 deletions configs/nextflow.ci.config
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ process {
container = "${params.containerDir}/bonsai-prp.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/analysis_metadata", mode: 'copy', overwrite: true ]
}
withName: sccmec {
container = "${params.containerDir}/sccmec.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/sccmec", mode: 'copy', overwrite: true ]
}
withName: seqtk_sample {
container = "${params.containerDir}/seqtk.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/seqtk_sample", mode: 'copy', overwrite: true ]
Expand Down
4 changes: 4 additions & 0 deletions configs/nextflow.dev.config
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ process {
container = "${params.containerDir}/bonsai-prp.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/analysis_metadata", mode: 'copy', overwrite: true ]
}
withName: sccmec {
container = "https://depot.galaxyproject.org/singularity/sccmec:1.2.0--hdfd78af_0"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/sccmec", mode: 'copy', overwrite: true ]
}
withName: seqtk_sample {
container = "https://depot.galaxyproject.org/singularity/seqtk:1.4--he4a0461_2"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/seqtk_sample", mode: 'copy', overwrite: true ]
Expand Down
4 changes: 4 additions & 0 deletions configs/nextflow.hopper.config
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ process {
container = "docker://clinicalgenomicslund/bonsai-prp:0.11.4"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/analysis_metadata", mode: 'copy', overwrite: true ]
}
withName: sccmec {
container = "https://depot.galaxyproject.org/singularity/sccmec:1.2.0--hdfd78af_0"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/sccmec", mode: 'copy', overwrite: true ]
}
withName: seqtk_sample {
container = "https://depot.galaxyproject.org/singularity/seqtk:1.4--he4a0461_2"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/seqtk_sample", mode: 'copy', overwrite: true ]
Expand Down
4 changes: 4 additions & 0 deletions configs/nextflow.ngp.config
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ process {
container = "${params.containerDir}/bonsai-prp.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/analysis_metadata", mode: 'copy', overwrite: true ]
}
withName: sccmec {
container = "${params.containerDir}/sccmec.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/sccmec", mode: 'copy', overwrite: true ]
}
withName: seqtk_sample {
container = "${params.containerDir}/seqtk.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/seqtk_sample", mode: 'copy', overwrite: true ]
Expand Down
2 changes: 2 additions & 0 deletions container/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ remote_containers := ncbi-amrfinderplus.sif \
quast.sif \
resfinder.sif \
samtools.sif \
sccmec.sif \
seqtk.sif \
serotypefinder.sif \
shigapass.sif \
Expand Down Expand Up @@ -69,6 +70,7 @@ URL_perl-json := https://depot.galaxyproject.org/singularity/perl-json:4.10--pl5
URL_quast := https://depot.galaxyproject.org/singularity/quast:5.2.0--py310pl5321hc8f18ef_2
URL_resfinder := https://depot.galaxyproject.org/singularity/resfinder:4.4.2--pyhdfd78af_1
URL_samtools := https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0
URL_sccmec := https://depot.galaxyproject.org/singularity/sccmec:1.2.0--hdfd78af_0
URL_seqtk := https://depot.galaxyproject.org/singularity/seqtk:1.4--he4a0461_2
URL_serotypefinder := https://depot.galaxyproject.org/singularity/serotypefinder:2.0.2--py312hdfd78af_1
URL_shigapass := https://depot.galaxyproject.org/singularity/shigapass:1.5.0--hdfd78af_0
Expand Down
40 changes: 40 additions & 0 deletions nextflow-modules/modules/sccmec/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
process sccmec {
tag "${sample_id}"
scratch params.scratch

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

output:
tuple val(sample_id), path(output), emit: tsv
path "*versions.yml" , emit: versions

script:
def args = task.ext.args ?: ''
output = "${sample_id}_sccmec.tsv"
outputDir = "sccmec_outdir"
"""
sccmec --input ${assembly} --prefix ${sample_id}_sccmec -o ${outputDir} ${args}
cp ${outputDir}/${sample_id}_sccmec.tsv ${output}

cat <<-END_VERSIONS > ${sample_id}_${task.process}_versions.yml
${task.process}:
sccmec:
version: \$(echo \$(sccmec --version 2>&1) | sed -n 's/.*sccmec_targets, version //p')
container: ${task.container}
END_VERSIONS
"""

stub:
output = "${sample_id}_sccmec.tsv"
"""
touch ${output}

cat <<-END_VERSIONS > ${sample_id}_${task.process}_versions.yml
${task.process}:
sccmec:
version: \$(echo \$(sccmec --version 2>&1) | sed -n 's/.*sccmec_targets, version //p')
container: ${task.container}
END_VERSIONS
"""
}
3 changes: 3 additions & 0 deletions workflows/staphylococcus_aureus.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include { mask_polymorph_assembly } from '../nextflow-modules/
include { mlst } from '../nextflow-modules/modules/mlst/main.nf'
include { resfinder } from '../nextflow-modules/modules/resfinder/main.nf'
include { samtools_index as samtools_index_assembly } from '../nextflow-modules/modules/samtools/main.nf'
include { sccmec } from '../nextflow-modules/modules/sccmec/main.nf'
include { virulencefinder } from '../nextflow-modules/modules/virulencefinder/main.nf'
include { CALL_BACTERIAL_BASE } from '../workflows/bacterial_base.nf'

Expand Down Expand Up @@ -90,6 +91,7 @@ workflow CALL_STAPHYLOCOCCUS_AUREUS {

// TYPING
mlst(ch_assembly, params.mlstScheme, pubMlstDb, mlstBlastDb)
sccmec(ch_assembly)

mask_polymorph_assembly.out.fasta
.multiMap { sampleID, filePath ->
Expand Down Expand Up @@ -167,6 +169,7 @@ workflow CALL_STAPHYLOCOCCUS_AUREUS {
ch_versions = ch_versions.mix(mlst.out.versions)
ch_versions = ch_versions.mix(resfinder.out.versions)
ch_versions = ch_versions.mix(samtools_index_assembly.out.versions)
ch_versions = ch_versions.mix(sccmec.out.versions)
ch_versions = ch_versions.mix(virulencefinder.out.versions)

emit:
Expand Down
Loading