Skip to content

Commit

Permalink
Merge pull request #56 from uclahs-cds/nzeltser-add-schema
Browse files Browse the repository at this point in the history
add schema validation
  • Loading branch information
alkaZeltser authored Mar 14, 2024
2 parents 25c2530 + 41599ed commit 46a57e5
Show file tree
Hide file tree
Showing 5 changed files with 553 additions and 197 deletions.
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
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'
]

}
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()

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

0 comments on commit 46a57e5

Please sign in to comment.