Skip to content

Commit

Permalink
Merge pull request #40 from uclahs-cds/sfitz-update-input
Browse files Browse the repository at this point in the history
Standardize input structure and upgrade from release candidate
  • Loading branch information
sorelfitzgibbon authored Mar 13, 2024
2 parents 9b60523 + 42a8ca3 commit 6ef99eb
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 58 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
5 changes: 4 additions & 1 deletion config/custom_schema_types.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
custom_schema_types {
allowed_input_types = [
'BAM'
]
allowed_bam_types = [
'normal',
'tumor'
]
Expand Down Expand Up @@ -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
]
Expand Down
2 changes: 1 addition & 1 deletion config/methods.config
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
55 changes: 30 additions & 25 deletions config/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
17 changes: 9 additions & 8 deletions input/example-multiple-samples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 7 additions & 6 deletions input/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
18 changes: 9 additions & 9 deletions test/yaml/a_mini-multiple-samples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 7 additions & 7 deletions test/yaml/a_mini.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6ef99eb

Please sign in to comment.