src/Search/MsgfPlusSearch.php
public function search(SearchParametersInterface $parameters)
    {
        if (! is_a($parameters, 'pgb_liv\php_ms\Search\Parameters\MsgfPlusSearchParameters')) {
            throw new \InvalidArgumentException('Argument 1 expected to be of type MsgfPlusSearchParameters');
        }
        
        if (is_null($parameters->getSpectraPath()) || ! file_exists($parameters->getSpectraPath())) {
            throw new \InvalidArgumentException('Valid Spectra file must be specified in paramaters.');
        }
        
        if (is_null($parameters->getDatabases()) || ! file_exists($parameters->getDatabases())) {
            throw new \InvalidArgumentException('Valid database file must be specified in paramaters.');
        }
        
        $command = $this->getCommand($parameters);
        
        $this->executeCommand($command);
        
        if (! is_null($parameters->getOutputFile())) {
            return $parameters->getOutputFile();
        } else {
            $extensionPos = strrpos($parameters->getSpectraPath(), '.');
            return substr($parameters->getSpectraPath(), 0, $extensionPos) . '.mzid';
        }
    }
public function search(SearchParametersInterface $parameters)
    {
        if (! is_a($parameters, 'pgb_liv\php_ms\Search\Parameters\MsgfPlusSearchParameters')) {
            throw new \InvalidArgumentException('Argument 1 expected to be of type MsgfPlusSearchParameters');
        }
        
        if (is_null($parameters->getSpectraPath()) || ! file_exists($parameters->getSpectraPath())) {
            throw new \InvalidArgumentException('Valid Spectra file must be specified in paramaters.');
        }
        
        if (is_null($parameters->getDatabases()) || ! file_exists($parameters->getDatabases())) {
            throw new \InvalidArgumentException('Valid database file must be specified in paramaters.');
        }
        
        $command = $this->getCommand($parameters);
        
        $this->executeCommand($command);
        
        if (! is_null($parameters->getOutputFile())) {
            return $parameters->getOutputFile();
        } else {
            $extensionPos = strrpos($parameters->getSpectraPath(), '.');
            return substr($parameters->getSpectraPath(), 0, $extensionPos) . '.mzid';
        }
    }
public function search ( SearchParametersInterface $ parameters ) { if ( ! is_a ( $ parameters , 'pgb_liv\php_ms\Search\Parameters\MsgfPlusSearchParameters' ) ) { throw new \ InvalidArgumentException ( 'Argument 1 expected to be of type MsgfPlusSearchParameters' ) ; } if ( is_null ( $ parameters -> getSpectraPath ( ) ) || ! file_exists ( $ parameters -> getSpectraPath ( ) ) ) { throw new \ InvalidArgumentException ( 'Valid Spectra file must be specified in paramaters.' ) ; } if ( is_null ( $ parameters -> getDatabases ( ) ) || ! file_exists ( $ parameters -> getDatabases ( ) ) ) { throw new \ InvalidArgumentException ( 'Valid database file must be specified in paramaters.' ) ; } $ command = $ this -> getCommand ( $ parameters ) ; $ this -> executeCommand ( $ command ) ; if ( ! is_null ( $ parameters -> getOutputFile ( ) ) ) { return $ parameters -> getOutputFile ( ) ; } else { $ extensionPos = strrpos ( $ parameters -> getSpectraPath ( ) , '.' ) ; return substr ( $ parameters -> getSpectraPath ( ) , 0 , $ extensionPos ) . '.mzid' ; } }
Perform the MS-GF+ search using the specified parameters.
Any paramaters not specified will use the MS-GF+ defaults.

@param SearchParametersInterface $parameters
Paramaters object for any arguments to send to MS-GF+
@throws \InvalidArgumentException Thrown if any of the required properties are missing
@return string Path to the results file
Perform the MS - GF + search using the specified parameters . Any paramaters not specified will use the MS - GF + defaults .