From 02c7369f0ca61f36288c1aa33c0fe0dac8b4d95f Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Thu, 2 May 2024 15:31:44 -0400 Subject: [PATCH 01/10] draft module to produce nfcore workflow config --- .../WorkflowSteps/MakeNfCorePMACSConfig.pm | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Main/lib/perl/WorkflowSteps/MakeNfCorePMACSConfig.pm diff --git a/Main/lib/perl/WorkflowSteps/MakeNfCorePMACSConfig.pm b/Main/lib/perl/WorkflowSteps/MakeNfCorePMACSConfig.pm new file mode 100644 index 0000000..80a76e5 --- /dev/null +++ b/Main/lib/perl/WorkflowSteps/MakeNfCorePMACSConfig.pm @@ -0,0 +1,53 @@ +package MicrobiomeWorkflow::Main::WorkflowSteps::MakeNfCorePMACSConfig; + +@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep); + +use strict; +use warnings; +use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep; + +sub run { + my ($self, $test, $undo) = @_; + + my $configPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), $self->getParamValue("configFileName")); + + my $memoryInGb = $self->getParamValue("memoryInGb"); + my $nextflowTowerAccessToken = $self->getParamValue("nextflowTowerAccessToken"); + my $nextflowTowerWorkspaceId = $self->getParamValue("nextflowTowerWorkspaceId"); + + # not sure we need to grab these, since this is pmacs specific :( + # id like to look into a pmacs config file here: https://nf-co.re/configs + my $executor = $self->getClusterExecutor(); + my $queue = $self->getClusterQueue(); + + if ($undo) { + $self->runCmd(0,"rm -rf $configPath"); + } else { + open(F, ">", $configPath) or die "$! :Can't open config file '$configPath' for writing"; + + print F +"process { + executor = '$executor' + queue = '$queue' +} +// nf-core requests memory in kb +// pmacs wants requests for memory in mb +// therefore, request for 6mb will look like 6gb to pmacs. +// having to do this trick makes this config specific to pmacs, unfortunately. +params { + max_memory = $memoryInGb.MB +} +singularity { + enabled = true +} +tower { + accessToken = '$nextflowTowerAccessToken' + workspaceId = '$nextflowTowerWorkspaceId' + enabled = true +}"; + close(F); + } +} + +1; + From bb6e4bf8d88daeb96e0c14e4d465a03b69c7d4d9 Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Thu, 2 May 2024 15:32:27 -0400 Subject: [PATCH 02/10] draft subgraphs for mag and funcscan --- .../workflow/runNfCoreFunscanOnCluster.xml | 50 ++++++++++++++++++ .../xml/workflow/runNfCoreMagOnCluster.xml | 51 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml create mode 100644 Main/lib/xml/workflow/runNfCoreMagOnCluster.xml diff --git a/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml b/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml new file mode 100644 index 0000000..fd57b94 --- /dev/null +++ b/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml @@ -0,0 +1,50 @@ + + + + + + + + + + $$analysisDir$$ + $$analysisDir$$/results + nextflow.config + $$memoryInGb + $$nextflowTowerAccessToken + $$nextflowTowerWorkspaceId + + + + + + $$sampleToFastqFileName + + + + + + + + $$analysisDir$$ + + + + + + $$analysisDir$$ + $$analysisDir$$/results + $$analysisDir$$/nextflow.config + nf-core/funcscan + true + + + + + + $$analysisDir$$/results + $$resultDir$$ + + + + diff --git a/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml b/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml new file mode 100644 index 0000000..43ac82d --- /dev/null +++ b/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml @@ -0,0 +1,51 @@ + + + + + + + + + + $$analysisDir$$ + $$analysisDir$$/results + nextflow.config + $$memoryInGb + $$nextflowTowerAccessToken + $$nextflowTowerWorkspaceId + + + + + $$sampleToFastqFileName + + + + + + + + + + $$analysisDir$$ + + + + + + $$analysisDir$$ + $$analysisDir$$/results + $$analysisDir$$/nextflow.config + nf-core/mag + true + + + + + + $$analysisDir$$/results + $$resultDir$$ + + + + From 202d534b2430ea23eb6b45a496c0a8519b36738a Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Thu, 2 May 2024 15:32:45 -0400 Subject: [PATCH 03/10] add mag and funscan subgraphs to mbio root --- .../xml/workflowTemplates/microbiomeRoot.xml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Main/lib/xml/workflowTemplates/microbiomeRoot.xml b/Main/lib/xml/workflowTemplates/microbiomeRoot.xml index 6c33921..a10fa22 100644 --- a/Main/lib/xml/workflowTemplates/microbiomeRoot.xml +++ b/Main/lib/xml/workflowTemplates/microbiomeRoot.xml @@ -144,6 +144,28 @@ + + + ${sampleToWgsFastqFileName} + otuDADA2_${name}_RSRC/Eukdetect_${name} + all_results + 80 + ${nextflowTowerAccessToken} + ${nextflowTowerWorkspaceId} + + + + + + ${sampleToWgsFastqFileName} + otuDADA2_${name}_RSRC/Eukdetect_${name} + all_results + 40 + ${nextflowTowerAccessToken} + ${nextflowTowerWorkspaceId} + + + otuDADA2_${name}_RSRC From d50c05b3db2ada2bdff8bb09705c0eaade3a0e8d Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Fri, 3 May 2024 14:34:37 -0400 Subject: [PATCH 04/10] add modules for making mag specific samplesheet and config --- .../WorkflowSteps/MakeNfCoreMagParamsFile.pm | 49 +++++++++++++++++++ .../WorkflowSteps/MakeNfCoreMagSamplesheet.pm | 33 +++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 Main/lib/perl/WorkflowSteps/MakeNfCoreMagParamsFile.pm create mode 100644 Main/lib/perl/WorkflowSteps/MakeNfCoreMagSamplesheet.pm diff --git a/Main/lib/perl/WorkflowSteps/MakeNfCoreMagParamsFile.pm b/Main/lib/perl/WorkflowSteps/MakeNfCoreMagParamsFile.pm new file mode 100644 index 0000000..16cc6b3 --- /dev/null +++ b/Main/lib/perl/WorkflowSteps/MakeNfCoreMagParamsFile.pm @@ -0,0 +1,49 @@ +package MicrobiomeWorkflow::Main::WorkflowSteps::MakeNfCoreMagParamsFile; + +@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep); + +use strict; +use warnings; +use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep; + +sub run { + my ($self, $test, $undo) = @_; + + my $paramsFilePath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), "nf-params.json"); + my $samplesheetPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), "samplesheet.csv"); + my $krakenDBPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("krakenDBPath")); + + ## TODO compare these args to what i tested on pmacs and make sure i didnt miss anything + ## TODO figure out for sure which of these ref dbs we need and update them + + if ($undo) { + $self->runCmd(0,"rm -rf $configPath"); + } else { + open(F, ">", $paramsFilePath) or die "$! :Can't open config file '$paramsFilePath' for writing"; + + print F +" +{ + \"input\": \"$samplesheetPath\", + \"outdir\": \"out\", + \"kraken2_db\": \"$krakenDBPath\", + \"cat_db\": \"TODO\", + \"gtdb_db\": \"TODO\", + \"gtdb_mash\": \"TODO\", + \"skip_spades\": true, + \"skip_spadeshybrid\": true, + \"run_virus_identification\": true, + \"skip_concoct\": true, + \"metaeuk_db\": \"TODO\", + \"busco_db\": \"TODO\", + \"checkm_db\": \"TODO\", + \"gunc_db\": \"TODO\" +} +"; + + close(F); + } +} + +1; + diff --git a/Main/lib/perl/WorkflowSteps/MakeNfCoreMagSamplesheet.pm b/Main/lib/perl/WorkflowSteps/MakeNfCoreMagSamplesheet.pm new file mode 100644 index 0000000..61ed178 --- /dev/null +++ b/Main/lib/perl/WorkflowSteps/MakeNfCoreMagSamplesheet.pm @@ -0,0 +1,33 @@ +package MicrobiomeWorkflow::Main::WorkflowSteps::MakeNfCoreMagSamplesheet; + +@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep); + +use strict; +use warnings; +use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep; + +sub run { + my ($self, $test, $undo) = @_; + + my $sampleToFastqPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), $self->getParamValue("sampleToFastqFileName")); + my $samplesheetPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), "samplesheet.csv"); + + if ($undo) { + $self->runCmd(0,"rm -rf $configPath"); + } else { + open(F, ">", $samplesheetPath) or die "$! :Can't open config file '$samplesheetPath' for writing"; + + # TODO write the header here, then + # loop through the sampleToFastq file and reformat rows + # write out the reformatted rows to the samplesheet + # i need to go look at these two files yet to see what needs doing here + + close(F); + + ## remove the sampleToFastq file + $self->runCmd(0,"rm -rf $sampleToFastqPath"); + } +} + +1; + From e27da3dd38d474e555bdfeb5eac1de2375d7f07a Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Fri, 3 May 2024 14:34:55 -0400 Subject: [PATCH 05/10] add modules for making funcscan specific samplesheet and config --- .../MakeNfCoreFuncscanParamsFile.pm | 46 +++++++++++++++++++ .../MakeNfCoreFuncscanSamplesheet.pm | 31 +++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 Main/lib/perl/WorkflowSteps/MakeNfCoreFuncscanParamsFile.pm create mode 100644 Main/lib/perl/WorkflowSteps/MakeNfCoreFuncscanSamplesheet.pm diff --git a/Main/lib/perl/WorkflowSteps/MakeNfCoreFuncscanParamsFile.pm b/Main/lib/perl/WorkflowSteps/MakeNfCoreFuncscanParamsFile.pm new file mode 100644 index 0000000..9f09fbc --- /dev/null +++ b/Main/lib/perl/WorkflowSteps/MakeNfCoreFuncscanParamsFile.pm @@ -0,0 +1,46 @@ +package MicrobiomeWorkflow::Main::WorkflowSteps::MakeNfCoreFuncscanParamsFile; + +@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep); + +use strict; +use warnings; +use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep; + +sub run { + my ($self, $test, $undo) = @_; + + my $paramsFilePath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), "nf-params.json"); + my $samplesheetPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), "samplesheet.csv"); + + ## TODO sort all these ref dbs, and double check which ones i need. + ## TODO compare these args to what i tested on pmacs and make sure i didnt miss anything + + if ($undo) { + $self->runCmd(0,"rm -rf $configPath"); + } else { + open(F, ">", $paramsFilePath) or die "$! :Can't open config file '$paramsFilePath' for writing"; + + print F +" +{ + \"input\": \"$samplesheetPath\", + \"outdir\": \"out\", + \"run_amp_screening\": true, + \"run_arg_screening\": true, + \"run_bgc_screening\": true, + \"amp_hmmsearch_models\": \"TODO\", + \"amp_ampcombi_db\": \"TODO\", + \"arg_amrfinderplus_db\": \"TODO\", + \"arg_deeparg_data\": \"TODO\", + \"bgc_antismash_databases\": \"TODO\", + \"bgc_deepbgc_database\": \"TODO\", + \"bgc_hmmsearch_models\": \"TODO\" +} +"; + + close(F); + } +} + +1; + diff --git a/Main/lib/perl/WorkflowSteps/MakeNfCoreFuncscanSamplesheet.pm b/Main/lib/perl/WorkflowSteps/MakeNfCoreFuncscanSamplesheet.pm new file mode 100644 index 0000000..8124974 --- /dev/null +++ b/Main/lib/perl/WorkflowSteps/MakeNfCoreFuncscanSamplesheet.pm @@ -0,0 +1,31 @@ +package MicrobiomeWorkflow::Main::WorkflowSteps::MakeNfCoreFuncscanSamplesheet; + +@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep); + +use strict; +use warnings; +use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep; + +sub run { + my ($self, $test, $undo) = @_; + + my $sampleToFastqPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), $self->getParamValue("sampleToFastqFileName")); + my $magAnalysisDir = join("/", $self->getWorkflowDataDir(), $self->getParamValue("magAnalysisDir")); + my $samplesheetPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), "samplesheet.csv"); + + if ($undo) { + $self->runCmd(0,"rm -rf $configPath"); + } else { + open(F, ">", $samplesheetPath) or die "$! :Can't open config file '$samplesheetPath' for writing"; + + # TODO write the header here, then + # loop through the sampleToFastq file and get sample names + # for each sample, write a row to the samplesheet that points to the associated mag output file + close(F); + + ## remove the sampleToFastq file + $self->runCmd(0,"rm -rf $sampleToFastqPath"); ## TODO make sure we want to do this, vs ignore its existence + } +} + +1; \ No newline at end of file From 57344c1f4945a8bb4e2046049fbd965415d01a6b Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Fri, 3 May 2024 14:35:26 -0400 Subject: [PATCH 06/10] add modules for retrieving mag and funcscan results from cluster --- ...trieveFuncscanResultsFromComputeCluster.pm | 46 ++++++++++++++++++ .../RetrieveMagResultsFromComputeCluster.pm | 48 +++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 Main/lib/perl/RetrieveFuncscanResultsFromComputeCluster.pm create mode 100644 Main/lib/perl/RetrieveMagResultsFromComputeCluster.pm diff --git a/Main/lib/perl/RetrieveFuncscanResultsFromComputeCluster.pm b/Main/lib/perl/RetrieveFuncscanResultsFromComputeCluster.pm new file mode 100644 index 0000000..fd0f9eb --- /dev/null +++ b/Main/lib/perl/RetrieveFuncscanResultsFromComputeCluster.pm @@ -0,0 +1,46 @@ +package MicrobiomeWorkflow::Main::RetrieveFunscanResultsFromComputeCluster; + +@ISA = (ReFlow::Controller::WorkflowStepHandle); + +use strict; +use warnings; +use ReFlow::Controller::WorkflowStepHandle; +use File::Basename; + +sub run { + my ($self, $test, $undo) = @_; + + my $clusterDir = join("/", $self->getClusterWorkflowDataDir(), $self->getParamValue("clusterDir")); + my $targetDir = join("/", $self->getWorkflowDataDir(), $self->getParamValue("targetDir")); + + if($undo){ + $self->runCmd(0, "rm -f $targetDir/*"); + }else { + if ($test) { + $self->runCmd(0, "echo test > $targetDir/test.txt"); ## TODO a real file name or something here + } else { + + ## TODO decide what all we need from funcscan and collect it up nicely here + ## $self->runCmd(0, "fun stuff here"); + my $from = "TODO"; + my $to = "TODO"; + + $self->copyFromCluster("$clusterDir", $from, $to, 0); + } + } + +} + +sub getParamDeclaration { + return ( + "clusterDir", + "targetDir", + ); +} + +sub getConfigDeclaration { + return ( + # [name, default, description] + ); +} +1; diff --git a/Main/lib/perl/RetrieveMagResultsFromComputeCluster.pm b/Main/lib/perl/RetrieveMagResultsFromComputeCluster.pm new file mode 100644 index 0000000..a838905 --- /dev/null +++ b/Main/lib/perl/RetrieveMagResultsFromComputeCluster.pm @@ -0,0 +1,48 @@ +package MicrobiomeWorkflow::Main::RetrieveMagResultsFromComputeCluster; + +@ISA = (ReFlow::Controller::WorkflowStepHandle); + +use strict; +use warnings; +use ReFlow::Controller::WorkflowStepHandle; +use File::Basename; + +sub run { + my ($self, $test, $undo) = @_; + + my $clusterDir = join("/", $self->getClusterWorkflowDataDir(), $self->getParamValue("clusterDir")); + my $targetDir = join("/", $self->getWorkflowDataDir(), $self->getParamValue("targetDir")); + + if($undo){ + $self->runCmd(0, "rm -f $targetDir/*"); + }else { + if ($test) { + $self->runCmd(0, "echo test > $targetDir/test.txt"); ## TODO a real file name or something here + } else { + + ## TODO decide what all we need from mag and collect it up nicely here + ## I think we want to return everything except the megahit assemblies ?? + ## were not planning to load anything for the assemblies, but funcscan will need them as input + ## $self->runCmd(0, "fun stuff here"); + my $from = "TODO"; + my $to = "TODO"; + + $self->copyFromCluster("$clusterDir", $from, $to, 0); + } + } + +} + +sub getParamDeclaration { + return ( + "clusterDir", + "targetDir", + ); +} + +sub getConfigDeclaration { + return ( + # [name, default, description] + ); +} +1; From 764a27142a3689a83ab8473857910d98f35ddd2e Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Fri, 3 May 2024 14:35:50 -0400 Subject: [PATCH 07/10] update mag and funcscan subgraphs to reference new modules --- .../xml/workflow/runNfCoreFunscanOnCluster.xml | 16 ++++++++-------- .../lib/xml/workflow/runNfCoreMagOnCluster.xml | 18 ++++++++---------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml b/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml index fd57b94..7bd866b 100644 --- a/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml +++ b/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml @@ -5,6 +5,7 @@ + $$analysisDir$$ @@ -15,32 +16,31 @@ $$nextflowTowerWorkspaceId - - $$sampleToFastqFileName - - - - - + $$magAnalysisDir + + + $$analysisDir$$ + + $$analysisDir$$ $$analysisDir$$/results $$analysisDir$$/nextflow.config + $$analysisDir$$/nf-params.json nf-core/funcscan true - $$analysisDir$$/results $$resultDir$$ diff --git a/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml b/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml index 43ac82d..fde9208 100644 --- a/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml +++ b/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml @@ -5,6 +5,7 @@ + $$analysisDir$$ @@ -15,37 +16,34 @@ $$nextflowTowerWorkspaceId - + $$sampleToFastqFileName - - - - - - + + + $$analysisDir$$ + $$analysisDir$$ $$analysisDir$$/results $$analysisDir$$/nextflow.config + $$analysisDir$$/nf-params.json nf-core/mag true - $$analysisDir$$/results $$resultDir$$ - - + \ No newline at end of file From c873859f7530add68ab3df7d073e4a80b26f746b Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Fri, 3 May 2024 14:36:08 -0400 Subject: [PATCH 08/10] more args for mag and funcscan subgraphs --- .../xml/workflowTemplates/microbiomeRoot.xml | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/Main/lib/xml/workflowTemplates/microbiomeRoot.xml b/Main/lib/xml/workflowTemplates/microbiomeRoot.xml index a10fa22..b2e009c 100644 --- a/Main/lib/xml/workflowTemplates/microbiomeRoot.xml +++ b/Main/lib/xml/workflowTemplates/microbiomeRoot.xml @@ -1,7 +1,7 @@ - + webServices/$$projectName$$/release-$$projectVersionForWebsiteFiles$$ downloadSite/$$projectName$$/release-$$projectVersionForWebsiteFiles$$/ @@ -30,6 +30,7 @@ + rRNAReference_RSRC $$projectName$$.xml @@ -42,6 +43,12 @@ + + + KrakenReferenceDB_RSRC + $$projectName$$.xml + + rRNAReference_RSRC @@ -54,6 +61,12 @@ + + KrakenReferenceDB_RSRC + + + + all_results @@ -83,6 +96,8 @@ + + @@ -144,26 +159,33 @@ - + + + + + ${sampleToWgsFastqFileName} - otuDADA2_${name}_RSRC/Eukdetect_${name} + otuDADA2_${name}_RSRC/MAG_${name} all_results + KrakenReferenceDB_RSRC/TODO 80 ${nextflowTowerAccessToken} ${nextflowTowerWorkspaceId} - + + ${sampleToWgsFastqFileName} - otuDADA2_${name}_RSRC/Eukdetect_${name} + otuDADA2_${name}_RSRC/MAG_${name} + otuDADA2_${name}_RSRC/Funcscan_${name} all_results 40 ${nextflowTowerAccessToken} ${nextflowTowerWorkspaceId} - + @@ -181,7 +203,7 @@ - + CrossStudy_RSRC $$projectName$$.xml @@ -189,15 +211,15 @@ - + LineageTaxonLinkingTable_RSRC $$projectName$$.xml - + - + ISASimple_RSRC $$projectName$$.xml From 0523b4a5fdc47a2b9cd50ef24fbf32734cad009e Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Fri, 3 May 2024 15:27:33 -0400 Subject: [PATCH 09/10] explicit versions for mag and funcscan --- Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml | 4 +++- Main/lib/xml/workflow/runNfCoreMagOnCluster.xml | 4 +++- Main/lib/xml/workflowTemplates/microbiomeRoot.xml | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml b/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml index 7bd866b..5072e3b 100644 --- a/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml +++ b/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml @@ -6,6 +6,7 @@ + $$analysisDir$$ @@ -37,7 +38,8 @@ $$analysisDir$$/nextflow.config $$analysisDir$$/nf-params.json nf-core/funcscan - true + true + $$pipelineVersion$$ diff --git a/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml b/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml index fde9208..724d73a 100644 --- a/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml +++ b/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml @@ -6,6 +6,7 @@ + $$analysisDir$$ @@ -37,7 +38,8 @@ $$analysisDir$$/nextflow.config $$analysisDir$$/nf-params.json nf-core/mag - true + true + $$pipelineVersion$$ diff --git a/Main/lib/xml/workflowTemplates/microbiomeRoot.xml b/Main/lib/xml/workflowTemplates/microbiomeRoot.xml index b2e009c..1a1e27f 100644 --- a/Main/lib/xml/workflowTemplates/microbiomeRoot.xml +++ b/Main/lib/xml/workflowTemplates/microbiomeRoot.xml @@ -159,8 +159,6 @@ - - @@ -172,6 +170,7 @@ 80 ${nextflowTowerAccessToken} ${nextflowTowerWorkspaceId} + 2.5.4 @@ -185,6 +184,7 @@ 40 ${nextflowTowerAccessToken} ${nextflowTowerWorkspaceId} + 1.1.5 From 52702fd1237e5fba67218f454a7b57b8ae040e83 Mon Sep 17 00:00:00 2001 From: Danielle Callan Date: Fri, 3 May 2024 15:36:55 -0400 Subject: [PATCH 10/10] add isPaired param to mag --- Main/lib/perl/WorkflowSteps/MakeNfCoreMagParamsFile.pm | 2 ++ Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml | 5 +++-- Main/lib/xml/workflow/runNfCoreMagOnCluster.xml | 8 +++++--- Main/lib/xml/workflowTemplates/microbiomeRoot.xml | 3 +-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Main/lib/perl/WorkflowSteps/MakeNfCoreMagParamsFile.pm b/Main/lib/perl/WorkflowSteps/MakeNfCoreMagParamsFile.pm index 16cc6b3..5495c06 100644 --- a/Main/lib/perl/WorkflowSteps/MakeNfCoreMagParamsFile.pm +++ b/Main/lib/perl/WorkflowSteps/MakeNfCoreMagParamsFile.pm @@ -12,6 +12,7 @@ sub run { my $paramsFilePath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), "nf-params.json"); my $samplesheetPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), "samplesheet.csv"); my $krakenDBPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("krakenDBPath")); + my $singleEnd = $self->getParamValue("isPaired") ? "false" : "true"; ## TODO compare these args to what i tested on pmacs and make sure i didnt miss anything ## TODO figure out for sure which of these ref dbs we need and update them @@ -27,6 +28,7 @@ sub run { \"input\": \"$samplesheetPath\", \"outdir\": \"out\", \"kraken2_db\": \"$krakenDBPath\", + \"single_end\": $singleEnd, \"cat_db\": \"TODO\", \"gtdb_db\": \"TODO\", \"gtdb_mash\": \"TODO\", diff --git a/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml b/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml index 5072e3b..16f11d5 100644 --- a/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml +++ b/Main/lib/xml/workflow/runNfCoreFunscanOnCluster.xml @@ -18,11 +18,13 @@ + $$analysisDir$$ $$sampleToFastqFileName $$magAnalysisDir + - + $$analysisDir$$ $$analysisDir$$ @@ -31,7 +33,6 @@ - $$analysisDir$$ $$analysisDir$$/results diff --git a/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml b/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml index 724d73a..fe157c6 100644 --- a/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml +++ b/Main/lib/xml/workflow/runNfCoreMagOnCluster.xml @@ -7,6 +7,7 @@ + $$analysisDir$$ @@ -18,12 +19,13 @@ - + $$analysisDir$$ $$sampleToFastqFileName - - + $$analysisDir$$ + $$krakenDB$$ + $$isPaired$$ $$analysisDir$$ diff --git a/Main/lib/xml/workflowTemplates/microbiomeRoot.xml b/Main/lib/xml/workflowTemplates/microbiomeRoot.xml index 1a1e27f..7bc22f1 100644 --- a/Main/lib/xml/workflowTemplates/microbiomeRoot.xml +++ b/Main/lib/xml/workflowTemplates/microbiomeRoot.xml @@ -161,7 +161,6 @@ - ${sampleToWgsFastqFileName} otuDADA2_${name}_RSRC/MAG_${name} @@ -171,11 +170,11 @@ ${nextflowTowerAccessToken} ${nextflowTowerWorkspaceId} 2.5.4 + ${isPaired} - ${sampleToWgsFastqFileName} otuDADA2_${name}_RSRC/MAG_${name}