From 773c470426daac6f648929f3a9710efc37ed1d7c Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Wed, 24 Mar 2021 11:58:44 +0100 Subject: [PATCH 1/3] set a path height to show path names --- main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.nf b/main.nf index 67afce9f..0d680d66 100644 --- a/main.nf +++ b/main.nf @@ -231,7 +231,7 @@ process odgiViz { odgi viz \ -i $graph \ -o ${graph}.viz_mqc.png \ - -x 1500 -y 500 -P 5 + -x 1500 -y 500 -P 10 """ } From c02f24663a551aed8ba8393afd67a321ae0cf699 Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Wed, 24 Mar 2021 17:00:47 +0100 Subject: [PATCH 2/3] remove consensus paths for downstream analyses --- main.nf | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/main.nf b/main.nf index 0d680d66..72865696 100644 --- a/main.nf +++ b/main.nf @@ -190,6 +190,21 @@ process smoothxg { """ } +process removeConsensusPaths { + publishDir "${params.outdir}/smoothxg", mode: "${params.publish_dir_mode}" + + input: + path(graph) + + output: + path("${graph}.no_cons.gfa"), emit: gfa_smooth_no_cons + + script: + """ + grep "Consensus_" "$graph" -v > "${graph}.no_cons.gfa" + """ +} + process odgiBuild { publishDir "${params.outdir}/odgi_build", mode: "${params.publish_dir_mode}" @@ -227,12 +242,13 @@ process odgiViz { output: path("${graph}.viz_mqc.png") - """ - odgi viz \ + script: + """ + odgi viz \ -i $graph \ -o ${graph}.viz_mqc.png \ -x 1500 -y 500 -P 10 - """ + """ } process odgiChop { @@ -325,16 +341,20 @@ workflow { seqwish(fasta, wfmash.out.collect{it[1]}) } smoothxg(seqwish.out) + + removeConsensusPaths(smoothxg.out.gfa_smooth) if (params.do_stats) { - odgiBuild(seqwish.out.collect{it[1]}.mix(smoothxg.out.gfa_smooth, smoothxg.out.consensus_smooth.flatten())) - odgiStats(odgiBuild.out) + odgiBuild(seqwish.out.collect{it[1]}.mix(removeConsensusPaths.out, smoothxg.out.consensus_smooth.flatten())) + odgiStats(odgiBuild.out) } else { - odgiBuild(smoothxg.out.gfa_smooth) + odgiBuild(seqwish.out.collect{it[1]}.mix(removeConsensusPaths.out, smoothxg.out.gfa_smooth)) } + odgiVizOut = Channel.empty() + removeConsensusPathsOut = Channel.empty() if (params.do_viz) { - odgiVizOut = odgiViz(odgiBuild.out.filter(~".*smooth.*")) + odgiVizOut = odgiViz(odgiBuild.out) } odgiDrawOut = Channel.empty() if (params.do_layout) { From 8f6d87d5de035910ddc2e495f7e57ce8e8f5d8d4 Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Wed, 24 Mar 2021 17:04:25 +0100 Subject: [PATCH 3/3] update odgi draw parameter --- main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.nf b/main.nf index 72865696..d7a14f82 100644 --- a/main.nf +++ b/main.nf @@ -293,8 +293,8 @@ process odgiDraw { -c $layoutGraph \ -p ${layoutGraph}.draw_mqc.png \ -C \ - -w 50 \ - -H 1000 -t ${task.cpus} + -w 20 \ + -H 1500 -t ${task.cpus} """ }