Skip to content

Commit 101349d

Browse files
Steffengreinerwow-such-codeJohnnyQ5
authored
2.21.0 sync dev to master (#334)
* Prepare Version 2.20.0 (#325) * 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) Co-authored-by: wow-such-code <andreas.friedrich@uni-tuebingen.de> * Update version to 2.20.0 (#327) * Set version to 2.20.0 * remove unnessary whitespace Co-authored-by: Steffengreiner <Steffen.Greiner@gmx.de> * 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> * Set version to 2.21.0 (#332) Co-authored-by: wow-such-code <andreas.friedrich@uni-tuebingen.de> Co-authored-by: Johnny Q5 <50356506+JohnnyQ5@users.noreply.github.com>
1 parent da00d85 commit 101349d

File tree

6 files changed

+236
-9
lines changed

6 files changed

+236
-9
lines changed

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.20.0-SNAPSHOT</version>
10+
<version>2.22.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/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
{

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema",
3-
"$id": "http://qbic.life/nanopore-instrument-output_v2.schema.json",
4-
"title": "Nanopore Instrument Output V2",
3+
"$id": "http://qbic.life/nanopore-instrument-output_v3.schema.json",
4+
"title": "Nanopore Instrument Output V3",
55
"description": "Describes in which form Nanopore data is received from the lab.",
66
"definitions": {
77
"folder": {
@@ -95,11 +95,7 @@
9595
},
9696
"children": {
9797
"items": {
98-
"oneOf": [
99-
{
100-
"$ref": "#/definitions/pore_scan_data_log"
101-
}
102-
]
98+
"$ref": "#/definitions/pore_scan_data_log"
10399
},
104100
"minItems": 1
105101
}

src/test/groovy/life/qbic/datamodel/datasets/datastructure/OxfordNanoporeExperimentSpec.groovy

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ class OxfordNanoporeExperimentSpec extends Specification {
1717
*/
1818
@Shared
1919
Map minimalSimpleDataStructure
20+
/**
21+
* Map that stores the Oxford Nanopore folder structure
22+
* according to the schema with an alternate report file ending
23+
*/
24+
@Shared
25+
Map minimalSimpleDataStructureWithHtmlReport
2026
/**
2127
* Newer map that stores the Oxford Nanopore folder structure according to the
2228
* schema that puts some reports in its own folder and adds a barcode alignment report
@@ -46,6 +52,9 @@ class OxfordNanoporeExperimentSpec extends Specification {
4652
def folder = "nanopore/"
4753
InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(folder+"valid-example.json")
4854
minimalSimpleDataStructure = (Map) new JsonSlurper().parse(stream)
55+
//example with report.html instead of report.html
56+
stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(folder+"valid-example-html-report.json")
57+
minimalSimpleDataStructureWithHtmlReport = (Map) new JsonSlurper().parse(stream)
4958
// example with slightly different structure
5059
stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(folder+"valid-example-v2.json")
5160
extendedDataStructureWithReportsFolder = (Map) new JsonSlurper().parse(stream)
@@ -75,6 +84,20 @@ class OxfordNanoporeExperimentSpec extends Specification {
7584
assert measurements[0].libraryPreparationKit == "SQK-LSK109"
7685
}
7786

87+
def "Create simple sample Oxford Nanopore experiment including an html report successfully"() {
88+
given:
89+
final def example = minimalSimpleDataStructureWithHtmlReport
90+
91+
when:
92+
final def experiment = OxfordNanoporeExperiment.create(example)
93+
final def measurements = experiment.getMeasurements()
94+
95+
then:
96+
assert experiment.sampleCode == "QABCD001AB"
97+
assert measurements.size() == 1
98+
assert measurements[0].libraryPreparationKit == "SQK-LSK109"
99+
}
100+
78101
def "Create sample Oxford Nanopore experiment successfully for newer structure"() {
79102
given:
80103
final def example = extendedDataStructureWithReportsFolder

src/test/groovy/life/qbic/datamodel/dtos/projectmanagement/ProjectSpaceSpec.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@ class ProjectSpaceSpec extends Specification {
2929

3030
then:
3131
thrown(IllegalArgumentException)
32-
3332
}
3433
}
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"name": "QABCD001AB_E12A345a01_PAE12345",
3+
"path": "./",
4+
"children": [
5+
{
6+
"name": "20200122_1217_1-A1-B1-PAE12345_1234567a",
7+
"metadata": {
8+
"adapter": "flongle",
9+
"asic_temp": "32.631687",
10+
"base_caller": "Guppy",
11+
"base_caller_version": "3.2.8+bd67289",
12+
"device_type" : "promethion",
13+
"flow_cell_id": "PAE26306",
14+
"flow_cell_product_code": "FLO-PRO002",
15+
"flow_cell_position": "2-A3-D3",
16+
"hostname": "PCT0094",
17+
"protocol": "sequencing/sequencing_PRO002_DNA:FLO-PRO002:SQK-LSK109:True",
18+
"started": "2020-02-11T15:52:10.465982+01:00"
19+
},
20+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a",
21+
"children": [
22+
{
23+
"name": "throughput_.csv",
24+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/throughput_.csv",
25+
"file_type": "csv"
26+
},
27+
{
28+
"name": "report_.md",
29+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/report_.md",
30+
"file_type": "md"
31+
},
32+
{
33+
"name": "final_summary_.txt",
34+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/final_summary_.txt",
35+
"file_type": "txt"
36+
},
37+
{
38+
"name": "fastq_pass",
39+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass",
40+
"children": [
41+
{
42+
"name": "myfile3.fastq.gz",
43+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile3.fastq.gz",
44+
"file_type": "fastq.gz"
45+
},
46+
{
47+
"name": "myfile2.fastq.gz",
48+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile2.fastq.gz",
49+
"file_type": "fastq.gz"
50+
},
51+
{
52+
"name": "myfile4.fastq.gz",
53+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile4.fastq.gz",
54+
"file_type": "fastq.gz"
55+
},
56+
{
57+
"name": "myfile5.fastq.gz",
58+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile5.fastq.gz",
59+
"file_type": "fastq.gz"
60+
},
61+
{
62+
"name": "myfile1.fastq.gz",
63+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_pass/myfile1.fastq.gz",
64+
"file_type": "fastq.gz"
65+
}
66+
]
67+
},
68+
{
69+
"name": "fastq_fail",
70+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/",
71+
"children": [
72+
{
73+
"name": "myfile3.fastq.gz",
74+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile3.fastq.gz",
75+
"file_type": "fastq.gz"
76+
},
77+
{
78+
"name": "myfile2.fastq.gz",
79+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile2.fastq.gz",
80+
"file_type": "fastq.gz"
81+
},
82+
{
83+
"name": "myfile4.fastq.gz",
84+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile4.fastq.gz",
85+
"file_type": "fastq.gz"
86+
},
87+
{
88+
"name": "myfile5.fastq.gz",
89+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile5.fastq.gz",
90+
"file_type": "fastq.gz"
91+
},
92+
{
93+
"name": "myfile.fastq.gz",
94+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fastq_fail/myfile.fastq.gz",
95+
"file_type": "fastq.gz"
96+
}
97+
]
98+
},
99+
{
100+
"name": "duty_time_.csv",
101+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/duty_time_.csv",
102+
"file_type": "csv"
103+
},
104+
{
105+
"name": "sequencing_summary_.txt",
106+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/sequencing_summary_.txt",
107+
"file_type": "txt"
108+
},
109+
{
110+
"name": "mux_scan_data.csv",
111+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/mux_scan_data.csv",
112+
"file_type": "csv"
113+
},
114+
{
115+
"name": "drift_correction_.csv",
116+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/drift_correction_.csv",
117+
"file_type": "csv"
118+
},
119+
{
120+
"name": "report_test.html",
121+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/report_test.html",
122+
"file_type": "html"
123+
},
124+
{
125+
"name": "fast5_fail",
126+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/",
127+
"children": [
128+
{
129+
"name": "myfile2.fast5",
130+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile2.fast5",
131+
"file_type": "fast5"
132+
},
133+
{
134+
"name": "myfile4.fast5",
135+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile4.fast5",
136+
"file_type": "fast5"
137+
},
138+
{
139+
"name": "myfile3.fast5",
140+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile3.fast5",
141+
"file_type": "fast5"
142+
},
143+
{
144+
"name": "myfile5.fast5",
145+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile5.fast5",
146+
"file_type": "fast5"
147+
},
148+
{
149+
"name": "myfile.fast5",
150+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_fail/myfile.fast5",
151+
"file_type": "fast5"
152+
}
153+
]
154+
},
155+
{
156+
"name": "fast5_pass",
157+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/",
158+
"children": [
159+
{
160+
"name": "myfile2.fast5",
161+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile2.fast5",
162+
"file_type": "fast5"
163+
},
164+
{
165+
"name": "myfile4.fast5",
166+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile4.fast5",
167+
"file_type": "fast5"
168+
},
169+
{
170+
"name": "myfile3.fast5",
171+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile3.fast5",
172+
"file_type": "fast5"
173+
},
174+
{
175+
"name": "myfile5.fast5",
176+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile5.fast5",
177+
"file_type": "fast5"
178+
},
179+
{
180+
"name": "myfile.fast5",
181+
"path": "./20200122_1217_1-A1-B1-PAE12345_1234567a/fast5_pass/myfile.fast5",
182+
"file_type": "fast5"
183+
}
184+
]
185+
}
186+
]
187+
}
188+
]
189+
}

0 commit comments

Comments
 (0)