src/Utility/Digest/AbstractDigest.php
private function performMethionineExcision(array $peptides)
    {
        $nmePeptides = array();
        foreach ($peptides as $peptide) {
            $entry = $peptide->getProteins()[0];

            if ($entry->getStart() > 0) {
                continue;
            }

            $sequence = $peptide->getSequence();

            if (strlen($sequence) <= 1) {
                continue;
            }

            if ($sequence[0] != 'M') {
                continue;
            }

            $nmePeptide = new Peptide();
            $nmePeptide->setSequence(substr($sequence, 1));
            $nmePeptide->addProtein($entry->getProtein(), 1, $entry->getEnd());
            $nmePeptide->setMissedCleavageCount($peptide->getMissedCleavageCount());

            $nmePeptides[] = $nmePeptide;
        }

        return array_merge($peptides, $nmePeptides);
    }
private function performMethionineExcision(array $peptides)
    {
        $nmePeptides = array();
        foreach ($peptides as $peptide) {
            $entry = $peptide->getProteins()[0];

            if ($entry->getStart() > 0) {
                continue;
            }

            $sequence = $peptide->getSequence();

            if (strlen($sequence) <= 1) {
                continue;
            }

            if ($sequence[0] != 'M') {
                continue;
            }

            $nmePeptide = new Peptide();
            $nmePeptide->setSequence(substr($sequence, 1));
            $nmePeptide->addProtein($entry->getProtein(), 1, $entry->getEnd());
            $nmePeptide->setMissedCleavageCount($peptide->getMissedCleavageCount());

            $nmePeptides[] = $nmePeptide;
        }

        return array_merge($peptides, $nmePeptides);
    }
private function performMethionineExcision ( array $ peptides ) { $ nmePeptides = array ( ) ; foreach ( $ peptides as $ peptide ) { $ entry = $ peptide -> getProteins ( ) [ 0 ] ; if ( $ entry -> getStart ( ) > 0 ) { continue ; } $ sequence = $ peptide -> getSequence ( ) ; if ( strlen ( $ sequence ) <= 1 ) { continue ; } if ( $ sequence [ 0 ] != 'M' ) { continue ; } $ nmePeptide = new Peptide ( ) ; $ nmePeptide -> setSequence ( substr ( $ sequence , 1 ) ) ; $ nmePeptide -> addProtein ( $ entry -> getProtein ( ) , 1 , $ entry -> getEnd ( ) ) ; $ nmePeptide -> setMissedCleavageCount ( $ peptide -> getMissedCleavageCount ( ) ) ; $ nmePeptides [ ] = $ nmePeptide ; } return array_merge ( $ peptides , $ nmePeptides ) ; }
Performs methionine excision on an array of peptides

@param Peptide $peptides
@return Peptide[]
Performs methionine excision on an array of peptides