diff --git a/CHANGELOG.md b/CHANGELOG.md index ad52e37..4fd1623 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed +## [1.0.0] - 2024-03-12 +### Changed +- Standardized input structure + ## [1.0.0-rc.1] - 2024-03-08 ### Added - Add `schema.yaml` diff --git a/config/custom_schema_types.config b/config/custom_schema_types.config index c454cb1..0e5df32 100644 --- a/config/custom_schema_types.config +++ b/config/custom_schema_types.config @@ -1,5 +1,8 @@ custom_schema_types { allowed_input_types = [ + 'BAM' + ] + allowed_bam_types = [ 'normal', 'tumor' ] @@ -55,7 +58,7 @@ custom_schema_types { } types = [ - 'BAMEntryList': custom_schema_types.check_list_of_namespace, + 'MapList': custom_schema_types.check_list_of_namespace, 'ResourceUpdateNamespace': custom_schema_types.check_resource_update_namespace, 'ResourceUpdateList': custom_schema_types.check_resource_update_list ] diff --git a/config/methods.config b/config/methods.config index 01f0663..ae8786b 100644 --- a/config/methods.config +++ b/config/methods.config @@ -7,7 +7,7 @@ includeConfig "${projectDir}/external/pipeline-Nextflow-config/config/retry/retr methods { get_ids_from_bams = { params.samples_to_process = [] as Set - params.input.each { k, v -> + params.input['BAM'].each { k, v -> v.each { sampleMap -> def bam_path = sampleMap['path'] def bam_header = bam_parser.parse_bam_header(bam_path) diff --git a/config/schema.yaml b/config/schema.yaml index 2c295bd..25c226a 100644 --- a/config/schema.yaml +++ b/config/schema.yaml @@ -107,31 +107,36 @@ input: required: true help: 'Input to process' elements: - normal: - type: 'BAMEntryList' - required: false - help: 'Normal sample input specifications' + BAM: + type: 'InputBAMNamespace' + required: true + help: 'BAM input specifications' elements: - path: - type: 'Path' - mode: 'r' - required: true - help: 'Absolute path to normal sample BAM files' - read_length: - type: 'Integer' + normal: + type: 'MapList' required: false - help: 'Length of the reads in the BAM file' - tumor: - type: 'BAMEntryList' - required: false - help: 'Tumor sample input specifications' - elements: - path: - type: 'Path' - mode: 'r' - required: true - help: 'Absolute path to tumor sample BAM files' - read_length: - type: 'Integer' + help: 'Normal sample input specifications' + elements: + path: + type: 'Path' + mode: 'r' + required: true + help: 'Absolute path to normal sample BAM files' + read_length: + type: 'Integer' + required: false + help: 'Length of the reads in the BAM file' + tumor: + type: 'MapList' required: false - help: 'Length of the reads in the BAM file' + help: 'Tumor sample input specifications' + elements: + path: + type: 'Path' + mode: 'r' + required: true + help: 'Absolute path to tumor sample BAM files' + read_length: + type: 'Integer' + required: false + help: 'Length of the reads in the BAM file' diff --git a/input/example-multiple-samples.yaml b/input/example-multiple-samples.yaml index 0f1bf76..648b9e1 100644 --- a/input/example-multiple-samples.yaml +++ b/input/example-multiple-samples.yaml @@ -2,11 +2,12 @@ patient_id: 'patient_id' dataset_id: 'dataset_id' input: - normal: - - path: /absolute/path/to/normal.bam - read_length: length - tumor: - - path: /absolute/path/to/first.tumor.bam - read_length: length - - path: /absolute/path/to/second.tumor.bam - read_length: length + BAM: + normal: + - path: /absolute/path/to/normal.bam + read_length: length + tumor: + - path: /absolute/path/to/first.tumor.bam + read_length: length + - path: /absolute/path/to/second.tumor.bam + read_length: length diff --git a/input/example.yaml b/input/example.yaml index 87cb163..6a1a7ec 100644 --- a/input/example.yaml +++ b/input/example.yaml @@ -2,9 +2,10 @@ patient_id: 'patient_id' dataset_id: 'dataset_id' input: - normal: - - path: /absolute/path/to/normal.bam - read_length: length - tumor: - - path: /absolute/path/to/tumor.bam - read_length: length + BAM: + normal: + - path: /absolute/path/to/normal.bam + read_length: length + tumor: + - path: /absolute/path/to/tumor.bam + read_length: length diff --git a/nextflow.config b/nextflow.config index b4f3feb..ed9ca34 100644 --- a/nextflow.config +++ b/nextflow.config @@ -3,5 +3,5 @@ manifest { name = 'generate-SQC-BAM' author = 'Sorel Fitz-Gibbon' description = 'Sample level QC for DNA sequencing data' - version = '1.0.0-rc.1' + version = '1.0.0' } diff --git a/test/yaml/a_mini-multiple-samples.yaml b/test/yaml/a_mini-multiple-samples.yaml index 042f9f3..5f0d477 100644 --- a/test/yaml/a_mini-multiple-samples.yaml +++ b/test/yaml/a_mini-multiple-samples.yaml @@ -2,12 +2,12 @@ patient_id: 'TWGSAMIN000001' dataset_id: 'TWGSAMIN' input: - normal: - - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/HG002.N-n2.bam - read_length: 150 - - tumor: - - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/S2.T-n2.bam - read_length: 150 - - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/S2.T-n1_SMadjust.bam - read_length: 150 + BAM: + normal: + - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/HG002.N-n2.bam + read_length: 150 + tumor: + - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/S2.T-n2.bam + read_length: 150 + - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/S2.T-n1_SMadjust.bam + read_length: 150 diff --git a/test/yaml/a_mini.yaml b/test/yaml/a_mini.yaml index c839abf..7677047 100644 --- a/test/yaml/a_mini.yaml +++ b/test/yaml/a_mini.yaml @@ -2,10 +2,10 @@ patient_id: 'TWGSAMIN000001' dataset_id: 'TWGSAMIN' input: - normal: - - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/HG002.N-n2.bam - read_length: 150 - - tumor: - - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/S2.T-n2.bam - read_length: 150 + BAM: + normal: + - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/HG002.N-n2.bam + read_length: 150 + tumor: + - path: /hot/software/pipeline/pipeline-generate-SQC-BAM/Nextflow/development/test-input/S2.T-n2.bam + read_length: 150