Skip to content

Commit

Permalink
Release 2.24.0
Browse files Browse the repository at this point in the history
Merge pull request #345 from qbicsoftware/development
  • Loading branch information
Steffengreiner authored Dec 12, 2022
2 parents 5d8a1d2 + 28da4da commit 322b212
Show file tree
Hide file tree
Showing 17 changed files with 1,185 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ A more recent model, which places two of the configuration files into a subfolde

![Nanopore Data Structure Model v2](./doc/figures/Nanopore_Data_Structure_Model_v2.svg)

V4 outlines a model in which a second higher-accuracy basecalling was performed after the initial basecalling

![Nanopore Data Structure Model v4](./doc/figures/Nanopore_Data_Structure_Model_v4.svg)

#### Nanopore usage example

For usage examples, see the [usage documentation](./doc/examples.md).
Expand Down
4 changes: 4 additions & 0 deletions doc/figures/Nanopore_Data_Structure_Model_v4.svg
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.23.0</version>
<version>2.24.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 @@ -40,7 +40,9 @@ final class OxfordNanoporeExperiment implements ExperimentFolder {
FQDN_FILES + ".BarcodeAlignmentLog",
FQDN_FILES + ".PoreActivityLog",
FQDN_FILES + ".SampleSheetLog",
FQDN_FILES + ".PoreScanDataLog"
FQDN_FILES + ".PoreScanDataLog",
FQDN_FILES + ".SequencingTelemetryLog",
FQDN_FILES + ".GuppyBasecallLog"
]

private final static Set nanoporeFolderTypes = [
Expand All @@ -52,7 +54,8 @@ final class OxfordNanoporeExperiment implements ExperimentFolder {
FQDN_FOLDERS + ".FastQFailFolder",
FQDN_FOLDERS + ".UnclassifiedFast5Folder",
FQDN_FOLDERS + ".UnclassifiedFastQFolder",
FQDN_FOLDERS + ".OtherReportsFolder"
FQDN_FOLDERS + ".OtherReportsFolder",
FQDN_FOLDERS + ".BasecallingFolder"
]

private OxfordNanoporeExperiment(String sampleId, List<OxfordNanoporeMeasurement> measurements) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package life.qbic.datamodel.datasets.datastructure.files.nanopore

import life.qbic.datamodel.datasets.datastructure.files.DataFile

/**
* A specialisation of a DataFile, represents an Oxford Nanopore guppy basecalling client log file
*/
class GuppyBasecallLog extends DataFile {

final private static String FILE_TYPE = "log"

final private static String NAME_SCHEMA = $/guppy_basecall_client_log-.*/$

protected GuppyBasecallLog() {}

protected GuppyBasecallLog(String name, String relativePath) {
super(name, relativePath, FILE_TYPE)
validateName()
}

static GuppyBasecallLog create(String name, String relativePath) {
return new GuppyBasecallLog(name, relativePath)
}

private void validateName() {
if (!(this.name =~ NAME_SCHEMA)) {
throw new IllegalArgumentException("Name must match the Nanopore guppy basecall client log schema!")
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package life.qbic.datamodel.datasets.datastructure.files.nanopore

import life.qbic.datamodel.datasets.datastructure.files.DataFile

/**
* A specialisation of a DataFile, represents an Oxford Nanopore sequencing telemetry log file
*
*/
class SequencingTelemetryLog extends DataFile {

final private static String FILE_TYPE = "js"

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

protected SequencingTelemetryLog() {}

protected SequencingTelemetryLog(String name, String relativePath) {
super(name, relativePath, FILE_TYPE)
validateName()
}

static SequencingTelemetryLog create(String name, String relativePath) {
return new SequencingTelemetryLog(name, relativePath)
}

private void validateName() {
if (!(this.name =~ NAME_SCHEMA)) {
throw new IllegalArgumentException("Name must match the Nanopore sequencing telemetry log name schema!")
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package life.qbic.datamodel.datasets.datastructure.folders.nanopore

import life.qbic.datamodel.datasets.datastructure.folders.DataFolder

/**
* <class short description - One Line!>
*
* <More detailed description - When to use, what it solves, etc.>
*
* @since <version tag>
*
*/
class BasecallingFolder extends DataFolder {
/**
* The name schema of a basecalling folder contained within the nanopore dataset.
*
*/
final private static String NAME_SCHEMA = /basecalling/

protected BasecallingFolder() {}

protected BasecallingFolder(String name, String relativePath, List children) {
super(name, relativePath, children)
validateName()
}

/**
* Creates a new instance of a BasecallingFolder object
* @param relativePath The relative path of the folder
* @param children A list with child elements of unknown type of the folder
* @return A new instance of a BasecallingFolder object
*/
static BasecallingFolder create(String name, String relativePath, List<?> children) {
new BasecallingFolder(name, relativePath, children)
}

private void validateName() {
if (!(this.name =~ NAME_SCHEMA)) {
throw new IllegalArgumentException("Name must match the Nanopore Basecalling schema!")
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package life.qbic.datamodel.instruments


/**
* Represents the Nanopore instrument output data structure schema.
*
* The original schema is defined in as resource and is
* referenced here, wrapped in a Groovy class for reference
* in applications that want to validate the instrument
* output structure against the schema.
*
* @author Steffen Greiner
* @since 1.9.0
*/
class OxfordNanoporeInstrumentOutputV4 {

private static final String SCHEMA_PATH = "/schemas/nanopore-instrument-output_v4.schema.json"

static InputStream getSchemaAsStream() {
return OxfordNanoporeInstrumentOutputV4.getResourceAsStream(SCHEMA_PATH)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://qbic.life/nanopore-instrument-output.schema.json",
"title": "Nanopore Instrument Output",
"description": "Describes in which form Nanopore data is received from the lab.",
"description": "Describes in which form PromethION/MinION sequenced Nanopore is received from the Microbiology lab.",
"definitions": {
"folder": {
"description": "Describes a folder",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://qbic.life/nanopore-instrument-output_v2.schema.json",
"title": "Nanopore Instrument Output V2",
"description": "Describes in which form Nanopore data is received from the lab.",
"description": "Describes in which form PromethION/MinION sequenced Nanopore data is received from the medical genetics lab. Accounts for 'other reports' folder created by the lab",
"definitions": {
"folder": {
"description": "Describes a folder",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://qbic.life/nanopore-instrument-output_v3.schema.json",
"title": "Nanopore Instrument Output V3",
"description": "Describes in which form Nanopore data is received from the lab.",
"description": "Describes in which form PromethION/MinION sequenced Nanopore data is received from the medical genetics lab. Accounts for the adapted 'other_reports' folder structure provided by the lab",
"definitions": {
"folder": {
"description": "Describes a folder",
Expand Down
Loading

0 comments on commit 322b212

Please sign in to comment.