Skip to content

Commit 322b212

Browse files
Release 2.24.0
Merge pull request #345 from qbicsoftware/development
2 parents 5d8a1d2 + 28da4da commit 322b212

17 files changed

+1185
-6
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ A more recent model, which places two of the configuration files into a subfolde
107107

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

110+
V4 outlines a model in which a second higher-accuracy basecalling was performed after the initial basecalling
111+
112+
![Nanopore Data Structure Model v4](./doc/figures/Nanopore_Data_Structure_Model_v4.svg)
113+
110114
#### Nanopore usage example
111115

112116
For usage examples, see the [usage documentation](./doc/examples.md).

doc/figures/Nanopore_Data_Structure_Model_v4.svg

Lines changed: 4 additions & 0 deletions
Loading

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>life.qbic</groupId>
99
<artifactId>data-model-lib</artifactId>
10-
<version>2.23.0</version>
10+
<version>2.24.0-SNAPSHOT</version>
1111
<name>data-model-lib</name>
1212
<url>http://github.com/qbicsoftware/data-model-lib</url>
1313
<description>Data models. A collection of QBiC's central data models and DTOs. </description>

src/main/groovy/life/qbic/datamodel/datasets/OxfordNanoporeExperiment.groovy

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ final class OxfordNanoporeExperiment implements ExperimentFolder {
4040
FQDN_FILES + ".BarcodeAlignmentLog",
4141
FQDN_FILES + ".PoreActivityLog",
4242
FQDN_FILES + ".SampleSheetLog",
43-
FQDN_FILES + ".PoreScanDataLog"
43+
FQDN_FILES + ".PoreScanDataLog",
44+
FQDN_FILES + ".SequencingTelemetryLog",
45+
FQDN_FILES + ".GuppyBasecallLog"
4446
]
4547

