|
1 | 1 | using System; |
2 | 2 | using System.Collections.Generic; |
3 | 3 | using System.Collections.Specialized; |
4 | | -using System.Diagnostics; |
5 | | -using System.Diagnostics.Eventing.Reader; |
6 | 4 | using System.Globalization; |
7 | 5 | using System.IO; |
8 | 6 | using System.IO.Compression; |
@@ -527,7 +525,7 @@ public override void Write(IRawDataPlus rawFile, int firstScanNumber, int lastSc |
527 | 525 | _writer.WriteEndElement(); // spectrumList |
528 | 526 |
|
529 | 527 | index = 0; |
530 | | - var chromatograms = ConstructChromatograms(firstScanNumber, lastScanNumber); |
| 528 | + var chromatograms = ConstructChromatograms(); |
531 | 529 | if (!chromatograms.IsNullOrEmpty()) |
532 | 530 | { |
533 | 531 | // ChromatogramList |
@@ -914,7 +912,7 @@ private void Serialize<T>(XmlSerializer serializer, T t) |
914 | 912 | /// <param name="firstScanNumber">the first scan number</param> |
915 | 913 | /// <param name="lastScanNumber">the last scan number</param> |
916 | 914 | /// <returns>a list of chromatograms</returns> |
917 | | - private List<ChromatogramType> ConstructChromatograms(int firstScanNumber, int lastScanNumber) |
| 915 | + private List<ChromatogramType> ConstructChromatograms() |
918 | 916 | { |
919 | 917 | var chromatograms = new List<ChromatogramType>(); |
920 | 918 |
|
@@ -2470,15 +2468,14 @@ private PrecursorListType ConstructPrecursorList(int precursorScanNumber, IScanE |
2470 | 2468 | var SPSPrecursor = new PrecursorType |
2471 | 2469 | { |
2472 | 2470 | selectedIonList = |
2473 | | - new SelectedIonListType {count = "1", selectedIon = new ParamGroupType[1]}, |
2474 | | - spectrumRef = spectrumRef |
2475 | | - }; |
2476 | | - |
2477 | | - //Isolation window for SPS masses is the same as for the first precursor |
2478 | | - SPSPrecursor.isolationWindow = |
| 2471 | + new SelectedIonListType { count = "1", selectedIon = new ParamGroupType[1] }, |
| 2472 | + spectrumRef = spectrumRef, |
| 2473 | + //Isolation window for SPS masses is the same as for the first precursor |
| 2474 | + isolationWindow = |
2479 | 2475 | new ParamGroupType |
2480 | 2476 | { |
2481 | 2477 | cvParam = new CVParamType[3] |
| 2478 | + } |
2482 | 2479 | }; |
2483 | 2480 |
|
2484 | 2481 | SPSPrecursor.isolationWindow.cvParam[0] = |
@@ -2755,14 +2752,13 @@ private ScanListType ConstructScanList(int scanNumber, Scan scan) |
2755 | 2752 |
|
2756 | 2753 | var scanType = new ScanType |
2757 | 2754 | { |
2758 | | - cvParam = scanTypeCvParams.ToArray() |
2759 | | - }; |
2760 | | - |
2761 | | - // Scan window list |
2762 | | - scanType.scanWindowList = new ScanWindowListType |
2763 | | - { |
2764 | | - count = 1, |
2765 | | - scanWindow = new ParamGroupType[1] |
| 2755 | + cvParam = scanTypeCvParams.ToArray(), |
| 2756 | + // Scan window list |
| 2757 | + scanWindowList = new ScanWindowListType |
| 2758 | + { |
| 2759 | + count = 1, |
| 2760 | + scanWindow = new ParamGroupType[1] |
| 2761 | + } |
2766 | 2762 | }; |
2767 | 2763 | var scanWindow = new ParamGroupType |
2768 | 2764 | { |
@@ -2853,22 +2849,6 @@ private static byte[] GetZLib64BitArray(ICollection<double> array) |
2853 | 2849 | return bytes; |
2854 | 2850 | } |
2855 | 2851 |
|
2856 | | - /// <summary> |
2857 | | - /// Calculate the RAW file checksum |
2858 | | - /// </summary> |
2859 | | - /// <returns>the checksum string</returns> |
2860 | | - private string CalculateMD5Checksum() |
2861 | | - { |
2862 | | - using (var md5 = MD5.Create()) |
2863 | | - { |
2864 | | - using (var stream = File.OpenRead(ParseInput.RawFilePath)) |
2865 | | - { |
2866 | | - var hash = md5.ComputeHash(stream); |
2867 | | - return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant(); |
2868 | | - } |
2869 | | - } |
2870 | | - } |
2871 | | - |
2872 | 2852 | /// <summary> |
2873 | 2853 | /// Calculate the RAW file checksum |
2874 | 2854 | /// </summary> |
|
0 commit comments