Skip to content

Commit

Permalink
Merge branch 'master' into nanofilt
Browse files Browse the repository at this point in the history
  • Loading branch information
lfreitasl committed Mar 20, 2024
2 parents a524961 + 7b29d1b commit ca169b6
Show file tree
Hide file tree
Showing 299 changed files with 8,723 additions and 1,628 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ jobs:
profile: [conda, docker, singularity]
exclude:
- tags: nf-test
- profile: conda
tags: angsd/gl
- profile: conda
tags: annotsv
- profile: conda
Expand Down Expand Up @@ -559,6 +561,8 @@ jobs:
tags: merquryfk/merquryfk
- profile: conda
tags: merquryfk/ploidyplot
- profile: conda
tags: molkartgarage/clahe
- profile: conda
tags: quartonotebook
- profile: conda
Expand All @@ -583,6 +587,8 @@ jobs:
tags: subworkflows/vcf_annotate_ensemblvep
- profile: singularity
tags: bases2fastq
- profile: conda
tags: wittyer
env:
NXF_ANSI_LOG: false
SENTIEON_LICENSE_BASE64: ${{ secrets.SENTIEON_LICENSE_BASE64 }}
Expand Down
10 changes: 10 additions & 0 deletions modules/nf-core/ale/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
name: "ale"
channels:
- conda-forge
- bioconda
- defaults
- tanghaibao
dependencies:
- "bioconda::ale=20180904"
50 changes: 50 additions & 0 deletions modules/nf-core/ale/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
process ALE {
tag "$meta.id"
label 'process_single'

// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ale:20180904--py27ha92aebf_0':
'biocontainers/ale:20180904--py27ha92aebf_0' }"

input:
tuple val(meta), path(asm), path(bam)

output:
tuple val(meta), path("*_ALEoutput.txt"), emit: ale
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}"
def VERSION = '20180904' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
ALE \\
$args \\
$bam \\
$asm \\
${prefix}_ALEoutput.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
ale: $VERSION
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '20180904' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
touch ${prefix}_ALEoutput.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
ale: $VERSION
END_VERSIONS
"""
}
51 changes: 51 additions & 0 deletions modules/nf-core/ale/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: "ale"
description: "ALE: assembly likelihood estimator."
keywords:
- reference-independent
- assembly
- evaluation
tools:
- "ale":
description: "ALE is a generic assembly likelihood evaluation framework for assessing the accuracy of genome and metagenome assemblies."
documentation: "https://portal.nersc.gov/dna/RD/Adv-Seq/ALE-doc/index.html#document-install"
tool_dev_url: "https://github.com/sc932/ALE"
doi: "10.1093/bioinformatics/bts723"
licence: ["NCSA"]

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- asm:
type: file
description: Assembly in FASTA format
pattern: "*.{fasta,fa}"

- bam:
type: file
description: BAM file containing sorted read mappings
pattern: "*.{bam}"

output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- ale:
type: file
description: Output TXT file containing ALE results
pattern: "*_ALEoutput.{txt}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"

authors:
- "@rodtheo"
maintainers:
- "@rodtheo"
108 changes: 108 additions & 0 deletions modules/nf-core/ale/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// nf-core modules test ale
nextflow_process {

name "Test Process ALE"
script "../main.nf"
process "ALE"

tag "modules"
tag "modules_nfcore"
tag "ale"

test("sarscov2 [fasta] - paired-end sorted bam") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert path(process.out.ale[0][1]).readLines().first().contains("ALE_score") }
)
}

}

test("sarscov2 [fasta_gz] - paired-end sorted bam") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['genome']['genome_fasta_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert path(process.out.ale[0][1]).readLines().first().contains("ALE_score") }
)
}

}

test("sarscov2 [fasta] - single-end sorted bam") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ], // meta map
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert path(process.out.ale[0][1]).readLines().first().contains("ALE_score") }
)
}

}

test("sarscov2 [fasta_gz] - single-end sorted bam") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ], // meta map
file(params.test_data['sarscov2']['genome']['genome_fasta_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert path(process.out.ale[0][1]).readLines().first().contains("ALE_score") }
)
}

}

}
142 changes: 142 additions & 0 deletions modules/nf-core/ale/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/ale/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ale:
- "modules/nf-core/ale/**"
Loading

0 comments on commit ca169b6

Please sign in to comment.