File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -425,8 +425,8 @@ public static IEnumerable<Ms2ScanWithSpecificMass> GetMs2Scans(MsDataFile myMSDa
425425 return new List < Ms2ScanWithSpecificMass > ( ) ;
426426 }
427427
428- var childScanNumbers = new HashSet < int > ( scansWithPrecursors . SelectMany ( p => p . SelectMany ( v => v . ChildScans . Select ( x => x . OneBasedScanNumber ) ) ) ) ;
429- var parentScans = scansWithPrecursors . Where ( p => p . Any ( ) && ! childScanNumbers . Contains ( p . First ( ) . OneBasedScanNumber ) )
428+ var childScanNumbers = new HashSet < int > ( scansWithPrecursors . Where ( p => p != null ) . SelectMany ( p => p . SelectMany ( v => v . ChildScans . Select ( x => x . OneBasedScanNumber ) ) ) ) ;
429+ var parentScans = scansWithPrecursors . Where ( p => p != null && p . Count > 0 && ! childScanNumbers . Contains ( p . First ( ) . OneBasedScanNumber ) )
430430 . SelectMany ( v => v )
431431 . OrderBy ( p => p . OneBasedScanNumber )
432432 . ToArray ( ) ;
You can’t perform that action at this time.
0 commit comments