From 9f58c5421d85ab221b7109c5c782a764785c0d8a Mon Sep 17 00:00:00 2001 From: Sven F Date: Tue, 20 Jul 2021 11:10:17 +0200 Subject: [PATCH 01/15] Sync with hotfix 1.9.2 (#69) * Hotfix 1.9.1 (#66) * Fix RST syntax error * Remove orphaned print statement * Update CL * Bump version 1.9.1 -> 1.9.2 Co-authored-by: Steffengreiner --- CHANGELOG.rst | 17 +++++- README.rst | 59 ++++++++++--------- pom.xml | 2 +- .../utils/BioinformaticAnalysisParser.groovy | 1 - 4 files changed, 47 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index af71f5d5..00a5d0a7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,8 +4,21 @@ Changelog This project adheres to `Semantic Versioning `_. -1.9.1 ------ +1.9.2 (2021-07-20) +------------------ + +**Added** + +**Fixed** + +* Removes orphaned log statement + +**Dependencies** + +**Deprecated** + +1.9.1 (2021-07-20) +------------------ **Added** diff --git a/README.rst b/README.rst index a51c7e3e..59633c8c 100644 --- a/README.rst +++ b/README.rst @@ -41,13 +41,14 @@ How to Install This is a library and the most common way to use this library in particular is by including it in your `pom.xml` as a dependency: -```xml - - life.qbic - core-utils-lib - X.Y.Z - -``` +.. code-block:: xml + + + life.qbic + core-utils-lib + X.Y.Z + + Features -------- @@ -57,27 +58,29 @@ Find QBiC services ------------------ Finding QBiC service instances from within an application is as easy as this: -```Groovy -// Example in Groovy -def serviceList = [] -def serviceRegistryUrl = new Url("https://host-name-of-registry:/v1") -def connector = new ConsulConnector(serviceRegistryUrl) -connector.withCloseable { - ConsulServiceFactory factory = new ConsulServiceFactory(it) - serviceList.addAll(factory.getServicesOfType(ServiceType.SAMPLE_TRACKING)) -} -``` - - -```Java -// Example in Java -List serviceList = new ArrayList<>() -Url serviceRegistryUrl = new URL("https://host-name-of-registry:/v1") -try (ConsulConnector connector = new ConsulConnector(serviceRegistryUrl)) { - ConsulServiceFactory factory = new ConsulServiceFactory(connector) - serviceList.addAll(factory.getServicesOfType(ServiceType.SAMPLE_TRACKING)) -} -``` +.. code-block:: Groovy + + // Example in Groovy + def serviceList = [] + def serviceRegistryUrl = new Url("https://host-name-of-registry:/v1") + def connector = new ConsulConnector(serviceRegistryUrl) + connector.withCloseable { + ConsulServiceFactory factory = new ConsulServiceFactory(it) + serviceList.addAll(factory.getServicesOfType(ServiceType.SAMPLE_TRACKING)) + } + + + +.. code-block:: Java + + // Example in Java + List serviceList = new ArrayList<>() + Url serviceRegistryUrl = new URL("https://host-name-of-registry:/v1") + try (ConsulConnector connector = new ConsulConnector(serviceRegistryUrl)) { + ConsulServiceFactory factory = new ConsulServiceFactory(connector) + serviceList.addAll(factory.getServicesOfType(ServiceType.SAMPLE_TRACKING)) + } + Credits ------- diff --git a/pom.xml b/pom.xml index ecc59552..5b025aba 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ Collection of non-Vaadin, non-Liferay utilities. 4.0.0 Core Utilities Library - 1.9.1-SNAPSHOT + 1.9.2-SNAPSHOT http://github.com/qbicsoftware/core-utils-lib jar diff --git a/src/main/groovy/life/qbic/utils/BioinformaticAnalysisParser.groovy b/src/main/groovy/life/qbic/utils/BioinformaticAnalysisParser.groovy index 393b394b..8b3a3320 100644 --- a/src/main/groovy/life/qbic/utils/BioinformaticAnalysisParser.groovy +++ b/src/main/groovy/life/qbic/utils/BioinformaticAnalysisParser.groovy @@ -165,7 +165,6 @@ class BioinformaticAnalysisParser implements DatasetParser break default: //ignore other files - log.warn("Could not recognize file ${currentChild.path}") break } } From 8761877bc3d8df079aeaa9415c8309e536b9764a Mon Sep 17 00:00:00 2001 From: jnnfr Date: Fri, 10 Sep 2021 13:45:31 +0200 Subject: [PATCH 02/15] Update maxquant file parser (#74) The summary file is now searched within the summary folder --- CHANGELOG.rst | 2 ++ .../groovy/life/qbic/utils/MaxQuantParser.groovy | 15 ++++++++++----- .../life/qbic/utils/MaxQuantParserSpec.groovy | 2 +- .../combined/txt/{ => summary}/summary_1234.pdf | Bin 4 files changed, 13 insertions(+), 6 deletions(-) rename src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/{ => summary}/summary_1234.pdf (100%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 00a5d0a7..dc8e03e1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,8 @@ This project adheres to `Semantic Versioning `_. * Removes orphaned log statement +* Update 'life.qbic.utils.MaxQuantParser', parsing the summary file from a new summary folder (`#74 `_) + **Dependencies** **Deprecated** diff --git a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy index f719b5d2..5350c48b 100644 --- a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy +++ b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy @@ -147,11 +147,12 @@ class MaxQuantParser implements DatasetParser { List rootFolderInformation = maxQuantInformation.get("children") as List def combinedFolderInformation def txtFolderInformation + def summaryFolderInformation rootFolderInformation.findAll{map -> if (map.get("name") == "combined") { combinedFolderInformation = map.get("children") } - } + } if (combinedFolderInformation) { combinedFolderInformation.findAll { map -> if (map.get("name") == "txt") { @@ -181,14 +182,18 @@ class MaxQuantParser implements DatasetParser { insertAsProperty(maxQuantInformation, child, RequiredTxtFileKeys.PROTEIN_GROUPS.getKeyName()) break default: - //switch statements can't handle regex so the variable summary name has to be handled here - if (child.get("name").toString().matches("summary_[0-9]{4}.*")) { - insertAsProperty(maxQuantInformation, child, RequiredTxtFileKeys.SUMMARY.getKeyName()) - } + if(child.get("name") == "summary") summaryFolderInformation = child.get("children") as List //ignoring other children break } + } } + if(summaryFolderInformation){ + summaryFolderInformation.each{ Map child -> + if (child.get("name").toString().matches("summary_[0-9]{4}.*")) { + insertAsProperty(maxQuantInformation, child, RequiredTxtFileKeys.SUMMARY.getKeyName()) + } + } } } diff --git a/src/test/groovy/life/qbic/utils/MaxQuantParserSpec.groovy b/src/test/groovy/life/qbic/utils/MaxQuantParserSpec.groovy index 82541ede..8fdc2267 100644 --- a/src/test/groovy/life/qbic/utils/MaxQuantParserSpec.groovy +++ b/src/test/groovy/life/qbic/utils/MaxQuantParserSpec.groovy @@ -54,7 +54,7 @@ class MaxQuantParserSpec extends Specification { assert maxQuantRunResult.proteinGroups.getRelativePath() == "./combined/txt/proteinGroups.txt" assert maxQuantRunResult.proteinGroups.getName()== "proteinGroups.txt" - assert maxQuantRunResult.summary.getRelativePath() == "./combined/txt/summary_1234.pdf" + assert maxQuantRunResult.summary.getRelativePath() == "./combined/txt/summary/summary_1234.pdf" assert maxQuantRunResult.summary.getName()== "summary_1234.pdf" } diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/summary_1234.pdf b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/summary/summary_1234.pdf similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/summary_1234.pdf rename to src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/summary/summary_1234.pdf From 6fbf291d0bbdad0addd7dc2630d77a3e09b19f09 Mon Sep 17 00:00:00 2001 From: Steffengreiner Date: Thu, 23 Dec 2021 11:26:26 +0100 Subject: [PATCH 03/15] Remove qube files and Bump version to 1.11.0-SNAPSHOT --- .github/workflows/build_docs.yml | 36 ------------------------------ .github/workflows/sync_project.yml | 34 ---------------------------- .qube.yml | 19 ---------------- CHANGELOG.rst | 11 +++++++++ pom.xml | 2 +- qube.cfg | 15 ------------- 6 files changed, 12 insertions(+), 105 deletions(-) delete mode 100644 .github/workflows/build_docs.yml delete mode 100644 .github/workflows/sync_project.yml delete mode 100644 .qube.yml delete mode 100644 qube.cfg diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml deleted file mode 100644 index 8adc6d73..00000000 --- a/.github/workflows/build_docs.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build Documentation - -on: - push: - workflow_dispatch: - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python: [3.7, 3.8] - - steps: - - uses: actions/checkout@v2 - name: Check out source-code repository - - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python }} - - - name: Install pip - run: | - python -m pip install --upgrade pip - - - name: Install doc dependencies - run: | - pip install -r docs/requirements.txt - - - name: Build docs - run: | - cd docs - make html - diff --git a/.github/workflows/sync_project.yml b/.github/workflows/sync_project.yml deleted file mode 100644 index 089d7970..00000000 --- a/.github/workflows/sync_project.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Sync qube project - -on: - schedule: - - cron: '0 1 * * *' - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - - name: Install qube - run: pip install qube - - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - token: '${{ secrets.JOHNNY_Q5_REPORTS_TOKEN}}' - name: Check out source-code repository - - - uses: oleksiyrudenko/gha-git-credentials@v2 - with: - name: 'JohnnyQ5' - email: 'support@qbic.zendesk.com' - actor: 'JohnnyQ5' - token: '${{ secrets.JOHNNY_Q5_REPORTS_TOKEN}}' - - - name: Sync project - run: qube sync . ${{ secrets.JOHNNY_Q5_REPORTS_TOKEN }} JohnnyQ5 diff --git a/.qube.yml b/.qube.yml deleted file mode 100644 index 3c594b69..00000000 --- a/.qube.yml +++ /dev/null @@ -1,19 +0,0 @@ -qube_version: '2.7.0-SNAPSHOT # <>' -full_name: Jennifer Bödker -email: jennifer.boedker@qbic.uni-tuebingen.de -project_name: core-utils-lib -project_short_description: core-utils-lib. A qube based . -version: 1.10.2 -domain: lib -language: groovy -project_slug: core-utils-lib -project_slug_no_hyphen: core_utils_lib -template_version: '1.0.1 # <>' -template_handle: lib-groovy -github_username: jenniferboedker -creator_github_username: jenniferboedker -is_github_repo: false -is_repo_private: false -is_github_orga: false -copyright_holder: QBiC -license: MIT diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fda7e13a..968f89a8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,17 @@ Changelog This project adheres to `Semantic Versioning `_. +1.11.0-SNAPSHOT (2021-12-23) +--------------------------- + +**Added** + +**Fixed** + +**Dependencies** + +**Deprecated** + 1.10.3 (2021-12-20) ------------------- diff --git a/pom.xml b/pom.xml index f9aa1c3a..6b24c471 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ Collection of non-Vaadin, non-Liferay utilities. 4.0.0 Core Utilities Library - 1.10.3 + 1.11.0-SNAPSHOT https://github.com/qbicsoftware/core-utils-lib jar diff --git a/qube.cfg b/qube.cfg deleted file mode 100644 index 51d960bc..00000000 --- a/qube.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[bumpversion] -current_version = 1.10.2 - -[bumpversion_files_whitelisted] -dot_qube = .qube.yml -conf_py = docs/conf.py - -[bumpversion_files_blacklisted] -pom = pom.xml - -[sync_level] -ct_sync_level = minor - -[sync_files_blacklisted] - From 8db0d1166cc10fe62e69966f9f983bb3765794aa Mon Sep 17 00:00:00 2001 From: Steffengreiner Date: Thu, 23 Dec 2021 11:28:13 +0100 Subject: [PATCH 04/15] Bump conf.py to current version --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index ad5816a9..e321f42e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ # the built documents. # # The short X.Y version. -version = '1.10.2' +version = '1.11.0-SNAPSHOT' # The full version, including alpha/beta/rc tags. -release = '1.10.2' +release = '1.11.0-SNAPSHOT' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 292765396b6bc14be3ba8c11d4e6013c4da724a0 Mon Sep 17 00:00:00 2001 From: Steffengreiner Date: Fri, 7 Jan 2022 18:19:32 +0100 Subject: [PATCH 05/15] Bump version to 1.11.0-SNAPSHOT --- CHANGELOG.rst | 11 +++++++++++ docs/conf.py | 4 ++-- pom.xml | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2cc4cfcd..a36f19ce 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,17 @@ Changelog This project adheres to `Semantic Versioning `_. +1.11.0-SNAPSHOT (2022-01-07) +---------------------------- + +**Added** + +**Fixed** + +**Dependencies** + +**Deprecated** + 1.10.4 (2022-01-04) ------------------ diff --git a/docs/conf.py b/docs/conf.py index ad5816a9..e321f42e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ # the built documents. # # The short X.Y version. -version = '1.10.2' +version = '1.11.0-SNAPSHOT' # The full version, including alpha/beta/rc tags. -release = '1.10.2' +release = '1.11.0-SNAPSHOT' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/pom.xml b/pom.xml index d7ab4265..a61d5a82 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ Collection of non-Vaadin, non-Liferay utilities. 4.0.0 Core Utilities Library - 1.10.4 + 1.11.0-SNAPSHOT https://github.com/qbicsoftware/core-utils-lib jar From d3d5f7398dee8bb8abd87fdca2e237b35a5143f3 Mon Sep 17 00:00:00 2001 From: Steffengreiner Date: Tue, 8 Feb 2022 13:45:10 +0100 Subject: [PATCH 06/15] Include groovydoc plugin in report generation (#59) --- pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pom.xml b/pom.xml index a61d5a82..ce94be4b 100644 --- a/pom.xml +++ b/pom.xml @@ -218,4 +218,12 @@ + + + + life.qbic + groovydoc-maven-plugin + + + From 6e048544ccbb3875fcbd3810d9dda4e623e2543c Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Thu, 5 May 2022 16:52:20 +0200 Subject: [PATCH 07/15] Feature/update nanopore (#91) * increase some versions, fix testing env * add tests for alternative nanopore structure * Add worflow triggers (#93) * Add triggers * Reorder git commands * Use master as base, not main * parser * update workflows (#94) * Set version to 1.10.6 * update pom * Fix project setup (#96) * add possibility of some metadata values being empty * comments * extract method to validate a single schema Co-authored-by: Sven F Co-authored-by: JohnnyQ5 Co-authored-by: Steffengreiner Co-authored-by: Sven F <9976560+sven1103@users.noreply.github.com> --- .github/workflows/build_package.yml | 10 ++- .github/workflows/create-release.yml | 15 ++-- .github/workflows/run_tests.yml | 8 +- pom.xml | 63 ++++++++++---- .../life/qbic/utils/NanoporeParser.groovy | 38 +++++--- .../java/life/qbic/cli/AbstractCommand.java | 6 +- src/main/java/life/qbic/cli/ToolExecutor.java | 81 +++++++++++------- .../utils/ImagingMetadataValidatorSpec.groovy | 2 - .../life/qbic/utils/NanoporeParserSpec.groovy | 33 ++++++- .../barcode_alignment_.tsv | 0 .../duty_time_.csv | 0 .../fast5_fail/myfile.fast5 | 1 + .../fast5_fail/myfile2.fast5 | 1 + .../fast5_fail/myfile3.fast5 | 1 + .../fast5_fail/myfile4.fast5 | 1 + .../fast5_fail/myfile5.fast5 | 1 + .../fast5_pass/myfile.fast5 | 1 + .../fast5_pass/myfile2.fast5 | 1 + .../fast5_pass/myfile3.fast5 | 1 + .../fast5_pass/myfile4.fast5 | 1 + .../fast5_pass/myfile5.fast5 | 1 + .../fastq_fail/myfile.fastq.gz | 1 + .../fastq_fail/myfile2.fastq.gz | 1 + .../fastq_fail/myfile3.fastq.gz | 1 + .../fastq_fail/myfile4.fastq.gz | 1 + .../fastq_fail/myfile5.fastq.gz | 1 + .../fastq_pass/myfile1.fastq.gz | 0 .../fastq_pass/myfile2.fastq.gz | 0 .../fastq_pass/myfile3.fastq.gz | 0 .../fastq_pass/myfile4.fastq.gz | 0 .../fastq_pass/myfile5.fastq.gz | 0 .../final_summary_.txt | 17 ++++ .../other_reports/drift_correction_.csv | 0 .../other_reports/mux_scan_data_.csv | 0 .../report_.md | 52 +++++++++++ .../report_.pdf | Bin .../sequencing_summary_.txt | 0 .../throughput_.csv | 0 .../barcode_alignment_.tsv | 0 .../duty_time_.csv | 0 .../fast5_fail/myfile.fast5 | 1 + .../fast5_fail/myfile2.fast5 | 1 + .../fast5_fail/myfile3.fast5 | 1 + .../fast5_fail/myfile4.fast5 | 1 + .../fast5_fail/myfile5.fast5 | 1 + .../fast5_pass/myfile.fast5 | 1 + .../fast5_pass/myfile2.fast5 | 1 + .../fast5_pass/myfile3.fast5 | 1 + .../fast5_pass/myfile4.fast5 | 1 + .../fast5_pass/myfile5.fast5 | 1 + .../fastq_fail/myfile.fastq.gz | 1 + .../fastq_fail/myfile2.fastq.gz | 1 + .../fastq_fail/myfile3.fastq.gz | 1 + .../fastq_fail/myfile4.fastq.gz | 1 + .../fastq_fail/myfile5.fastq.gz | 1 + .../fastq_pass/myfile1.fastq.gz | 0 .../fastq_pass/myfile2.fastq.gz | 0 .../fastq_pass/myfile3.fastq.gz | 0 .../fastq_pass/myfile4.fastq.gz | 0 .../fastq_pass/myfile5.fastq.gz | 0 .../final_summary_.txt | 17 ++++ .../other_reports/drift_correction_.csv | 0 .../other_reports/mux_scan_data_.csv | 0 .../report_.md | 52 +++++++++++ .../report_.pdf | Bin .../sequencing_summary_.txt | 0 .../throughput_.csv | 0 67 files changed, 349 insertions(+), 75 deletions(-) create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/barcode_alignment_.tsv create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/duty_time_.csv create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile2.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile3.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile4.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile5.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile2.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile3.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile4.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile5.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile2.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile3.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile4.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile5.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile1.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile2.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile3.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile4.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile5.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/final_summary_.txt create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/drift_correction_.csv create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/mux_scan_data_.csv create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.md create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.pdf create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/sequencing_summary_.txt create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/throughput_.csv create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/barcode_alignment_.tsv create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/duty_time_.csv create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile2.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile3.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile4.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile5.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile2.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile3.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile4.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile5.fast5 create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile2.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile3.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile4.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile5.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile1.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile2.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile3.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile4.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile5.fastq.gz create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/final_summary_.txt create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/drift_correction_.csv create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/mux_scan_data_.csv create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.md create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.pdf create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/sequencing_summary_.txt create mode 100644 src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/throughput_.csv diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index 89482e54..d616186c 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -1,6 +1,12 @@ name: Build Maven Package -on: [push] +on: + push: + branches: + - '**' + pull_request: + # The branches below must be a subset of the branches above + branches: [ main, master ] jobs: package: @@ -20,4 +26,4 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Run mvn package - run: mvn clean -B package --file pom.xml + run: mvn -B package --file pom.xml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 57d5afed..4203baf0 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -42,7 +42,7 @@ jobs: || contains(github.event.inputs.versionTag, 'rc')) }} uses: actions/github-script@v4.0.2 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} script: | await github.request(`POST /repos/${{ github.repository }}/releases`, { tag_name: "${{ github.event.inputs.versionTag }}", @@ -55,7 +55,7 @@ jobs: || contains(github.event.inputs.versionTag, 'rc')) }} uses: actions/github-script@v4.0.2 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} script: | await github.request(`POST /repos/${{ github.repository }}/releases`, { tag_name: "${{ github.event.inputs.versionTag }}", @@ -71,19 +71,22 @@ jobs: - name: Switch to new branch run: git checkout -b release/set-version-to-${{ github.event.inputs.versionTag }} + - name: Set remote branch + run: git push --set-upstream origin release/set-version-to-${{ github.event.inputs.versionTag }} + - name: Checkin commit run: git commit . -m 'Set version to ${{ github.event.inputs.versionTag }}' - - name: Set remote branch - run: git push --set-upstream origin release/set-version-to-${{ github.event.inputs.versionTag }} + - name: Push to Github + run: git push - name: Open PR with version bump uses: actions/github-script@v4.0.2 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} script: | await github.request(`POST /repos/${{ github.repository }}/pulls`, { title: 'Update version to ${{ github.event.inputs.versionTag }}', head: 'release/set-version-to-${{ github.event.inputs.versionTag }}', - base: 'main' + base: 'master' }); diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index a6269fbb..5708a258 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,8 +1,12 @@ name: Run Maven Tests -on: +on: push: - workflow_dispatch: + branches: + - '**' + pull_request: + # The branches below must be a subset of the branches above + branches: [ main, master ] jobs: test: diff --git a/pom.xml b/pom.xml index ce94be4b..02bfc551 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,8 @@ + xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> life.qbic core-utils-lib Collection of non-Vaadin, non-Liferay utilities. @@ -10,11 +12,11 @@ https://github.com/qbicsoftware/core-utils-lib jar - 1.8 - 1.8 - 2.17.1 - UTF-8 - UTF-8 + 1.8 + 1.8 + 2.17.1 + UTF-8 + UTF-8 @@ -32,6 +34,19 @@ + + + true + always + fail + + + false + + maven-central + Maven central + https://repo.maven.apache.org/maven2 + nexus-snapshots QBiC Snapshots @@ -63,8 +78,24 @@ https://jitpack.io + + + + org.codehaus.groovy + groovy-bom + 3.0.9 + pom + import + + + - + + org.codehaus.groovy + groovy-all + 3.0.9 + pom + @@ -90,13 +121,13 @@ spock-core org.spockframework - 2.0-groovy-2.5 + 2.1-groovy-3.0 test data-model-lib life.qbic - 2.10.0 + 2.17.0-SNAPSHOT org.mockito @@ -138,7 +169,7 @@ maven-surefire-plugin - 2.21.0 + 3.0.0-M5 **/*Spec @@ -148,7 +179,7 @@ org.codehaus.gmavenplus gmavenplus-plugin - 1.12.0 + 1.13.1 @@ -175,19 +206,21 @@ - ${project.build.directory}/site/gapidocs - ${project.build.directory}/site/testgapidocs + ${project.build.directory}/site/gapidocs + + ${project.build.directory}/site/testgapidocs + org.apache.maven.plugins maven-site-plugin - 3.7.1 + 3.9.1 org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 3.1.1 life.qbic diff --git a/src/main/groovy/life/qbic/utils/NanoporeParser.groovy b/src/main/groovy/life/qbic/utils/NanoporeParser.groovy index 56cd2e34..71751c29 100644 --- a/src/main/groovy/life/qbic/utils/NanoporeParser.groovy +++ b/src/main/groovy/life/qbic/utils/NanoporeParser.groovy @@ -2,8 +2,8 @@ package life.qbic.utils import com.fasterxml.jackson.databind.ObjectMapper import groovy.json.JsonSlurper -import groovyjarjarcommonscli.MissingArgumentException import life.qbic.datamodel.instruments.OxfordNanoporeInstrumentOutput +import life.qbic.datamodel.instruments.OxfordNanoporeInstrumentOutputV2 import org.everit.json.schema.Schema import org.everit.json.schema.ValidationException import org.everit.json.schema.loader.SchemaLoader @@ -39,7 +39,7 @@ class NanoporeParser { } catch (ValidationException validationException) { // we have to fetch all validation exceptions def causes = validationException.getAllMessages().collect{ it }.join("\n") - throw validationException + throw new ValidationException(causes) } } @@ -88,12 +88,13 @@ class NanoporeParser { jsonEnded = true } } - def finalMetaData = (Map) jsonSlurper.parseText(buffer.toString()) + def finalMetaData = (Map) jsonSlurper.parseText(buffer.toString()) new File(Paths.get(root.toString(), summaryFile["path"].toString()) as String) .readLines().each { line -> def split = line.split("=") - finalMetaData[split[0]] = split[1] + def value = split.size() > 1 ? split[1] : "" + finalMetaData[split[0]] = value } return finalMetaData @@ -122,19 +123,19 @@ class NanoporeParser { private static void checkPresenceOfFlowCellPosition(Map metadata, String flowCellEntry) { if (!metadata.containsKey(flowCellEntry)) { - throw new MissingArgumentException("Could not find metadata information about the flow cell position.") + throw new RuntimeException("Could not find metadata information about the flow cell position.") } if ((metadata[flowCellEntry] as String).isEmpty()) { - throw new MissingArgumentException("Flow cell position information was empty.") + throw new RuntimeException("Flow cell position information was empty.") } } private static void checkPresenceOfBaseCaller(Map metadata, String baseCallerEntry) { if (!metadata.containsKey(baseCallerEntry)) { - throw new MissingArgumentException("Could not find metadata information about the base caller.") + throw new RuntimeException("Could not find metadata information about the base caller.") } if ((metadata[baseCallerEntry] as String).isEmpty()) { - throw new MissingArgumentException("Base caller information was empty.") + throw new RuntimeException("Base caller information was empty.") } } @@ -156,15 +157,26 @@ class NanoporeParser { * @throws org.everit.json.schema.ValidationException */ private static void validateJson(String json) throws ValidationException { - // Step1: load schema + // Step 1: load schema JSONObject jsonObject = new JSONObject(json) - InputStream schemaStream = OxfordNanoporeInstrumentOutput.getSchemaAsStream() - JSONObject rawSchema = new JSONObject(new JSONTokener(schemaStream)) - Schema jsonSchema = SchemaLoader.load(rawSchema) - // Step2: validate against schema return if valid, throw exception if invalid + try { + // Step 2: validate against schema return if valid, throw exception if invalid + validateUsingSchema(OxfordNanoporeInstrumentOutput.getSchemaAsStream(), jsonObject) + } catch (ValidationException validationException) { + validateUsingSchema(OxfordNanoporeInstrumentOutputV2.getSchemaAsStream(), jsonObject) + } + } + + private static void validateUsingSchema(InputStream schemaAsStream, JSONObject jsonObject) throws ValidationException { + Schema jsonSchema = loadSchemaFromStream(schemaAsStream) jsonSchema.validate(jsonObject) } + private static Schema loadSchemaFromStream(InputStream stream) { + JSONObject rawSchema = new JSONObject(new JSONTokener(stream)) + return SchemaLoader.load(rawSchema) + } + /* * Converts a file tree into a json object. */ diff --git a/src/main/java/life/qbic/cli/AbstractCommand.java b/src/main/java/life/qbic/cli/AbstractCommand.java index 6aa54837..6d569d4a 100644 --- a/src/main/java/life/qbic/cli/AbstractCommand.java +++ b/src/main/java/life/qbic/cli/AbstractCommand.java @@ -1,11 +1,11 @@ package life.qbic.cli; +import groovyjarjarpicocli.CommandLine; +import groovyjarjarpicocli.CommandLine.Option; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import life.qbic.exceptions.ApplicationException; import org.apache.commons.lang3.Validate; -import picocli.CommandLine; -import picocli.CommandLine.Option; /** * Abstract class that encapsulates all common command-line arguments using {@code picocli} annotations. @@ -31,7 +31,7 @@ public abstract class AbstractCommand { public volatile boolean printHelp; /** - * Utility method to parse the given command-line arguments as a command using the {@link CommandLine#populateCommand(Object, String...)} method. + * Utility method to parse the given command-line arguments as a command using the {@link groovyjarjarpicocli.CommandLine#populateCommand(Object, String...)} method. * * @param commandClass the class of the desired command. * @param args the command-line arguments diff --git a/src/main/java/life/qbic/cli/ToolExecutor.java b/src/main/java/life/qbic/cli/ToolExecutor.java index 76f23fc7..f0a3e7dc 100644 --- a/src/main/java/life/qbic/cli/ToolExecutor.java +++ b/src/main/java/life/qbic/cli/ToolExecutor.java @@ -1,5 +1,7 @@ package life.qbic.cli; +import groovyjarjarpicocli.CommandLine; +import groovyjarjarpicocli.CommandLine.MissingParameterException; import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Constructor; @@ -13,13 +15,12 @@ import org.apache.commons.lang3.Validate; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import picocli.CommandLine; -import picocli.CommandLine.MissingParameterException; /** * Class that coordinates execution of generic command-line {@link QBiCTool}s. - * - * In order to be able to write "generic" code that can run "any" tool, we have decided to use the Strategy design pattern. This class represents the + *

+ * In order to be able to write "generic" code that can run "any" tool, we have decided to use the + * Strategy design pattern. This class represents the * Context (i.e., command-line tools and services). */ public class ToolExecutor { @@ -34,15 +35,16 @@ public class ToolExecutor { /** * Invokes the given {@link QBiCTool}. * - * @param toolClass the class of the tool to invoke. + * @param toolClass the class of the tool to invoke. * @param commandClass the class of the commands that the tool is able to understand. - * @param args the provided command-line arguments. + * @param args the provided command-line arguments. */ - public void invoke(final Class> toolClass, final Class commandClass, final String[] args) { + public void invoke(final Class> toolClass, + final Class commandClass, final String[] args) { final AbstractCommand command; try { - command = validateParametersAndParseCommandlineArguments(toolClass, commandClass, args); + command = validateParametersAndParseCommandlineArguments(toolClass, commandClass, args); } catch (MissingParameterException e) { LOG.error(e.getMessage()); CommandLine.usage(AbstractCommand.createDummyCommand(commandClass), System.err); @@ -57,14 +59,16 @@ public void invoke(final Class } /** - * Validates that the passed parameters are not null and parses the given {@code args} as a command of the class {@code commandClass}. + * Validates that the passed parameters are not null and parses the given {@code args} as a + * command of the class {@code commandClass}. * - * @param toolClass the class of the tool that will be executed. + * @param toolClass the class of the tool that will be executed. * @param commandClass the class of the commands that will be parsed. - * @param args the command-line arguments. + * @param args the command-line arguments. * @return the parsed command. */ - protected AbstractCommand validateParametersAndParseCommandlineArguments(final Class toolClass, final Class commandClass, + protected AbstractCommand validateParametersAndParseCommandlineArguments(final Class toolClass, + final Class commandClass, final String[] args) { Validate.notNull(toolClass, "toolClass is required and cannot be null"); Validate.notNull(commandClass, "commandClass is required and cannot be null"); @@ -73,7 +77,8 @@ protected AbstractCommand validateParametersAndParseCommandlineArguments(final C return AbstractCommand.parseArguments(commandClass, args); } - private Tool instantiateTool(final Class toolClass, final AbstractCommand command) { + private Tool instantiateTool(final Class toolClass, + final AbstractCommand command) { final Tool tool; final Constructor constructor; @@ -81,32 +86,40 @@ private Tool instantiateTool(final Class toolClass, final Ab constructor = toolClass.getConstructor(command.getClass()); } catch (final NoSuchMethodException e) { throw new ApplicationException(String - .format("Could not find a suitable public constructor for the given tool with class name %s. Check QBiCTool class' documentation.", toolClass), + .format( + "Could not find a suitable public constructor for the given tool with class name %s. Check QBiCTool class' documentation.", + toolClass), e); } try { tool = constructor.newInstance(command); } catch (final InstantiationException | IllegalAccessException | InvocationTargetException e) { - throw new ApplicationException(String.format("Could not create a new instance for the given tool with class name %s", toolClass), e); + throw new ApplicationException( + String.format("Could not create a new instance for the given tool with class name %s", + toolClass), e); } return tool; } /** - * Handles the standard {@ code --help} and {@code --version} parameters which all {@link QBiCTool} are able to handle. + * Handles the standard {@ code --help} and {@code --version} parameters which all {@link + * QBiCTool} are able to handle. * * @param toolMetadata the metadata of the tool. - * @param command the command. - * @return {@code true} if either help or version (or both!) were requested, {@code false} otherwise. + * @param command the command. + * @return {@code true} if either help or version (or both!) were requested, {@code false} + * otherwise. */ - protected boolean handleCommonParameters(final ToolMetadata toolMetadata, final AbstractCommand command) { + protected boolean handleCommonParameters(final ToolMetadata toolMetadata, + final AbstractCommand command) { // this is the only thing that is the same across all tools: --help and --version if (command.printVersion || command.printHelp) { if (command.printVersion) { LOG.debug("Version requested."); - LOG.info("{}, version {} ({})", toolMetadata.getToolName(), toolMetadata.getToolVersion(), toolMetadata.getToolRepoUrl()); + LOG.info("{}, version {} ({})", toolMetadata.getToolName(), toolMetadata.getToolVersion(), + toolMetadata.getToolRepoUrl()); } if (command.printHelp) { LOG.debug("Help requested."); @@ -118,8 +131,9 @@ protected boolean handleCommonParameters(final ToolMetadata toolMetadata, final } /** - * Extracts tool name, version and repository URL from {@link #TOOL_PROPERTIES_PATH}. If the file does not exist, is corrupt or properties are missing, this - * method will only generate warnings in the log file and use the following default values: + * Extracts tool name, version and repository URL from {@link #TOOL_PROPERTIES_PATH}. If the file + * does not exist, is corrupt or properties are missing, this method will only generate warnings + * in the log file and use the following default values: *

    *
  • Default name if property {@code tool.name} is missing: {@link #DEFAULT_NAME}
  • *
  • Default version if property {@code tool.version} is missing: {@link #DEFAULT_VERSION}
  • @@ -130,19 +144,23 @@ protected boolean handleCommonParameters(final ToolMetadata toolMetadata, final */ protected ToolMetadata extractToolMetadata() { final Properties properties = new Properties(); - try (final InputStream inputStream = ToolExecutor.class.getClassLoader().getResourceAsStream(TOOL_PROPERTIES_PATH)) { + try (final InputStream inputStream = ToolExecutor.class.getClassLoader() + .getResourceAsStream(TOOL_PROPERTIES_PATH)) { if (inputStream == null) { - LOG.warn("Missing tool descriptor file. Make sure the file {} is located in the classpath", TOOL_PROPERTIES_PATH); + LOG.warn("Missing tool descriptor file. Make sure the file {} is located in the classpath", + TOOL_PROPERTIES_PATH); } else { properties.load(inputStream); } } catch (final IOException e) { throw new ApplicationException( - "Could not load required file tool.properties. Make sure tool.properties can be found in the classpath and that it is properly formatted.", e); + "Could not load required file tool.properties. Make sure tool.properties can be found in the classpath and that it is properly formatted.", + e); } // optional properties final String toolVersion = extractAndWarnIfMissing(properties, "tool.version", DEFAULT_VERSION); - final String toolRepositoryUrl = extractAndWarnIfMissing(properties, "tool.repo.url", DEFAULT_REPO); + final String toolRepositoryUrl = extractAndWarnIfMissing(properties, "tool.repo.url", + DEFAULT_REPO); final String toolName = extractAndWarnIfMissing(properties, "tool.name", DEFAULT_NAME); return new ToolMetadata(toolName, toolVersion, toolRepositoryUrl); @@ -174,7 +192,8 @@ private void startQBiCTool(final Tool tool) { // let the JVM handle exiting normally, the tool could be a daemon } - private void shutdownHook(final Tool tool, final Lock shutdownAccessLock, final AtomicBoolean cleanShutdown) { + private void shutdownHook(final Tool tool, final Lock shutdownAccessLock, + final AtomicBoolean cleanShutdown) { shutdownAccessLock.lock(); try { if (!cleanShutdown.get()) { @@ -199,13 +218,15 @@ private static void logException(final Exception e) { } - private static String extractAndWarnIfMissing(final Properties properties, final String key, final String defaultValue) { + private static String extractAndWarnIfMissing(final Properties properties, final String key, + final String defaultValue) { String value = StringUtils.trimToEmpty(properties.getProperty(key)); if (StringUtils.isBlank(value)) { - LOG.warn("Missing value in tool.properties file for property '{}', using default value '{}'", key, defaultValue); + LOG.warn("Missing value in tool.properties file for property '{}', using default value '{}'", + key, defaultValue); value = defaultValue; } return value; } -} \ No newline at end of file +} diff --git a/src/test/groovy/life/qbic/utils/ImagingMetadataValidatorSpec.groovy b/src/test/groovy/life/qbic/utils/ImagingMetadataValidatorSpec.groovy index b57a7285..4383ede9 100644 --- a/src/test/groovy/life/qbic/utils/ImagingMetadataValidatorSpec.groovy +++ b/src/test/groovy/life/qbic/utils/ImagingMetadataValidatorSpec.groovy @@ -1,7 +1,5 @@ package life.qbic.utils -import groovyjarjarcommonscli.MissingArgumentException -import life.qbic.datamodel.datasets.imaging.ImageMetadata import org.everit.json.schema.ValidationException import spock.lang.Specification diff --git a/src/test/groovy/life/qbic/utils/NanoporeParserSpec.groovy b/src/test/groovy/life/qbic/utils/NanoporeParserSpec.groovy index fe50b3c4..8476e0d2 100644 --- a/src/test/groovy/life/qbic/utils/NanoporeParserSpec.groovy +++ b/src/test/groovy/life/qbic/utils/NanoporeParserSpec.groovy @@ -1,6 +1,5 @@ package life.qbic.utils -import groovyjarjarcommonscli.MissingArgumentException import life.qbic.datamodel.datasets.OxfordNanoporeExperiment import org.everit.json.schema.ValidationException import spock.lang.Specification @@ -26,6 +25,36 @@ class NanoporeParserSpec extends Specification { assert experiment.getMeasurements().get(0).getLibraryPreparationKit() == "SQK-LSK109" } + def "parsing the alternative valid file structure returns an OxfordNanoporeExperiment Object"() { + given: + def pathToDirectory = Paths.get(exampleDirectoriesRoot, "validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new") + when: + def experiment = NanoporeParser.parseFileStructure(pathToDirectory) + then: + assert experiment instanceof OxfordNanoporeExperiment + // Check that the metadata from the report file has been retrieved + assert experiment.getMeasurements().get(0).getMachineHost() == "PCT0094" + // Check that the metadata from the summary file has been retrieved + assert experiment.getMeasurements().get(0).getLibraryPreparationKit() == "SQK-LSK109-XL" + } + + def "parsing the alternative valid file structure with metadata missing returns an OxfordNanoporeExperiment Object"() { + given: + def pathToDirectory = Paths.get(exampleDirectoriesRoot, "validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal") + when: + def experiment = NanoporeParser.parseFileStructure(pathToDirectory) + then: + assert experiment instanceof OxfordNanoporeExperiment + // Check that the metadata from the report file is parsed + assert experiment.getMeasurements().get(0).getFlowCellType() == "FLO-PRO002" + // Check that the metadata from the summary file has been retrieved, but data can also be empty + assert experiment.getMeasurements().get(0).getLibraryPreparationKit() == "SQK-LSK109-XL" + assert experiment.getMeasurements().get(0).getFlowcellId() == "flow_cell_from_summary" + assert experiment.getMeasurements().get(0).getAsicTemp() == "" + assert experiment.getMeasurements().get(0).getMachineHost() == "" + assert experiment.getMeasurements().get(0).getStartDate() == "" + } + def "qc folder is ignored"() { given: def pathToDirectory = Paths.get(exampleDirectoriesRoot, "validates/with_qc_folder/QABCD001AB_E12A345a01_PAE12345") @@ -109,4 +138,4 @@ class NanoporeParserSpec extends Specification { thrown(ValidationException) } -} \ No newline at end of file +} diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/barcode_alignment_.tsv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/barcode_alignment_.tsv new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/duty_time_.csv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/duty_time_.csv new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile2.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile2.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile2.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile3.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile3.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile3.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile4.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile4.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile4.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile5.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile5.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile5.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile2.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile2.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile2.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile3.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile3.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile3.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile4.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile4.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile4.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile5.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile5.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile5.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile2.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile2.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile2.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile3.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile3.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile3.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile4.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile4.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile4.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile5.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile5.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile5.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile1.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile1.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile2.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile2.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile3.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile3.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile4.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile4.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile5.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile5.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/final_summary_.txt b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/final_summary_.txt new file mode 100644 index 00000000..900f4d7e --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/final_summary_.txt @@ -0,0 +1,17 @@ +instrument=PCT0094 +position=1-A3-D3 +flow_cell_id=PAE24142 +sample_id=QNANO027AE_E19D023a01_200211 +protocol_group_id=20200211_QNANO +protocol=sequencing/sequencing_PRO002_DNA:FLO-PRO002:SQK-LSK109-XL +protocol_run_id=5a7cfc2a-81b0-412d-baa0-51b939cd8e76 +acquisition_run_id=c6028297dff19d01e7c5fba6487de807d1e99c05 +started=2020-02-11T15:52:10.465982+01:00 +acquisition_stopped=2020-02-14T08:39:54.688916+01:00 +processing_stopped=2020-02-14T08:39:58.804639+01:00 +basecalling_enabled=1 +sequencing_summary_file=sequencing_summary_PAE24142_c6028297.txt +fast5_files_in_final_dest=2189 +fast5_files_in_fallback=0 +fastq_files_in_final_dest=2189 +fastq_files_in_fallback=0 diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/drift_correction_.csv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/drift_correction_.csv new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/mux_scan_data_.csv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/mux_scan_data_.csv new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.md b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.md new file mode 100644 index 00000000..586d5325 --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.md @@ -0,0 +1,52 @@ +Tracking ID +=========== + +{ + "asic_id": "0004A30B0022C63E", + "asic_id_eeprom": "0004A30B0022C63E", + "asic_temp": "32.631687", + "asic_version": "Unknown", + "auto_update": "0", + "auto_update_source": "https://mirror.oxfordnanoportal.com/software/MinKNOW/", + "bream_is_standard": "0", + "configuration_version": "1.0.7", + "device_id": "1-E9-H9", + "device_type": "promethion", + "distribution_status": "stable", + "distribution_version": "19.12.5", + "exp_script_name": "N/A", + "exp_script_purpose": "sequencing_run", + "exp_start_time": "2020-01-28T15:17:38Z", + "flow_cell_id": "PAE26989", + "flow_cell_product_code": "FLO-PRO002", + "guppy_version": "3.2.8+bd67289", + "heatsink_temp": "36.179111", + "hostname": "PCT0094", + "hublett_board_id": "0132136faade2e15", + "hublett_firmware_version": "2.0.12", + "installation_type": "nc", + "ip_address": "", + "local_firmware_file": "1", + "mac_address": "", + "operating_system": "ubuntu 16.04", + "protocol_group_id": "20200128_QNANO", + "protocol_run_id": "", + "protocols_version": "4.3.16", + "run_id": "db9e9383d44d80bbe1e2600c7a7419056610d46d", + "sample_id": "QNANO036AD_E19D023b04", + "satellite_board_id": "0000000000000000", + "satellite_firmware_version": "2.0.12", + "usb_config": "firm_1.2.3_ware#rbt_4.5.6_rbt#ctrl#USB3", + "version": "3.6.1" +} + +Duty Time +========= + +ID: db9e9383d44d80bbe1e2600c7a7419056610d46d + +Channel State,Experiment Time (minutes),State Time (samples), +strand,0,144832342 +strand,1,158421270 +strand,2,378095352 +strand,3,472685319 diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.pdf b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/sequencing_summary_.txt b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/sequencing_summary_.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/throughput_.csv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new/20200122_1217_1-A1-B1-PAE12345_1234567a/throughput_.csv new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/barcode_alignment_.tsv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/barcode_alignment_.tsv new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/duty_time_.csv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/duty_time_.csv new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile2.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile2.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile2.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile3.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile3.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile3.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile4.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile4.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile4.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile5.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile5.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile5.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile2.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile2.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile2.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile3.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile3.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile3.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile4.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile4.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile4.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile5.fast5 b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile5.fast5 new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile5.fast5 @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile2.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile2.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile2.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile3.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile3.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile3.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile4.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile4.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile4.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile5.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile5.fastq.gz new file mode 100644 index 00000000..a46c98ae --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile5.fastq.gz @@ -0,0 +1 @@ +This is some text diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile1.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile1.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile2.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile2.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile3.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile3.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile4.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile4.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile5.fastq.gz b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile5.fastq.gz new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/final_summary_.txt b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/final_summary_.txt new file mode 100644 index 00000000..977940dc --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/final_summary_.txt @@ -0,0 +1,17 @@ +instrument= +position=1-A3-D3 +flow_cell_id=flow_cell_from_summary +sample_id=QNANO027AE_E19D023a01_200211 +protocol_group_id= +protocol=sequencing/sequencing_PRO002_DNA:FLO-PRO002:SQK-LSK109-XL +protocol_run_id= +acquisition_run_id= +started= +acquisition_stopped=2020-02-14T08:39:54.688916+01:00 +processing_stopped=2020-02-14T08:39:58.804639+01:00 +basecalling_enabled= +sequencing_summary_file=sequencing_summary_PAE24142_c6028297.txt +fast5_files_in_final_dest=2189 +fast5_files_in_fallback=0 +fastq_files_in_final_dest=2189 +fastq_files_in_fallback=0 diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/drift_correction_.csv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/drift_correction_.csv new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/mux_scan_data_.csv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/other_reports/mux_scan_data_.csv new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.md b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.md new file mode 100644 index 00000000..02d2f302 --- /dev/null +++ b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.md @@ -0,0 +1,52 @@ +Tracking ID +=========== + +{ + "asic_id": "", + "asic_id_eeprom": "", + "asic_temp": "", + "asic_version": "", + "auto_update": "", + "auto_update_source": "", + "bream_is_standard": "", + "configuration_version": "", + "device_id": "", + "device_type": "promethion", + "distribution_status": "", + "distribution_version": "", + "exp_script_name": "", + "exp_script_purpose": "", + "exp_start_time": "2020-01-28T15:17:38Z", + "flow_cell_id": "flow_cell_from_report", + "flow_cell_product_code": "FLO-PRO002", + "guppy_version": "3.2.8+bd67289", + "heatsink_temp": "", + "hostname": "", + "hublett_board_id": "", + "hublett_firmware_version": "", + "installation_type": "", + "ip_address": "", + "local_firmware_file": "", + "mac_address": "", + "operating_system": "", + "protocol_group_id": "", + "protocol_run_id": "", + "protocols_version": "", + "run_id": "", + "sample_id": "QNANO036AD_E19D023b04", + "satellite_board_id": "", + "satellite_firmware_version": "", + "usb_config": "", + "version": "" +} + +Duty Time +========= + +ID: db9e9383d44d80bbe1e2600c7a7419056610d46d + +Channel State,Experiment Time (minutes),State Time (samples), +strand,0,144832342 +strand,1,158421270 +strand,2,378095352 +strand,3,472685319 diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.pdf b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/report_.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/sequencing_summary_.txt b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/sequencing_summary_.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/throughput_.csv b/src/test/resources/dummyFileSystem/nanopore-instrument-output/validates/QABCD001AB_E12A345a01_PAE12345_nanopore_new_minimal/20200122_1217_1-A1-B1-PAE12345_1234567a/throughput_.csv new file mode 100644 index 00000000..e69de29b From 33e6e8f7bca1fbe4ab0778fb02215c0e6a381a66 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Fri, 6 May 2022 13:48:11 +0200 Subject: [PATCH 08/15] Feature/update nanopore (#97) * increase some versions, fix testing env * add tests for alternative nanopore structure * Add worflow triggers (#93) * Add triggers * Reorder git commands * Use master as base, not main * parser * update workflows (#94) * Set version to 1.10.6 * update pom * Fix project setup (#96) * add possibility of some metadata values being empty * comments * extract method to validate a single schema * use data-model-lib release Co-authored-by: Sven F Co-authored-by: JohnnyQ5 Co-authored-by: Steffengreiner Co-authored-by: Sven F <9976560+sven1103@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 02bfc551..0826fa18 100644 --- a/pom.xml +++ b/pom.xml @@ -127,7 +127,7 @@ data-model-lib life.qbic - 2.17.0-SNAPSHOT + 2.18.0 org.mockito From fe106baa8e1111a57def498e3fdd66b9c3290ed8 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Fri, 6 May 2022 13:59:31 +0200 Subject: [PATCH 09/15] Update CHANGELOG.rst Co-authored-by: Tobias Koch --- CHANGELOG.rst | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a36f19ce..01010846 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,16 +4,7 @@ Changelog This project adheres to `Semantic Versioning `_. -1.11.0-SNAPSHOT (2022-01-07) ----------------------------- - -**Added** - -**Fixed** - -**Dependencies** - -**Deprecated** +For information about newer versions please refer to `our GitHub releases `_ 1.10.4 (2022-01-04) ------------------ From 154bbcda10113dbffe0ddbd9e833869a746f8d8a Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Fri, 13 May 2022 17:34:23 +0200 Subject: [PATCH 10/15] use and test new maxquant reults structure --- pom.xml | 2 +- .../life/qbic/utils/MaxQuantParser.groovy | 4 +++ .../life/qbic/utils/MaxQuantParserSpec.groovy | 24 +++++++----------- .../QABCD_sample_ids.txt} | 0 .../sample_ids.txt | 0 .../txt/experimentalDesignTemplate.txt | 0 .../combined/txt/summary_1234.pdf | Bin .../{combined => }/txt/allPeptides.txt | 0 .../{combined => }/txt/evidence.txt | 0 .../{combined => }/txt/parameters.txt | 0 .../{combined => }/txt/peptides.txt | 0 .../{combined => }/txt/proteinGroups.txt | 0 .../QABCD_sample_ids.txt} | 0 .../mqpar.xml} | 0 .../Q0010_sample_ids.txt} | Bin .../txt/experimentalDesignTemplate.txt | 0 .../combined/txt/summary/summary_1234.pdf | Bin .../validates/sample_ids.txt | 0 .../{combined => }/txt/allPeptides.txt | 0 .../validates/{combined => }/txt/evidence.txt | 0 .../{combined => }/txt/parameters.txt | 0 .../validates/{combined => }/txt/peptides.txt | 0 .../{combined => }/txt/proteinGroups.txt | 0 23 files changed, 14 insertions(+), 16 deletions(-) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/{missing_combined_directory/mqpar.xml => missing_file_in_txt_directory/QABCD_sample_ids.txt} (100%) delete mode 100644 src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/sample_ids.txt delete mode 100644 src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/experimentalDesignTemplate.txt delete mode 100644 src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/summary_1234.pdf rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/{combined => }/txt/allPeptides.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/{combined => }/txt/evidence.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/{combined => }/txt/parameters.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/{combined => }/txt/peptides.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/{combined => }/txt/proteinGroups.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/{missing_combined_directory/sample_ids.txt => missing_txt_directory/QABCD_sample_ids.txt} (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/{missing_file_in_txt_directory/combined/txt/experimentalDesignTemplate.txt => missing_txt_directory/mqpar.xml} (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/{fails/missing_file_in_txt_directory/combined/txt/summary_1234.pdf => validates/Q0010_sample_ids.txt} (100%) delete mode 100644 src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/experimentalDesignTemplate.txt delete mode 100644 src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/summary/summary_1234.pdf delete mode 100644 src/test/resources/dummyFileSystem/maxquant-run-output/validates/sample_ids.txt rename src/test/resources/dummyFileSystem/maxquant-run-output/validates/{combined => }/txt/allPeptides.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/validates/{combined => }/txt/evidence.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/validates/{combined => }/txt/parameters.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/validates/{combined => }/txt/peptides.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/validates/{combined => }/txt/proteinGroups.txt (100%) diff --git a/pom.xml b/pom.xml index 1a94f480..1636b271 100644 --- a/pom.xml +++ b/pom.xml @@ -127,7 +127,7 @@ data-model-lib life.qbic - 2.18.0 + 2.19.0-SNAPSHOT org.mockito diff --git a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy index 084d9f0a..58fdfc98 100644 --- a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy +++ b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy @@ -85,6 +85,8 @@ class MaxQuantParser implements DatasetParser { MaxQuantRunResult maxQuantRunResult = MaxQuantRunResult.createFrom(fileTreeMap) return maxQuantRunResult } catch (ValidationException validationException) { + println root + println validationException.getAllMessages() throw new DatasetValidationException(validationException) } catch(Exception e) { throw new DataParserException(e.message, e.cause) @@ -226,9 +228,11 @@ class MaxQuantParser implements DatasetParser { */ private static void validateJson(String json) throws ValidationException { // Step1: load schema + println json JSONObject jsonObject = new JSONObject(json) InputStream schemaStream = MaxQuantOutput.getSchemaAsStream() JSONObject rawSchema = new JSONObject(new JSONTokener(schemaStream)) + println rawSchema SchemaLoader jsonSchemaLoader = SchemaLoader.builder() .schemaClient(SchemaClient.classPathAwareClient()) .schemaJson(rawSchema) diff --git a/src/test/groovy/life/qbic/utils/MaxQuantParserSpec.groovy b/src/test/groovy/life/qbic/utils/MaxQuantParserSpec.groovy index 8fdc2267..c2bfe703 100644 --- a/src/test/groovy/life/qbic/utils/MaxQuantParserSpec.groovy +++ b/src/test/groovy/life/qbic/utils/MaxQuantParserSpec.groovy @@ -32,35 +32,29 @@ class MaxQuantParserSpec extends Specification { assert maxQuantRunResult.runParameters.getRelativePath() == "./mqpar.xml" assert maxQuantRunResult.runParameters.getName()== "mqpar.xml" - assert maxQuantRunResult.sampleIds.getRelativePath() == "./sample_ids.txt" - assert maxQuantRunResult.sampleIds.getName()== "sample_ids.txt" + assert maxQuantRunResult.sampleIds.getRelativePath() == "./QABCD_sample_ids.txt" + assert maxQuantRunResult.sampleIds.getName()== "QABCD_sample_ids.txt" - //Files in ./combined/txt/ can be parsed - assert maxQuantRunResult.allPeptides.getRelativePath() == "./combined/txt/allPeptides.txt" + //Files in ./txt/ can be parsed + assert maxQuantRunResult.allPeptides.getRelativePath() == "./txt/allPeptides.txt" assert maxQuantRunResult.allPeptides.getName()== "allPeptides.txt" - assert maxQuantRunResult.evidence.getRelativePath() == "./combined/txt/evidence.txt" + assert maxQuantRunResult.evidence.getRelativePath() == "./txt/evidence.txt" assert maxQuantRunResult.evidence.getName()== "evidence.txt" - assert maxQuantRunResult.experimentalDesignTemplate.getRelativePath() == "./combined/txt/experimentalDesignTemplate.txt" - assert maxQuantRunResult.experimentalDesignTemplate.getName()== "experimentalDesignTemplate.txt" - - assert maxQuantRunResult.parameters.getRelativePath() == "./combined/txt/parameters.txt" + assert maxQuantRunResult.parameters.getRelativePath() == "./txt/parameters.txt" assert maxQuantRunResult.parameters.getName()== "parameters.txt" - assert maxQuantRunResult.peptides.getRelativePath() == "./combined/txt/peptides.txt" + assert maxQuantRunResult.peptides.getRelativePath() == "./txt/peptides.txt" assert maxQuantRunResult.peptides.getName()== "peptides.txt" - assert maxQuantRunResult.proteinGroups.getRelativePath() == "./combined/txt/proteinGroups.txt" + assert maxQuantRunResult.proteinGroups.getRelativePath() == "./txt/proteinGroups.txt" assert maxQuantRunResult.proteinGroups.getName()== "proteinGroups.txt" - - assert maxQuantRunResult.summary.getRelativePath() == "./combined/txt/summary/summary_1234.pdf" - assert maxQuantRunResult.summary.getName()== "summary_1234.pdf" } def "parsing an invalid file structure throws DatasetValidationException"() { given: - def pathToDirectory = Paths.get(exampleDirectoriesRoot, "fails/missing_combined_directory") + def pathToDirectory = Paths.get(exampleDirectoriesRoot, "fails/missing_txt_directory") when: maxQuantParser.parseFrom(pathToDirectory) then: diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_combined_directory/mqpar.xml b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/QABCD_sample_ids.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_combined_directory/mqpar.xml rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/QABCD_sample_ids.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/sample_ids.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/sample_ids.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/experimentalDesignTemplate.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/experimentalDesignTemplate.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/summary_1234.pdf b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/summary_1234.pdf deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/allPeptides.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/allPeptides.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/allPeptides.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/allPeptides.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/evidence.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/evidence.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/evidence.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/evidence.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/parameters.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/parameters.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/parameters.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/parameters.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/peptides.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/peptides.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/peptides.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/peptides.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/proteinGroups.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/proteinGroups.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/combined/txt/proteinGroups.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_root_files_directory/txt/proteinGroups.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_combined_directory/sample_ids.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_txt_directory/QABCD_sample_ids.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_combined_directory/sample_ids.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_txt_directory/QABCD_sample_ids.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/experimentalDesignTemplate.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_txt_directory/mqpar.xml similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/experimentalDesignTemplate.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_txt_directory/mqpar.xml diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/summary_1234.pdf b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/Q0010_sample_ids.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/summary_1234.pdf rename to src/test/resources/dummyFileSystem/maxquant-run-output/validates/Q0010_sample_ids.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/experimentalDesignTemplate.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/experimentalDesignTemplate.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/summary/summary_1234.pdf b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/summary/summary_1234.pdf deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/sample_ids.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/sample_ids.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/allPeptides.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/allPeptides.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/allPeptides.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/allPeptides.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/evidence.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/evidence.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/evidence.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/evidence.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/parameters.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/parameters.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/parameters.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/parameters.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/peptides.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/peptides.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/peptides.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/peptides.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/proteinGroups.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/proteinGroups.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/validates/combined/txt/proteinGroups.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/validates/txt/proteinGroups.txt From ee0063da35a61404eb80fc44e7bc29960e789739 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Fri, 13 May 2022 18:07:18 +0200 Subject: [PATCH 11/15] fix test structure --- .../missing_file_in_txt_directory/{combined => }/txt/evidence.txt | 0 .../{combined => }/txt/parameters.txt | 0 .../missing_file_in_txt_directory/{combined => }/txt/peptides.txt | 0 .../{combined => }/txt/proteinGroups.txt | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/{combined => }/txt/evidence.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/{combined => }/txt/parameters.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/{combined => }/txt/peptides.txt (100%) rename src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/{combined => }/txt/proteinGroups.txt (100%) diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/evidence.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/txt/evidence.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/evidence.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/txt/evidence.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/parameters.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/txt/parameters.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/parameters.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/txt/parameters.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/peptides.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/txt/peptides.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/peptides.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/txt/peptides.txt diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/proteinGroups.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/txt/proteinGroups.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/combined/txt/proteinGroups.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/fails/missing_file_in_txt_directory/txt/proteinGroups.txt From bf06cde35d8f070fb33a149430238bdd31a28ed7 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Fri, 13 May 2022 18:36:46 +0200 Subject: [PATCH 12/15] correctly parse structure without combined folder --- .../life/qbic/utils/MaxQuantParser.groovy | 25 ++++++++----------- ...10_sample_ids.txt => QABCD_sample_ids.txt} | 0 2 files changed, 11 insertions(+), 14 deletions(-) rename src/test/resources/dummyFileSystem/maxquant-run-output/validates/{Q0010_sample_ids.txt => QABCD_sample_ids.txt} (100%) diff --git a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy index 58fdfc98..791e1a75 100644 --- a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy +++ b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy @@ -85,8 +85,6 @@ class MaxQuantParser implements DatasetParser { MaxQuantRunResult maxQuantRunResult = MaxQuantRunResult.createFrom(fileTreeMap) return maxQuantRunResult } catch (ValidationException validationException) { - println root - println validationException.getAllMessages() throw new DatasetValidationException(validationException) } catch(Exception e) { throw new DataParserException(e.message, e.cause) @@ -120,16 +118,14 @@ class MaxQuantParser implements DatasetParser { rootChildren.each { currentChild -> if (currentChild.containsKey("children")) { //folder - parseCombinedInformation(map) + parseSubfolderInformation(map) } else if (currentChild.containsKey("fileType")) { //file - switch (currentChild.get("name")) { - case "mqpar.xml": - insertAsProperty(map, currentChild, RequiredRootFileKeys.RUN_PARAMETERS.getKeyName()) - break - case "sample_ids.txt": - insertAsProperty(map, currentChild, RequiredRootFileKeys.SAMPLE_ID.getKeyName()) - break + String name = currentChild.get("name") + if(name.equals("mqpar.xml")) { + insertAsProperty(map, currentChild, RequiredRootFileKeys.RUN_PARAMETERS.getKeyName()) + } else if(name.endsWith("sample_ids.txt")) { + insertAsProperty(map, currentChild, RequiredRootFileKeys.SAMPLE_ID.getKeyName()) } } } @@ -139,12 +135,12 @@ class MaxQuantParser implements DatasetParser { * Method which adapts the parsed content of the txt directory in place to the expected file structure. * @see {valid datastructure example} * - * After parsing the files of the txt directory are contained in the children property of the combined directory, which itself is contained in the root directory. + * After parsing the files of the txt directory and a potential intermediate directory, which itself is contained in the root directory. * The underlying datastructure however expects a mapping of the expected files as a Map entry in the root directory. * @param maxQuantInformation a nested map representing the parsed fileTree structure * @since 1.9.0 */ - private static void parseCombinedInformation(Map maxQuantInformation) { + private static void parseSubfolderInformation(Map maxQuantInformation) { List rootFolderInformation = maxQuantInformation.get("children") as List def combinedFolderInformation def txtFolderInformation @@ -153,6 +149,9 @@ class MaxQuantParser implements DatasetParser { if (map.get("name") == "combined") { combinedFolderInformation = map.get("children") } + if (map.get("name") == "txt") { + txtFolderInformation = map.get("children") as List + } } if (combinedFolderInformation) { combinedFolderInformation.findAll { map -> @@ -228,11 +227,9 @@ class MaxQuantParser implements DatasetParser { */ private static void validateJson(String json) throws ValidationException { // Step1: load schema - println json JSONObject jsonObject = new JSONObject(json) InputStream schemaStream = MaxQuantOutput.getSchemaAsStream() JSONObject rawSchema = new JSONObject(new JSONTokener(schemaStream)) - println rawSchema SchemaLoader jsonSchemaLoader = SchemaLoader.builder() .schemaClient(SchemaClient.classPathAwareClient()) .schemaJson(rawSchema) diff --git a/src/test/resources/dummyFileSystem/maxquant-run-output/validates/Q0010_sample_ids.txt b/src/test/resources/dummyFileSystem/maxquant-run-output/validates/QABCD_sample_ids.txt similarity index 100% rename from src/test/resources/dummyFileSystem/maxquant-run-output/validates/Q0010_sample_ids.txt rename to src/test/resources/dummyFileSystem/maxquant-run-output/validates/QABCD_sample_ids.txt From 72dc222b84794720850490c2e68f31ea7ff7f978 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Tue, 17 May 2022 15:12:38 +0200 Subject: [PATCH 13/15] Update src/main/groovy/life/qbic/utils/MaxQuantParser.groovy Co-authored-by: jnnfr --- src/main/groovy/life/qbic/utils/MaxQuantParser.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy index 791e1a75..3c3314a2 100644 --- a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy +++ b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy @@ -118,7 +118,7 @@ class MaxQuantParser implements DatasetParser { rootChildren.each { currentChild -> if (currentChild.containsKey("children")) { //folder - parseSubfolderInformation(map) + parseTxtFolder(map) } else if (currentChild.containsKey("fileType")) { //file String name = currentChild.get("name") From a8831754d89ea07b864ebf0dff5b9ea46a31c897 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Tue, 17 May 2022 15:17:20 +0200 Subject: [PATCH 14/15] remove unused folder parsing, rename method, fix comment --- .../life/qbic/utils/MaxQuantParser.groovy | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy index 3c3314a2..aed1088f 100644 --- a/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy +++ b/src/main/groovy/life/qbic/utils/MaxQuantParser.groovy @@ -135,31 +135,19 @@ class MaxQuantParser implements DatasetParser { * Method which adapts the parsed content of the txt directory in place to the expected file structure. * @see {valid datastructure example} * - * After parsing the files of the txt directory and a potential intermediate directory, which itself is contained in the root directory. + * After parsing, the files of the txt directory are contained in the children property of the root directory. * The underlying datastructure however expects a mapping of the expected files as a Map entry in the root directory. * @param maxQuantInformation a nested map representing the parsed fileTree structure * @since 1.9.0 */ - private static void parseSubfolderInformation(Map maxQuantInformation) { + private static void parseTxtFolder(Map maxQuantInformation) { List rootFolderInformation = maxQuantInformation.get("children") as List - def combinedFolderInformation def txtFolderInformation - def summaryFolderInformation rootFolderInformation.findAll { map -> - if (map.get("name") == "combined") { - combinedFolderInformation = map.get("children") - } if (map.get("name") == "txt") { txtFolderInformation = map.get("children") as List } } - if (combinedFolderInformation) { - combinedFolderInformation.findAll { map -> - if (map.get("name") == "txt") { - txtFolderInformation = map.get("children") as List - } - } - } if (txtFolderInformation) { txtFolderInformation.each { Map child -> switch (child.get("name")) { @@ -182,19 +170,11 @@ class MaxQuantParser implements DatasetParser { insertAsProperty(maxQuantInformation, child, RequiredTxtFileKeys.PROTEIN_GROUPS.getKeyName()) break default: - if(child.get("name") == "summary") summaryFolderInformation = child.get("children") as List //ignoring other children break } } } - if(summaryFolderInformation){ - summaryFolderInformation.each{ Map child -> - if (child.get("name").toString().matches("summary_[0-9]{4}.*")) { - insertAsProperty(maxQuantInformation, child, RequiredTxtFileKeys.SUMMARY.getKeyName()) - } - } - } } /** From b03c886ececf93fe93f77a365cb4d0f1a34b61b3 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Tue, 17 May 2022 16:22:49 +0200 Subject: [PATCH 15/15] use 2.19.0 of data-model --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1636b271..7a485d02 100644 --- a/pom.xml +++ b/pom.xml @@ -127,7 +127,7 @@ data-model-lib life.qbic - 2.19.0-SNAPSHOT + 2.19.0 org.mockito