From 7b925321f4ca7520c6e8a3033c150f519a538271 Mon Sep 17 00:00:00 2001 From: Jim Downie Date: Wed, 27 Mar 2024 19:02:21 +0000 Subject: [PATCH] fix sed --- conf/modules.config | 3 ++- modules/sed_fasta_header.nf | 2 +- nextflow.config | 4 ++-- nextflow_schema.json | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index ed0a467..610e8de 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -129,7 +129,7 @@ process { } withName: MMSEQS_EASYCLUSTER { - ext.args = { "--min-seq-id 0.95 --cov-mode 1 -c 0.9" } + ext.args = { "${params.mmseqs_cluster_options}" } ext.prefix = { "${params.assemblyid}" } publishDir = [ path: { "${params.outdir}/annotation/clusters/" }, @@ -155,6 +155,7 @@ process { withName: SED_FASTA_HEADER { ext.prefix = { "${meta.assemblyid}" } + ext.sed_arg = { "${meta.assemblyid}" } } withName: STROBEALIGN_CREATEINDEX{ diff --git a/modules/sed_fasta_header.nf b/modules/sed_fasta_header.nf index a2e0909..2aa9a32 100644 --- a/modules/sed_fasta_header.nf +++ b/modules/sed_fasta_header.nf @@ -13,7 +13,7 @@ process SED_FASTA_HEADER { def prefix = task.ext.prefix ?: "${meta.id}" def sed_arg = task.ext.sed_arg ?: "${meta.id}" """ - sed s/^>/>${sed_arg}_/g ${fasta} > ${prefix}.renamed.fasta + sed "s/^>/>${sed_arg}_/g" ${fasta} > ${prefix}.renamed.fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/nextflow.config b/nextflow.config index 3109e4d..f40f5be 100644 --- a/nextflow.config +++ b/nextflow.config @@ -32,11 +32,11 @@ params { // Annotation options enable_annotation = true cluster_genes = false - mmseqs_cluster_options = "" + mmseqs_cluster_options = "--min-seq-id 0.95 --cov-mode 1 -c 0.9" // Coverage options enable_coverage = true - go_list = "$baseDir/assets/GOs.csv" + go_list = "${baseDir}/assets/GOs.csv" // Boilerplate options outdir = null diff --git a/nextflow_schema.json b/nextflow_schema.json index 7cc0b99..f133830 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -119,12 +119,12 @@ }, "cluster_genes": { "type": "boolean", - "default": false, "description": "Concatenate all contigs across all assemblies and cluster them prior to annotation." }, "mmseqs_cluster_options": { "type": "string", - "description": "Mmseqs command-line arguments for the mmseqs cluster call." + "description": "Mmseqs command-line arguments for the mmseqs cluster call.", + "default": "--min-seq-id 0.95 --cov-mode 1 -c 0.9" } } },