@@ -2166,6 +2166,7 @@ private PrecursorListType ConstructPrecursorList(int precursorScanNumber, IScanE
21662166
21672167 //if isolation width was not found in the trailer, try to get one from the reaction
21682168 if ( isolationWidth == null ) isolationWidth = reaction . IsolationWidth ;
2169+ if ( isolationWidth < 0 ) isolationWidth = null ;
21692170
21702171 var precursor = new PrecursorType
21712172 {
@@ -2384,6 +2385,51 @@ private PrecursorListType ConstructPrecursorList(int precursorScanNumber, IScanE
23842385 spectrumRef = spectrumRef
23852386 } ;
23862387
2388+ //Isolation window for SPS masses is the same as for the first precursor
2389+ SPSPrecursor . isolationWindow =
2390+ new ParamGroupType
2391+ {
2392+ cvParam = new CVParamType [ 3 ]
2393+ } ;
2394+
2395+ SPSPrecursor . isolationWindow . cvParam [ 0 ] =
2396+ new CVParamType
2397+ {
2398+ accession = "MS:1000827" ,
2399+ name = "isolation window target m/z" ,
2400+ value = SPSMasses [ n ] . ToString ( CultureInfo . InvariantCulture ) ,
2401+ cvRef = "MS" ,
2402+ unitCvRef = "MS" ,
2403+ unitAccession = "MS:1000040" ,
2404+ unitName = "m/z"
2405+ } ;
2406+ if ( isolationWidth != null )
2407+ {
2408+ var offset = isolationWidth . Value / 2 + reaction . IsolationWidthOffset ;
2409+ SPSPrecursor . isolationWindow . cvParam [ 1 ] =
2410+ new CVParamType
2411+ {
2412+ accession = "MS:1000828" ,
2413+ name = "isolation window lower offset" ,
2414+ value = ( isolationWidth . Value - offset ) . ToString ( CultureInfo . InvariantCulture ) ,
2415+ cvRef = "MS" ,
2416+ unitCvRef = "MS" ,
2417+ unitAccession = "MS:1000040" ,
2418+ unitName = "m/z"
2419+ } ;
2420+ SPSPrecursor . isolationWindow . cvParam [ 2 ] =
2421+ new CVParamType
2422+ {
2423+ accession = "MS:1000829" ,
2424+ name = "isolation window upper offset" ,
2425+ value = offset . ToString ( CultureInfo . InvariantCulture ) ,
2426+ cvRef = "MS" ,
2427+ unitCvRef = "MS" ,
2428+ unitAccession = "MS:1000040" ,
2429+ unitName = "m/z"
2430+ } ;
2431+ }
2432+
23872433 // Selected ion MZ only
23882434 SPSPrecursor . selectedIonList . selectedIon [ 0 ] =
23892435 new ParamGroupType
0 commit comments