diff --git a/assets/samplesheet.csv b/assets/samplesheet.csv index cc478c4..d8b90e2 100644 --- a/assets/samplesheet.csv +++ b/assets/samplesheet.csv @@ -1,2 +1,3 @@ id,fasta,reference,optional_data -seatoxin-ref,https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa,https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin.ref,https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz \ No newline at end of file +seatoxin-ref,https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin-ref.fa,https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/setoxin.ref,https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz +toxin-ref,https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/toxin-ref.fa,https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/toxin.ref, \ No newline at end of file diff --git a/assets/toolsheet.csv b/assets/toolsheet.csv index a5f1b6e..2ae1536 100644 --- a/assets/toolsheet.csv +++ b/assets/toolsheet.csv @@ -1,3 +1,4 @@ tree,args_tree,aligner,args_aligner ,,FOLDMASON, -FAMSA,,FAMSA, \ No newline at end of file +FAMSA,,FAMSA, +FAMSA,,FOLDMASON, \ No newline at end of file diff --git a/bin/shiny_app/shiny_app.py b/bin/shiny_app/shiny_app.py index 77c395e..dd79529 100644 --- a/bin/shiny_app/shiny_app.py +++ b/bin/shiny_app/shiny_app.py @@ -30,9 +30,9 @@ sys.exit(1) def merge_tree_args(row): - if str(row["tree"]) == "nan": + if str(row["tree"]) == "DEFAULT": return "None" - elif str(row["args_tree"]) == "nan": + elif str(row["args_tree"]) == "default": return str(row["tree"]) + " ()" else: return str(row["tree"]) + " (" + str(row["args_tree"]) + ")" @@ -42,7 +42,7 @@ def merge_tree_args(row): def merge_aligner_args(row): if str(row["aligner"]) == "nan": return "None" - elif str(row["args_aligner"]) == "nan": + elif str(row["args_aligner"]) == "default": return str(row["aligner"]) + " ()" else: return str(row["aligner"]) + " (" + str(row["args_aligner"]) + ")" diff --git a/conf/modules.config b/conf/modules.config index 6a7c143..b026fd5 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -74,7 +74,7 @@ meta.args_tree ? "args: ${meta.args_tree}" : "" ].join(' ').trim() } - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}" } ext.args = { "${meta.args_tree}" == "null" ? '' : "${meta.args_tree}" } publishDir = [ path: { "${params.outdir}/trees/${meta.id}" }, @@ -99,7 +99,7 @@ meta.args_aligner ? "args: ${meta.args_aligner}" : "" ].join(' ').trim() } - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}" } ext.args = { "${meta.args_aligner}" == "null" ? '' : "${meta.args_aligner}" } if(params.skip_compression){ publishDir = [ @@ -119,7 +119,7 @@ meta.args_aligner ? "args: ${meta.args_aligner}" : "" ].join(' ').trim() } - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}" } ext.args = { "${meta.args_aligner}" == "null" ? '' : "${meta.args_aligner}" } if(params.skip_compression){ publishDir = [ @@ -174,21 +174,21 @@ // withName: 'PARSE_IRMSD' { - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_irmsd" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_irmsd" } } withName: 'TCOFFEE_ALNCOMPARE_SP' { - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_sp" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_sp" } ext.args = "-compare_mode sp" } withName: 'TCOFFEE_ALNCOMPARE_TC' { - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_tc" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_tc" } ext.args = "-compare_mode tc" } withName: 'TCOFFEE_IRMSD' { - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_irmsd" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_irmsd" } publishDir = [ path: { "${params.outdir}/evaluation/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: params.publish_dir_mode, @@ -198,7 +198,7 @@ } withName: "CALC_GAPS" { - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_gaps" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_gaps" } } withName: "CONCAT_IRMSD" { @@ -222,7 +222,7 @@ } withName: 'TCOFFEE_TCS' { - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_tcs" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}_tcs" } publishDir = [ path: { "${params.outdir}/evaluation/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: params.publish_dir_mode, @@ -274,7 +274,7 @@ // Visualization // withName: 'FOLDMASON_MSA2LDDTREPORT' { - ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.argstree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}" } + ext.prefix = { "${meta.id}_${meta.tree}-args-${meta.args_tree_clean}_${meta.aligner}-args-${meta.args_aligner_clean}" } publishDir = [ path: { "${params.outdir}/visualization" }, mode: params.publish_dir_mode, diff --git a/subworkflows/local/align.nf b/subworkflows/local/align.nf index 59538c5..c852061 100644 --- a/subworkflows/local/align.nf +++ b/subworkflows/local/align.nf @@ -49,6 +49,7 @@ workflow ALIGN { } .set { ch_tools_split } + ch_tools.view() // ------------------------------------------------ // Compute the required trees // ------------------------------------------------ diff --git a/subworkflows/local/utils_nfcore_multiplesequencealign_pipeline/main.nf b/subworkflows/local/utils_nfcore_multiplesequencealign_pipeline/main.nf index 12af446..4c41253 100644 --- a/subworkflows/local/utils_nfcore_multiplesequencealign_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_multiplesequencealign_pipeline/main.nf @@ -357,12 +357,21 @@ class Utils { // if clearnArgs is empty, return "" if (cleanArgs == null || cleanArgs == "") { - return "" + return "default" }else{ return cleanArgs } } + public static clean_tree(argsTree){ + + def tree = argsTree.toString() + if(tree == null || tree == "" || tree == "null"){ + return "DEFAULT" + } + return tree + } + public static fix_args(tool,args,tool_to_be_checked, required_flag, default_value) { /* This function checks if the required_flag is present in the args string for the tool_to_be_checked. diff --git a/subworkflows/local/visualization.nf b/subworkflows/local/visualization.nf index 037a4e1..c228165 100644 --- a/subworkflows/local/visualization.nf +++ b/subworkflows/local/visualization.nf @@ -13,6 +13,8 @@ workflow VISUALIZATION { ch_versions = Channel.empty() ch_html = Channel.empty() + + ch_msa.view() // Merge the msa and tree // split the msa meta to be able to merge with the tree meta ch_msa