Skip to content

Commit

Permalink
Merge pull request #2 from artic-network/dev
Browse files Browse the repository at this point in the history
Add squirrel v1.0.8 options
  • Loading branch information
rmcolq authored Aug 26, 2024
2 parents 72367a6 + eea7b12 commit cabac4f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 15 deletions.
19 changes: 15 additions & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ process squirrel {

input:
path fasta
path refs
path "refs.fa"
path "bg.fa"
path additional_mask

output:
Expand All @@ -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 )
Expand All @@ -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 += " -bf bg.fa"
if ( params.outgroups )
extra += " --outgroups ${params.outgroups}"

Expand All @@ -52,13 +57,19 @@ 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)
}

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)
}
5 changes: 4 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
34 changes: 24 additions & 10 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand All @@ -51,25 +51,39 @@
"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`",
"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",
"format": "file-path",
"title": "Additional Background",
"description": "Include this additional FASTA file as background to the phylogenetics",
"help_text": ""
},
"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",
"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": ""
Expand Down

0 comments on commit cabac4f

Please sign in to comment.