Ejemplo n.º 1
0
 if ($nterminus !== '') {
     $ntermmass = strval($pep->getNTerminusMass('monoisotopic'));
 }
 $mec = $pep->getMec();
 $pepmass = strval($pep->getMass('monoisotopic'));
 $pepmcr2 = strval($pep->getTheoreticalMCR('monoisotopic', 2));
 $pepmcr3 = strval($pep->getTheoreticalMCR('monoisotopic', 3));
 $pepmcr4 = strval($pep->getTheoreticalMCR('monoisotopic', 4));
 if (!is_numeric($iccharge)) {
     $iccharge = '2';
 }
 //-- IonCalculator --
 $ic = new IonCalculator(array('peptide' => $pep, 'maxcharge' => intval($iccharge), 'weighttype' => 'monoisotopic', 'neutralloss' => array('H2O', 'NH3'), 'customtemplate' => '{ion}{index} {charge}+ {flag}'));
 $arrIcRes = array();
 foreach ($arrIons as $ion) {
     $arrIcRes += $ic->calculateIon($ion);
 }
 //-- Spectrum --
 $validSpec = false;
 if ($spectrum !== '') {
     $spec = new Spectrum();
     $validSpec = $spec->setSpectrumByString($spectrum);
     if ($validSpec === true) {
         $annotSpec = $spec->annotateSpectrum($arrIcRes, 'mass', 'intensity', 'custom', 300, 'ppm');
     }
 }
 //-- Ui Spectrum --
 if ($validSpec === true) {
     $specUi = new SpectrumUi(array('drawer' => new PChartDrawer(array('width' => 900, 'height' => 400, 'is3D' => false, 'colors' => array('#888', '#00f'), 'legend' => 'none')), 'tofile' => dirname(__FILE__) . '/media/spectrum.png', 'spectrum' => $annotSpec, 'annotationproperty' => 'custom'));
     $specUi->draw();
     $specimage = '<img src="media/spectrum.png">';
Ejemplo n.º 2
0
/**
 * File.php
 * 
 * Description of the file
 * @author Robert Schmidt <*****@*****.**>
 * @version 0.1
 * @package wildpack
 * @subpackage 
 */
include_once '../src/PhProt.php';
$pp = new PhProt();
$pp->using('ui');
$arrSpectrum = array(array('mass' => 234.062, 'intensity' => 1.9), array('mass' => 243.459, 'intensity' => 3.1), array('mass' => 249.239, 'intensity' => 26.3), array('mass' => 251.291, 'intensity' => 1.6), array('mass' => 252.147, 'intensity' => 3.8), array('mass' => 254.193, 'intensity' => 4.4), array('mass' => 259.133, 'intensity' => 1.6), array('mass' => 262.261, 'intensity' => 13.5), array('mass' => 263.038, 'intensity' => 1.9), array('mass' => 266.08, 'intensity' => 1.9), array('mass' => 267.659, 'intensity' => 7.9), array('mass' => 269.093, 'intensity' => 4.9), array('mass' => 270.453, 'intensity' => 9.6), array('mass' => 274.432, 'intensity' => 2.7), array('mass' => 277.132, 'intensity' => 78.5), array('mass' => 278.218, 'intensity' => 8.699999999999999), array('mass' => 279.391, 'intensity' => 7.8), array('mass' => 284.293, 'intensity' => 2.2), array('mass' => 289.98, 'intensity' => 8.1), array('mass' => 293.161, 'intensity' => 4.9), array('mass' => 294.286, 'intensity' => 152.5), array('mass' => 295.023, 'intensity' => 33.8), array('mass' => 295.863, 'intensity' => 4.8), array('mass' => 297.401, 'intensity' => 5.5), array('mass' => 298.401, 'intensity' => 2.9), array('mass' => 300.113, 'intensity' => 2.0), array('mass' => 304.182, 'intensity' => 2.7), array('mass' => 305.251, 'intensity' => 13.7), array('mass' => 306.308, 'intensity' => 17.8), array('mass' => 310.111, 'intensity' => 7.6), array('mass' => 312.218, 'intensity' => 1151.9), array('mass' => 313.3, 'intensity' => 166.3), array('mass' => 315.222, 'intensity' => 9.199999999999999), array('mass' => 320.381, 'intensity' => 5.3), array('mass' => 322.283, 'intensity' => 79.8), array('mass' => 323.202, 'intensity' => 15.9), array('mass' => 324.446, 'intensity' => 11.2), array('mass' => 327.342, 'intensity' => 13.2), array('mass' => 331.21, 'intensity' => 2.3), array('mass' => 332.192, 'intensity' => 3.2), array('mass' => 333.95, 'intensity' => 9.300000000000001), array('mass' => 336.107, 'intensity' => 8.699999999999999), array('mass' => 337.332, 'intensity' => 3.9), array('mass' => 340.173, 'intensity' => 502.5), array('mass' => 341.035, 'intensity' => 61.3), array('mass' => 342.086, 'intensity' => 2.8), array('mass' => 342.927, 'intensity' => 6.7), array('mass' => 346.16, 'intensity' => 4.9), array('mass' => 348.198, 'intensity' => 23.0), array('mass' => 348.819, 'intensity' => 1.6), array('mass' => 349.803, 'intensity' => 4.5), array('mass' => 350.411, 'intensity' => 8.1), array('mass' => 351.387, 'intensity' => 1.6), array('mass' => 353.816, 'intensity' => 6.5), array('mass' => 358.171, 'intensity' => 146.5), array('mass' => 359.166, 'intensity' => 8.5), array('mass' => 361.122, 'intensity' => 17.8), array('mass' => 362.214, 'intensity' => 3.1), array('mass' => 363.338, 'intensity' => 19.2), array('mass' => 365.312, 'intensity' => 4.0), array('mass' => 367.228, 'intensity' => 4.6), array('mass' => 369.162, 'intensity' => 5.8), array('mass' => 373.401, 'intensity' => 6.5), array('mass' => 375.162, 'intensity' => 6.5), array('mass' => 376.34, 'intensity' => 16.7), array('mass' => 377.112, 'intensity' => 5.1), array('mass' => 379.065, 'intensity' => 9.699999999999999), array('mass' => 381.129, 'intensity' => 4.1), array('mass' => 382.429, 'intensity' => 5.6), array('mass' => 383.113, 'intensity' => 5.9), array('mass' => 385.41, 'intensity' => 11.5), array('mass' => 386.297, 'intensity' => 3.9), array('mass' => 387.353, 'intensity' => 3.8), array('mass' => 389.17, 'intensity' => 2.1), array('mass' => 390.323, 'intensity' => 8.9), array('mass' => 391.181, 'intensity' => 11.1), array('mass' => 392.053, 'intensity' => 1.5), array('mass' => 393.311, 'intensity' => 14.6), array('mass' => 394.149, 'intensity' => 6.4), array('mass' => 397.196, 'intensity' => 19.8), array('mass' => 399.244, 'intensity' => 3.3), array('mass' => 405.307, 'intensity' => 3.9), array('mass' => 406.55, 'intensity' => 5.7), array('mass' => 407.352, 'intensity' => 7.4), array('mass' => 409.262, 'intensity' => 37.0), array('mass' => 410.32, 'intensity' => 6.6), array('mass' => 411.627, 'intensity' => 5.4), array('mass' => 412.309, 'intensity' => 17.4), array('mass' => 413.368, 'intensity' => 11.1), array('mass' => 414.2, 'intensity' => 2.8), array('mass' => 415.313, 'intensity' => 3.0), array('mass' => 418.488, 'intensity' => 6.0), array('mass' => 419.328, 'intensity' => 7.8), array('mass' => 421.614, 'intensity' => 9.800000000000001), array('mass' => 425.392, 'intensity' => 11.7), array('mass' => 426.74, 'intensity' => 19.5), array('mass' => 427.364, 'intensity' => 206.3), array('mass' => 428.485, 'intensity' => 56.1), array('mass' => 429.327, 'intensity' => 6.4), array('mass' => 430.636, 'intensity' => 6.7), array('mass' => 432.209, 'intensity' => 5.3), array('mass' => 434.078, 'intensity' => 1.5), array('mass' => 435.363, 'intensity' => 4.0), array('mass' => 436.381, 'intensity' => 3.3), array('mass' => 437.608, 'intensity' => 2.1), array('mass' => 438.417, 'intensity' => 2.7), array('mass' => 439.519, 'intensity' => 9.300000000000001), array('mass' => 441.231, 'intensity' => 4.1), array('mass' => 443.381, 'intensity' => 56.2), array('mass' => 444.746, 'intensity' => 16.5), array('mass' => 446.282, 'intensity' => 12.7), array('mass' => 447.21, 'intensity' => 3.7), array('mass' => 448.222, 'intensity' => 19.7), array('mass' => 449.193, 'intensity' => 4.0), array('mass' => 450.3, 'intensity' => 5.3), array('mass' => 451.459, 'intensity' => 3.9), array('mass' => 452.183, 'intensity' => 1.6), array('mass' => 453.253, 'intensity' => 17.9), array('mass' => 455.235, 'intensity' => 5.6), array('mass' => 456.493, 'intensity' => 5.8), array('mass' => 459.302, 'intensity' => 16.3), array('mass' => 462.12, 'intensity' => 6.8), array('mass' => 463.173, 'intensity' => 10.7), array('mass' => 464.114, 'intensity' => 8.199999999999999), array('mass' => 465.247, 'intensity' => 7.4), array('mass' => 466.432, 'intensity' => 9.800000000000001), array('mass' => 467.419, 'intensity' => 15.9), array('mass' => 469.305, 'intensity' => 11.9), array('mass' => 471.28, 'intensity' => 97.40000000000001), array('mass' => 472.343, 'intensity' => 47.7), array('mass' => 473.982, 'intensity' => 5.5), array('mass' => 475.333, 'intensity' => 10.5), array('mass' => 475.991, 'intensity' => 25.9), array('mass' => 478.212, 'intensity' => 3.5), array('mass' => 479.22, 'intensity' => 4.9), array('mass' => 480.099, 'intensity' => 25.2), array('mass' => 482.4, 'intensity' => 2.8), array('mass' => 483.515, 'intensity' => 5.2), array('mass' => 486.711, 'intensity' => 8.300000000000001), array('mass' => 487.735, 'intensity' => 3.7), array('mass' => 491.261, 'intensity' => 10.1), array('mass' => 492.284, 'intensity' => 8.800000000000001), array('mass' => 493.37, 'intensity' => 20.3), array('mass' => 496.46, 'intensity' => 15.8), array('mass' => 497.362, 'intensity' => 4.7), array('mass' => 498.86, 'intensity' => 4.2), array('mass' => 499.492, 'intensity' => 3.9), array('mass' => 500.289, 'intensity' => 8.6), array('mass' => 501.428, 'intensity' => 5.2), array('mass' => 502.328, 'intensity' => 30.3), array('mass' => 503.293, 'intensity' => 4.5), array('mass' => 506.101, 'intensity' => 18.9), array('mass' => 507.401, 'intensity' => 9.5), array('mass' => 509.35, 'intensity' => 5.4), array('mass' => 510.373, 'intensity' => 46.2), array('mass' => 511.458, 'intensity' => 3.6), array('mass' => 513.4299999999999, 'intensity' => 12.1), array('mass' => 515.086, 'intensity' => 8.199999999999999), array('mass' => 516.245, 'intensity' => 9.9), array('mass' => 517.184, 'intensity' => 19.3), array('mass' => 518.283, 'intensity' => 24.7), array('mass' => 519.314, 'intensity' => 1.6), array('mass' => 520.3869999999999, 'intensity' => 13.3), array('mass' => 523.587, 'intensity' => 15.6), array('mass' => 524.41, 'intensity' => 14.1), array('mass' => 525.329, 'intensity' => 29.4), array('mass' => 526.398, 'intensity' => 21.6), array('mass' => 528.417, 'intensity' => 69.5), array('mass' => 529.529, 'intensity' => 25.0), array('mass' => 531.0650000000001, 'intensity' => 8.800000000000001), array('mass' => 532.309, 'intensity' => 4.9), array('mass' => 533.865, 'intensity' => 21.6), array('mass' => 536.172, 'intensity' => 13.0), array('mass' => 537.2, 'intensity' => 8.699999999999999), array('mass' => 538.641, 'intensity' => 4.1), array('mass' => 539.4160000000001, 'intensity' => 6.0), array('mass' => 541.2, 'intensity' => 14.7), array('mass' => 542.346, 'intensity' => 123.3), array('mass' => 543.405, 'intensity' => 17.0), array('mass' => 544.35, 'intensity' => 4.7), array('mass' => 544.981, 'intensity' => 14.8), array('mass' => 545.832, 'intensity' => 19.0), array('mass' => 546.651, 'intensity' => 14.3), array('mass' => 548.96, 'intensity' => 3.7), array('mass' => 550.956, 'intensity' => 19.9), array('mass' => 552.159, 'intensity' => 14.0), array('mass' => 553.4160000000001, 'intensity' => 16.8), array('mass' => 555.569, 'intensity' => 8.4), array('mass' => 558.004, 'intensity' => 1.8), array('mass' => 559.724, 'intensity' => 2.6), array('mass' => 560.373, 'intensity' => 5.8), array('mass' => 561.925, 'intensity' => 4.3), array('mass' => 563.004, 'intensity' => 6.1), array('mass' => 564.296, 'intensity' => 8.5), array('mass' => 565.278, 'intensity' => 20.3), array('mass' => 565.896, 'intensity' => 8.699999999999999), array('mass' => 567.2, 'intensity' => 5.4), array('mass' => 568.486, 'intensity' => 9.0), array('mass' => 569.466, 'intensity' => 26.0), array('mass' => 570.332, 'intensity' => 15.9), array('mass' => 571.255, 'intensity' => 9.4), array('mass' => 572.298, 'intensity' => 7.1), array('mass' => 573.485, 'intensity' => 14.3), array('mass' => 574.4059999999999, 'intensity' => 5.7), array('mass' => 575.36, 'intensity' => 7.1), array('mass' => 576.931, 'intensity' => 4.0), array('mass' => 578.388, 'intensity' => 11.6), array('mass' => 579.309, 'intensity' => 8.300000000000001), array('mass' => 581.404, 'intensity' => 18.1), array('mass' => 582.448, 'intensity' => 22.4), array('mass' => 585.499, 'intensity' => 11.2), array('mass' => 586.271, 'intensity' => 4.0), array('mass' => 587.365, 'intensity' => 4.5), array('mass' => 589.3049999999999, 'intensity' => 30.0), array('mass' => 590.165, 'intensity' => 1.9), array('mass' => 591.125, 'intensity' => 3.0), array('mass' => 592.333, 'intensity' => 9.699999999999999), array('mass' => 593.228, 'intensity' => 24.3), array('mass' => 595.295, 'intensity' => 11.8), array('mass' => 596.472, 'intensity' => 28.0), array('mass' => 597.3869999999999, 'intensity' => 29.9), array('mass' => 598.329, 'intensity' => 6.5), array('mass' => 598.985, 'intensity' => 7.0), array('mass' => 600.448, 'intensity' => 1.5), array('mass' => 602.351, 'intensity' => 9.5), array('mass' => 604.212, 'intensity' => 21.8), array('mass' => 605.617, 'intensity' => 38.2), array('mass' => 606.561, 'intensity' => 20.4), array('mass' => 607.729, 'intensity' => 11.6), array('mass' => 609.284, 'intensity' => 13.2), array('mass' => 610.306, 'intensity' => 15.4), array('mass' => 611.423, 'intensity' => 18.4), array('mass' => 612.955, 'intensity' => 8.800000000000001), array('mass' => 614.652, 'intensity' => 2.2), array('mass' => 615.9930000000001, 'intensity' => 12.0), array('mass' => 616.98, 'intensity' => 25.0), array('mass' => 619.405, 'intensity' => 21.2), array('mass' => 620.191, 'intensity' => 12.7), array('mass' => 621.643, 'intensity' => 61.9), array('mass' => 622.401, 'intensity' => 8.699999999999999), array('mass' => 623.418, 'intensity' => 39.6), array('mass' => 624.653, 'intensity' => 30.7), array('mass' => 625.567, 'intensity' => 10.2), array('mass' => 626.347, 'intensity' => 19.8), array('mass' => 627.515, 'intensity' => 22.0), array('mass' => 628.136, 'intensity' => 3.6), array('mass' => 629.282, 'intensity' => 29.6), array('mass' => 629.966, 'intensity' => 18.8), array('mass' => 631.157, 'intensity' => 35.2), array('mass' => 632.1319999999999, 'intensity' => 23.9), array('mass' => 633.8099999999999, 'intensity' => 36.0), array('mass' => 634.737, 'intensity' => 60.9), array('mass' => 635.372, 'intensity' => 12.9), array('mass' => 636.582, 'intensity' => 13.6), array('mass' => 639.447, 'intensity' => 99.40000000000001), array('mass' => 640.582, 'intensity' => 32.0), array('mass' => 641.3579999999999, 'intensity' => 131.7), array('mass' => 642.746, 'intensity' => 72.90000000000001), array('mass' => 643.706, 'intensity' => 16.6), array('mass' => 646.05, 'intensity' => 6.5), array('mass' => 647.394, 'intensity' => 3.6), array('mass' => 649.373, 'intensity' => 10.3), array('mass' => 650.2910000000001, 'intensity' => 7.3), array('mass' => 651.481, 'intensity' => 3.4), array('mass' => 652.083, 'intensity' => 19.0), array('mass' => 653.328, 'intensity' => 9.0), array('mass' => 654.006, 'intensity' => 19.7), array('mass' => 654.784, 'intensity' => 9.300000000000001), array('mass' => 655.809, 'intensity' => 12.1), array('mass' => 656.629, 'intensity' => 17.8), array('mass' => 657.3819999999999, 'intensity' => 169.8), array('mass' => 658.39, 'intensity' => 21.4), array('mass' => 659.207, 'intensity' => 12.4), array('mass' => 660.697, 'intensity' => 4.2), array('mass' => 662.139, 'intensity' => 10.5), array('mass' => 663.241, 'intensity' => 26.5), array('mass' => 664.296, 'intensity' => 8.5), array('mass' => 665.348, 'intensity' => 26.4), array('mass' => 666.3099999999999, 'intensity' => 13.7), array('mass' => 667.2859999999999, 'intensity' => 18.3), array('mass' => 668.521, 'intensity' => 21.3), array('mass' => 669.341, 'intensity' => 41.3), array('mass' => 670.567, 'intensity' => 17.7), array('mass' => 671.441, 'intensity' => 9.5), array('mass' => 672.164, 'intensity' => 14.8), array('mass' => 673.427, 'intensity' => 36.9), array('mass' => 674.1180000000001, 'intensity' => 15.2), array('mass' => 676.1799999999999, 'intensity' => 2.2), array('mass' => 677.289, 'intensity' => 14.7), array('mass' => 678.558, 'intensity' => 7.3), array('mass' => 680.378, 'intensity' => 10.7), array('mass' => 681.617, 'intensity' => 65.0), array('mass' => 682.447, 'intensity' => 50.0), array('mass' => 683.628, 'intensity' => 8.9), array('mass' => 684.556, 'intensity' => 31.5), array('mass' => 686.523, 'intensity' => 15.5), array('mass' => 687.544, 'intensity' => 13.5), array('mass' => 688.49, 'intensity' => 26.5), array('mass' => 690.769, 'intensity' => 34.7), array('mass' => 691.447, 'intensity' => 10.3), array('mass' => 692.5069999999999, 'intensity' => 7.9), array('mass' => 693.237, 'intensity' => 14.8), array('mass' => 694.211, 'intensity' => 25.5), array('mass' => 695.385, 'intensity' => 7.2), array('mass' => 696.223, 'intensity' => 17.2), array('mass' => 698.546, 'intensity' => 48.0), array('mass' => 700.364, 'intensity' => 25.8), array('mass' => 702.42, 'intensity' => 32.8), array('mass' => 704.33, 'intensity' => 18.6), array('mass' => 705.1420000000001, 'intensity' => 21.1), array('mass' => 706.227, 'intensity' => 3.7), array('mass' => 707.426, 'intensity' => 17.0), array('mass' => 709.647, 'intensity' => 35.2), array('mass' => 711.5700000000001, 'intensity' => 25.9), array('mass' => 712.398, 'intensity' => 7.1), array('mass' => 713.465, 'intensity' => 7.9), array('mass' => 714.318, 'intensity' => 9.5), array('mass' => 715.643, 'intensity' => 6.9), array('mass' => 717.5119999999999, 'intensity' => 32.4), array('mass' => 718.225, 'intensity' => 2.2), array('mass' => 719.328, 'intensity' => 5.9), array('mass' => 720.345, 'intensity' => 8.699999999999999), array('mass' => 721.3630000000001, 'intensity' => 2.1), array('mass' => 722.529, 'intensity' => 32.8), array('mass' => 723.379, 'intensity' => 24.2), array('mass' => 724.349, 'intensity' => 7.1), array('mass' => 725.716, 'intensity' => 11.0), array('mass' => 726.477, 'intensity' => 3.5), array('mass' => 727.171, 'intensity' => 7.3), array('mass' => 728.668, 'intensity' => 59.8), array('mass' => 729.934, 'intensity' => 15.7), array('mass' => 730.687, 'intensity' => 9.4), array('mass' => 731.424, 'intensity' => 118.9), array('mass' => 732.41, 'intensity' => 78.5), array('mass' => 734.124, 'intensity' => 66.3), array('mass' => 735.105, 'intensity' => 64.0), array('mass' => 736.26, 'intensity' => 10.4), array('mass' => 737.6180000000001, 'intensity' => 60.1), array('mass' => 738.443, 'intensity' => 58.7), array('mass' => 739.151, 'intensity' => 25.9), array('mass' => 740.3150000000001, 'intensity' => 5.6), array('mass' => 741.639, 'intensity' => 39.1), array('mass' => 742.3339999999999, 'intensity' => 35.0), array('mass' => 743.332, 'intensity' => 8.300000000000001), array('mass' => 744.297, 'intensity' => 4.8), array('mass' => 748.393, 'intensity' => 11.5), array('mass' => 751.444, 'intensity' => 12.7), array('mass' => 777.604, 'intensity' => 62.7), array('mass' => 778.357, 'intensity' => 13.9), array('mass' => 778.962, 'intensity' => 12.0), array('mass' => 779.597, 'intensity' => 11.3), array('mass' => 781.228, 'intensity' => 7.4), array('mass' => 783.027, 'intensity' => 57.9), array('mass' => 784.4109999999999, 'intensity' => 23.9), array('mass' => 785.583, 'intensity' => 28.3), array('mass' => 786.314, 'intensity' => 138.2), array('mass' => 787.261, 'intensity' => 97.09999999999999), array('mass' => 788.16, 'intensity' => 42.6), array('mass' => 789.521, 'intensity' => 74.8), array('mass' => 791.015, 'intensity' => 104.5), array('mass' => 792.1799999999999, 'intensity' => 106.5), array('mass' => 793.328, 'intensity' => 13.1), array('mass' => 796.652, 'intensity' => 3.2), array('mass' => 803.3579999999999, 'intensity' => 11.9), array('mass' => 824.36, 'intensity' => 25.1), array('mass' => 828.518, 'intensity' => 15.7), array('mass' => 854.044, 'intensity' => 12.2), array('mass' => 859.043, 'intensity' => 39.0), array('mass' => 865.471, 'intensity' => 9.300000000000001), array('mass' => 867.4450000000001, 'intensity' => 5.9), array('mass' => 869.712, 'intensity' => 2.7), array('mass' => 870.317, 'intensity' => 3.0), array('mass' => 871.669, 'intensity' => 14.7), array('mass' => 873.284, 'intensity' => 25.1), array('mass' => 877.12, 'intensity' => 33.6), array('mass' => 879.454, 'intensity' => 8.4), array('mass' => 880.7910000000001, 'intensity' => 11.6), array('mass' => 884.502, 'intensity' => 7.9), array('mass' => 886.482, 'intensity' => 1.5), array('mass' => 887.394, 'intensity' => 2.3), array('mass' => 888.316, 'intensity' => 19.9), array('mass' => 889.602, 'intensity' => 24.2), array('mass' => 890.442, 'intensity' => 17.7), array('mass' => 891.754, 'intensity' => 5.2), array('mass' => 892.51, 'intensity' => 13.2), array('mass' => 897.28, 'intensity' => 57.9), array('mass' => 899.264, 'intensity' => 5.9), array('mass' => 902.309, 'intensity' => 13.6), array('mass' => 903.46, 'intensity' => 6.2), array('mass' => 905.354, 'intensity' => 45.8), array('mass' => 908.127, 'intensity' => 9.199999999999999), array('mass' => 910.526, 'intensity' => 23.4), array('mass' => 912.46, 'intensity' => 8.199999999999999), array('mass' => 913.778, 'intensity' => 21.9), array('mass' => 914.48, 'intensity' => 23.4), array('mass' => 915.423, 'intensity' => 86.09999999999999), array('mass' => 916.453, 'intensity' => 65.2), array('mass' => 917.623, 'intensity' => 11.6), array('mass' => 920.7619999999999, 'intensity' => 28.0), array('mass' => 921.88, 'intensity' => 31.9), array('mass' => 923.817, 'intensity' => 6.8), array('mass' => 925.2140000000001, 'intensity' => 10.8), array('mass' => 926.102, 'intensity' => 18.2), array('mass' => 926.924, 'intensity' => 11.9), array('mass' => 928.053, 'intensity' => 17.0), array('mass' => 929.346, 'intensity' => 11.0), array('mass' => 931.246, 'intensity' => 19.2), array('mass' => 933.362, 'intensity' => 380.7), array('mass' => 934.486, 'intensity' => 162.4), array('mass' => 935.388, 'intensity' => 53.4), array('mass' => 936.373, 'intensity' => 1.9), array('mass' => 937.255, 'intensity' => 33.9), array('mass' => 939.587, 'intensity' => 6.7), array('mass' => 942.01, 'intensity' => 48.7), array('mass' => 943.384, 'intensity' => 56.8), array('mass' => 945.0700000000001, 'intensity' => 29.7), array('mass' => 946.148, 'intensity' => 12.1), array('mass' => 947.496, 'intensity' => 36.1), array('mass' => 948.659, 'intensity' => 6.5), array('mass' => 949.4880000000001, 'intensity' => 30.2), array('mass' => 951.279, 'intensity' => 17.9), array('mass' => 951.955, 'intensity' => 60.4), array('mass' => 953.473, 'intensity' => 4.5), array('mass' => 955.362, 'intensity' => 41.7), array('mass' => 956.508, 'intensity' => 1.5), array('mass' => 957.516, 'intensity' => 13.1), array('mass' => 958.658, 'intensity' => 29.2), array('mass' => 960.245, 'intensity' => 62.2), array('mass' => 961.487, 'intensity' => 71.7), array('mass' => 962.3049999999999, 'intensity' => 6.8), array('mass' => 963.3920000000001, 'intensity' => 5.6), array('mass' => 964.129, 'intensity' => 25.4), array('mass' => 966.619, 'intensity' => 30.4), array('mass' => 967.494, 'intensity' => 5.6), array('mass' => 970.328, 'intensity' => 15.5), array('mass' => 973.26, 'intensity' => 15.2), array('mass' => 975.548, 'intensity' => 3.6), array('mass' => 977.422, 'intensity' => 2.1), array('mass' => 979.103, 'intensity' => 27.5), array('mass' => 980.561, 'intensity' => 74.5), array('mass' => 982.045, 'intensity' => 4.9), array('mass' => 983.768, 'intensity' => 35.6), array('mass' => 985.1660000000001, 'intensity' => 3.4), array('mass' => 985.827, 'intensity' => 20.1), array('mass' => 988.273, 'intensity' => 31.8), array('mass' => 989.963, 'intensity' => 6.3), array('mass' => 991.015, 'intensity' => 18.4), array('mass' => 994.441, 'intensity' => 28.9), array('mass' => 996.926, 'intensity' => 24.9), array('mass' => 998.813, 'intensity' => 9.1), array('mass' => 1000.289, 'intensity' => 37.8), array('mass' => 1001.558, 'intensity' => 20.1), array('mass' => 1002.755, 'intensity' => 17.9), array('mass' => 1005.527, 'intensity' => 26.6), array('mass' => 1006.318, 'intensity' => 8.0), array('mass' => 1007.763, 'intensity' => 23.6), array('mass' => 1010.416, 'intensity' => 61.3), array('mass' => 1011.378, 'intensity' => 41.7), array('mass' => 1012.025, 'intensity' => 18.3), array('mass' => 1013.41, 'intensity' => 18.4), array('mass' => 1014.077, 'intensity' => 32.0), array('mass' => 1015.596, 'intensity' => 44.2), array('mass' => 1017.819, 'intensity' => 34.2), array('mass' => 1019.62, 'intensity' => 2.6), array('mass' => 1020.27, 'intensity' => 15.3), array('mass' => 1021.849, 'intensity' => 26.0), array('mass' => 1023.289, 'intensity' => 1.8), array('mass' => 1024.612, 'intensity' => 11.0), array('mass' => 1026.746, 'intensity' => 23.3), array('mass' => 1028.438, 'intensity' => 15.5), array('mass' => 1029.133, 'intensity' => 4.3), array('mass' => 1030.735, 'intensity' => 43.4), array('mass' => 1040.297, 'intensity' => 5.3), array('mass' => 1041.163, 'intensity' => 5.0), array('mass' => 1042.524, 'intensity' => 13.6), array('mass' => 1044.555, 'intensity' => 24.3), array('mass' => 1045.821, 'intensity' => 3.0), array('mass' => 1048.365, 'intensity' => 16.0), array('mass' => 1048.976, 'intensity' => 12.0), array('mass' => 1051.235, 'intensity' => 56.7), array('mass' => 1053.095, 'intensity' => 4.7), array('mass' => 1053.718, 'intensity' => 5.3), array('mass' => 1054.983, 'intensity' => 24.0), array('mass' => 1055.673, 'intensity' => 3.6), array('mass' => 1056.599, 'intensity' => 2.7), array('mass' => 1058.611, 'intensity' => 13.8), array('mass' => 1059.345, 'intensity' => 9.300000000000001), array('mass' => 1062.38, 'intensity' => 76.7), array('mass' => 1063.485, 'intensity' => 53.8), array('mass' => 1064.696, 'intensity' => 9.800000000000001), array('mass' => 1065.559, 'intensity' => 6.1), array('mass' => 1068.392, 'intensity' => 45.3), array('mass' => 1069.702, 'intensity' => 17.8), array('mass' => 1073.219, 'intensity' => 38.9), array('mass' => 1074.325, 'intensity' => 29.4), array('mass' => 1077.096, 'intensity' => 25.2), array('mass' => 1078.517, 'intensity' => 8.199999999999999), array('mass' => 1080.469, 'intensity' => 296.3), array('mass' => 1081.393, 'intensity' => 257.0), array('mass' => 1082.35, 'intensity' => 53.4), array('mass' => 1083.278, 'intensity' => 9.800000000000001), array('mass' => 1084.064, 'intensity' => 31.9), array('mass' => 1085.269, 'intensity' => 7.1), array('mass' => 1088.701, 'intensity' => 9.9), array('mass' => 1092.269, 'intensity' => 5.1), array('mass' => 1093.629, 'intensity' => 1.6), array('mass' => 1094.256, 'intensity' => 6.9), array('mass' => 1096.411, 'intensity' => 147.3), array('mass' => 1097.401, 'intensity' => 75.90000000000001), array('mass' => 1098.23, 'intensity' => 21.4), array('mass' => 1098.971, 'intensity' => 9.1), array('mass' => 1100.613, 'intensity' => 2.1), array('mass' => 1104.28, 'intensity' => 45.1), array('mass' => 1108.594, 'intensity' => 25.5), array('mass' => 1110.564, 'intensity' => 2.8), array('mass' => 1113.672, 'intensity' => 4.3), array('mass' => 1115.6, 'intensity' => 5.6), array('mass' => 1122.844, 'intensity' => 37.4), array('mass' => 1126.927, 'intensity' => 7.4), array('mass' => 1128.38, 'intensity' => 2.6), array('mass' => 1134.231, 'intensity' => 9.1), array('mass' => 1140.216, 'intensity' => 23.1), array('mass' => 1142.389, 'intensity' => 5.6), array('mass' => 1145.663, 'intensity' => 18.1), array('mass' => 1147.058, 'intensity' => 10.2), array('mass' => 1148.241, 'intensity' => 8.4), array('mass' => 1149.901, 'intensity' => 17.5), array('mass' => 1152.4, 'intensity' => 1.6), array('mass' => 1153.556, 'intensity' => 5.9), array('mass' => 1154.64, 'intensity' => 3.9), array('mass' => 1155.716, 'intensity' => 14.8), array('mass' => 1160.658, 'intensity' => 4.6), array('mass' => 1162.846, 'intensity' => 26.4), array('mass' => 1164.084, 'intensity' => 18.4), array('mass' => 1165.142, 'intensity' => 4.2), array('mass' => 1167.107, 'intensity' => 62.8), array('mass' => 1167.783, 'intensity' => 6.5), array('mass' => 1168.509, 'intensity' => 8.199999999999999), array('mass' => 1172.223, 'intensity' => 18.1), array('mass' => 1173.355, 'intensity' => 63.5), array('mass' => 1175.582, 'intensity' => 12.7), array('mass' => 1177.582, 'intensity' => 4.4), array('mass' => 1178.665, 'intensity' => 21.7), array('mass' => 1180.352, 'intensity' => 14.1), array('mass' => 1187.256, 'intensity' => 18.8), array('mass' => 1189.308, 'intensity' => 15.8), array('mass' => 1190.379, 'intensity' => 3.6), array('mass' => 1191.47, 'intensity' => 53.7), array('mass' => 1192.666, 'intensity' => 14.3), array('mass' => 1193.65, 'intensity' => 12.3), array('mass' => 1194.372, 'intensity' => 11.4), array('mass' => 1195.545, 'intensity' => 302.4), array('mass' => 1196.59, 'intensity' => 96.59999999999999), array('mass' => 1197.515, 'intensity' => 18.1), array('mass' => 1200.689, 'intensity' => 18.9), array('mass' => 1203.019, 'intensity' => 22.8), array('mass' => 1205.688, 'intensity' => 13.9), array('mass' => 1206.537, 'intensity' => 19.1), array('mass' => 1209.661, 'intensity' => 65.90000000000001), array('mass' => 1210.664, 'intensity' => 59.5), array('mass' => 1211.46, 'intensity' => 16.3), array('mass' => 1212.48, 'intensity' => 36.1), array('mass' => 1213.483, 'intensity' => 22.5), array('mass' => 1215.608, 'intensity' => 22.8), array('mass' => 1220.758, 'intensity' => 6.7), array('mass' => 1221.399, 'intensity' => 8.199999999999999), array('mass' => 1223.62, 'intensity' => 44.9), array('mass' => 1228.17, 'intensity' => 6.0), array('mass' => 1230.258, 'intensity' => 29.0), array('mass' => 1231.571, 'intensity' => 27.9), array('mass' => 1232.401, 'intensity' => 14.2), array('mass' => 1235.392, 'intensity' => 16.7), array('mass' => 1240.744, 'intensity' => 11.8), array('mass' => 1241.905, 'intensity' => 1.9), array('mass' => 1248.345, 'intensity' => 117.2), array('mass' => 1249.757, 'intensity' => 44.9), array('mass' => 1250.633, 'intensity' => 12.7), array('mass' => 1251.286, 'intensity' => 20.8), array('mass' => 1254.028, 'intensity' => 1.8), array('mass' => 1257.346, 'intensity' => 29.6), array('mass' => 1260.676, 'intensity' => 6.0), array('mass' => 1263.399, 'intensity' => 18.3), array('mass' => 1266.442, 'intensity' => 771.8), array('mass' => 1267.454, 'intensity' => 440.1), array('mass' => 1268.504, 'intensity' => 103.7), array('mass' => 1270.608, 'intensity' => 23.9), array('mass' => 1271.546, 'intensity' => 1.6), array('mass' => 1272.94, 'intensity' => 3.1), array('mass' => 1274.602, 'intensity' => 10.2), array('mass' => 1275.782, 'intensity' => 7.0), array('mass' => 1277.587, 'intensity' => 6.7), array('mass' => 1279.519, 'intensity' => 43.0), array('mass' => 1280.733, 'intensity' => 4.2), array('mass' => 1282.32, 'intensity' => 7.7), array('mass' => 1283.267, 'intensity' => 22.5), array('mass' => 1285.647, 'intensity' => 11.5), array('mass' => 1288.412, 'intensity' => 2.7), array('mass' => 1289.066, 'intensity' => 25.4), array('mass' => 1290.548, 'intensity' => 11.6), array('mass' => 1292.682, 'intensity' => 101.3), array('mass' => 1293.499, 'intensity' => 14.7), array('mass' => 1299.387, 'intensity' => 23.9), array('mass' => 1301.578, 'intensity' => 26.0), array('mass' => 1302.472, 'intensity' => 3.6), array('mass' => 1303.896, 'intensity' => 11.4), array('mass' => 1304.941, 'intensity' => 4.3), array('mass' => 1310.509, 'intensity' => 343.1), array('mass' => 1311.41, 'intensity' => 232.0), array('mass' => 1312.569, 'intensity' => 72.2), array('mass' => 1318.619, 'intensity' => 3.1), array('mass' => 1320.298, 'intensity' => 22.8), array('mass' => 1323.808, 'intensity' => 4.6), array('mass' => 1324.887, 'intensity' => 9.9), array('mass' => 1327.005, 'intensity' => 20.5), array('mass' => 1329.294, 'intensity' => 4.7), array('mass' => 1336.584, 'intensity' => 4.4), array('mass' => 1340.576, 'intensity' => 9.199999999999999), array('mass' => 1343.801, 'intensity' => 15.9), array('mass' => 1347.812, 'intensity' => 16.7), array('mass' => 1350.912, 'intensity' => 7.2), array('mass' => 1353.366, 'intensity' => 4.0), array('mass' => 1355.359, 'intensity' => 19.8), array('mass' => 1361.403, 'intensity' => 92.90000000000001), array('mass' => 1362.696, 'intensity' => 80.0), array('mass' => 1363.598, 'intensity' => 31.6), array('mass' => 1369.293, 'intensity' => 8.9), array('mass' => 1371.053, 'intensity' => 15.7), array('mass' => 1375.918, 'intensity' => 4.5), array('mass' => 1377.472, 'intensity' => 2.4), array('mass' => 1379.068, 'intensity' => 47.5), array('mass' => 1379.67, 'intensity' => 311.7), array('mass' => 1380.621, 'intensity' => 202.1), array('mass' => 1381.592, 'intensity' => 83.2), array('mass' => 1389.477, 'intensity' => 7.8), array('mass' => 1390.559, 'intensity' => 8.4), array('mass' => 1391.394, 'intensity' => 7.0), array('mass' => 1398.442, 'intensity' => 22.8), array('mass' => 1403.41, 'intensity' => 7.9), array('mass' => 1404.081, 'intensity' => 7.7), array('mass' => 1407.549, 'intensity' => 243.7), array('mass' => 1408.513, 'intensity' => 204.6), array('mass' => 1409.575, 'intensity' => 86.2), array('mass' => 1410.841, 'intensity' => 9.6), array('mass' => 1416.792, 'intensity' => 3.4), array('mass' => 1420.797, 'intensity' => 6.2), array('mass' => 1425.443, 'intensity' => 1097.6), array('mass' => 1426.475, 'intensity' => 954.4), array('mass' => 1427.599, 'intensity' => 274.6), array('mass' => 1437.802, 'intensity' => 3.3), array('mass' => 1441.609, 'intensity' => 2.9), array('mass' => 1444.289, 'intensity' => 7.3), array('mass' => 1447.272, 'intensity' => 4.3), array('mass' => 1448.629, 'intensity' => 4.9), array('mass' => 1461.326, 'intensity' => 5.7), array('mass' => 1464.435, 'intensity' => 18.3), array('mass' => 1465.591, 'intensity' => 45.5), array('mass' => 1472.55, 'intensity' => 1.8), array('mass' => 1483.651, 'intensity' => 4.4), array('mass' => 1484.572, 'intensity' => 21.1), array('mass' => 1486.612, 'intensity' => 5.7), array('mass' => 1489.645, 'intensity' => 12.4), array('mass' => 1490.555, 'intensity' => 8.1), array('mass' => 1495.495, 'intensity' => 7.7), array('mass' => 1499.737, 'intensity' => 2.2), array('mass' => 1501.228, 'intensity' => 9.1), array('mass' => 1502.177, 'intensity' => 3.5), array('mass' => 1506.363, 'intensity' => 4.0), array('mass' => 1507.396, 'intensity' => 17.0), array('mass' => 1508.182, 'intensity' => 7.1), array('mass' => 1508.855, 'intensity' => 2.9), array('mass' => 1517.764, 'intensity' => 15.5), array('mass' => 1518.753, 'intensity' => 10.9), array('mass' => 1524.572, 'intensity' => 37.9), array('mass' => 1525.667, 'intensity' => 55.6), array('mass' => 1526.548, 'intensity' => 15.2), array('mass' => 1527.533, 'intensity' => 11.9), array('mass' => 1528.398, 'intensity' => 2.5), array('mass' => 1529.304, 'intensity' => 13.1), array('mass' => 1534.386, 'intensity' => 26.9), array('mass' => 1538.41, 'intensity' => 2.1), array('mass' => 1539.706, 'intensity' => 2.6), array('mass' => 1542.508, 'intensity' => 254.5), array('mass' => 1543.664, 'intensity' => 202.1), array('mass' => 1544.755, 'intensity' => 77.40000000000001), array('mass' => 1545.566, 'intensity' => 31.3), array('mass' => 1546.698, 'intensity' => 2.5), array('mass' => 1551.909, 'intensity' => 3.9), array('mass' => 1561.668, 'intensity' => 11.5), array('mass' => 1562.745, 'intensity' => 144.8), array('mass' => 1563.755, 'intensity' => 105.8), array('mass' => 1564.578, 'intensity' => 55.2), array('mass' => 1572.796, 'intensity' => 5.2), array('mass' => 1581.606, 'intensity' => 17.0), array('mass' => 1582.585, 'intensity' => 13.2), array('mass' => 1591.011, 'intensity' => 5.0), array('mass' => 1596.411, 'intensity' => 4.9), array('mass' => 1599.802, 'intensity' => 80.8), array('mass' => 1600.574, 'intensity' => 165.1), array('mass' => 1601.594, 'intensity' => 20.4), array('mass' => 1603.747, 'intensity' => 7.4), array('mass' => 1604.646, 'intensity' => 18.3), array('mass' => 1609.55, 'intensity' => 4.1), array('mass' => 1619.133, 'intensity' => 20.3), array('mass' => 1620.427, 'intensity' => 4.9), array('mass' => 1663.376, 'intensity' => 1.8), array('mass' => 1666.933, 'intensity' => 4.2), array('mass' => 1692.108, 'intensity' => 15.4), array('mass' => 1699.823, 'intensity' => 5.6), array('mass' => 1700.728, 'intensity' => 9.0), array('mass' => 1702.317, 'intensity' => 9.0), array('mass' => 1714.22, 'intensity' => 1.6), array('mass' => 1714.999, 'intensity' => 5.4), array('mass' => 1715.978, 'intensity' => 6.0));
$pep = new Peptide();
$pep->Sequence = 'HGYIGEFEYVDDHR';
$pep->NTerminus = 'H';
$pep->CTerminus = 'OH';
$strIon = 'b';
$ic = new IonCalculator(array('peptide' => $pep, 'maxcharge' => 2, 'weighttype' => 'monoisotopic', 'neutralloss' => array('H2O', 'NH3'), 'customtemplate' => '{ion}{index} +{charge} {flag}'));
//print('<h3>Testing</h3>');
//print('Peptide: '.$pep->Sequence.'<br />');
$arrB = $ic->calculateIon('b');
$arrY = $ic->calculateIon('y');
$arrAll = $arrB + $arrY;
$spec = new Spectrum(array('spectrum' => $arrSpectrum, 'peptide' => $pep));
$arrAnnot = $spec->annotateSpectrum($arrAll, 'mass', 'intensity', 'custom', 300, 'ppm');
$objSpecUi = new SpectrumUi(array('drawer' => new PChartDrawer(array('width' => 900, 'height' => 400, 'is3D' => false, 'colors' => array('#888', '#00f'), 'legend' => 'none')), 'spectrum' => $arrAnnot, 'annotationproperty' => 'custom'));
$objSpecUi->draw();
/* End of file file.php */
/* Location: ./path/file.php */
Ejemplo n.º 3
0
include_once '../PhProt.php';
$pp = new PhProt();
$pp->using('base');
$pp->using('peptide');
$pep = new ModifiedPeptide();
$pep->Sequence = 'KDEPAEESDGDLGFGLFD';
$pep->NTerminus = 'H';
$pep->CTerminus = 'OH';
$pep->addModification(array('accession' => 21, 'position' => 7));
$strIon = 'b';
$ic = new IonCalculator(array('peptide' => $pep, 'maxcharge' => 3, 'weighttype' => 'monoisotopic', 'neutralloss' => array('H2O', 'NH3'), 'customtemplate' => '{ion}{index}{charge} {flag}'));
print '<h3>Testing</h3>';
print 'Peptide: ' . $pep->Sequence . '<br />';
print '<h3>Result for ' . $strIon . '-Ions</h3>';
print '<table style="border: null">';
$arrResult = $ic->calculateIon($strIon);
for ($i = 0; $i < count($arrResult); $i++) {
    print '<tr><td>' . strval($arrResult[$i]['mass']) . '</td><td>' . $arrResult[$i]['ion'] . strval($arrResult[$i]['index']) . '</td><td>' . strval($arrResult[$i]['charge']) . '</td><td>' . $arrResult[$i]['flag'] . '</td><td>' . $arrResult[$i]['custom'] . '</td></tr>';
}
print '</table>';
print '<h3>Testing</h3>';
print 'Peptide: ' . $pep->Sequence . '<br />';
$strIon = 'y';
print '<h3>Result for ' . $strIon . '-Ions</h3>';
print '<table style="border: null">';
$arrResult = $ic->calculateIon($strIon);
for ($i = 0; $i < count($arrResult); $i++) {
    print '<tr><td>' . strval($arrResult[$i]['mass']) . '</td><td>' . $arrResult[$i]['ion'] . strval($arrResult[$i]['index']) . '</td><td>' . strval($arrResult[$i]['charge']) . '</td><td>' . $arrResult[$i]['flag'] . '</td><td>' . $arrResult[$i]['custom'] . '</td></tr>';
}
print '</table>';
/* End of file CustomTestsIonCalc.php */