![]() |
Example program for retrieving input spectrum data.
/* ############################################################################## # file: resfile_input.cs # # 'msparser' toolkit example code # ############################################################################## # COPYRIGHT NOTICE # # Copyright 1998-2015 Matrix Science Limited All Rights Reserved. # # # ############################################################################## # $Source: parser/examples/test_csharp/resfile_input.cs $ # # $Author: villek@matrixscience.com $ # # $Date: 2018-07-30 16:23:53 +0100 $ # # $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $ # # $NoKeywords:: $ # ############################################################################## */ using System; using matrix_science.msparser; namespace MsParserExamples { public class resfile_input { public static void Main(string[] argv) { // ----- Object creation ----- if (argv.Length < 1) { Console.WriteLine("Must specify results filename as parameter"); return; } ms_mascotresfile file = new ms_mascotresfile(argv[0], 0, ""); if (file.isValid()) { inputData(file); } else { Console.WriteLine("Error number: {0}", file.getLastError()); Console.WriteLine("Error string: {0}", file.getLastErrorString()); return; } } private static void inputData(ms_mascotresfile file) { int i, j, num_peaks; // display input data via inputquery get functions for (i = 1; i <= 1; i++) { Console.WriteLine("Input data for query number {0}", i); Console.WriteLine("========================================="); ms_inputquery q = new ms_inputquery(file, i); Console.WriteLine(" title : {0}", q.getStringTitle(true)); Console.WriteLine(" mass_min : {0}", q.getMassMin()); Console.WriteLine(" mass_max : {0}", q.getMassMax()); Console.WriteLine(" int_min : {0}", q.getIntMin()); Console.WriteLine(" int_max : {0}", q.getIntMax()); Console.WriteLine(" num_vals : {0}", q.getNumVals()); Console.WriteLine(" num_used1 : {0}", q.getNumUsed()); Console.WriteLine(" ions1 : {0}", q.getStringIons1()); Console.WriteLine(" ions2 : {0}", q.getStringIons2()); Console.WriteLine(" ions3 : {0}", q.getStringIons3()); Console.WriteLine(" peptol : {0}", q.getPepTol()); Console.WriteLine(" peptol units: {0}", q.getPepTolUnits()); Console.WriteLine(" peptol str : {0}", q.getPepTolString()); Console.WriteLine(" INSTRUMENT : {0}", q.getINSTRUMENT()); Console.WriteLine(" RULES : {0}", q.getRULES()); Console.WriteLine(" IT_MODS : {0}", q.getIT_MODS()); Console.WriteLine(" repeat srch : {0}", file.getRepeatSearchString(i)); num_peaks = q.getNumberOfPeaks(1); for (j = 1; j <= num_peaks; j++) { Console.WriteLine("{0:#}, {1:#}",q.getPeakMass(1,j), q.getPeakIntensity(1,j)); } } } } } /* resfile_input.exe c:\inetpub\mascot\data\F981123.dat >resfile_input_output.txt Will give the following output: Input data for query number 1 ========================================= title : mass_min : 72.09 mass_max : 1711.52 int_min : 1.103 int_max : 80.7 num_vals : 425 num_used1 : 0 ions1 : 157.096962:23.72,185.160000:26.69,286.134951:80.7,385.210000:13.49,480.270000:4.363,129.102412:18.84,187.070000:22.51,354.189124:13.57,399.246727:9.489,482.140542:3.205,130.110251:9.257,258.132661:15.93,357.210000:13.57,443.810000:6.256,481.210000:3.182,136.070000:7.387,213.139215:13.84,371.204929:11.24,459.280000:6.216,489.233770:3.157,147.117662:6.333,229.120000:9.72,326.133204:5.268,423.125582:4.262,483.115000:2.205,159.080000:5.222,240.130000:7.562,298.110000:5.231,444.168974:3.247,474.300000:1.103,158.090000:4.301,270.180000:7.432,324.170000:5.17,411.200000:3.23,475.270000:1.103,86.110000:3.276,175.110000:7.308,312.150879:4.235,463.265712:3.205,476.700000:1.103,102.060000:3.276,241.085275:5.361,293.110000:4.178,445.810000:3.182,478.180000:1.103,115.088725:3.255,243.139772:4.378,353.155308:4.149,401.150000:3.138,486.880000:1.103,72.090000:2.174,76.400000:1.103,84.075000:2.111,87.110000:1.103,88.100000:1.103,98.060000:1.103,103.060000:1.103,105.070000:1.103,116.070000:1.103,117.110000:1.103,118.400000:1.103,120.090000:2.205,126.070000:1.103,127.090000:1.103,128.090000:2.103,131.085000:2.118,132.090000:1.103,135.800000:1.103,137.080000:1.103,138.070000:1.103,139.090000:1.103,140.150000:2.174,141.060000:2.174,143.120000:2.174,146.080000:1.103,152.060000:1.103,155.070000:2.205,156.100000:1.103,159.450000:1.103,165.080000:2.136,166.110000:1.103,167.110000:1.103,169.710000:1.103,170.450000:1.103,171.090000:1.103,173.120000:2.174,177.090000:1.103,178.080000:1.103,181.160000:1.103,182.030000:1.103,183.110000:2.174,183.930000:1.103,186.131024:4.374,188.070000:1.103,188.760000:1.103,189.070000:1.103,190.065000:2.103,191.300000:1.103,197.130000:1.103,199.180000:1.103,200.080000:1.103,201.100000:3.138,202.110000:2.091,203.080000:2.174,203.610000:1.103,211.140000:4.189,212.115000:2.103,212.490000:1.103,214.985000:2.205,216.110000:2.103,217.100000:1.103,218.080000:1.103,219.090000:2.103,223.090000:3.154,224.130000:1.103,225.130000:1.103,227.170000:1.103,227.880000:1.103,228.170000:2.136,229.760000:1.103,231.950000:1.103,233.130000:1.103,234.430000:1.103,235.080000:2.103,236.590000:1.103,238.080000:4.332,239.139997:3.131,242.170000:2.205,244.090000:2.136,244.430000:2.091,245.165685:3.205,246.160000:2.197,247.110000:2.102,248.145000:2.118,249.110000:2.136,250.080000:1.103,251.160000:1.103,253.100000:1.103,254.130000:1.103,255.165000:2.22,256.170000:1.103,257.060000:1.103,259.150000:2.197,260.000000:1.103,260.490000:1.103,262.110000:1.103,265.120000:1.103,266.130000:2.159,266.950000:1.103,267.210000:1.103,268.120000:3.214,269.090000:1.103,271.150000:2.136,272.170000:2.103,274.120000:1.103,275.030000:1.103,276.175000:2.22,278.190000:1.103,279.720000:2.205,281.120000:1.103,283.070000:1.103,284.110000:1.103,285.070000:1.103,287.140000:3.296,287.780000:1.103,288.090000:2.103,290.130000:1.103,294.110000:2.174,295.150000:3.114,295.730000:1.103,297.180000:2.136,300.160000:3.143,302.070000:1.103,303.160000:1.103,303.590000:1.103,304.600000:1.103,305.130000:1.103,306.140000:3.182,307.050000:1.103,308.150000:2.174,308.490000:1.103,312.610000:1.103,312.880000:1.103,314.120000:1.103,316.085000:2.111,317.150000:3.183,318.140000:1.103,320.140000:1.103,322.149731:3.255,323.034482:3.149,327.020000:1.103,328.020000:1.103,331.140000:2.091,332.165000:2.103,333.140000:1.103,335.500000:1.103,336.190000:1.103,337.030000:2.118,338.620000:1.103,338.940000:1.103,339.200000:3.261,341.210000:2.103,342.180000:1.103,342.800000:1.103,343.225000:2.111,343.800000:1.103,344.150000:2.174,346.010000:1.103,347.660000:1.103,348.200000:2.197,349.800000:1.103,350.110000:2.118,351.130000:3.276,352.130000:2.136,353.910000:1.103,354.470000:1.103,355.193955:3.376,358.200000:1.103,359.210000:2.174,359.910000:1.103,360.470000:1.103,361.080000:1.103,362.190000:1.103,363.040000:1.103,364.080000:1.103,366.120000:1.103,367.150000:1.103,368.330000:1.103,368.730000:1.103,369.230000:3.15,369.820000:1.103,370.177065:3.279,373.130000:2.197,374.055000:2.217,374.510000:2.205,376.040000:1.103,377.040000:1.103,380.160000:2.103,382.180000:3.102,383.115000:2.209,385.890000:2.205,386.370000:1.103,387.170000:3.114,387.680000:2.217,388.050000:1.103,389.620000:1.103,390.190000:1.103,390.610000:1.103,394.260000:1.103,395.180000:1.103,396.140000:2.205,397.980000:1.103,400.165000:2.209,403.210000:1.103,404.150000:1.103,404.470000:1.103,410.165000:2.111,411.550000:1.103,413.240000:1.103,414.080000:1.103,415.000000:1.103,416.190000:1.103,416.830000:1.103,417.230000:1.103,417.760000:1.103,418.285000:2.111,418.680000:1.103,420.650000:1.103,421.170000:2.136,422.580000:1.103,425.215000:2.103,425.690000:1.103,426.220000:3.125,428.140000:2.155,428.650000:1.103,430.260000:1.103,430.995000:2.205,433.200000:1.103,433.690000:1.103,435.000000:1.103,435.260000:1.103,437.180000:1.103,438.710000:2.174,439.230000:1.103,440.210000:1.103,442.190000:1.103,443.120000:1.103,444.680000:1.103,445.120000:1.103,449.110000:1.103,450.710000:1.103,452.150000:2.209,453.240000:3.12,454.200000:1.103,454.700000:1.103,458.310000:1.103,460.290000:1.103,461.250000:1.103,461.830000:1.103,462.195000:2.103,463.850000:1.103,464.250000:1.103,467.180000:2.174,470.210000:1.103,471.120000:1.103,489.700000:1.103,493.200000:1.103,494.200000:1.103,505.200000:1.103,508.170000:2.197,508.840000:1.103,509.200000:2.103,511.450000:1.103,522.170000:2.197,523.190000:1.103,524.150000:2.174,527.160000:1.103,528.410000:2.19,529.280000:1.103,530.230000:1.103,531.250000:1.103,533.130000:1.103,533.670000:1.103,536.720000:1.103,537.240000:1.103,538.080000:1.103,538.450000:1.103,540.220000:1.103,545.210000:2.174,545.490000:1.103,546.250000:1.103,547.350000:1.103,550.750000:2.205,558.070000:1.103,561.360000:1.103,562.200000:1.103,563.330000:1.103,568.230000:1.103,571.290000:3.136,573.010000:1.103,575.410000:1.103,580.240000:1.103,581.260000:1.103,585.160000:1.103,588.380000:1.103,590.120000:1.103,599.450000:1.103,605.210000:2.197,607.285000:4.499,608.270000:3.143,613.330000:2.103,614.330000:1.103,617.320000:1.103,621.230000:1.103,622.310000:1.103,625.320000:3.23,626.210000:1.103,633.275000:2.205,640.350000:1.103,642.220000:1.103,644.280000:1.103,646.250000:1.103,648.390000:1.103,651.335000:2.103,653.360000:2.136,658.300000:1.103,662.320000:1.103,663.800000:1.103,668.275000:2.209,674.370000:1.103,676.090000:1.103,677.350000:1.103,678.070000:1.103,683.370000:1.103,684.920000:1.103,685.380000:2.091,686.390000:1.103,701.410000:1.103,702.380000:7.387,703.420000:3.12,707.360000:1.103,713.340000:1.103,718.370000:2.197,720.400000:1.103,724.180000:1.103,728.390000:1.103,734.380000:1.103,735.430000:1.103,736.360000:1.103,737.310000:1.103,741.070000:1.103,745.480000:1.103,747.290000:1.103,748.320000:1.103,754.358237:6.383,755.370000:2.136,760.490000:1.103,765.360000:1.103,767.500000:1.103,770.370000:1.103,775.230000:1.103,778.490000:1.103,792.360000:1.103,796.420000:1.103,801.380000:1.103,814.390000:2.118,815.390000:1.103,816.410000:1.103,820.470000:1.103,825.350000:1.103,841.510000:1.103,848.450000:1.103,883.450000:1.103,884.470000:1.103,896.410000:1.103,907.420000:1.103,908.430000:1.103,916.380000:1.103,1074.300000:1.103,1092.600000:1.103,1164.300000:1.103,1231.540000:1.103,1397.690000:1.103,1660.400000:1.103,1711.520000:1.103 ions2 : ions3 : peptol : 0 peptol units: peptol str : INSTRUMENT : RULES : IT_MODS : repeat srch : 497.265612 from(498.272888,1+) query(1) 157, 24 185, 27 286, 81 385, 13 480, 4 129, 19 187, 23 354, 14 399, 9 482, 3 130, 9 258, 16 357, 14 444, 6 481, 3 136, 7 213, 14 371, 11 459, 6 489, 3 147, 6 229, 10 326, 5 423, 4 483, 2 159, 5 240, 8 298, 5 444, 3 474, 1 158, 4 270, 7 324, 5 411, 3 475, 1 86, 3 175, 7 312, 4 463, 3 477, 1 102, 3 241, 5 293, 4 446, 3 478, 1 115, 3 243, 4 353, 4 401, 3 487, 1 72, 2 76, 1 84, 2 87, 1 88, 1 98, 1 103, 1 105, 1 116, 1 117, 1 118, 1 120, 2 126, 1 127, 1 128, 2 131, 2 132, 1 136, 1 137, 1 138, 1 139, 1 140, 2 141, 2 143, 2 146, 1 152, 1 155, 2 156, 1 159, 1 165, 2 166, 1 167, 1 170, 1 170, 1 171, 1 173, 2 177, 1 178, 1 181, 1 182, 1 183, 2 184, 1 186, 4 188, 1 189, 1 189, 1 190, 2 191, 1 197, 1 199, 1 200, 1 201, 3 202, 2 203, 2 204, 1 211, 4 212, 2 212, 1 215, 2 216, 2 217, 1 218, 1 219, 2 223, 3 224, 1 225, 1 227, 1 228, 1 228, 2 230, 1 232, 1 233, 1 234, 1 235, 2 237, 1 238, 4 239, 3 242, 2 244, 2 244, 2 245, 3 246, 2 247, 2 248, 2 249, 2 250, 1 251, 1 253, 1 254, 1 255, 2 256, 1 257, 1 259, 2 260, 1 260, 1 262, 1 265, 1 266, 2 267, 1 267, 1 268, 3 269, 1 271, 2 272, 2 274, 1 275, 1 276, 2 278, 1 280, 2 281, 1 283, 1 284, 1 285, 1 287, 3 288, 1 288, 2 290, 1 294, 2 295, 3 296, 1 297, 2 300, 3 302, 1 303, 1 304, 1 305, 1 305, 1 306, 3 307, 1 308, 2 308, 1 313, 1 313, 1 314, 1 316, 2 317, 3 318, 1 320, 1 322, 3 323, 3 327, 1 328, 1 331, 2 332, 2 333, 1 336, 1 336, 1 337, 2 339, 1 339, 1 339, 3 341, 2 342, 1 343, 1 343, 2 344, 1 344, 2 346, 1 348, 1 348, 2 350, 1 350, 2 351, 3 352, 2 354, 1 354, 1 355, 3 358, 1 359, 2 360, 1 360, 1 361, 1 362, 1 363, 1 364, 1 366, 1 367, 1 368, 1 369, 1 369, 3 370, 1 370, 3 373, 2 374, 2 375, 2 376, 1 377, 1 380, 2 382, 3 383, 2 386, 2 386, 1 387, 3 388, 2 388, 1 390, 1 390, 1 391, 1 394, 1 395, 1 396, 2 398, 1 400, 2 403, 1 404, 1 404, 1 410, 2 412, 1 413, 1 414, 1 415, 1 416, 1 417, 1 417, 1 418, 1 418, 2 419, 1 421, 1 421, 2 423, 1 425, 2 426, 1 426, 3 428, 2 429, 1 430, 1 431, 2 433, 1 434, 1 435, 1 435, 1 437, 1 439, 2 439, 1 440, 1 442, 1 443, 1 445, 1 445, 1 449, 1 451, 1 452, 2 453, 3 454, 1 455, 1 458, 1 460, 1 461, 1 462, 1 462, 2 464, 1 464, 1 467, 2 470, 1 471, 1 490, 1 493, 1 494, 1 505, 1 508, 2 509, 1 509, 2 511, 1 522, 2 523, 1 524, 2 527, 1 528, 2 529, 1 530, 1 531, 1 533, 1 534, 1 537, 1 537, 1 538, 1 538, 1 540, 1 545, 2 545, 1 546, 1 547, 1 551, 2 558, 1 561, 1 562, 1 563, 1 568, 1 571, 3 573, 1 575, 1 580, 1 581, 1 585, 1 588, 1 590, 1 599, 1 605, 2 607, 4 608, 3 613, 2 614, 1 617, 1 621, 1 622, 1 625, 3 626, 1 633, 2 640, 1 642, 1 644, 1 646, 1 648, 1 651, 2 653, 2 658, 1 662, 1 664, 1 668, 2 674, 1 676, 1 677, 1 678, 1 683, 1 685, 1 685, 2 686, 1 701, 1 702, 7 703, 3 707, 1 713, 1 718, 2 720, 1 724, 1 728, 1 734, 1 735, 1 736, 1 737, 1 741, 1 745, 1 747, 1 748, 1 754, 6 755, 2 760, 1 765, 1 768, 1 770, 1 775, 1 778, 1 792, 1 796, 1 801, 1 814, 2 815, 1 816, 1 820, 1 825, 1 842, 1 848, 1 883, 1 884, 1 896, 1 907, 1 908, 1 916, 1 1074, 1 1093, 1 1164, 1 1232, 1 1398, 1 1660, 1 1712, 1 */
Copyright © 2022 Matrix Science Ltd. All Rights Reserved. Generated on Thu Mar 31 2022 01:12:29 |