Merge branch 'master' into update/mosdepth

This commit is contained in:
Matthias De Smet 2022-05-25 19:20:45 +02:00 committed by GitHub
commit bc7002b0c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 97 additions and 53 deletions

View file

@ -1,6 +1,6 @@
def VERSION = '2.1' // Version information not provided by tool on CLI def VERSION = '2.1' // Version information not provided by tool on CLI
process GAMMA { process GAMMA_GAMMA {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_low'
@ -26,13 +26,24 @@ process GAMMA {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
""" """
GAMMA.py \\ if [[ ${fasta} == *.gz ]]
then
FNAME=\$(basename ${fasta} .gz)
gunzip -f ${fasta}
GAMMA.py \\
$args \\
"\${FNAME}" \\
$db \\
$prefix
else
GAMMA.py \\
$args \\ $args \\
$fasta \\ $fasta \\
$db \\ $db \\
$prefix $prefix
fi
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
gamma: $VERSION gamma: $VERSION

View file

@ -1,4 +1,4 @@
name: "gamma" name: "gamma_gamma"
description: Gene Allele Mutation Microbial Assessment description: Gene Allele Mutation Microbial Assessment
keywords: keywords:
- gamma - gamma
@ -61,3 +61,4 @@ output:
authors: authors:
- "@sateeshperi" - "@sateeshperi"
- "@rastanton" - "@rastanton"
- "@jvhagey"

View file

@ -8,8 +8,8 @@ process MASH_SCREEN {
'quay.io/biocontainers/mash:2.3--he348c14_1' }" 'quay.io/biocontainers/mash:2.3--he348c14_1' }"
input: input:
tuple val(meta), path(query_sketch) tuple val(meta), path(query)
path fastx_db path sequences_sketch
output: output:
tuple val(meta), path("*.screen"), emit: screen tuple val(meta), path("*.screen"), emit: screen
@ -26,8 +26,8 @@ process MASH_SCREEN {
screen \\ screen \\
$args \\ $args \\
-p $task.cpus \\ -p $task.cpus \\
$query_sketch \\ $sequences_sketch \\
$fastx_db \\ $query \\
> ${prefix}.screen > ${prefix}.screen
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml

View file

@ -20,13 +20,14 @@ input:
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- query_sketch: - query:
type: file type: file
description: MinHash sketch of query sequences description: Query sequences
pattern: "*.msh" pattern: "*.fastq.gz"
- fastx_db: - sequence_sketch:
type: file type: file
description: Sequence files to match against description: Sequence files to match against
pattern: "*.msh"
output: output:
- meta: - meta:

View file

@ -711,9 +711,9 @@ freebayes:
- modules/freebayes/** - modules/freebayes/**
- tests/modules/freebayes/** - tests/modules/freebayes/**
gamma: gamma/gamma:
- modules/gamma/** - modules/gamma/gamma/**
- tests/modules/gamma/** - tests/modules/gamma/gamma/**
gatk4/applybqsr: gatk4/applybqsr:
- modules/gatk4/applybqsr/** - modules/gatk4/applybqsr/**

View file

@ -0,0 +1,29 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { GAMMA_GAMMA } from '../../../../modules/gamma/gamma/main.nf'
workflow test_unzip {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true),
]
db = [ file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/ResGANNCBI_20210507_srst2.fasta", checkIfExists: true), ]
GAMMA_GAMMA ( input, db )
}
workflow test_gamma {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ]
GAMMA_GAMMA ( input, db )
}

View file

@ -0,0 +1,29 @@
- name: gamma gamma test_unzip
command: nextflow run tests/modules/gamma/gamma -entry test_unzip -c tests/config/nextflow.config
tags:
- gamma/gamma
- gamma
files:
- path: output/gamma/test.fasta
md5sum: 5b3b831d863fffaa3410a9ee7bfa12ce
- path: output/gamma/test.gamma
md5sum: 46165a89e10b7315d3a9b0aa6c561626
- path: output/gamma/test.psl
md5sum: f489ce4602ddbcb692d5781ee3fbf449
- path: output/gamma/versions.yml
md5sum: 8baafec7b3b87f788f69e30d317c9722
- name: gamma gamma test_gamma
command: nextflow run tests/modules/gamma/gamma -entry test_gamma -c tests/config/nextflow.config
tags:
- gamma/gamma
- gamma
files:
- path: output/gamma/test.fasta
md5sum: df37b48466181311e0a679f3c5878484
- path: output/gamma/test.gamma
md5sum: 3256708fa517a65ed01d99e0e3c762ae
- path: output/gamma/test.psl
md5sum: 162a2757ed3b167ae1e0cdb24213f940
- path: output/gamma/versions.yml
md5sum: b75c2871d8cac2f8ac67c0fbd22babd6

View file

@ -1,17 +0,0 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { GAMMA } from '../../../modules/gamma/main.nf'
workflow test_gamma {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ]
GAMMA ( input, db )
}

View file

@ -1,13 +0,0 @@
- name: gamma test_gamma
command: nextflow run tests/modules/gamma -entry test_gamma -c tests/config/nextflow.config
tags:
- gamma
files:
- path: output/gamma/test.fasta
md5sum: df37b48466181311e0a679f3c5878484
- path: output/gamma/test.gamma
md5sum: 3256708fa517a65ed01d99e0e3c762ae
- path: output/gamma/test.psl
md5sum: 162a2757ed3b167ae1e0cdb24213f940
- path: output/gamma/versions.yml
md5sum: 3fefb5b46c94993362243c5f9a472057

View file

@ -14,8 +14,11 @@ workflow test_mash_screen {
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
] ]
] ]
fastx_db = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) sars_db = [
[ id: 'sars_db' ],
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
MASH_SKETCH ( input ) MASH_SKETCH ( sars_db )
MASH_SCREEN ( MASH_SKETCH.out.mash, fastx_db ) MASH_SCREEN ( input, MASH_SKETCH.out.mash.map { meta, sketch -> sketch } )
} }

View file

@ -4,9 +4,9 @@
- mash - mash
- mash/screen - mash/screen
files: files:
- path: output/mash/test.mash_stats - path: output/mash/sars_db.mash_stats
md5sum: 2a6f297d8e69a5e4160243bc6c89129c md5sum: 1dafbd23e36e18bf4c87a007d0fc98f7
- path: output/mash/test.msh - path: output/mash/sars_db.msh
md5sum: d747145a43dad5f82342036f8f5d9133 md5sum: 24289e4a13526e88eeb2abfca4a0f0a8
- path: output/mash/test.screen - path: output/mash/test.screen
md5sum: d3c871dccd5cd57ab54781fa5c5d7278 md5sum: ac8701e1aab651b2f36c6380b1351b11