Skip to content

Commit d68db8b

Browse files
Release/2.21.0 (#331)
* 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) * add digiwest property tpes * Support nanopore data structure v3 (#328) * add new version of valid nanopore structure * implement additional v3 changes * Update schema and test to current file structure Co-authored-by: Steffengreiner <Steffen.Greiner@gmx.de> * Fix Nanopore Schema V3 naming and streamline children of other report definition * Adapt schema and add test case for mibi datastructure Co-authored-by: wow-such-code <andreas.friedrich@uni-tuebingen.de>
1 parent f95dae6 commit d68db8b

File tree

14 files changed

+1271
-4
lines changed

14 files changed

+1271
-4
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ final class OxfordNanoporeExperiment implements ExperimentFolder {
3333
FQDN_FILES + ".MuxScanDataLog",
3434
FQDN_FILES + ".ReportMdLog",
3535
FQDN_FILES + ".ReportPDFLog",
36+
FQDN_FILES + ".ReportHTMLLog",
37+
FQDN_FILES + ".ReportJSONLog",
3638
FQDN_FILES + ".SequencingSummaryLog",
3739
FQDN_FILES + ".ThroughputLog",
38-
FQDN_FILES + ".BarcodeAlignmentLog"
40+
FQDN_FILES + ".BarcodeAlignmentLog",
41+
FQDN_FILES + ".PoreActivityLog",
42+
FQDN_FILES + ".SampleSheetLog",
43+
FQDN_FILES + ".PoreScanDataLog"
3944
]
4045

4146
private final static Set nanoporeFolderTypes = [
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 pore activity log file
7+
*
8+
*/
9+
class PoreActivityLog extends DataFile {
10+
11+
final private static String FILE_TYPE = "csv"
12+
13+
final private static String NAME_SCHEMA = $/pore_activity_.*/$
14+
15+
protected PoreActivityLog() {}
16+
17+
protected PoreActivityLog(String name, String relativePath) {
18+
super(name, relativePath, FILE_TYPE)
19+
validateName()
20+
}
21+
22+
static PoreActivityLog create(String name, String relativePath) {
23+
return new PoreActivityLog(name, relativePath)
24+
}
25+
26+
private void validateName() {
27+
if (!(this.name =~ NAME_SCHEMA)) {
28+
throw new IllegalArgumentException("Name must match the Nanopore pore activity log name schema!")
29+
}
30+
}
31+
32+
}
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 pore scan data log file
7+
*
8+
*/
9+
class PoreScanDataLog extends DataFile {
10+
11+
final private static String FILE_TYPE = "csv"
12+
13+
final private static String NAME_SCHEMA = $/pore_scan_data_.*/$
14+
15+
protected PoreScanDataLog() {}
16+
17+
protected PoreScanDataLog(String name, String relativePath) {
18+
super(name, relativePath, FILE_TYPE)
19+
validateName()
20+
}
21+
22+
static PoreScanDataLog create(String name, String relativePath) {
23+
return new PoreScanDataLog(name, relativePath)
24+
}
25+
26+
private void validateName() {
27+
if (!(this.name =~ NAME_SCHEMA)) {
28+
throw new IllegalArgumentException("Name must match the Nanopore pore scan data log name schema!")
29+
}
30+
}
31+
32+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 report HTML log file
7+
*
8+
*/
9+
class ReportHTMLLog extends DataFile {
10+
11+
final private static String FILE_TYPE = "html"
12+
13+
final private static String NAME_SCHEMA = $/report_.*/$
14+
15+
protected ReportHTMLLog() {}
16+
17+
protected ReportHTMLLog(String name, String relativePath) {
18+
super(name, relativePath, FILE_TYPE)
19+
validateName()
20+
}
21+
22+
static ReportHTMLLog create(String name, String relativePath) {
23+
return new ReportHTMLLog(name, relativePath)
24+
}
25+
26+
private void validateName() {
27+
if (!(this.name =~ NAME_SCHEMA)) {
28+
throw new IllegalArgumentException("Name must match the Nanopore report name schema!")
29+
}
30+
}
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 report JSON log file
7+
*
8+
*/
9+
class ReportJSONLog extends DataFile {
10+
11+
final private static String FILE_TYPE = "json"
12+
13+
final private static String NAME_SCHEMA = $/report_.*/$
14+
15+
protected ReportJSONLog() {}
16+
17+
protected ReportJSONLog(String name, String relativePath) {
18+
super(name, relativePath, FILE_TYPE)
19+
validateName()
20+
}
21+
22+
static ReportJSONLog create(String name, String relativePath) {
23+
return new ReportJSONLog(name, relativePath)
24+
}
25+
26+
private void validateName() {
27+
if (!(this.name =~ NAME_SCHEMA)) {
28+
throw new IllegalArgumentException("Name must match the Nanopore report name schema!")
29+
}
30+
}
31+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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 sample sheet log file
7+
*
8+
* @author: Andreas Friedrich
9+
*/
10+
class SampleSheetLog extends DataFile {
11+
12+
final private static String FILE_TYPE = "csv"
13+
14+
final private static String NAME_SCHEMA = $/sample_sheet_.*/$
15+
16+
protected SampleSheetLog() {}
17+
18+
protected SampleSheetLog(String name, String relativePath) {
19+
super(name, relativePath, FILE_TYPE)
20+
validateName()
21+
}
22+
23+
static SampleSheetLog create(String name, String relativePath) {
24+
return new SampleSheetLog(name, relativePath)
25+
}
26+
27+
private void validateName() {
28+
if (!(this.name =~ NAME_SCHEMA)) {
29+
throw new IllegalArgumentException("Name must match the Nanopore sample sheet log name schema!")
30+
}
31+
}
32+
33+
}
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 Sven Fillinger
13+
* @since 1.9.0
14+
*/
15+
class OxfordNanoporeInstrumentOutputV3 {
16+
17+
private static final String SCHEMA_PATH = "/schemas/nanopore-instrument-output_v3.schema.json"
18+
19+
static InputStream getSchemaAsStream() {
20+
return OxfordNanoporeInstrumentOutputV3.getResourceAsStream(SCHEMA_PATH)
21+
}
22+
}

src/main/java/life/qbic/datamodel/experiments/ExperimentType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
*
2323
*/
2424
public enum ExperimentType {
25-
Q_WF_NGS_QUALITYCONTROL, Q_BMI_GENERIC_IMAGING, Q_WF_MS_QUALITYCONTROL, Q__WF_NGS_MAPPING, Q_WF_MS_MAXQUANT, Q_NGS_VARIANT_CALLING, Q_NGS_MEASUREMENT, Q_NGS_MAPPING, Q_NGS_IMMUNE_MONITORING, Q_NGS_HLATYPING, Q_NGS_FLOWCELL_RUN, Q_NGS_EPITOPE_PREDICTION, Q_WF_NGS_EPITOPE_PREDICTION, Q_WF_NGS_VARIANT_ANNOTATION, Q_WF_NGS_HLATYPING, Q_EXPERIMENTAL_DESIGN, Q_SAMPLE_EXTRACTION, Q_SAMPLE_PREPARATION, Q_MHC_LIGAND_EXTRACTION, Q_MS_MEASUREMENT, Q_NGS_SINGLE_SAMPLE_RUN, Q_PROJECT_DETAILS, Q_MICROARRAY_MEASUREMENT
25+
Q_WF_NGS_QUALITYCONTROL, Q_BMI_GENERIC_IMAGING, Q_WF_MS_QUALITYCONTROL, Q__WF_NGS_MAPPING, Q_WF_MS_MAXQUANT, Q_NGS_VARIANT_CALLING, Q_NGS_MEASUREMENT, Q_NGS_MAPPING, Q_NGS_IMMUNE_MONITORING, Q_NGS_HLATYPING, Q_NGS_FLOWCELL_RUN, Q_NGS_EPITOPE_PREDICTION, Q_WF_NGS_EPITOPE_PREDICTION, Q_WF_NGS_VARIANT_ANNOTATION, Q_WF_NGS_HLATYPING, Q_EXPERIMENTAL_DESIGN, Q_SAMPLE_EXTRACTION, Q_SAMPLE_PREPARATION, Q_MHC_LIGAND_EXTRACTION, Q_MS_MEASUREMENT, Q_NGS_SINGLE_SAMPLE_RUN, Q_PROJECT_DETAILS, Q_MICROARRAY_MEASUREMENT, Q_DIGIWEST_MEASUREMENT
2626
}

src/main/java/life/qbic/datamodel/samples/SampleType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
*
2323
*/
2424
public enum SampleType {
25-
Q_ATTACHMENT_SAMPLE, Q_BIOLOGICAL_ENTITY, Q_BIOLOGICAL_SAMPLE, Q_BMI_GENERIC_IMAGING_RUN, Q_EDDA_BENCHMARK, Q_EXT_MS_QUALITYCONTROL_RUN, Q_EXT_NGS_QUALITYCONTROL_RUN, Q_FASTA, Q_HT_QPCR_RUN, Q_MHC_LIGAND_EXTRACT, Q_MICROARRAY_RUN, Q_MS_RUN, Q_NGS_EPITOPES, Q_NGS_FLOWCELL_RUN, Q_NGS_HLATYPING, Q_NGS_IMMUNE_MONITORING, Q_NGS_IONTORRENT_RUN, Q_NGS_MAPPING, Q_NGS_MTB_DIAGNOSIS_RUN, Q_NGS_READ_MATCH_ALIGNMENT_RUN, Q_NGS_SINGLE_SAMPLE_RUN, Q_NGS_VARIANT_CALLING, Q_TEST_SAMPLE, Q_VACCINE_CONSTRUCT, Q_WF_MA_QUALITYCONTROL_RUN, Q_WF_MS_INDIVIDUALIZED_PROTEOME_RUN, Q_WF_MS_LIGANDOMICS_ID_RUN, Q_WF_MS_LIGANDOMICS_QC_RUN, Q_WF_MS_MAXQUANT_RUN, Q_WF_MS_PEPTIDEID_RUN, Q_WF_MS_QUALITYCONTROL_RUN, Q_WF_NGS_16S_TAXONOMIC_PROFILING, Q_WF_NGS_EPITOPE_PREDICTION_RUN, Q_WF_NGS_HLATYPING_RUN, Q_WF_NGS_MAPPING_RUN, Q_WF_NGS_QUALITYCONTROL_RUN, Q_WF_NGS_RNA_EXPRESSION_ANALYSIS_RUN, Q_WF_NGS_SHRNA_COUNTING_RUN, Q_WF_NGS_VARIANT_ANNOTATION_RUN, Q_WF_NGS_VARIANT_CALLING_RUN
25+
Q_ATTACHMENT_SAMPLE, Q_BIOLOGICAL_ENTITY, Q_BIOLOGICAL_SAMPLE, Q_BMI_GENERIC_IMAGING_RUN, Q_EDDA_BENCHMARK, Q_EXT_MS_QUALITYCONTROL_RUN, Q_EXT_NGS_QUALITYCONTROL_RUN, Q_FASTA, Q_HT_QPCR_RUN, Q_MHC_LIGAND_EXTRACT, Q_MICROARRAY_RUN, Q_MS_RUN, Q_NGS_EPITOPES, Q_NGS_FLOWCELL_RUN, Q_NGS_HLATYPING, Q_NGS_IMMUNE_MONITORING, Q_NGS_IONTORRENT_RUN, Q_NGS_MAPPING, Q_NGS_MTB_DIAGNOSIS_RUN, Q_NGS_READ_MATCH_ALIGNMENT_RUN, Q_NGS_SINGLE_SAMPLE_RUN, Q_NGS_VARIANT_CALLING, Q_TEST_SAMPLE, Q_VACCINE_CONSTRUCT, Q_WF_MA_QUALITYCONTROL_RUN, Q_WF_MS_INDIVIDUALIZED_PROTEOME_RUN, Q_WF_MS_LIGANDOMICS_ID_RUN, Q_WF_MS_LIGANDOMICS_QC_RUN, Q_WF_MS_MAXQUANT_RUN, Q_WF_MS_PEPTIDEID_RUN, Q_WF_MS_QUALITYCONTROL_RUN, Q_WF_NGS_16S_TAXONOMIC_PROFILING, Q_WF_NGS_EPITOPE_PREDICTION_RUN, Q_WF_NGS_HLATYPING_RUN, Q_WF_NGS_MAPPING_RUN, Q_WF_NGS_QUALITYCONTROL_RUN, Q_WF_NGS_RNA_EXPRESSION_ANALYSIS_RUN, Q_WF_NGS_SHRNA_COUNTING_RUN, Q_WF_NGS_VARIANT_ANNOTATION_RUN, Q_WF_NGS_VARIANT_CALLING_RUN, Q_DIGIWEST_RUN
2626

2727
}

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,9 @@
402402
{
403403
"$ref": "#/definitions/report_pdf_log"
404404
},
405+
{
406+
"$ref": "#/definitions/report_html_log"
407+
},
405408
{
406409
"$ref": "#/definitions/sequencing_summary_log"
407410
},
@@ -517,6 +520,23 @@
517520
}
518521
]
519522
},
523+
"report_html_log": {
524+
"allOf": [
525+
{
526+
"$ref": "#/definitions/file"
527+
},
528+
{
529+
"properties": {
530+
"name": {
531+
"pattern": "report_.*"
532+
},
533+
"file_type": {
534+
"pattern": "html"
535+
}
536+
}
537+
}
538+
]
539+
},
520540
"sequencing_summary_log": {
521541
"allOf": [
522542
{

0 commit comments

Comments
 (0)