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

merfin_hist module added #5300

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
951032f
merfin_hist module added
rodtheo Mar 20, 2024
383a1fa
Add module seqfu/stats (#5275)
telatin Mar 20, 2024
c2342b4
nf-test bases2fastq (#5272)
kobelavaerts Mar 20, 2024
f42872b
update paths for VEP (#5281)
maxulysse Mar 20, 2024
653218e
4557 new module kaijumergeoutputs + stub Kraken2/Kraken2 (#5249)
Joon-Klaps Mar 20, 2024
89cf292
gatk4_asereadcounter add updated meta and nf-tests (#5164)
Lucpen Mar 20, 2024
60a7dba
Add README to modules build with Docker (#4935)
maxulysse Mar 20, 2024
3afb95b
add cram/index support to bwamem2 (#5248)
matthdsm Mar 20, 2024
8487a44
Bamstats (#4474)
johnoooh Mar 20, 2024
61f2ea5
Add wittyer as module (#5171)
famosab Mar 20, 2024
dcf17cc
Remove unnecessary .view() in subworkflows/nf-core/vcf_phase_shapeit5…
dimple-aspiring-cat Mar 20, 2024
0c39191
Igv reports (#5263)
soulj Mar 20, 2024
53c2b46
Revert "update kallistobustools count output list" (#5307)
fmalmeida Mar 20, 2024
1774f78
Revert "add paths in output directive in cellranger cout module" (#5306)
fmalmeida Mar 20, 2024
9d0f89b
Remove AMRFinderPlus DB update on each invocation (#5232)
oschwengers Mar 20, 2024
9f892b5
Add subworkflow mapAD (#5239)
jch-13 Mar 20, 2024
6920a61
Leviosam2 index (#5316)
lgrochowalski Mar 20, 2024
7b29d1b
Added contrast limited adaptive histogram equalization module (#5268)
kbestak Mar 20, 2024
dd2757c
add cram/index support to dragmap (#5303)
matthdsm Mar 20, 2024
bf021bf
scimap/spatiallda (#5260)
migueLib Mar 20, 2024
4685ac9
New module svtypersso (#5311)
tstoeriko Mar 20, 2024
c331b11
Add and update - picard/gatk4 - addorreplacereadgroups (#5302)
tomiles Mar 20, 2024
2d5ea49
Tcoffee tcs (#5288)
alessiovignoli Mar 20, 2024
fc63cd1
Add module nanofilt (#5290)
lfreitasl Mar 20, 2024
15e2db9
Add president module (#5256)
paulwolk Mar 20, 2024
1332943
merfin_hist module added
rodtheo Mar 20, 2024
f9fdd0b
nf-test with multiple inputs fixed
rodtheo Mar 20, 2024
a83c25d
nf-tests insert file URLs instead of test_data
rodtheo Mar 20, 2024
f67a420
fix merging issues
rodtheo Mar 20, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,12 @@ jobs:
tags: merquryfk/merquryfk
- profile: conda
tags: merquryfk/ploidyplot
- profile: conda
tags: molkartgarage/clahe
- profile: conda
tags: quartonotebook
- profile: conda
tags: scimap/spatiallda
- profile: conda
tags: sentieon/bwaindex
- profile: conda
Expand All @@ -585,6 +589,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
2 changes: 0 additions & 2 deletions modules/nf-core/bakta/bakta/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ process BAKTA_BAKTA {
def proteins_opt = proteins ? "--proteins ${proteins[0]}" : ""
def prodigal_tf = prodigal_tf ? "--prodigal-tf ${prodigal_tf[0]}" : ""
"""
amrfinder_update --force_update --database $db/amrfinderplus-db

bakta \\
$fasta \\
$args \\
Expand Down
9 changes: 9 additions & 0 deletions modules/nf-core/bamstats/generalstats/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
name: "bamstats_generalstats"
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- "bioconda::bamstats=0.3.5"
51 changes: 51 additions & 0 deletions modules/nf-core/bamstats/generalstats/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
process BAMSTATS_GENERALSTATS {
tag "$meta.id"
label 'process_single'
conda "bioconda::bamstats=0.3.5"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bamstats:0.3.5--he881be0_0':
'biocontainers/bamstats:0.3.5--he881be0_0' }"

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

output:
tuple val(meta), path("*.json"), emit: json
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}"
// Several ARGS are available.
// -a is a helpfu; one where you can add a BED file
// -u, --uniq outputs genomic coverage statistics for uniqely mapped reads
"""
bamstats \\
-i $bam \\
$args \\
-c $task.cpus \\
-o ${prefix}.json

cat <<-END_VERSIONS > versions.yml
"${task.process}":
bamstats: \$(echo \$(bamstats --version 2>&1) | sed 's/^.*bamstats == version://; s/Using.*\$//' | sed 's/built.*//' )
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
touch ${prefix}.json

cat <<-END_VERSIONS > versions.yml
"${task.process}":
bamstats: \$(echo \$(bamstats --version 2>&1) | sed 's/^.*bamstats == version://; s/Using.*\$//' | sed 's/built.*//' )
END_VERSIONS
"""
}

46 changes: 46 additions & 0 deletions modules/nf-core/bamstats/generalstats/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "bamstats_generalstats"
description: write your description here
keywords:
- bam
- statistics
- genomics
tools:
- "bamstats":
description: "A command line tool to compute mapping statistics from a BAM file"
homepage: "https://github.com/guigolab/bamstats/"
documentation: "https://github.com/guigolab/bamstats/"
tool_dev_url: "https://github.com/guigolab"
licence: ["BSD-3-clause"]

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`

- bam:
type: file
description: Sorted BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"

output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`

- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- json:
type: file
description: json containing bam statistics
pattern: "*.json"

authors:
- "@johnoooh"
60 changes: 60 additions & 0 deletions modules/nf-core/bamstats/generalstats/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "bamstats"
tag "bamstats/generalstats"

test("sarscov2 - bam") {

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

then {
assertAll(
{ assert process.success },
{ assert path(process.out.json.get(0)[1]).exists() },
{ assert snapshot(process.out.versions).match("versions") }
)
}

}

test("sarscov2 - bam - stub") {

options "-stub"

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

then {
assertAll(
{ assert process.success },
{ assert path(process.out.json.get(0)[1]).exists() },
{ assert snapshot(process.out.versions).match("versions_stub") }
)
}

}

}
26 changes: 26 additions & 0 deletions modules/nf-core/bamstats/generalstats/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/bamstats/generalstats/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bamstats/generalstats:
- "modules/nf-core/bamstats/generalstats/**"
17 changes: 17 additions & 0 deletions modules/nf-core/bases2fastq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,21 @@ process BASES2FASTQ {
bases2fastq: \$(bases2fastq --version | sed -e "s/bases2fastq version //g")
END_VERSIONS
"""

stub:
"""
mkdir output
mkdir output/Samples
mkdir output/Samples/DefaultSample

touch output/Metrics.csv
touch output/RunManifest.json
touch output/UnassignedSequences.csv
echo | gzip > output/Samples/DefaultSample/DefaultSample_R1.fastq.gz
echo | gzip > output/Samples/DefaultSample/DefaultSample_R2.fastq.gz
touch output/Bases2Fastq-Sim_QC.html
touch output/RunStats.json
touch output/Samples/DefaultSample/DefaultSample_stats.json
touch versions.yml
"""
}
78 changes: 78 additions & 0 deletions modules/nf-core/bases2fastq/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "bases2fastq"
tag "untar"

setup {
run("UNTAR") {
script "modules/nf-core/untar/main.nf"
process {
"""
input[0] = Channel.of([ [id: "sim-data", samplesheet: file("https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/sim-data/RunManifest.csv", checkIfExists: true)], file("https://github.com/nf-core/test-datasets/raw/demultiplex/testdata/sim-data/sim-data.tar.gz", checkIfExists: true) ])
"""
}
}
}

test("sim-data.tar.gz - bcl") {
when {
process {
"""
input[0]= UNTAR.out.untar.map{meta, untar -> [meta, meta.samplesheet, untar]}

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.metrics,
process.out.generated_run_manifest,
process.out.unassigned,
process.out.sample_fastq,
file(process.out.qc_report[0][1]).name,
file(process.out.run_stats[0][1]).name,
file(process.out.sample_json[0][1]).name
).match()
}
)
}

}

test("sim-data.tar.gz - bcl -stub") {
options "-stub"
when {
process {
"""
input[0]= UNTAR.out.untar.map{meta, untar -> [meta, meta.samplesheet, untar]}

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.metrics,
process.out.generated_run_manifest,
process.out.unassigned,
process.out.sample_fastq,
file(process.out.qc_report[0][1]).name,
file(process.out.run_stats[0][1]).name,
file(process.out.sample_json[0][1]).name
).match()
}
)
}
}
}
Loading
Loading