Skip to content

Commit

Permalink
Added shared conda env location
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmero committed Feb 26, 2024
1 parent dbadb08 commit 153df48
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
4 changes: 3 additions & 1 deletion modules/trim.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ process trim_primer {

publishDir params.outdir, mode: 'copy'

conda "${projectDir}/envs/biopython.yaml"
conda "${ params.conda_env_location != null && params.conda_env_location != '' ?
params.conda_env_location + '/biopython' :
projectDir + '/envs/biopython.yaml' }"

input:
path fastq
Expand Down
5 changes: 4 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ params {

index_template_file = "$projectDir/.test/data/indexes.txt"

demultiplex = true
demultiplex = false

//number of bases to search for index 1 at start of read
bases_num_r1 = 12
Expand All @@ -30,6 +30,9 @@ params {
//if false, the database is queried to create one
//if true, config.txt should be in the input directory
is_config_file_provided = true

// if specified, use this location to load prebuilt conda environments
conda_env_location = ""
}

//SQL DB Plugin
Expand Down
28 changes: 21 additions & 7 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,24 @@
"default": false,
"description": "Optional ready-made config file for splitcode. Use this to skip the databse index lookup. Must be called config.txt and put in input directory."
}
},
"required": [
"fwd_primer",
"rev_primer",
"primer_mismatches",
"barcode_length"
]
}
},
"generic_options": {
"title": "Generic options",
"type": "object",
"fa_icon": "fas fa-file-import",
"description": "Less common options for the pipeline, typically set in a config file.",
"help_text": "These options are common to all nf-core pipelines and allow you to customise some of the core preferences for how the pipeline runs.\n\nTypically these options would be set in a Nextflow config file loaded for all pipeline runs, such as `~/.nextflow/config`.",
"properties": {
"conda_env_location": {
"type": "string",
"format": "directory-path",
"description": "Use this location for pre-build conda environments (if blank, new conda environments will be created).",
"fa_icon": "fas fa-cog",
"default": "",
"hidden": true
}
}
}
},
"allOf": [
Expand All @@ -128,6 +139,9 @@
},
{
"$ref": "#/definitions/demultiplex_options"
},
{
"$ref": "#/definitions/generic_options"
}
]
}

0 comments on commit 153df48

Please sign in to comment.