Skip to content

Commit

Permalink
nextflow config with indv envs
Browse files Browse the repository at this point in the history
  • Loading branch information
saramonzon committed Oct 15, 2023
1 parent 5c5788c commit 751e7e5
Showing 1 changed file with 190 additions and 0 deletions.
190 changes: 190 additions & 0 deletions nextflow_2.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
/*
* -------------------------------------------------
* Nextflow config file
* -------------------------------------------------
* Default config options for all environments.
* Cluster-specific config options should be saved
* in the conf folder and imported under a profile
* name here.
*/

manifest {
homePage = 'https://github.com/BU-ISCIII/bacterial_wgs_training'
description = 'This is a project for wgs analysis trainning using nextflow and containers.'
mainScript = 'main.nf'
}

// Global default params, used in configs
params {
ver = '1.0' //Pipeline version
nf_required_version = '0.27.6' //Minimum version of Nextflow required

reads="$baseDir/data/samples/*.fastq.gz"
outdir='results'
step = "preprocessing"
output_docs = "${baseDir}/docs/output.md"
multiqc_config = "${baseDir}/conf/multiqc_config.yaml"
// Mapping-duplicates defaults
keepduplicates = false
notrim = false
outbreaker_config = false
gtf = false
bwa_index = false
fasta = false
cut_mean_quality = 20
qualified_quality_phred = 20
unqualified_percent_limit = 10
min_trim_length = 50
scheme = false
}

profiles {

standard {
includeConfig 'conf/base.config'
}

docker {
includeConfig 'conf/docker.config'
}

singularity {
includeConfig 'conf/singularity.config'
}

conda {
process{
// conda= "/opt/miniconda3/envs/bacterial_wgs_training/"
withName:makeBWAindex {
conda = "/opt/miniconda3/envs/bwa/"
}
withName:fastqc {
conda = "/opt/miniconda3/envs/fastqc/"
}
withName:trimming {
conda = "/opt/miniconda3/envs/fastp/"
}
withName:bwa {
conda = "/opt/miniconda3/envs/bwa/"
}
withName:samtools {
conda = "/opt/miniconda3/envs/mapping/"
}
withName:bwa_mapped {
conda = "/opt/miniconda3/envs/mapping/"
}
withName:picard {
conda = "/opt/miniconda3/envs/mapping/"
}
withName:unicycler {
conda = "/opt/miniconda3/envs/unicycler/"
}
withName:quast {
conda = "/opt/miniconda3/envs/quast/"
}
withName:prokka {
conda = "/opt/miniconda3/envs/prokka/"
}
withName:snippy {
conda = "/opt/miniconda3/envs/snippy/"
}
withName:snippy_core {
conda = "/opt/miniconda3/envs/snippy/"
}
withName:gubbins {
conda = "/opt/miniconda3/envs/snippy/"
}
withName:iqtree {
conda = "/opt/miniconda3/envs/iqtree/"
}
withName:scheme_evaluation {
conda = "/opt/miniconda3/envs/taranis/"
}
withName:taranis {
conda = "/opt/miniconda3/envs/taranis/"
}
withName:plasmidid {
conda = "/opt/miniconda3/envs/plasmidid/"
}
withName:srst2_virulence {
conda = "/opt/miniconda3/envs/srst2/"
}
withName:srst2_mlst {
conda = "/opt/miniconda3/envs/srst2/"
}
withName:srst2_serogroup {
conda = "/opt/miniconda3/envs/srst2/"
}
withName:srst2_resistance {
conda = "/opt/miniconda3/envs/srst2/"
}
withName:multiqc_preprocessing {
conda = "/opt/miniconda3/envs/multiqc/"
}
withName:multiqc_mapping {
conda = "/opt/miniconda3/envs/multiqc/"
}
withName:multiqc_assembly {
conda = "/opt/miniconda3/envs/multiqc/"
}
withName:multiqc_outbreakSNP {
conda = "/opt/miniconda3/envs/multiqc/"
}
withName:multiqc_preprocessing {
conda = "/opt/miniconda3/envs/multiqc/"
}
}
}

testing {
// TODO
}

aws {
// TO DO
}

none {
// Don't load any config (for use with custom home configs)
}

}

// Capture exit codes from upstream processes when piping
process.shell = ['/bin/bash', '-euo', 'pipefail']

// By default output execution reports
timeline {
enabled = true
file = "${params.outdir}/timeline.html"
}
report {
enabled = true
file = "${params.outdir}/report.html"
}
trace {
enabled = true
file = "${params.outdir}/trace.txt"
}
dag {
enabled = true
file = "${params.outdir}/DAG.svg"
}

// Function to ensure that resource requirements don't go beyond
// a maximum limit
//def check_max(obj, type) {
// if(type == 'memory'){
// if(obj.compareTo(params.max_memory) == 1)
// return params.max_memory
// else
// return obj
// } else if(type == 'time'){
// if(obj.compareTo(params.max_time) == 1)
// return params.max_time
// else
// return obj
// } else if(type == 'cpus'){
// return Math.min( obj, params.max_cpus )
// }
//}

0 comments on commit 751e7e5

Please sign in to comment.