src/Search/MsgfPlusSearch.php
private function executeCommand($command)
    {
        $stdoutPath = tempnam(sys_get_temp_dir(), 'php-msMsgfOut');
        $stderrPath = tempnam(sys_get_temp_dir(), 'php-msMsGfErr');
        
        $descriptors = array(
            0 => array(
                'pipe',
                'r'
            ),
            1 => array(
                'file',
                $stdoutPath,
                'a'
            ),
            2 => array(
                'file',
                $stderrPath,
                'a'
            )
        );
        
        $process = proc_open($command, $descriptors, $pipes);
        proc_close($process);
        
        if (filesize($stderrPath) > 0) {
            throw new \InvalidArgumentException(file_get_contents($stderrPath));
        }
        
        return $stdoutPath;
    }
private function executeCommand($command)
    {
        $stdoutPath = tempnam(sys_get_temp_dir(), 'php-msMsgfOut');
        $stderrPath = tempnam(sys_get_temp_dir(), 'php-msMsGfErr');
        
        $descriptors = array(
            0 => array(
                'pipe',
                'r'
            ),
            1 => array(
                'file',
                $stdoutPath,
                'a'
            ),
            2 => array(
                'file',
                $stderrPath,
                'a'
            )
        );
        
        $process = proc_open($command, $descriptors, $pipes);
        proc_close($process);
        
        if (filesize($stderrPath) > 0) {
            throw new \InvalidArgumentException(file_get_contents($stderrPath));
        }
        
        return $stdoutPath;
    }
private function executeCommand ( $ command ) { $ stdoutPath = tempnam ( sys_get_temp_dir ( ) , 'php-msMsgfOut' ) ; $ stderrPath = tempnam ( sys_get_temp_dir ( ) , 'php-msMsGfErr' ) ; $ descriptors = array ( 0 => array ( 'pipe' , 'r' ) , 1 => array ( 'file' , $ stdoutPath , 'a' ) , 2 => array ( 'file' , $ stderrPath , 'a' ) ) ; $ process = proc_open ( $ command , $ descriptors , $ pipes ) ; proc_close ( $ process ) ; if ( filesize ( $ stderrPath ) > 0 ) { throw new \ InvalidArgumentException ( file_get_contents ( $ stderrPath ) ) ; } return $ stdoutPath ; }
Executes the MSGF+ Command.

@param string $command
Complete command line argument to execute
@throws \InvalidArgumentException Thrown if MS-GF+ writes anything to stderr
@return string Path to MS-GF+ stdout log file
Executes the MSGF + Command .