Skip to content

Commit

Permalink
v2.0.1
Browse files Browse the repository at this point in the history
- Update versions (Dorado, MultiQC, Samtools).
- Update Dorado default model
- Some code cleanup
  • Loading branch information
dialvarezs authored Jun 3, 2024
1 parent 67ff1c7 commit 84af1e0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 45 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ nextflow run ont-basecalling-demultiplexing/ -profile apptainer -params-file my_
| `output_dir` | False | `demultiplex_results` | Path to the folder where the results will be saved. |
| `fastq_output` | False | `true` | If `true`, the pipeline will generate FASTQ files (if not, it would be UBAM files). |
| `qscore_filter` | False | `10` | Minimum QScore for the "pass" data, used for demultiplexing. |
| `dorado_basecalling_model` | False | `dna_r10.4.1_e8.2_400bps_sup@v4.3.0` | Model used for basecalling. |
| `dorado_basecalling_model` | False | `dna_r10.4.1_e8.2_400bps_sup@v5.0.0` | Model used for basecalling. |
| `dorado_basecalling_extra_config` | False | - | Extra configuration for Dorado basecalling. |
| `dorado_basecalling_gpus` | False | `1` | Number of GPUs to use for basecalling. |
| `skip_demultiplexingskip_demultiplexing` | False | `false` | If `true`, the pipeline will not perform demultiplexing |
Expand Down
10 changes: 5 additions & 5 deletions conf/containers.config
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// containers
process {
withLabel: linux { container = 'ubuntu:22.04' }
withLabel: linux { container = 'ubuntu:24.04' }
withLabel: fastqc { container = 'quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0' }
withLabel: nanoplot { container = 'quay.io/biocontainers/nanoplot:1.42.0--pyhdfd78af_0' }
withLabel: multiqc { container = 'quay.io/biocontainers/multiqc:1.19--pyhdfd78af_0' }
withLabel: multiqc { container = 'quay.io/biocontainers/multiqc:1.22.2--pyhdfd78af_0' }
withLabel: pigz { container = 'ghcr.io/dialvarezs/containers/utils:latest' }
withLabel: pycoqc { container = 'quay.io/biocontainers/pycoqc:2.5.2--py_0' }
withLabel: samtools { container = 'quay.io/biocontainers/samtools:1.19.2--h50ea8bc_0' }
withLabel: samtools { container = 'quay.io/biocontainers/samtools:1.20--h50ea8bc_0' }

withLabel: dorado {
container = params.use_dorado_container
? 'ghcr.io/dialvarezs/containers/dorado:0.5.3'
: null
? 'ghcr.io/dialvarezs/containers/dorado:0.7.0'
: null
containerOptions = '--nv'
}
}
2 changes: 1 addition & 1 deletion conf/params.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ params {
output_dir = 'demultiplex_results/'
fastq_output = true
qscore_filter = 10
dorado_basecalling_model = 'dna_r10.4.1_e8.2_400bps_sup@v4.3.0'
dorado_basecalling_model = 'dna_r10.4.1_e8.2_400bps_sup@v5.0.0'
dorado_basecalling_extra_config = ''
dorado_basecalling_gpus = 1
skip_demultiplexing = false
Expand Down
37 changes: 0 additions & 37 deletions lib/groovy/utils.gvy
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
import org.yaml.snakeyaml.Yaml

/*
* Add default parameter values (a mapping) if they are not defined,
* reading them from a YAML file
*/
def addDefaultParamValues(params, defaultsFile) {
yaml = new Yaml()
defaultValues = yaml.load(file(defaultsFile))

defaultValues.each { name, value ->
params[name] = evaluateWorkflowVars(getParamValue(params, name, value))
}
}

/*
* Evaluate workflow instrospection variables (workflow.*) inside a string
*/
def evaluateWorkflowVars(value) {
matches = (value =~ /\$\{workflow\.[^}]*\}/).findAll()
evaluated = value
matches.each { m ->
name = (m =~ /(?<=\{workflow\.).*(?=\})/).findAll()[0]
evaluated = evaluated.replace(m, workflow[name].toString())
}

return evaluated
}

/*
* Check if file exists of throw error
*/
Expand All @@ -43,14 +14,6 @@ def pathCheck(path, isDirectory = false) {
return f
}

def isEmpty(params, name) {
return !params.containsKey(name) || params[name] == null
}

def getParamValue(params, name, defaultValue) {
return isEmpty(params, name) ? defaultValue : params[name]
}

def sanitizeFilename(filename) {
return filename.toLowerCase().replaceAll(' ', '_').replaceAll('[^a-z0-9._-]', '')
}
Expand Down
2 changes: 1 addition & 1 deletion params.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sample_data: input/samples.csv
output_dir: demultiplex_results/
fastq_output: true
qscore_filter: 10
dorado_basecalling_model: dna_r10.4.1_e8.2_400bps_sup@v4.2.0
dorado_basecalling_model: dna_r10.4.1_e8.2_400bps_sup@v5.0.0
dorado_basecalling_extra_config: ''
dorado_basecalling_gpus: 1
skip_demultiplexing: false
Expand Down

0 comments on commit 84af1e0

Please sign in to comment.