1- using System ;
2- using System . IO ;
3- using System . Collections . Generic ;
4- using System . ComponentModel . DataAnnotations ;
5- using System . Globalization ;
6- using System . Linq ;
7- using System . Text ;
1+ using System . Collections . Generic ;
82using System . Threading . Tasks ;
93using Newtonsoft . Json ;
10- using Newtonsoft . Json . Linq ;
11- using Newtonsoft . Json . Schema ;
124using NJsonSchema . Validation ;
13- using ThermoFisher . CommonCore . Data ;
145using ThermoRawFileParser . Util ;
156
167namespace ThermoRawFileParser . XIC
@@ -39,7 +30,8 @@ public static class JSONParser
3930 {'required' : ['mz_start','tolerance']},
4031 {'required' : ['mz_end','tolerance']},
4132 ]
42- },
33+ },
34+ 'additionalProperties': false,
4335 'properties': {
4436 'mz': {
4537 '$id': '#/items/properties/mz',
@@ -58,13 +50,13 @@ public static class JSONParser
5850 'type': 'string',
5951 'title': 'The Tolerance_unit Schema',
6052 'enum': ['ppm', 'amu', 'mmu', 'da']
61- },
53+ },
6254 'mz_start': {
6355 '$id': '#/items/properties/mz_start',
6456 'type': 'number',
6557 'minimum': 0,
6658 'title': 'The Mz_start Schema',
67- },
59+ },
6860 'mz_end': {
6961 '$id': '#/items/properties/mz_end',
7062 'type': 'number',
@@ -87,6 +79,11 @@ public static class JSONParser
8779 '$id': '#/items/properties/sequence',
8880 'type': 'string',
8981 'title': 'The Sequence Schema',
82+ },
83+ 'scan_filter': {
84+ '$id': '#/items/properties/scan_filter',
85+ 'type': 'string',
86+ 'title': 'The Filter Schema',
9087 }
9188 }
9289 }
@@ -139,11 +136,11 @@ public static XicData ParseJSON(string jsonString)
139136 }
140137
141138 xicUnit = new XicUnit ( xic . Mz . Value - delta , xic . Mz . Value + delta , xic . RtStart ,
142- xic . RtEnd ) ;
139+ xic . RtEnd , xic . Filter ) ;
143140 }
144141 else if ( xic . HasMzRange ( ) )
145142 {
146- xicUnit = new XicUnit ( xic . MzStart . Value , xic . MzEnd . Value , xic . RtStart , xic . RtEnd ) ;
143+ xicUnit = new XicUnit ( xic . MzStart . Value , xic . MzEnd . Value , xic . RtStart , xic . RtEnd , xic . Filter ) ;
147144 }
148145
149146 if ( xicUnit == null || ! xicUnit . HasValidRanges ( ) )
0 commit comments