-
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.
Merge pull request #354 from qbicsoftware/development
Introduce minimal Schema for nanopore registration (#350)
- Loading branch information
Showing
8 changed files
with
1,437 additions
and
205 deletions.
There are no files selected for viewing
494 changes: 292 additions & 202 deletions
494
src/main/groovy/life/qbic/datamodel/datasets/OxfordNanoporeExperiment.groovy
Large diffs are not rendered by default.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
...main/groovy/life/qbic/datamodel/datasets/datastructure/files/nanopore/OptionalFile.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,29 @@ | ||
package life.qbic.datamodel.datasets.datastructure.files.nanopore | ||
|
||
import life.qbic.datamodel.datasets.datastructure.files.DataFile | ||
|
||
/** | ||
* Unspecific OptionalFile used to store unexpected file in the nanopore registration | ||
* | ||
* The high variety of the nanopore datasets registered made an optional all-purpose Datafile structure necessary. | ||
* | ||
*/ | ||
class OptionalFile extends DataFile { | ||
|
||
protected OptionalFile() {} | ||
|
||
protected OptionalFile(String name, String relativePath, String fileType) { | ||
super(name, relativePath, fileType) | ||
} | ||
|
||
/** | ||
* Creates a new instance of a OptionalFile object | ||
* @param name The name of the file | ||
* @param relativePath The relative path of the file | ||
* @param fileType The suffix specifying the file type of the file | ||
* @return A new instance of a OptionalFile object | ||
*/ | ||
static OptionalFile create(String name, String relativePath, String fileType) { | ||
return new OptionalFile(name, relativePath, fileType) | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
.../groovy/life/qbic/datamodel/datasets/datastructure/folders/nanopore/OptionalFolder.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,29 @@ | ||
package life.qbic.datamodel.datasets.datastructure.folders.nanopore | ||
|
||
import life.qbic.datamodel.datasets.datastructure.folders.DataFolder | ||
|
||
/** | ||
* Unspecific Optional Folder used to store unexpected folders in the nanopore registration | ||
* | ||
* The high variety of the nanopore datasets registered made an optional all-purpose Datafolder structure necessary. | ||
* | ||
*/ | ||
class OptionalFolder extends DataFolder { | ||
|
||
protected OptionalFolder() {} | ||
|
||
protected OptionalFolder(String name, String relativePath, List children) { | ||
super(name, relativePath, children) | ||
} | ||
|
||
/** | ||
* Creates a new instance of a OptionalFolder 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 OptionalFolder object | ||
*/ | ||
static OptionalFolder create(String name, String relativePath, List<?> children) { | ||
new OptionalFolder(name, relativePath, children) | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/groovy/life/qbic/datamodel/instruments/OxfordNanoporeInstrumentOutputMinimal.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,19 @@ | ||
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. | ||
*/ | ||
class OxfordNanoporeInstrumentOutputMinimal { | ||
|
||
private static final String SCHEMA_PATH = "/schemas/nanopore-instrument-output_minimal_schema.json" | ||
|
||
static InputStream getSchemaAsStream() { | ||
return OxfordNanoporeInstrumentOutputMinimal.getResourceAsStream(SCHEMA_PATH) | ||
} | ||
} |
Oops, something went wrong.