diff --git a/modules.json b/modules.json index 1dad49b8..b07ebe00 100644 --- a/modules.json +++ b/modules.json @@ -116,16 +116,6 @@ "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, - "kmcp/compute": { - "branch": "master", - "git_sha": "6a8df5472d224697a64502961291038fafc7ed08", - "installed_by": ["modules"] - }, - "kmcp/index": { - "branch": "master", - "git_sha": "1106a8046ead1562c57e1c969f8c66863cab338b", - "installed_by": ["modules"] - }, "kmcp/merge": { "branch": "master", "git_sha": "0fbbd07d2430dd2adcbdd2900bd420e10263c94a", diff --git a/modules/nf-core/kmcp/compute/main.nf b/modules/nf-core/kmcp/compute/main.nf deleted file mode 100644 index 2e4458f4..00000000 --- a/modules/nf-core/kmcp/compute/main.nf +++ /dev/null @@ -1,51 +0,0 @@ -process KMCP_COMPUTE { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::kmcp=0.9.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/kmcp:0.9.1--h9ee0642_0': - 'biocontainers/kmcp:0.9.1--h9ee0642_0' }" - - input: - tuple val(meta), path(sequences) - - output: - tuple val(meta), path("${prefix}") , emit: outdir - tuple val(meta), path("${prefix}/_info.txt") , emit: info - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def input = sequences.isDirectory()? "--in-dir ${sequences}" : "${sequences}" - """ - kmcp \\ - compute \\ - $args \\ - --threads $task.cpus \\ - --out-dir ${prefix}/ \\ - $input - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - kmcp: \$(echo \$(kmcp version 2>&1) | sed -n 1p | sed 's/^.*kmcp v//') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - """ - mkdir $prefix - touch $prefix/_info.txt - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - kmcp: \$(echo \$(kmcp version 2>&1) | sed -n 1p | sed 's/^.*kmcp v//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/kmcp/compute/meta.yml b/modules/nf-core/kmcp/compute/meta.yml deleted file mode 100644 index 52181e2f..00000000 --- a/modules/nf-core/kmcp/compute/meta.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: "kmcp_compute" -description: Generate k-mers (sketches) from FASTA/Q sequences -keywords: - - metagenomics - - classify - - taxonomic profiling - - fastq - - sequences - - kmers -tools: - - "kmcp": - description: "Accurate metagenomic profiling of both prokaryotic and viral populations by pseudo-mapping" - homepage: "https://github.com/shenwei356/kmcp" - documentation: "https://github.com/shenwei356/kmcp#documents" - tool_dev_url: "https://github.com/shenwei356/kmcp" - doi: "10.1093/bioinformatics/btac845" - licence: "['MIT']" - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - sequences: - type: file - description: fasta file, or a directory containing FASTA files - pattern: "**/*.{fa,fa.gz,fasta,fasta.gz,fna,fna.gz}" - -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" - - outdir: - type: directory - description: Output directory containing all .unik files and a summary file in .txt format. Every .unik file contains the sequence/reference ID,chunk index, number of chunks, and genome size of reference. - pattern: "*/" - - info: - type: file - description: Summary file that is generated for later use - pattern: "*_info.txt" - -authors: - - "@sofstam" diff --git a/modules/nf-core/kmcp/index/main.nf b/modules/nf-core/kmcp/index/main.nf deleted file mode 100644 index 6a06b98a..00000000 --- a/modules/nf-core/kmcp/index/main.nf +++ /dev/null @@ -1,50 +0,0 @@ -process KMCP_INDEX { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::kmcp=0.9.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/kmcp:0.9.1--h9ee0642_0': - 'quay.io/biocontainers/kmcp:0.9.1--h9ee0642_0' }" - - input: - tuple val(meta), path(compute_dir) - - output: - tuple val(meta), path("${prefix}") , emit: kmcp - tuple val(meta), path("*.log") , emit: log - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - """ - kmcp \\ - index \\ - --in-dir $compute_dir \\ - $args \\ - --threads $task.cpus \\ - --log ${prefix}.log \\ - --out-dir ${prefix} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - kmcp: \$(echo \$(kmcp version 2>&1) | sed -n 1p | sed 's/^.*kmcp v//') - END_VERSIONS - """ - stub: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - """ - mkdir ${prefix} - touch ${prefix}.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - kmcp: \$(echo \$(kmcp version 2>&1) | sed -n 1p | sed 's/^.*kmcp v//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/kmcp/index/meta.yml b/modules/nf-core/kmcp/index/meta.yml deleted file mode 100644 index d42bf490..00000000 --- a/modules/nf-core/kmcp/index/meta.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: "kmcp_index" -description: Construct KMCP database from k-mer files -keywords: - - metagenomics - - classify - - taxonomic profiling - - fastq - - sequences - - kmers - - index -tools: - - "kmcp": - description: "Accurate metagenomic profiling of both prokaryotic and viral populations by pseudo-mapping" - homepage: "https://github.com/shenwei356/kmcp" - documentation: "https://github.com/shenwei356/kmcp#documents" - tool_dev_url: "https://github.com/shenwei356/kmcp" - doi: "10.1093/bioinformatics/btac845" - licence: "['MIT']" - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - outdir: - type: directory - description: Output directory generated by "kmcp compute" - pattern: "*/" - -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" - - kmcp: - type: directory - description: Output directory containing the database from k-mer files. - pattern: "*/" - - log: - type: file - description: A log of kmcp/index output - pattern: "*.log" - -authors: - - "@sofstam" diff --git a/subworkflows/local/profiling.nf b/subworkflows/local/profiling.nf index bee70041..229bd130 100644 --- a/subworkflows/local/profiling.nf +++ b/subworkflows/local/profiling.nf @@ -377,7 +377,7 @@ workflow PROFILING { if (params.run_kmcp) { - ch_input_for_kmcpcompute = ch_input_for_profiling.kmcp + ch_input_for_kmcp = ch_input_for_profiling.kmcp .filter { meta, reads, meta_db, db -> if ( meta['instrument_platform'] == 'OXFORD_NANOPORE' ) log.warn "[nf-core/taxprofiler] Kmcp is only suitable for short-read metagenomic profiling, with much lower sensitivity on long-read datasets. Skipping kmcp for sample ${meta.id}." @@ -386,17 +386,12 @@ workflow PROFILING { .multiMap { it -> reads: [ it[0] + it[2], it[1] ] - db: [ it[0], it[3] ] - //.multiMap { meta, reads, meta_db, db -> - // reads: [meta, reads.flatten()] - // db: [meta, db ] - } + db: it[3] + } - KMCP_COMPUTE (ch_input_for_kmcpcompute.db) - KMCP_INDEX (KMCP_COMPUTE.out.outdir) - KMCP_SEARCH (KMCP_INDEX.out.kmcp.map{it[1]}, ch_input_for_kmcpcompute.reads) - //KMCP_PROFILE (KMCP_SEARCH.out.result,params.kmcp_taxdump, params.kmcp_taxid, params.kmcp_mode) + KMCP_SEARCH (ch_input_for_kmcp.db, ch_input_for_kmcp.reads) + //KMCP_PROFILE (KMCP_SEARCH.out.result,ch_input_for_kmcpcompute.db.map, params.kmcp_mode) //ch_versions = ch_versions.mix( KMCP_PROFILE.out.versions.first() ) //ch_raw_profiles = ch_raw_profiles.mix( KMCP_PROFILE.out.profile )