Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
luisas committed Dec 11, 2024
1 parent 058ab34 commit 3b01ff2
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 16 deletions.
3 changes: 2 additions & 1 deletion assets/samplesheet.csv
Original file line number Diff line number Diff line change
@@ -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
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,
3 changes: 2 additions & 1 deletion assets/toolsheet.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tree,args_tree,aligner,args_aligner
,,FOLDMASON,
FAMSA,,FAMSA,
FAMSA,,FAMSA,
FAMSA,,FOLDMASON,
6 changes: 3 additions & 3 deletions bin/shiny_app/shiny_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]) + ")"
Expand All @@ -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"]) + ")"
Expand Down
20 changes: 10 additions & 10 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -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}" },
Expand All @@ -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 = [
Expand All @@ -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 = [
Expand Down Expand Up @@ -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,
Expand All @@ -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" {
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions subworkflows/local/align.nf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ workflow ALIGN {
}
.set { ch_tools_split }

ch_tools.view()
// ------------------------------------------------
// Compute the required trees
// ------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions subworkflows/local/visualization.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b01ff2

Please sign in to comment.