From 995b0fe33ccd4a53bc91f6d0ea4d8deeb2086e4b Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 26 May 2026 10:41:38 +0200 Subject: [PATCH 1/2] add tissue samples to vivar samplesheet --- CHANGELOG.md | 4 ++++ build.gradle | 2 +- .../nfcmgg/plugin/samplesheets/PreprocessingObserver.groovy | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7773af7..ca011a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.3 + +Added `tissue` samples to the vivar samplesheet + ## 0.2.2 Removed the `sex` field and added the `proband` field to the vivar samplesheet diff --git a/build.gradle b/build.gradle index f4a70b9..8f54124 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp:5.3.2' } -version = '0.2.2' +version = '0.2.3' 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 84e82e7..1c1272f 100644 --- a/src/main/groovy/nfcmgg/plugin/samplesheets/PreprocessingObserver.groovy +++ b/src/main/groovy/nfcmgg/plugin/samplesheets/PreprocessingObserver.groovy @@ -127,8 +127,9 @@ class PreprocessingObserver extends PipelineObserver { creator.dump( entries .findAll { entry -> + String type = entry.value.get('sample_type')?.toLowerCase() // Only create samplesheet for DNA samples - entry.value.get('sample_type')?.toLowerCase() == 'dna' + type == 'dna' || type == 'tissue' } .values() *.subKeys([ From 5cc823bbdb887f6371bd6506edbefa98290d3f30 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 26 May 2026 10:47:59 +0200 Subject: [PATCH 2/2] prek --- .groovylintrc.json | 3 +++ .../nfcmgg/plugin/samplesheets/PipelineObserver.groovy | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.groovylintrc.json b/.groovylintrc.json index 68ef982..a62439d 100644 --- a/.groovylintrc.json +++ b/.groovylintrc.json @@ -4,6 +4,9 @@ "DuplicateListLiteral": { "enabled": false }, + "DuplicateNumberLiteral": { + "enabled": false + }, "DuplicateStringLiteral": { "enabled": false } diff --git a/src/main/groovy/nfcmgg/plugin/samplesheets/PipelineObserver.groovy b/src/main/groovy/nfcmgg/plugin/samplesheets/PipelineObserver.groovy index c1f6fa7..bf5cced 100644 --- a/src/main/groovy/nfcmgg/plugin/samplesheets/PipelineObserver.groovy +++ b/src/main/groovy/nfcmgg/plugin/samplesheets/PipelineObserver.groovy @@ -94,10 +94,13 @@ class PipelineObserver implements TraceObserverV2 { * @param basePath the base path for which to get the sample name * @return the sample name for the given base path */ - protected String safeGetSample(String basePath) { + protected String safeGetSample(String inputBasePath) { + String basePath // Make sure SNP tracking data will be added to the correct sample if (basePath.startsWith('snp_')) { - basePath = basePath.replaceFirst('snp_', '') + basePath = inputBasePath.replaceFirst('snp_', '') + } else { + basePath = inputBasePath } List possibleSamples = samples .findAll { sample -> basePath.startsWith(sample) }.toList() as List