Exemplo n.º 1
0
print '<h1>Testing phosphat data</h1>';
print 'Peptide: ' . $modpep->Sequence . '<br />';
print 'N-Terminus: ' . $modpep->NTerminus . '<br />';
print 'C-Terminus: ' . $modpep->CTerminus . '<br />';
print 'Modification 1: ' . strval($objMod1['accession']) . ' at ' . strval($objMod1['position']) . '<br />';
print '<h3>Masses monoisotopic without Phospho mod</h3>';
print 'Mass C-Terminus: ' . strval($modpep->getCTerminusMass('monoisotopic')) . '<br />';
print 'Mass N-Terminus: ' . strval($modpep->getNTerminusMass('monoisotopic')) . '<br />';
print 'Peptide mass: ' . strval($modpep->getMass('monoisotopic')) . '<br />';
print 'Calculated MCR 2: ' . strval($modpep->getTheoreticalMCR('monoisotopic', 2)) . '<br />';
print '<h3>Masses average without Phospho mod</h3>';
print 'Mass C-Terminus: ' . strval($modpep->getCTerminusMass('average')) . '<br />';
print 'Mass N-Terminus: ' . strval($modpep->getNTerminusMass('average')) . '<br />';
print 'Peptide mass: ' . strval($modpep->getMass('average')) . '<br />';
print 'Calculated MCR 3: ' . strval($modpep->getTheoreticalMCR('monoisotopic', 3)) . '<br />';
$modpep->addModification($objMod1);
print '<h3>Masses monoisotopic with Phospho mod</h3>';
print 'Mass C-Terminus: ' . strval($modpep->getCTerminusMass('monoisotopic')) . '<br />';
print 'Mass N-Terminus: ' . strval($modpep->getNTerminusMass('monoisotopic')) . '<br />';
print 'Peptide mass: ' . strval($modpep->getMass('monoisotopic')) . '<br />';
print 'Calculated MCR 2: ' . strval($modpep->getTheoreticalMCR('monoisotopic', 2)) . '<br />';
print '<h3>Masses average with Phospho mod</h3>';
print 'Mass C-Terminus: ' . strval($modpep->getCTerminusMass('average')) . '<br />';
print 'Mass N-Terminus: ' . strval($modpep->getNTerminusMass('average')) . '<br />';
print 'Peptide mass: ' . strval($modpep->getMass('average')) . '<br />';
print 'Calculated MCR 3: ' . strval($modpep->getTheoreticalMCR('monoisotopic', 3)) . '<br />';
$modpep = new ModifiedPeptide();
$modpep->setModifiedSequence('KDEPAEE(pS)DGDLGFGLFD');
$modpep->NTerminus = 'H';
$modpep->CTerminus = 'OH';
print '<h1>Testing phosphat data (using the modseq detector)</h1>';
Exemplo n.º 2
0
 * 
 * Custom tests for the IonCalculator class
 * @author Robert Schmidt <*****@*****.**>
 * @version 0.1
 * @package mpimp.phprot
 * @subpackage 
 */
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>';