Skip to content

Commit

Permalink
Prepare Version 2.20.0 (#325)
Browse files Browse the repository at this point in the history
* increase snapshot to 2.20.0

* Adjust Nf-core pipeline result to account for sarekv3 file structure

* Remove replacement of hyphens with underscores in project spaces (#326)

Co-authored-by: wow-such-code <[email protected]>
  • Loading branch information
Steffengreiner and wow-such-code authored Aug 26, 2022
1 parent 0c72def commit efe896a
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 181 deletions.
Binary file modified doc/figures/ER_diagram_pipeline_results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>life.qbic</groupId>
<artifactId>data-model-lib</artifactId>
<version>2.19.1</version>
<version>2.20.0-SNAPSHOT</version>
<name>data-model-lib</name>
<url>http://github.com/qbicsoftware/data-model-lib</url>
<description>Data models. A collection of QBiC's central data models and DTOs. </description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package life.qbic.datamodel.datasets

import life.qbic.datamodel.datasets.datastructure.files.DataFile
import life.qbic.datamodel.datasets.datastructure.files.nfcore.ExecutionReport
import life.qbic.datamodel.datasets.datastructure.files.nfcore.PipelineReport

import life.qbic.datamodel.datasets.datastructure.files.nfcore.RunId
import life.qbic.datamodel.datasets.datastructure.files.general.SampleIds
import life.qbic.datamodel.datasets.datastructure.files.nfcore.SoftwareVersions
Expand Down Expand Up @@ -33,7 +33,6 @@ final class NfCorePipelineResult {
private final static Set nfCoreFileTypes = [
FQDN_FILES + ".ExecutionReport",
GENERAL_FILES + ".SampleIds",
FQDN_FILES + ".PipelineReport",
FQDN_FILES + ".SoftwareVersions",
FQDN_FILES + ".RunId"
]
Expand Down Expand Up @@ -85,9 +84,8 @@ final class NfCorePipelineResult {
Objects.requireNonNull(bioinformaticPipelineOutput.get("processFolders"), "The root folder must contain at least one process folder.")
//Check if all required files are in the pipeline_info directory
Map pipelineInfoMap = bioinformaticPipelineOutput["pipelineInformation"] as Map
Objects.requireNonNull(pipelineInfoMap.get("softwareVersions"), "The pipeline_info folder must contain a softwareVersions.csv file.")
Objects.requireNonNull(pipelineInfoMap.get("executionReport"), "The pipeline_info folder must contain a executionReport.txt file.")
Objects.requireNonNull(pipelineInfoMap.get("pipelineReport"), "The pipeline_info folder must contain a pipeline_info.txt file.")
Objects.requireNonNull(pipelineInfoMap.get("softwareVersions"), "The pipeline_info folder must contain a softwareVersions.yml file.")
Objects.requireNonNull(pipelineInfoMap.get("executionReport"), "The pipeline_info folder must contain a executionReport.html file.")
//Check if all required files are in root directory
Objects.requireNonNull(bioinformaticPipelineOutput.get("runId"), "The root folder must contain a run_id.txt file.")
Objects.requireNonNull(bioinformaticPipelineOutput.get("sampleIds"), "The root folder must contain an sample_ids.txt file.")
Expand All @@ -105,11 +103,9 @@ final class NfCorePipelineResult {
//These files are not stored as children but as properties of the pipeline_info folder
DataFile softwareVersions = parseFile(pipelineInfoMap.get("softwareVersions") as Map)
DataFile executionReport = parseFile(pipelineInfoMap.get("executionReport") as Map)
DataFile pipelineReport = parseFile(pipelineInfoMap.get("pipelineReport") as Map)

//Set information of pipelineInformation properties
pipelineInformation.softwareVersions = softwareVersions as SoftwareVersions
pipelineInformation.pipelineReport = pipelineReport as PipelineReport
pipelineInformation.executionReport = executionReport as ExecutionReport

//Parse all files in the root directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import life.qbic.datamodel.datasets.datastructure.files.DataFile
*/
class ExecutionReport extends DataFile {

final private static String FILE_TYPE = "txt"
final private static String FILE_TYPE = "html"

final private static String NAME_SCHEMA = $/execution_report.*/$
final private static String NAME_SCHEMA = $/^execution_report.*/$

protected ExecutionReport() {}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import life.qbic.datamodel.datasets.datastructure.files.DataFile
*/
class SoftwareVersions extends DataFile {

final private static String FILE_TYPE = "csv"
final private static String FILE_TYPE = "yml"

final private static String NAME_SCHEMA = $/software_versions.*/$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package life.qbic.datamodel.datasets.datastructure.folders.nfcore

import life.qbic.datamodel.datasets.datastructure.files.DataFile
import life.qbic.datamodel.datasets.datastructure.files.nfcore.ExecutionReport
import life.qbic.datamodel.datasets.datastructure.files.nfcore.PipelineReport
import life.qbic.datamodel.datasets.datastructure.files.nfcore.SoftwareVersions
import life.qbic.datamodel.datasets.datastructure.folders.DataFolder

Expand All @@ -19,8 +18,6 @@ class PipelineInformationFolder extends DataFolder {

SoftwareVersions softwareVersions

PipelineReport pipelineReport

ExecutionReport executionReport

protected PipelineInformationFolder() {}
Expand Down Expand Up @@ -58,15 +55,6 @@ class PipelineInformationFolder extends DataFolder {
return softwareVersions
}

/**
* Provides access to the information stored in the runId file
* @return the pipeline report generated by nextflow
* @since 2.6.0
*/
PipelineReport getPipelineReport() {
return pipelineReport
}

/**
* Provides access to the information stored in the sampleIds file
* @return the execution report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ final class ProjectSpace {
private static String formatSpaceName(String name) {
def capitalizedName = name.trim().toUpperCase()
def refactoredName = capitalizedName.replaceAll("\\s+", "_")
.replaceAll("-", "_")
return refactoredName
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
"properties": {
"name": { "pattern": "pipeline_info"},
"softwareVersions": { "$ref": "#/definitions/softwareVersions" },
"pipelineReport": { "$ref": "#/definitions/pipelineReport" },
"executionReport": { "$ref": "#/definitions/executionReport" }
},
"required": [
"softwareVersions",
"pipelineReport",
"executionReport"
]
}
Expand All @@ -34,21 +32,7 @@
{
"properties": {
"name": { "pattern": "software_versions"},
"fileType": { "pattern": "csv" }
}
}
]
},
"pipelineReport": {
"description": "A data file that describes the pipeline configuration.",
"allOf": [
{
"$ref": "data-structure-commons.json#/definitions/dataFile"
},
{
"properties": {
"name": { "pattern": "pipeline_report"},
"fileType": { "pattern": "txt" }
"fileType": { "pattern": "yml" }
}
}
]
Expand All @@ -62,7 +46,7 @@
{
"properties": {
"name": { "pattern": "execution_report"},
"fileType": { "pattern": "txt" }
"fileType": { "pattern": "html" }
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ class NfCorePipelineResultSpec extends Specification {
runId.name == "run_id.txt"
processFolders.get(0).name == "salmon"
qualityControlFolder.name == "multiqc"
pipelineInformationFolder.getSoftwareVersions().name == "software_versions.csv"
pipelineInformationFolder.getPipelineReport().name == "pipeline_report.txt"
pipelineInformationFolder.getExecutionReport().name == "execution_report.txt"
pipelineInformationFolder.getSoftwareVersions().name == "software_versions.yml"
pipelineInformationFolder.getExecutionReport().name == "execution_report.html"
}

def "Invalid fileTree will return a NullPointerException"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class ExecutionReportSpec extends Specification {

def "shall create a ExecutionReport instance"() {
given:
final name = "execution_report.txt"
final relativePath = "root/execution_report.txt"
final name = "execution_report.html"
final relativePath = "root/execution_report.html"

when:
def dataObject = ExecutionReport.create(name, relativePath)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class SoftwareVersionsSpec extends Specification {

def "shall create a SoftwareVersions instance"() {
given:
final name = "software_versions.csv"
final path = "root/software_versions.csv"
final name = "software_versions.yml"
final path = "root/software_versions.yml"

when:
def dataObject = SoftwareVersions.create(name, path)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package life.qbic.datamodel.datasets.datastructure.folders.nfcore

import life.qbic.datamodel.datasets.datastructure.files.nfcore.ExecutionReport
import life.qbic.datamodel.datasets.datastructure.files.nfcore.PipelineReport
import life.qbic.datamodel.datasets.datastructure.files.nfcore.SoftwareVersions
import spock.lang.Specification

Expand All @@ -17,18 +16,15 @@ class PipelineInformationFolderSpec extends Specification {
final def name = "pipeline_info"
final def relativePath = "root/pipeline_info"
final def children = []
final def executionReport = ExecutionReport.create("execution_report.txt", "root/execution_report.txt")
final def pipelineReport = PipelineReport.create("pipeline_report.txt", "root/pipeline_report.txt")
final def softwareVersions = SoftwareVersions.create("software_versions.csv", "root/software_versions.csv")
final def executionReport = ExecutionReport.create("execution_report.html", "root/execution_report.html")
final def softwareVersions = SoftwareVersions.create("software_versions.yml", "root/software_versions.yml")
when:
final def pipelineInformationFolder = PipelineInformationFolder.create(name, relativePath, children)
pipelineInformationFolder.executionReport = executionReport
pipelineInformationFolder.pipelineReport = pipelineReport
pipelineInformationFolder.softwareVersions = softwareVersions

then:
assert pipelineInformationFolder.getExecutionReport() == executionReport
assert pipelineInformationFolder.getPipelineReport() == pipelineReport
assert pipelineInformationFolder.getSoftwareVersions() == softwareVersions

}
Expand All @@ -38,7 +34,7 @@ class PipelineInformationFolderSpec extends Specification {
final def name = "pipeline_unsatisfied"
final def relativePath = "root/pipeline_unsatisfied"
final def children = []
final def datafile = ExecutionReport.create("execution_report_test.txt", "root/execution_report_test.txt")
final def datafile = ExecutionReport.create("execution_report_test.html", "root/execution_report_test.html")
children.add(datafile)

when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ProcessFolderSpec extends Specification {
final def name = "processtest"
final def relativePath = "root/processtest"
final def children = []
final def datafile = ExecutionReport.create("execution_report.txt", "root/processtest/execution_report.txt")
final def datafile = ExecutionReport.create("execution_report.html", "root/processtest/execution_report.html")
children.add(datafile)

when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class QualityControlFolderSpec extends Specification {
final def name = "multiqc"
final def relativePath = "root/multiqc"
final def children = []
final def datafile = ExecutionReport.create("execution_report_test.txt", "root/execution_report_test.txt")
final def datafile = ExecutionReport.create("execution_report_test.html", "root/execution_report_test.html")
children.add(datafile)

when:
Expand All @@ -31,7 +31,7 @@ class QualityControlFolderSpec extends Specification {
final def name = "simpleqc"
final def relativePath = "root/simpleqc"
final def children = []
final def datafile = ExecutionReport.create("execution_report_test.txt", "root/execution_report_test.txt")
final def datafile = ExecutionReport.create("execution_report_test.html", "root/execution_report_test.html")
children.add(datafile)

when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,4 @@ class ProjectSpaceSpec extends Specification {
thrown(IllegalArgumentException)

}

def "Dashes are replaced by underscores"() {
given:
String projectSpaceName = "my-new-space"

when:
ProjectSpace space = new ProjectSpace(projectSpaceName)

then:
space.name.equals("MY_NEW_SPACE")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@
"path": "./",
"children": [],
"softwareVersions": {
"name": "software_versions.csv",
"fileType": "csv",
"path": "pipeline_info/software_versions.csv"
},
"pipelineReport": {
"name": "pipeline_report.txt",
"fileType": "txt",
"path": "pipeline_info/pipeline_report.txt"
"name": "software_versions.yml",
"fileType": "yml",
"path": "pipeline_info/software_versions.yml"
},
"executionReport": {
"name": "execution_report.txt",
"fileType": "txt",
"path": "pipeline_info/execution_report.txt"
"name": "execution_report.html",
"fileType": "html",
"path": "pipeline_info/execution_report.html"
}
},
"qualityControl": {
Expand Down
Loading

0 comments on commit efe896a

Please sign in to comment.