From 0ef7f07490305c688b318746848955e8c9379c12 Mon Sep 17 00:00:00 2001 From: Rachel Colquhoun Date: Mon, 26 Aug 2024 10:33:39 +0100 Subject: [PATCH 1/3] updates to add new squirrel options --- main.nf | 19 +++++++++++++++---- nextflow.config | 5 ++++- nextflow_schema.json | 28 +++++++++++++++++++++------- 3 files changed, 40 insertions(+), 12 deletions(-) diff --git a/main.nf b/main.nf index b10aac7..304c41d 100644 --- a/main.nf +++ b/main.nf @@ -6,7 +6,8 @@ process squirrel { input: path fasta - path refs + path "refs.fa" + path "bg.fa" path additional_mask output: @@ -20,7 +21,7 @@ process squirrel { if ( params.seq_qc ) extra += " --seq-qc" if ( params.assembly_refs ) - extra += " --assembly-refs ${refs}" + extra += " --assembly-refs refs.fa" if ( params.no_mask ) extra += " --no-mask" if ( params.no_itr_mask ) @@ -35,8 +36,12 @@ process squirrel { extra += " --clade ${params.clade}" if ( params.run_phylo ) extra += " --run-phylo" + if ( params.run_abobec3_phylo ) + extra += " --run-apobec3-phylo" if ( params.include_background ) extra += " --include-background" + if ( params.additional_background ) + extra += " --additional-background bg.fa" if ( params.outgroups ) extra += " --outgroups ${params.outgroups}" @@ -52,7 +57,13 @@ workflow { refs_ch = channel.fromPath("${projectDir}/${params.default_assembly_refs}", checkIfExists:true) } -if ( params.additional_mask ) { + if ( params.additional_background ) { + bg_ch = channel.fromPath("${params.additional_background}", checkIfExists:true) + } else { + bg_ch = channel.fromPath("${projectDir}/${params.default_additional_background}", checkIfExists:true) + } + + if ( params.additional_mask ) { mask_ch = channel.fromPath("${params.additional_mask}", checkIfExists:true) } else { mask_ch = channel.fromPath("${projectDir}/${params.default_additional_mask}", checkIfExists:true) @@ -60,5 +71,5 @@ if ( params.additional_mask ) { fasta_ch = Channel.of(file("${params.fasta}", type: "file", checkIfExists:true)) - squirrel(fasta_ch, refs_ch, mask_ch) + squirrel(fasta_ch, refs_ch, bg_ch, mask_ch) } diff --git a/nextflow.config b/nextflow.config index 7e1b22f..f01eb04 100644 --- a/nextflow.config +++ b/nextflow.config @@ -40,7 +40,10 @@ params { concatenate = false clade = null run_phylo = false + run_apobec3_phylo = false include_background = false + additional_background = null + default_additional_background = "data/empty.fa" outgroups = null wf { @@ -60,7 +63,7 @@ manifest { description = 'Some QUIck Rearranging to Resolve Evolutionary Links.' mainScript = 'main.nf' nextflowVersion = '>=20.10.0' - version = '1.0.7' + version = '1.0.8' } executor { diff --git a/nextflow_schema.json b/nextflow_schema.json index 7286a05..4c669b1 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -22,11 +22,11 @@ "clade": { "type": "string", "title": "Clade", - "description": "Specify whether the alignment is primarily for `cladei` or `cladeii`.", + "description": "Specify whether the alignment is primarily for 'cladei' or 'cladeii'.", "enum": [ "cladei", - "cladeia", - "cladeib", + "cladeia", + "cladeib", "cladeii", "cladeiia", "cladeiib" @@ -38,7 +38,7 @@ "default": false, "title": "Run Sequence QC", "description": "Flag potentially problematic SNPs and sequences.", - "help_text": "Note that if run_phylo is also selected this additionally run qc based on the phylogenetic tree." + "help_text": "Note that if 'Run Phylo' is also selected this additionally runs qc based on the phylogenetic tree." }, "additional_mask": { "type": "string", @@ -51,16 +51,30 @@ "type": "boolean", "default": false, "title": "Run Phylo", - "description": "Run phylogenetic reconstruction pipeline", + "description": "Run phylogenetics pipeline", + "help_text": "" + }, + "run_apobec3_phylo": { + "type": "boolean", + "default": false, + "title": "Run APOBEC3 Phylo", + "description": "Run phylogenetics & APOBEC3-mutation reconstruction pipeline", "help_text": "" }, "include_background": { "type": "boolean", "default": false, "title": "Include Background", - "description": "Include a default background set of sequences for the phylogenetics pipeline. Only the included outgroup sequences will be used, not those specified with `Outgroups`", + "description": "Include a default background set of sequences for the phylogenetics pipeline. Only the included outgroup sequences will be used, not those specified with 'Outgroups'", "help_text": "The set will be determined by the `--clade` specified." }, + "additional_background": { + "type": "string", + "format": "file-path", + "title": "Additional Background", + "description": "Include this additional FASTA file as background to the phylogenetics", + "help_text": "" + }, "outgroups": { "type": "string", "title": "Outgroups", @@ -69,7 +83,7 @@ }, "assembly_refs": { "type": "string", - "format": "path", + "format": "file-path", "title": "Assembly References", "description": "References to check for `calls to reference` against, used only by the sequence QC process.", "help_text": "" From 406ba9afda35226eafa127681dce583d969b22f2 Mon Sep 17 00:00:00 2001 From: Rachel Colquhoun Date: Mon, 26 Aug 2024 10:38:33 +0100 Subject: [PATCH 2/3] update schema --- nextflow_schema.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 4c669b1..347a505 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -65,8 +65,8 @@ "type": "boolean", "default": false, "title": "Include Background", - "description": "Include a default background set of sequences for the phylogenetics pipeline. Only the included outgroup sequences will be used, not those specified with 'Outgroups'", - "help_text": "The set will be determined by the `--clade` specified." + "description": "Include a default background set of sequences for the phylogenetics pipeline. ", + "help_text": "The set will be determined by the `--clade` specified. Only the included outgroup sequences will be used, not those specified with 'Outgroups'." }, "additional_background": { "type": "string", @@ -78,8 +78,8 @@ "outgroups": { "type": "string", "title": "Outgroups", - "description": "Specify which MPXV outgroup(s) in the alignment to use in the phylogeny. These must be in the input FASTA. Ignored if `Include Background` is selected.", - "help_text": "These are used only by the phylogenetics module and will get pruned out from the final tree." + "description": "Specify which MPXV outgroup(s) in the alignment to use in the phylogeny. ", + "help_text": "These are used only by the phylogenetics module and will get pruned out from the final tree. These must be in the input FASTA. Ignored if 'Include Background' is selected." }, "assembly_refs": { "type": "string", From eea7b1282e99add7ddf20f90cf29e6fd967515be Mon Sep 17 00:00:00 2001 From: Rachel Colquhoun Date: Mon, 26 Aug 2024 10:57:05 +0100 Subject: [PATCH 3/3] fix --- main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.nf b/main.nf index 304c41d..0dba77c 100644 --- a/main.nf +++ b/main.nf @@ -41,7 +41,7 @@ process squirrel { if ( params.include_background ) extra += " --include-background" if ( params.additional_background ) - extra += " --additional-background bg.fa" + extra += " -bf bg.fa" if ( params.outgroups ) extra += " --outgroups ${params.outgroups}"