Source of file MascotSearchParameters.php

Size: 8,688 Bytes - Last Modified: 2019-05-10T12:24:09+01:00

src/Search/Parameters/MascotSearchParameters.php

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testObjectCanBeConstructedForValidConstructorArguments
77
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testObjectCanBeConstructedForValidConstructorArguments
78
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testObjectCanBeConstructedForValidConstructorArguments
79
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testObjectCanBeConstructedForValidConstructorArguments
80
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testObjectCanBeConstructedForValidConstructorArguments
81
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testObjectCanBeConstructedForValidConstructorArguments
82838485
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidIntermediate
86
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidIntermediate
87888990
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidIntermediate
9192939495
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFormVersion
96
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFormVersion
979899100
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFormVersion
101102103104105106
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidSearchType
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidSearchType
107
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidSearchType
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidSearchType
108
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidSearchType
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidSearchType
109
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidSearchType
110
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidSearchType
111
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidSearchType
112
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidSearchType
113
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidSearchType
114115116117118
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidSearchType
119120121122123
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidRepType
124
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidRepType
125126127128
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidRepType
129130131132133
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidErrorTolerantRepeat
134
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidErrorTolerantRepeat
135136137138
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidErrorTolerantRepeat
139140141142143
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPeak
144
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPeak
145146147148
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPeak
149150151152153
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidShowAllModsEnabled
154155156157158
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidShowAllModsEnabled
159160161162163
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidUserName
164
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidUserName
165166167168
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidUserName
169170171172173
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidUserMail
174
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidUserMail
175176177178
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidUserMail
179180181182183184185186187188189190
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidTitle
191
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidTitle
192193194195196197198199200
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidTitle
201202203204205206
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidQuantitation
207
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidQuantitation
208209210211
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidQuantitation
212213214215216217
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidTaxonomy
218
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidTaxonomy
219220221222
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidTaxonomy
223224225226227
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPeptideIsotopeError
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidPeptideIsotopeError
228
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidPeptideIsotopeError
229230231
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPeptideIsotopeError
232
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPeptideIsotopeError
233234235236
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPeptideIsotopeError
237238239240241
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidCharge
242
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidCharge
243244245246
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidCharge
247248249250251252
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
253
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
254
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
255
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
256
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
257
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
258
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
259
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
260
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
261
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
262
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
263
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
264
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
265
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidFileFormat
266
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
267268269270
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidFileFormat
271272273274275276277278279280281282283
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPrecursor
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidPrecursor
284
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidPrecursor
285286287
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPrecursor
288
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPrecursor
289290291292
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidPrecursor
293294295296297298
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
299
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
300
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
301
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
302
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
303
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
304
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
305
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
306
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
307
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
308
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
309
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
310
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
311
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
312
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
313
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
314
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
315
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
316
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetInvalidInstrument
317
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
318319320321
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidInstrument
322323324325326327
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidReport
328
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidReport
329330331332
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidReport
333334335336337338
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidMassType
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidMassType
339
Covered by 2 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidMassType
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidMassType
340
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidMassType
341
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidMassType
342
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidMassType
343
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidMassType
344
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidMassType
345346347348349
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanGetSetValidMassType
350351352353354
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidMissedCleavageCountHigh
355
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidMissedCleavageCountHigh
356357358
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidMissedCleavageCountHigh
359
Covered by 1 test(s):
  • pgb_liv\php_ms\Test\Unit\MascotSearchParametersTest::testCanSetInvalidMissedCleavageCountHigh
360361
<?php
/**
 * Copyright 2016 University of Liverpool
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace pgb_liv\php_ms\Search\Parameters;

use pgb_liv\php_ms\Core\Tolerance;

/**
 * Encapsulation class for Mascot search parameters
 *
 * @author Andrew Collins
 */
class MascotSearchParameters extends AbstractSearchParameters implements SearchParametersInterface
{

    const UNIT_PPM = 'ppm';

    const MASS_MONO = 'Monoisotopic';

    const MASS_AVG = 'Average';

    private $formVersion = '1.01';

    private $intermediate = '';

    private $searchType = 'MIS';

    private $peak = 'AUTO';

    private $repType = 'peptide';

    private $errTolRepeat = 0;

    private $isShowAllModsEnabled = '';

    private $userName;

    private $userMail;

    private $title;

    private $quantitation = 'None';

    private $taxonomy = 'All Entries';

    private $peptideIsotopeError = 0;

    private $charge = '2+';

    private $mass = 'Monoisotopic';

    private $fileFormat = 'Mascot generic';

    private $precursor;

    private $instrument = 'Default';

    private $report = 'Auto';

    public function __construct()
    {
        // Set defaults
        $this->setEnzyme('Trypsin');
        $this->setMissedCleavageCount(1);
        $this->setPrecursorTolerance(new Tolerance(1.2, Tolerance::DA));
        $this->setFragmentTolerance(new Tolerance(0.6, Tolerance::DA));
        $this->setDecoyEnabled(true);
    }

    public function setIntermediate($intermediate)
    {
        $this->intermediate = $intermediate;
    }

    public function getIntermediate()
    {
        return $this->intermediate;
    }

    public function setFormVersion($formVersion)
    {
        $this->formVersion = $formVersion;
    }

    public function getFormVersion()
    {
        return $this->formVersion;
    }

    public function setSearchType($searchType)
    {
        switch ($searchType) {
            case 'MIS':
            case 'SQ':
            case 'PMF':
                $this->searchType = $searchType;
                return;
            default:
                throw new \InvalidArgumentException('Unknown search type: ' . $searchType);
        }
    }

