-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
17 changed files
with
1,185 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
.../groovy/life/qbic/datamodel/datasets/datastructure/files/nanopore/GuppyBasecallLog.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!") | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...y/life/qbic/datamodel/datasets/datastructure/files/nanopore/SequencingTelemetryLog.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!") | ||
} | ||
} | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
...oovy/life/qbic/datamodel/datasets/datastructure/folders/nanopore/BasecallingFolder.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!") | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/groovy/life/qbic/datamodel/instruments/OxfordNanoporeInstrumentOutputV4.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.