Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add schema validation #56

Merged
merged 14 commits into from
Mar 14, 2024
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Add workflow to run Nextflow configuration regression tests
- Add NFTest infrastructure and test cases
- Add one Nextflow regression test
- Add parameter validation schema

### Changed
- Update CI/CD workflow to use current image
Expand Down
9 changes: 9 additions & 0 deletions config/custom_schema_types.config
alkaZeltser marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This custom schema namespace implements a custom type for checking input BAMs for call-gSNP
*/
custom_schema_types {
allowed_input_types = [
'bam'
]
alkaZeltser marked this conversation as resolved.
Show resolved Hide resolved

}
4 changes: 4 additions & 0 deletions config/methods.config
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ methods {
methods.set_pipeline_logs()
methods.set_env()

schema.load_custom_types("${projectDir}/external/pipeline-Nextflow-config/config/schema/custom_schema_types.config")
schema.load_custom_types("${projectDir}/config/custom_schema_types.config")
schema.validate()
alkaZeltser marked this conversation as resolved.
Show resolved Hide resolved

methods.setup_docker_cpus()
}
}
99 changes: 99 additions & 0 deletions config/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
sample_id:
type: 'String'
required: true
help: 'Sample ID'
dataset_id:
type: 'String'
required: true
help: 'Dataset ID'
output_dir:
type: 'Path'
mode: 'w'
required: true
help: 'Absolute path to output directory'
save_intermediate_files:
type: 'Bool'
required: true
default: false
help: 'Whether to save intermediate files'
save_interval_list:
type: 'Bool'
required: true
default: false
help: 'Whether to save a copy of the interval list generated for picard CollectHsMetrics'
collect_metrics:
type: 'Bool'
required: true
default: true
help: 'Whether to run picard CollectHsMetrics'
off_target_depth:
type: 'Bool'
required: true
default: true
help: 'Whether to calculate depth at off-target dbSNP loci'
output_enriched_target_file:
type: 'Bool'
required: true
default: true
help: 'Whether or not to output a new target file containing high-coverage off-target dbSNP loci'
target_depth:
type: 'Bool'
required: true
default: false
help: 'Whether or not to output a new target file containing high-coverage off-target dbSNP loci'
target_bed:
type: 'String'
allow_empty: true
required: true
help: 'Target intervals to process for DNA panel/targeted sequencing samples; leave empty for WGS'
bait_bed:
type: 'String'
allow_empty: true
required: true
help: 'Target intervals to process for DNA panel/targeted sequencing samples; leave empty for WGS'
target_interval_list:
type: 'String'
allow_empty: true
required: true
help: 'Target intervals to process for DNA panel/targeted sequencing samples; leave empty for WGS'
bait_interval_list:
type: 'String'
allow_empty: true
required: true
help: 'Target intervals to process for DNA panel/targeted sequencing samples; leave empty for WGS'
picard_CollectHsMetrics_extra_args:
type: 'String'
allow_empty: true
required: true
help: 'Extra arguments for CollectHsMetrics'
samtools_depth_extra_args:
type: 'String'
allow_empty: true
required: true
help: 'Extra arguments for samtools depth'
reference_dict:
type: 'Path'
mode: 'r'
required: true
help: 'Absolute path to reference genome dictionary'
reference_dbSNP:
type: 'Path'
mode: 'r'
required: true
help: 'Absolute path to thinned dbSNP VCF'
genome_sizes:
type: 'Path'
mode: 'r'
required: true
help: 'Absolute path to table of chromosome lengths, can be fasta index'
input:
type: 'InputNamespace'
required: true
help: 'Input samples'
elements:
bam:
type: 'Path'
mode: 'r'
required: true
help: 'Input BAM for coverage analysis'
Loading
Loading