    public function getSearchType()
    {
        return $this->searchType;
    }

    public function setRepType($repType)
    {
        $this->repType = $repType;
    }

    public function getRepType()
    {
        return $this->repType;
    }

    public function setErrorTolerantRepeat($repeat)
    {
        $this->errTolRepeat = $repeat;
    }

    public function getErrorTolerantRepeat()
    {
        return $this->errTolRepeat;
    }

    public function setPeak($peak)
    {
        $this->peak = $peak;
    }

    public function getPeak()
    {
        return $this->peak;
    }

    public function setShowAllModsEnabled($bool)
    {
        return $this->isShowAllModsEnabled = $bool;
    }

    public function isShowAllModsEnabled()
    {
        return $this->isShowAllModsEnabled;
    }

    public function setUserName($userName)
    {
        $this->userName = $userName;
    }

    public function getUserName()
    {
        return $this->userName;
    }

    public function setUserMail($mail)
    {
        $this->userMail = $mail;
    }

    public function getUserMail()
    {
        return $this->userMail;
    }

    /**
     * A text string which will be printed at the top of results report pages.
     * Can be left blank.
     *
     * @param string $title
     *            Text string for title
     */
    public function setTitle($title)
    {
        $this->title = $title;
    }

    /**
     * A text string which will be printed at the top of results report pages.
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    public function setQuantitation($quantitationMethod)
    {
        // TODO: Validate quantitation
        $this->quantitation = $quantitationMethod;
    }

    public function getQuantitation()
    {
        return $this->quantitation;
    }

    public function setTaxonomy($taxonomy)
    {
        // TODO: Validate taxonomy
        $this->taxonomy = $taxonomy;
    }

    public function getTaxonomy()
    {
        return $this->taxonomy;
    }

    public function setPeptideIsotopeError($peptideIsotopeError)
    {
        if (! is_int($peptideIsotopeError) || $peptideIsotopeError < 0 || $peptideIsotopeError > 2) {
            throw new \InvalidArgumentException('Argument 1 must be an integer value between 0 and 2');
        }

        $this->peptideIsotopeError = $peptideIsotopeError;
    }

    public function getPeptideIsotopeError()
    {
        return $this->peptideIsotopeError;
    }

    public function setCharge($charge)
    {
        $this->charge = $charge;
    }

    public function getCharge()
    {
        return $this->charge;
    }

    public function setFileFormat($fileFormat)
    {
        switch ($fileFormat) {
            case 'Mascot generic':
            case 'Sequest (.DTA)':
            case 'Finnigan (.ASC)':
            case 'Micromass (.PKL)':
            case 'PerSeptive (.PKS)':
            case 'Sciex API III':
            case 'Bruker (.XML)':
            case 'mzData (.XML)':
            case 'mzML (.mzML)':
                $this->fileFormat = $fileFormat;
                break;
            default:
                throw new \InvalidArgumentException('Argument 1 must specify a known file format');
        }
    }

    public function getFileFormat()
    {
        return $this->fileFormat;
    }

    /**
     * Certain data file formats, SCIEX API III, PerSeptive (.PKS), and Bruker (.XML), do not include m/z information for the precursor peptide.
     * For these formats only, the Precursor field is used to specify the m/z value of the parent peptide. The charge state is defined by the setting of the
     * Peptide Charge field.
     *
     * @param float $precursorMass
     *            Precursor mass value
     */
    public function setPrecursor($precursorMass)
    {
        if ((! is_float($precursorMass) && ! is_int($precursorMass)) || $precursorMass < 0) {
            throw new \InvalidArgumentException('Argument 1 must be a float or integer value greater than 0');
        }

        $this->precursor = $precursorMass;
    }

    public function getPrecursor()
    {
        return $this->precursor;
    }

    public function setInstrument($instrument)
    {
        switch ($instrument) {
            case 'Default':
            case 'ESI-QUAD-TOF':
            case 'MALDI-TOF-PSD':
            case 'ESI-TRAP':
            case 'ESI-QUAD':
            case 'ESI-FTICR':
            case 'MALDI-TOF-TOF':
            case 'ESI-4SECTOR':
            case 'FTMS-ECD':
            case 'ETD-TRAP':
            case 'MALDI-QUAD-TOF':
            case 'MALDI-QIT-TOF':
            case 'MALDI-ISD':
            case 'CID+ETD':
                $this->instrument = $instrument;
                break;
            default:
                throw new \InvalidArgumentException('Argument 1 must specify a known instrument type');
        }
    }

    public function getInstrument()
    {
        return $this->instrument;
    }

    public function setReport($top)
    {
        // TODO: Validiate Report top limit
        $this->report = $top;
    }

    public function getReport()
    {
        return $this->report;
    }

    public function setMassType($massType)
    {
        switch ($massType) {
            case MascotSearchParameters::MASS_MONO:
            case MascotSearchParameters::MASS_AVG:
                $this->mass = $massType;
                return;
            default:
                throw new \InvalidArgumentException('Mass type must be either monoistopic or average');
        }
    }

    public function getMassType()
    {
        return $this->mass;
    }

    public function setMissedCleavageCount($maxCleave)
    {
        if (! is_int($maxCleave) || $maxCleave < 0 || $maxCleave > 9) {
            throw new \InvalidArgumentException('Argument 1 must be an unsigned integer between 0 and 9');
        }

        parent::setMissedCleavageCount($maxCleave);
    }
}