src/experimental/MzMlMerge.php
public function merge()
    {
        // TODO: verify analysis phase run
        foreach ($this->dataFiles as $replicate => $fractions) {
            $firstFile = current($fractions);
            // Write header
            $this->writeHeader($firstFile['path'], $this->spectrumCount[$replicate], $this->outputFiles[$replicate]);

            // Resets vars
            $this->spectrumIdRef = array();
            $this->timeOffset = 0;
            $this->indexOffset = 0;
            $this->idOffset = 0;

            foreach ($fractions as $fractionIndex => $file) {
                $this->writeSpectrum($file['path'], $this->outputFiles[$replicate],
                    $this->fractionOffsets[$fractionIndex]);
            }

            $this->writeFooter($firstFile['path'], $this->outputFiles[$replicate]);
        }
    }
public function merge()
    {
        // TODO: verify analysis phase run
        foreach ($this->dataFiles as $replicate => $fractions) {
            $firstFile = current($fractions);
            // Write header
            $this->writeHeader($firstFile['path'], $this->spectrumCount[$replicate], $this->outputFiles[$replicate]);

            // Resets vars
            $this->spectrumIdRef = array();
            $this->timeOffset = 0;
            $this->indexOffset = 0;
            $this->idOffset = 0;

            foreach ($fractions as $fractionIndex => $file) {
                $this->writeSpectrum($file['path'], $this->outputFiles[$replicate],
                    $this->fractionOffsets[$fractionIndex]);
            }

            $this->writeFooter($firstFile['path'], $this->outputFiles[$replicate]);
        }
    }
public function merge ( ) { // TODO: verify analysis phase run foreach ( $ this -> dataFiles as $ replicate => $ fractions ) { $ firstFile = current ( $ fractions ) ; // Write header $ this -> writeHeader ( $ firstFile [ 'path' ] , $ this -> spectrumCount [ $ replicate ] , $ this -> outputFiles [ $ replicate ] ) ; // Resets vars $ this -> spectrumIdRef = array ( ) ; $ this -> timeOffset = 0 ; $ this -> indexOffset = 0 ; $ this -> idOffset = 0 ; foreach ( $ fractions as $ fractionIndex => $ file ) { $ this -> writeSpectrum ( $ file [ 'path' ] , $ this -> outputFiles [ $ replicate ] , $ this -> fractionOffsets [ $ fractionIndex ] ) ; } $ this -> writeFooter ( $ firstFile [ 'path' ] , $ this -> outputFiles [ $ replicate ] ) ; } }
Merges the MzML files specified in the constructor into a single MzML file and writes the data to the output file specified in the constructor
Merges the MzML files specified in the constructor into a single MzML file and writes the data to the output file specified in the constructor