diff --git a/CHANGELOG.md b/CHANGELOG.md index aed5c62..9582446 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.8 + +1. Set the default mouse binsize to 100 if the given binsize is not 100 or 500 + ## 0.2.7 1. Rnafusion samplesheets will now contain multiple entries of the same sample when fastq files from multiple lanes are created by nf-cmgg/preprocessing diff --git a/build.gradle b/build.gradle index 1b956ea..fac1cb9 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp:5.3.2' } -version = '0.2.7' +version = '0.2.8' nextflowPlugin { nextflowVersion = '25.10.0' diff --git a/src/main/groovy/nfcmgg/plugin/samplesheets/PreprocessingObserver.groovy b/src/main/groovy/nfcmgg/plugin/samplesheets/PreprocessingObserver.groovy index 1d10c98..bd70b46 100644 --- a/src/main/groovy/nfcmgg/plugin/samplesheets/PreprocessingObserver.groovy +++ b/src/main/groovy/nfcmgg/plugin/samplesheets/PreprocessingObserver.groovy @@ -296,15 +296,24 @@ class PreprocessingObserver extends PipelineObserver { Map sampleData = inputData.find { entry -> entry.get('samplename', '') == sample } ?: [:] String sampleType = sampleData.get('sample_type', 'DNA') String tag = sampleData.get('tag', '') + String genome = sampleData.get('genome', null) + String organism = sampleData.get('organism', null) + Integer binsize = sampleData.get('binsize', null) as Integer + if ( + (organism?.toLowerCase() == 'mus musculus' || genome?.toLowerCase() == 'mm10') && + ![100, 500].contains(binsize) + ) { + binsize = 100 + } return [ 'strandedness': 'unknown', 'tag': tag, - 'organism': sampleData.get('organism', null), - 'genome': sampleData.get('genome', null), + 'organism': organism, + 'genome': genome, 'sample_type': sampleType, 'normdup': tag.toLowerCase() == 'copgt-m', 'nipt': tag.toLowerCase() == 'cfdnaseq', - 'binsize': sampleData.get('binsize', null), + 'binsize': binsize, 'vivar_project': sampleData.get('vivar_project', null), 'family': sampleData.get('family_number', null), 'library': sampleData.get('library', null), diff --git a/tests/preprocessing_mock/sampleinfo.yaml b/tests/preprocessing_mock/sampleinfo.yaml index bb995f3..a718182 100644 --- a/tests/preprocessing_mock/sampleinfo.yaml +++ b/tests/preprocessing_mock/sampleinfo.yaml @@ -17,7 +17,7 @@ tag: WES aligner: snap sample_type: DNA - binsize: 100 + binsize: 50 vivar_project: test_project family_number: mouse_family library: WES_prep