Skip to content

Commit

Permalink
Merge pull request #285 from nf-core/validation
Browse files Browse the repository at this point in the history
adding nf-core/validation
  • Loading branch information
jfy133 authored Jul 19, 2023
2 parents c61ea09 + 2354a87 commit 22f26b2
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 320 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### `Added`

- [#290](https://github.com/nf-core/funcscan/pull/290) Merged pipeline template of nf-core/tools version 2.9, updated references. (by @jfy133)
- [#285](https://github.com/nf-core/funcscan/pull/285) Use nf-validation for samplesheet checking and added support for `fna.gz` input FASTA files (by @louperelo, @mirpedrol, @jfy133)

- [#295](https://github.com/nf-core/funcscan/pull/295) Add Prokka to MultiQC output (by @louperelo)

Expand Down
28 changes: 10 additions & 18 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,19 @@
"sample": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Sample name must be provided and cannot contain spaces"
"errorMessage": "Sample name must be provided and cannot contain spaces",
"meta": ["id"],
"unique": true
},
"fastq_1": {
"fasta": {
"type": "string",
"pattern": "^\\S+\\.f(ast)?q\\.gz$",
"errorMessage": "FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
},
"fastq_2": {
"errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'",
"anyOf": [
{
"type": "string",
"pattern": "^\\S+\\.f(ast)?q\\.gz$"
},
{
"type": "string",
"maxLength": 0
}
]
"format": "file-path",
"exists": true,
"pattern": "^\\S+\\.f(ast|n)?a\\.gz$",
"errorMessage": "Fasta file for reads must be provided, cannot contain spaces and must have extension '.fa.gz', '.fna.gz' or '.fasta.gz'",
"unique": true
}
},
"required": ["sample", "fastq_1"]
"required": ["sample", "fasta"]
}
}
215 changes: 0 additions & 215 deletions bin/check_samplesheet.py

This file was deleted.

10 changes: 1 addition & 9 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]

withName: SAMPLESHEET_CHECK {
publishDir = [
path: { "${params.outdir}/pipeline_info" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: CUSTOM_DUMPSOFTWAREVERSIONS {
publishDir = [
path: { "${params.outdir}/pipeline_info" },
Expand Down Expand Up @@ -57,7 +49,7 @@ process {
enabled: false,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.prefix = { "${meta.it}.fa" }
ext.prefix = { "${meta.id}.fa" }
}

withName: PROKKA {
Expand Down
33 changes: 33 additions & 0 deletions conf/test_nothing.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.
Although in this case we turn everything off
Use as follows:
nextflow run nf-core/funcscan -profile test,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/

params {
config_profile_name = 'Test nothing profile'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'

// Input data
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/samplesheet.csv'
amp_hmmsearch_models = 'https://raw.githubusercontent.com/nf-core/test-datasets/funcscan/hmms/mybacteriocin.hmm'

annotation_tool = 'prodigal'

run_arg_screening = false
run_amp_screening = false
run_bgc_screening = false
}
1 change: 0 additions & 1 deletion lib/WorkflowMain.groovy
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class WorkflowMain {
" https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md"
}


//
// Validate parameters and print summary to screen
//
Expand Down
31 changes: 0 additions & 31 deletions modules/local/samplesheet_check.nf

This file was deleted.

3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ params {
genome = null
igenomes_base = 's3://ngi-igenomes/igenomes'
igenomes_ignore = false


// Annotation options
annotation_tool = 'pyrodigal'
Expand Down Expand Up @@ -329,6 +329,7 @@ profiles {
test_bgc { includeConfig 'conf/test_bgc.config' }
test_full { includeConfig 'conf/test_full.config' }
test_deeparg { includeConfig 'conf/test_deeparg.config' }
test_nothing { includeConfig 'conf/test_nothing.config' }
}

// Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile
Expand Down
1 change: 1 addition & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"exists": true,
"mimetype": "text/csv",
"pattern": "^\\S+\\.csv$",
"schema": "assets/schema_input.json",
"description": "Path to comma-separated file containing information sample names and paths to corresponding FASTA files.",
"help_text": "Before running the pipeline, you will need to create a design file with information about the samples to be scanned by nf-core/funcscan, containing `sample name` and `path/to/your/contigs.fasta`. Use this parameter to specify its location. It has to be a comma-separated file with 2 columns, and a header row (`sample, fasta`). See [usage docs](https://nf-co.re/funcscan/usage#samplesheet-input).",
"fa_icon": "fas fa-file-csv"
Expand Down
Loading

0 comments on commit 22f26b2

Please sign in to comment.