Skip to content

Commit

Permalink
Islandpath (#3145)
Browse files Browse the repository at this point in the history
* chore: Init module boilerplate

* feat: Build initial version of islandpath module

* test: Update islandpath test

* chore: Remove comment

* test: Add contains

* fix: Change identation

* Apply suggestions from code review

Co-authored-by: Louisa Perelo <[email protected]>

* Add islandpath to conda exclude in the CI

* Capitalize log in meta.yml

* [automated] Fix linting with Prettier

* lint: Fix doi

---------

Co-authored-by: Louisa Perelo <[email protected]>
Co-authored-by: nf-core-bot <[email protected]>
  • Loading branch information
3 people authored May 2, 2023
1 parent 38b1670 commit ca8da45
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pytest-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ jobs:
tags: subworkflows/bcl_demultiplex
- profile: "conda"
tags: subworkflows/vcf_annotate_ensemblvep

- profile: "conda"
tags: islandpath
env:
NXF_ANSI_LOG: false
SENTIEON_LICENSE_BASE64: ${{ secrets.SENTIEON_LICENSE_BASE64 }}
Expand Down
37 changes: 37 additions & 0 deletions modules/nf-core/islandpath/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
process ISLANDPATH {
tag "$meta.id"
label 'process_medium'

conda "bioconda::islandpath=1.0.6"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/islandpath:1.0.6--hdfd78af_0':
'quay.io/biocontainers/islandpath:1.0.6--hdfd78af_0' }"

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

output:
tuple val(meta), path("*.gff") , emit: gff
path "Dimob.log" , emit: log
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def VERSION = '1.0.6'
"""
islandpath \\
$genome \\
${prefix}.gff \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
islandpath: $VERSION
END_VERSIONS
"""
}
44 changes: 44 additions & 0 deletions modules/nf-core/islandpath/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: islandpath
description: Genomic island prediction in bacterial and archaeal genomes
keywords:
- genomes
- genomic islands
- prediction
tools:
- "islandpath":
description: "IslandPath-DIMOB is a standalone software to predict genomic islands (GIs - clusters of genes in prokaryotic genomes of probable horizontal origin) in bacterial and archaeal genomes based on the presence of dinucleotide biases and mobility genes."
homepage: https://github.com/brinkmanlab/islandpath
documentation: https://github.com/brinkmanlab/islandpath#readme
tool_dev_url: https://github.com/brinkmanlab/islandpath
doi: "10.1093/bioinformatics/bty095"
licence: "['GPL v3']"

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- genome:
type: file
description: |
Genome file in .gbk or .embl format.
pattern: "*.{gbk, embl, gbff}"
output:
- gff:
type: file
description: GFF file listing the predicted genomic islands and their coordinates
pattern: "*.gff"
- log:
type: file
description: Log file of the islandpath run
pattern: "*.log"

- versions:
type: file
description: File containing software versions
pattern: "versions.yml"

authors:
- "@jvfe"
4 changes: 4 additions & 0 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,10 @@ iqtree:
- modules/nf-core/iqtree/**
- tests/modules/nf-core/iqtree/**

islandpath:
- modules/nf-core/islandpath/**
- tests/modules/nf-core/islandpath/**

ismapper:
- modules/nf-core/ismapper/**
- tests/modules/nf-core/ismapper/**
Expand Down
18 changes: 18 additions & 0 deletions tests/modules/nf-core/islandpath/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env nextflow

nextflow.enable.dsl = 2

include { GUNZIP } from '../../../../modules/nf-core/gunzip/main.nf'
include { ISLANDPATH } from '../../../../modules/nf-core/islandpath/main.nf'

workflow test_islandpath {

input = [
[ id:'test' ], // meta map
file(params.test_data['bacteroides_fragilis']['genome']['genome_gbff_gz'], checkIfExists: true)
]

GUNZIP ( input )

ISLANDPATH ( GUNZIP.out.gunzip )
}
5 changes: 5 additions & 0 deletions tests/modules/nf-core/islandpath/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

}
11 changes: 11 additions & 0 deletions tests/modules/nf-core/islandpath/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- name: islandpath test_islandpath
command: nextflow run ./tests/modules/nf-core/islandpath -entry test_islandpath -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/islandpath/nextflow.config
tags:
- islandpath
files:
- path: output/islandpath/Dimob.log
contains:
- "Running IslandPath-DIMOB"
- path: output/islandpath/test.gff
md5sum: d4719f73e9af606346fade238aa191fa
- path: output/islandpath/versions.yml

0 comments on commit ca8da45

Please sign in to comment.