Skip to content
Open
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
21 changes: 4 additions & 17 deletions modules/nf-core/bamclipper/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,29 @@ process BAMCLIPPER {
input:
tuple val(meta), path(bam), path(bai), path(bedpe)

output:
output:
tuple val(meta), path("*.primerclipped.bam") , emit: bam
tuple val(meta), path("*.primerclipped.bam.bai"), emit: bai
path "versions.yml" , emit: versions

tuple val("${task.process}"), val('bamclipper'), val("1.0.0"), emit: versions_bamclipper, topic: versions
tuple val("${task.process}"), val('samtools'), eval("samtools --version |& sed '1!d ; s/samtools //'"), emit: versions_samtools, topic: versions
// WARN: Version information not provided by tool on CLI
when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def VERSION = '1.0.0' // WARN: Version information not provided by tool on CLI
"""
bamclipper.sh \\
-b ${bam} \\
-p ${bedpe} \\
-n $task.cpus \\
${args}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
bamclipper: $VERSION
samtools: \$( samtools --version |& sed '1!d ; s/samtools //' )
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '1.0.0'
"""
touch ${prefix}.primerclipped.bam
touch ${prefix}.primerclipped.bam.bai

cat <<-END_VERSIONS > versions.yml
"${task.process}":
bamclipper: $VERSION
samtools: \$( samtools --version |& sed '1!d ; s/samtools //' )
END_VERSIONS
"""
}
62 changes: 47 additions & 15 deletions modules/nf-core/bamclipper/meta.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: "bamclipper"

description: This module is used to clip primer sequences from your alignments.
keywords:
- primer
Expand All @@ -8,15 +7,14 @@ keywords:
- bam
tools:
- "bamclipper":
description: "BAMClipper: removing primers from alignments to minimize false-negative
mutations in amplicon next-generation sequencing"
description: "BAMClipper: removing primers from alignments to minimize false-negative mutations in amplicon next-generation sequencing"
homepage: "https://github.com/tommyau/bamclipper"
documentation: "https://github.com/tommyau/bamclipper"
tool_dev_url: "https://github.com/tommyau/bamclipper"
doi: "10.1038/s41598-017-01703-6"
licence: ["MIT"]
license:
- "MIT"
identifier: ""

input:
- - meta:
type: map
Expand Down Expand Up @@ -45,8 +43,7 @@ output:
Groovy Map containing sample information `[ id:'sample1']`
- "*.primerclipped.bam":
type: file
description: Sorted BAM file containing clipped query sequences according
to the given primer pair locations
description: Sorted BAM file containing clipped query sequences according to the given primer pair locations
pattern: "*.primerclipped.bam"
ontologies: []
bai:
Expand All @@ -56,17 +53,52 @@ output:
Groovy Map containing sample information `[ id:'sample1']`
- "*.primerclipped.bam.bai":
type: file
description: "BAI index of the output BAM file"
description: BAI index of the output BAM file
pattern: "*.primerclipped.bam.bai"
ontologies: []
versions_bamclipper:
- - "${task.process}":
type: string
description: The name of the process
- "bamclipper":
type: string
description: The name of the tool
- "1.0.0":
type: string
description: The hardcoded version of the tool
versions_samtools:
- - "${task.process}":
type: string
description: The name of the process
- "samtools":
type: string
description: The name of the tool
- "samtools --version |& sed '1!d ; s/samtools //'":
type: eval
description: The expression to obtain the version of the tool

topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - "${task.process}":
type: string
description: The name of the process
- "bamclipper":
type: string
description: The name of the tool
- "1.0.0":
type: string
description: The hardcoded version of the tool
- - "${task.process}":
type: string
description: The name of the process
- "samtools":
type: string
description: The name of the tool
- "samtools --version |& sed '1!d ; s/samtools //'":
type: eval
description: The expression to obtain the version of the tool

authors:
- "@krannich479"
maintainers:
- "@krannich479"
- "@krannich479"
84 changes: 41 additions & 43 deletions modules/nf-core/bamclipper/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,27 @@
"SarsCov2 - [BAM, BEDPE] - stub": {
"content": [
{
"0": [
"versions_bamclipper": [
[
{
"id": "MT192765.1"
},
"MT192765.1.primerclipped.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
[
{
"id": "MT192765.1"
},
"MT192765.1.primerclipped.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e"
"BAMCLIPPER",
"bamclipper",
"1.0.0"
]
],
"2": [
"versions.yml:md5,3f9ffa9e0acba7ec9e95087508b2fc29"
],
"bai": [
"versions_samtools": [
[
{
"id": "MT192765.1"
},
"MT192765.1.primerclipped.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e"
"BAMCLIPPER",
"samtools",
"samtools 1.12\nUsing htslib 1.12\nCopyright (C) 2021 Genome Research Ltd.\n\nSamtools compilation details:\n Features: build=configure curses=yes \n CC: /opt/conda/conda-bld/samtools_1616004847436/_build_env/bin/x86_64-conda-linux-gnu-cc\n CPPFLAGS: -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /usr/local/include\n CFLAGS: -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/include -fdebug-prefix-map=/opt/conda/conda-bld/samtools_1616004847436/work=/usr/local/src/conda/samtools-1.12 -fdebug-prefix-map=/usr/local=/usr/local/src/conda-prefix\n LDFLAGS: -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -L/usr/local/lib\n HTSDIR: \n LIBS: \n CURSES_LIB: -ltinfow -lncursesw\n\nHTSlib compilation details:\n Features: build=configure plugins=yes, plugin-path=/usr/local/libexec/htslib libcurl=yes S3=yes GCS=yes libdeflate=yes lzma=yes bzip2=yes htscodecs=1.0\n CC: /opt/conda/conda-bld/htslib_1615999655191/_build_env/bin/x86_64-conda-linux-gnu-cc\n CPPFLAGS: -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /usr/local/include\n CFLAGS: -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/include -fdebug-prefix-map=/opt/conda/conda-bld/htslib_1615999655191/work=/usr/local/src/conda/htslib-1.12 -fdebug-prefix-map=/usr/local=/usr/local/src/conda-prefix -fvisibility=hidden\n LDFLAGS: -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -L/usr/local/lib -fvisibility=hidden -rdynamic\n\nHTSlib URL scheme handlers present:\n built-in:\t preload, data, file\n S3 Multipart Upload:\t s3w, s3w+https, s3w+http\n libcurl:\t imaps, pop3, gophers, http, smb, gopher, sftp, ftps, imap, smtp, smtps, rtsp, scp, ftp, telnet, mqtt, https, smbs, tftp, pop3s, dict\n Google Cloud Storage:\t gs+http, gs+https, gs\n Amazon S3:\t s3+https, s3+http, s3\n crypt4gh-needed:\t crypt4gh\n mem:\t mem"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only want to capture 1.12 here.
This is such an old version of samtools, that maybe you'll need a different command?

]
],
"bam": [
[
{
"id": "MT192765.1"
},
"MT192765.1.primerclipped.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,3f9ffa9e0acba7ec9e95087508b2fc29"
]
}
],
"timestamp": "2026-03-13T11:47:57.492891",
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-03-20T17:07:35.685662094"
"nf-test": "0.9.4",
"nextflow": "25.10.4"
}
},
"SarsCov2 - [BAM, BEDPE]": {
"content": [
Expand All @@ -68,7 +44,18 @@
]
],
"2": [
"versions.yml:md5,3f9ffa9e0acba7ec9e95087508b2fc29"
[
"BAMCLIPPER",
"bamclipper",
"1.0.0"
]
],
"3": [
[
"BAMCLIPPER",
"samtools",
"samtools 1.12\nUsing htslib 1.12\nCopyright (C) 2021 Genome Research Ltd.\n\nSamtools compilation details:\n Features: build=configure curses=yes \n CC: /opt/conda/conda-bld/samtools_1616004847436/_build_env/bin/x86_64-conda-linux-gnu-cc\n CPPFLAGS: -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /usr/local/include\n CFLAGS: -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/include -fdebug-prefix-map=/opt/conda/conda-bld/samtools_1616004847436/work=/usr/local/src/conda/samtools-1.12 -fdebug-prefix-map=/usr/local=/usr/local/src/conda-prefix\n LDFLAGS: -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -L/usr/local/lib\n HTSDIR: \n LIBS: \n CURSES_LIB: -ltinfow -lncursesw\n\nHTSlib compilation details:\n Features: build=configure plugins=yes, plugin-path=/usr/local/libexec/htslib libcurl=yes S3=yes GCS=yes libdeflate=yes lzma=yes bzip2=yes htscodecs=1.0\n CC: /opt/conda/conda-bld/htslib_1615999655191/_build_env/bin/x86_64-conda-linux-gnu-cc\n CPPFLAGS: -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /usr/local/include\n CFLAGS: -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/include -fdebug-prefix-map=/opt/conda/conda-bld/htslib_1615999655191/work=/usr/local/src/conda/htslib-1.12 -fdebug-prefix-map=/usr/local=/usr/local/src/conda-prefix -fvisibility=hidden\n LDFLAGS: -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -L/usr/local/lib -fvisibility=hidden -rdynamic\n\nHTSlib URL scheme handlers present:\n built-in:\t preload, data, file\n S3 Multipart Upload:\t s3w, s3w+https, s3w+http\n libcurl:\t imaps, pop3, gophers, http, smb, gopher, sftp, ftps, imap, smtp, smtps, rtsp, scp, ftp, telnet, mqtt, https, smbs, tftp, pop3s, dict\n Google Cloud Storage:\t gs+http, gs+https, gs\n Amazon S3:\t s3+https, s3+http, s3\n crypt4gh-needed:\t crypt4gh\n mem:\t mem"
]
],
"bai": [
[
Expand All @@ -86,15 +73,26 @@
"test.paired_end.sorted.primerclipped.bam:md5,a56516da81ff46243f6154eaf6a0af35"
]
],
"versions": [
"versions.yml:md5,3f9ffa9e0acba7ec9e95087508b2fc29"
"versions_bamclipper": [
[
"BAMCLIPPER",
"bamclipper",
"1.0.0"
]
],
"versions_samtools": [
[
"BAMCLIPPER",
"samtools",
"samtools 1.12\nUsing htslib 1.12\nCopyright (C) 2021 Genome Research Ltd.\n\nSamtools compilation details:\n Features: build=configure curses=yes \n CC: /opt/conda/conda-bld/samtools_1616004847436/_build_env/bin/x86_64-conda-linux-gnu-cc\n CPPFLAGS: -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /usr/local/include\n CFLAGS: -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/include -fdebug-prefix-map=/opt/conda/conda-bld/samtools_1616004847436/work=/usr/local/src/conda/samtools-1.12 -fdebug-prefix-map=/usr/local=/usr/local/src/conda-prefix\n LDFLAGS: -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -L/usr/local/lib\n HTSDIR: \n LIBS: \n CURSES_LIB: -ltinfow -lncursesw\n\nHTSlib compilation details:\n Features: build=configure plugins=yes, plugin-path=/usr/local/libexec/htslib libcurl=yes S3=yes GCS=yes libdeflate=yes lzma=yes bzip2=yes htscodecs=1.0\n CC: /opt/conda/conda-bld/htslib_1615999655191/_build_env/bin/x86_64-conda-linux-gnu-cc\n CPPFLAGS: -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /usr/local/include\n CFLAGS: -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/include -fdebug-prefix-map=/opt/conda/conda-bld/htslib_1615999655191/work=/usr/local/src/conda/htslib-1.12 -fdebug-prefix-map=/usr/local=/usr/local/src/conda-prefix -fvisibility=hidden\n LDFLAGS: -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -L/usr/local/lib -fvisibility=hidden -rdynamic\n\nHTSlib URL scheme handlers present:\n built-in:\t preload, data, file\n S3 Multipart Upload:\t s3w, s3w+https, s3w+http\n libcurl:\t imaps, pop3, gophers, http, smb, gopher, sftp, ftps, imap, smtp, smtps, rtsp, scp, ftp, telnet, mqtt, https, smbs, tftp, pop3s, dict\n Google Cloud Storage:\t gs+http, gs+https, gs\n Amazon S3:\t s3+https, s3+http, s3\n crypt4gh-needed:\t crypt4gh\n mem:\t mem"
]
]
}
],
"timestamp": "2026-03-13T11:47:53.516774",
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-03-20T17:06:37.486491271"
"nf-test": "0.9.4",
"nextflow": "25.10.4"
}
}
}
Loading