4648
private final static Set nanoporeFolderTypes = [
@@ -52,7 +54,8 @@ final class OxfordNanoporeExperiment implements ExperimentFolder {
5254
FQDN_FOLDERS + ".FastQFailFolder",
5355
FQDN_FOLDERS + ".UnclassifiedFast5Folder",
5456
FQDN_FOLDERS + ".UnclassifiedFastQFolder",
55-
FQDN_FOLDERS + ".OtherReportsFolder"
57+
FQDN_FOLDERS + ".OtherReportsFolder",
58+
FQDN_FOLDERS + ".BasecallingFolder"
5659
]
5760

5861
private OxfordNanoporeExperiment(String sampleId, List<OxfordNanoporeMeasurement> measurements) {
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package life.qbic.datamodel.datasets.datastructure.files.nanopore
2+
3+
import life.qbic.datamodel.datasets.datastructure.files.DataFile
4+
5+
/**
6+
* A specialisation of a DataFile, represents an Oxford Nanopore guppy basecalling client log file
7+
*/
8+
class GuppyBasecallLog extends DataFile {
9+
10+
final private static String FILE_TYPE = "log"
11+
12+
final private static String NAME_SCHEMA = $/guppy_basecall_client_log-.*/$
13+
14+
protected GuppyBasecallLog() {}
15+
16+
protected GuppyBasecallLog(String name, String relativePath) {
17+
super(name, relativePath, FILE_TYPE)
18+
validateName()
19+
}
20+
21+
static GuppyBasecallLog create(String name, String relativePath) {
22+
return new GuppyBasecallLog(name, relativePath)
23+
}
24+
25+
private void validateName() {
26+
if (!(this.name =~ NAME_SCHEMA)) {
27+
throw new IllegalArgumentException("Name must match the Nanopore guppy basecall client log schema!")
28+
}
29+
}
30+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package life.qbic.datamodel.datasets.datastructure.files.nanopore
2+
3+
import life.qbic.datamodel.datasets.datastructure.files.DataFile
4+
5+
/**
6+
* A specialisation of a DataFile, represents an Oxford Nanopore sequencing telemetry log file
7+
*
8+
*/
9+
class SequencingTelemetryLog extends DataFile {
10+
11+
final private static String FILE_TYPE = "js"
12+
13+
final private static String NAME_SCHEMA = $/sequencing_telemetry_.*/$
14+
15+
protected SequencingTelemetryLog() {}
16+
17+
protected SequencingTelemetryLog(String name, String relativePath) {
18+
super(name, relativePath, FILE_TYPE)
19+
validateName()
20+
}
21+
22+
static SequencingTelemetryLog create(String name, String relativePath) {
23+
return new SequencingTelemetryLog(name, relativePath)
24+
}
25+
26+
private void validateName() {
27+
if (!(this.name =~ NAME_SCHEMA)) {
28+
throw new IllegalArgumentException("Name must match the Nanopore sequencing telemetry log name schema!")
29+
}
30+
}
31+
32+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package life.qbic.datamodel.datasets.datastructure.folders.nanopore
2+
3+
import life.qbic.datamodel.datasets.datastructure.folders.DataFolder
4+
5+
/**
6+
* <class short description - One Line!>
7+
*
8+
* <More detailed description - When to use, what it solves, etc.>
9+
*
10+
* @since <version tag>
11+
*
12+
*/
13+
class BasecallingFolder extends DataFolder {
14+
/**
15+
* The name schema of a basecalling folder contained within the nanopore dataset.
16+
*
17+
*/
18+
final private static String NAME_SCHEMA = /basecalling/
19+
20+
protected BasecallingFolder() {}
21+
22+
protected BasecallingFolder(String name, String relativePath, List children) {
23+
super(name, relativePath, children)
24+
validateName()
25+
}
26+
27+
/**
28+
* Creates a new instance of a BasecallingFolder object
29+
* @param relativePath The relative path of the folder
30+
* @param children A list with child elements of unknown type of the folder
31+
* @return A new instance of a BasecallingFolder object
32+
*/
33+
static BasecallingFolder create(String name, String relativePath, List<?> children) {
34+
new BasecallingFolder(name, relativePath, children)
35+
}
36+
37+
private void validateName() {
38+
if (!(this.name =~ NAME_SCHEMA)) {
39+
throw new IllegalArgumentException("Name must match the Nanopore Basecalling schema!")
40+
}
41+
}
42+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package life.qbic.datamodel.instruments
2+
3+
4+
/**
5+
* Represents the Nanopore instrument output data structure schema.
6+
*
7+
* The original schema is defined in as resource and is
8+
* referenced here, wrapped in a Groovy class for reference
9+
* in applications that want to validate the instrument
10+
* output structure against the schema.
11+
*
12+
* @author Steffen Greiner
13+
* @since 1.9.0
14+
*/
15+
class OxfordNanoporeInstrumentOutputV4 {
16+
17+
private static final String SCHEMA_PATH = "/schemas/nanopore-instrument-output_v4.schema.json"
18+
19+
static InputStream getSchemaAsStream() {
20+
return OxfordNanoporeInstrumentOutputV4.getResourceAsStream(SCHEMA_PATH)
21+
}
22+
}

src/main/resources/schemas/nanopore-instrument-output.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "http://qbic.life/nanopore-instrument-output.schema.json",
44
"title": "Nanopore Instrument Output",
5-
"description": "Describes in which form Nanopore data is received from the lab.",
5+
"description": "Describes in which form PromethION/MinION sequenced Nanopore is received from the Microbiology lab.",
66
"definitions": {
77
"folder": {
88
"description": "Describes a folder",

src/main/resources/schemas/nanopore-instrument-output_v2.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "http://qbic.life/nanopore-instrument-output_v2.schema.json",
44
"title": "Nanopore Instrument Output V2",
5-
"description": "Describes in which form Nanopore data is received from the lab.",
5+
"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",
66
"definitions": {
77
"folder": {
88
"description": "Describes a folder",

0 commit comments

Comments
 (0)