Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_mascotresfilebase.hpp
1/*
2##############################################################################
3# file: ms_mascotresfilebase.hpp #
4# 'msparser' toolkit #
5# Encapsulates a mascot results file #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2023 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11# $Archive:: /MowseBranches/ms_mascotresfile_1.2/include/ms_mascotresfi $ #
12# $Author: villek@matrixscience.com $ #
13# $Date: 2024-09-23 15:58:21 +0100 $ #
14# $Revision: 341a28550b540d9c21b06012aa60ab0be24409b8 | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $ #
15# $NoKeywords:: $ #
16##############################################################################
17*/
18
19#ifndef MS_MASCOTRESFILEBASE_HPP
20#define MS_MASCOTRESFILEBASE_HPP
21
22
23
24// Includes from the standard template library
25#include <stdarg.h>
26#include <time.h>
27#include <string>
28#include <list>
29#include <vector>
30#include <set>
31
32namespace msparser_internal {
33 class ms_peptidesummarybase;
34 class ms_proteinsummarybase;
35 class ms_inputquerybase;
36 class ms_searchparamsbase;
37}
38
39namespace matrix_science {
40 class ms_searchparams;
41 class ms_umod_configfile;
42 class ms_masses;
43 class ms_enzymefile;
44 class ms_taxonomyfile;
45 class ms_mascotresults_params;
46 class ms_proteinsummary;
47 class ms_inputquery;
48
55
71 class MS_MASCOTRESFILE_API ms_mascotresfilebase : public ms_errors
72 {
73 friend class ms_peptidesummary;
74 friend class ms_proteinsummary;
75 friend class ms_inputquery;
76 friend class ms_searchparams;
77 friend class msparser_internal::ms_peptidesummarybase;
78 friend class msparser_internal::ms_proteinsummarybase;
79
80 public:
81
83
89 {
90 KA_CREATEINDEX_CI = 0,
91 KA_READFILE_RF = 1,
92 KA_ASSIGNPROTEINS_AP = 2,
93 KA_GROUPPROTEINS_GP = 3,
94 KA_UNASSIGNEDLIST_UL = 4,
95 KA_QUANTITATION = 5,
96 KA_CREATECACHE_CC = 6,
97 KA_THRESHFORFDR_FDR = 7,
98 KA_LAST = 8
99 };
100
102
106 enum FLAGS
107 {
108
109 RESFILE_NOFLAG = 0x00000000,
110 RESFILE_USE_CACHE = 0x00000001,
111 RESFILE_CACHE_IGNORE_ACC_DUPES = 0x00000002,
112 RESFILE_USE_PARENT_PARAMS = 0x00000004,
113 RESFILE_CACHE_IGNORE_DATE_CHANGE = 0x00000008
114 };
115
117
123 {
124 PERCOLATOR_INPUT_FILE = 0,
125 PERCOLATOR_OUTPUT_TARGET = 1,
126 PERCOLATOR_OUTPUT_DECOY = 2
127 };
128
130
133 {
134 XML_SCHEMA_QUANTITATION = 0,
135 XML_SCHEMA_UNIMOD = 1,
136 XML_SCHEMA_DIRECTORY = 2,
137 XML_SCHEMA_CROSSLINKING = 3,
138 XML_SCHEMA_LAST = 4
139 };
140
142
145 {
146 RESFILE_DAT28 = 0,
147 RESFILE_MSR = 1,
148 RESFILE_UNKNOWN = 2
149 };
150
152 ms_mascotresfilebase(const char * szFileName, const int keepAliveInterval = 0,
153 const char * keepAliveText = "<!-- %d seconds -->\n",
154 const unsigned int flags = RESFILE_NOFLAG,
155 const char * cacheDirectory = 0, const char * XMLschemaDirectory = 0, ms_progress_info * progressMonitor = 0);
156
157 virtual ~ms_mascotresfilebase(){};
158
159 // ------------------- Basic generic functions -------------------
160
162 std::string getMSParserVersion() const;
163
165 bool versionGreaterOrEqual(int major, int minor, int revision) const;
166
168 virtual int appendResfile(const char * filename,
169 int flags=RESFILE_USE_PARENT_PARAMS,
170 const char * cacheDirectory = 0) = 0; // returns 'id' of added file
171
172 virtual const ms_mascotresfilebase* getResfile(int id) const = 0;
173
175 virtual int getNumberOfResfiles() const = 0;
176
178 virtual int getJobNumber(const int resfileID = 1) const = 0;
179
180
181#ifndef SWIG
182 // Not used from the outside world...
183 void setError(int error, ...) ;
184 void vsetError(int error, va_list arg);
185#endif
186
188 int getNumberOfErrors() const;
189
191 int getErrorNumber(const int num = -1) const;
192
194 int getLastError() const;
195
197 std::string getErrorString(const int num) const;
198
200 std::string getLastErrorString() const;
201
203 void appendErrors(ms_errs & errs);
204
206 void resetKeepAlive(const int keepAliveInterval, const char * keepAliveText,
207 const bool propagateToAppended = true, const bool resetStartTime = false);
208
209 // ----------------- Specific results functions ------------------
211 virtual int getNumQueries(const int resfileID = 0) const = 0;
212
214 virtual int getNumSeqs(const int idx = 0) const = 0;
215
217 virtual int getNumSeqsAfterTax(const int idx = 0) const = 0;
218
220 virtual int getNumEtSeqsSearched(const int idx = 0) const = 0;
221
223 virtual int getNumLibraryEntries(const int idx = 0) const = 0;
224
226 virtual double getNumResidues(const int idx = 0) const = 0;
227
229 virtual bool isDatabaseTypeAvailable() const = 0;
231 virtual DATABASE_TYPE getDatabaseType(const int idx) const = 0;
233 virtual int getReferenceDatabaseNumberOfSL(const int idx) const = 0;
234
236 virtual std::vector<int> getSLDatabaseNumbersOfReference(const int idx) const = 0;
237
239
249 virtual int getExecTime() const = 0;
250
252
263 virtual int getDate() const = 0;
264
266
276 virtual std::string getMascotVer() const = 0;
277
279 virtual std::string getFastaVer(int idx = 1) const = 0;
280
282 virtual std::string getFastaPath(int idx = 1) const = 0;
283
285 virtual std::string getUniqueTaskID() const = 0;
286
288 virtual ms_mascotoptions::DECOY_ALGORITHM getDecoyTypeForDB(const int idx = 1) const = 0;
289
291 virtual double getSLFragmentTolerance(int idx = 1) const = 0;
292
294 virtual std::string getSLFragmentToleranceUnit(int idx = 1) const = 0;
295
297 virtual std::string getSLExecCommand(int idx = 1) const = 0;
298
300 virtual bool isPMF() const = 0;
301
303 virtual bool isMSMS() const = 0;
304
306 virtual bool isSQ() const = 0;
307
309 virtual bool isErrorTolerant() const = 0;
310
312 virtual bool anyPMF() const = 0;
313
315 virtual bool anyMSMS() const = 0;
316
318 virtual bool anySQ() const = 0;
319
321 virtual bool anyTag() const = 0;
322
324 virtual bool anyFastaMatches(const bool isDecoy=false) const = 0;
325
327 virtual bool anySpectralLibraryMatches(const bool isDecoy=false) const = 0;
328
330 virtual bool anyErrorTolerantMatches(const bool isDecoy=false) const = 0;
331
333 virtual bool anyCrosslinkedMatches(const bool isDecoy=false) const = 0;
334
336 virtual double getObservedMass(const int query) const = 0;
337
339 virtual int getObservedCharge(const int query, const bool decoy=false) const = 0;
340
342 virtual double getObservedMrValue(const int query, const bool decoy=false) const = 0;
343
345 virtual double getObservedIntensity(const int query) const = 0;
346
348 virtual std::string getRepeatSearchString(const int query, const bool fullQuery = false) const = 0;
349
351 virtual std::string getFileName(const int id = 1) const = 0;
352
354
358 ms_searchparams & params() const { return *params_; };
359
361 virtual bool getQuantitation(ms_quant_configfile *qfile) const = 0;
362
364 bool setXMLschemaFilePath(XML_SCHEMA XMLschema, const char * path);
365
367 std::string getXMLschemaFilePath(XML_SCHEMA XMLschema) const;
368
370 bool getQuantitationMethod(ms_quant_method *qmethod) const;
371
373 bool getCrosslinkingMethod(ms_crosslinking_method *method) const;
374
376 virtual bool getUnimod(ms_umod_configfile *ufile, bool useSchemaFromResfile = false) const = 0;
377
379 virtual bool getUnimodXL(ms_umod_configfile *ufile, bool useSchemaFromResfile = false) const = 0;
380
382 const ms_modification* getMonoLinkModification(const int modNum, const int monoLink) const;
383
385 bool getMasses(ms_masses * masses) const;
386
388 virtual bool getEnzyme(ms_enzymefile *efile, const char * enzymeFileName = 0) const = 0;
389
391 virtual bool getTaxonomy(ms_taxonomyfile *tfile) const = 0;
392
394 bool outputKeepAlive() const;
395
396#ifndef SWIG
398 void getKeepAlive(KA_TASK & kaTask,
399 int & kaPercentage,
400 std::string & kaAccession,
401 int & kaHit,
402 int & kaQuery,
403 std::string & kaText) const;
404#else // SWIG Multiple return values
405 void getKeepAlive(KA_TASK & OUTPUT,
406 int & OUTPUT,
407 std::string & OUTPUT,
408 int & OUTPUT,
409 int & OUTPUT,
410 std::string & OUTPUT) const;
411#endif
412 // \internal Internal use only
413 bool outputKeepAlive(KA_TASK kaTask, int percentageComplete, const char * accession, int hit, int query) const;
414
416 ms_progress_info * getProgressInfo(bool forPeptideSummary = false) const;
417
419 virtual std::string getCacheDirectory(bool processed = true) const = 0;
420
422 virtual std::string getCacheFileName() const = 0;
423
425 std::string get_ms_mascotresults_params(const ms_mascotoptions & opts,
426 ms_mascotresults_params & params) const;
427
429 void setPercolatorFeatures(const char * percolatorFeatures,
430 const char * additionalFeatures,
431 const bool useRetentionTimes);
432
434 void setPercolatorFeatures(const ms_mascotoptions & options,
435 const char * additionalFeatures,
436 const std::vector<std::string> &adapterParameters = std::vector<std::string>());
437
439 std::vector<std::string> getPercolatorFileNames() const;
440
441#ifndef SWIG
443 virtual bool getSrcQueryAndFileIdForMultiFile(const int q, int & gsqNewQuery, int & gsqFileId) const = 0;
444#else // SWIG Multiple return values
445 virtual bool getSrcQueryAndFileIdForMultiFile(const int q, int & OUTPUT, int & OUTPUT) const = 0;
446#endif
448 virtual int getMultiFileQueryNumber(const int localQuery, const int fileId) const = 0;
449
451 std::string getEncodedPercolatorFeatures() const { return percolatorFeatures_; }
452
454 static bool staticGetPercolatorFileNames(const char * szFileName,
455 const char * cacheDirectory,
456 const char * percolatorFeatures,
457 const char * additionalFeatures,
458 const bool useRetentionTimes,
459 std::vector<std::string> & filenames,
460 std::vector<bool> & exists);
461
463 static bool staticGetPercolatorFileNames(const char * szFileName,
464 const char * cacheDirectory,
465 const ms_mascotoptions & options,
466 const char * additionalFeatures,
467 const std::vector<std::string> &adapterParameters,
468 std::vector<std::string> & filenames,
469 std::vector<bool> & exists);
470
471
472#ifndef SWIG
474 static bool willCreateCache(const char * szFileName,
475 const unsigned int flags,
476 const char * cacheDirectory,
477 std::string * cacheFileName);
478 // Can't / don't want to allow std::string * as OUTPUT in Java and C#
479 static bool willCreateCache(const char * szFileName,
480 const unsigned int flags,
481 const char * cacheDirectory,
482 std::string & cacheFileName) {
483 return (ms_mascotresfilebase::willCreateCache(szFileName, flags, cacheDirectory, &cacheFileName));
484 }
485
487 static bool willCreateCache(const char * szFileName,
488 const ms_mascotoptions & opts,
489 const char * applicationName,
490 std::string & resfileCacheFileName,
491 unsigned int & cacheStatus);
492
494 std::string get_ms_mascotresults_params(const ms_mascotoptions & opts,
495 unsigned int * gpFlags,
496 double * gpMinProbability,
497 int * gpMaxHitsToReport,
498 double * gpIgnoreIonsScoreBelow,
499 unsigned int * gpMinPepLenInPepSummary,
500 bool * gpUsePeptideSummary,
501 unsigned int * gpFlags2) const;
502
503#else // SWIG Multiple return values
504 static bool willCreateCache(const char * szFileName,
505 const unsigned int flags,
506 const char * cacheDirectory,
507 std::string & OUTPUT);
508
509 static bool willCreateCache(const char * szFileName,
510 const ms_mascotoptions & opts,
511 const char * applicationName,
512 std::string & OUTPUT,
513 unsigned int & OUTPUT);
514
515 std::string get_ms_mascotresults_params(const ms_mascotoptions & opts,
516 unsigned int * OUTPUT,
517 double * OUTPUT,
518 int * OUTPUT,
519 double * OUTPUT,
520 unsigned int * OUTPUT,
521 bool * OUTPUT,
522 unsigned int * OUTPUT) const;
523
524#endif
526 static RESFILE_TYPE resfileType(const std::string& fileName);
527
529 static std::unique_ptr<ms_mascotresfilebase> createResfile(const char * szFileName,
530 const int keepAliveInterval = 0,
531 const char * keepAliveText = "<!-- %d seconds -->\n",
533 const char * cacheDirectory = "../data/cache/%Y/%m",
534 const char * XMLschemaDirectory = 0,
535 matrix_science::ms_progress_info * progressMonitor = 0);
536
538 virtual bool hasEnzyme() const = 0;
539
541 virtual bool hasRT() const = 0;
542
544 virtual bool hasQuantitation() const = 0;
545
547 virtual ms_inputquery getInputQuery(const int queryNum) const = 0;
548
549
550
551#ifndef SWIG
553 virtual void getHeaderKeyValues(std::vector<std::string> & keys, std::vector<std::string> & values) const = 0;
554
556 virtual void getSearchParametersKeyValues(std::vector<std::string> & keys, std::vector<std::string> & values) const = 0;
557
559 virtual void getMassesKeyValues(std::vector<std::string> & keys, std::vector<double> & values) const = 0;
560#else // SWIG Multiple return values
561 virtual void getHeaderKeyValues(std::vector<std::string> & OUTPUT, std::vector<std::string> & OUTPUT) const = 0;
562
563 virtual void getSearchParametersKeyValues(std::vector<std::string> & OUTPUT, std::vector<std::string> & OUTPUT) const = 0;
564
565 virtual void getMassesKeyValues(std::vector<std::string> & OUTPUT, std::vector<double> & OUTPUT) const = 0;
566#endif
568 virtual std::string getHeaderValue(const std::string& key) const = 0;
569
571 virtual std::string getSearchParameter(const std::string& key) const = 0;
572
574 virtual double getMassValue(const std::string& key) const = 0;
575
577 virtual int getLibraryMods(std::vector<std::string> & modNames, std::vector<double> & modDeltas) const = 0;
578
580 virtual int64_t getQmatch(const int query, const ms_peptide::PSM_TYPE pepType) const = 0;
581
583 virtual double getQplughole(const int query, const ms_peptide::PSM_TYPE pepType) const = 0;
584
586 virtual double getFirstPassThreshold() const = 0;
587
588 protected:
589
590 void setError(int error, ...) const;
591 bool setErrorInfoFromString(const std::string & e);
592 std::string getErrorInfoAsString(const int num) const;
593 bool isErrorAlreadyPresent(const int errNum) const;
594
595 bool getPercolatorUseRetentionTimes() const { return percolatorUseRetentionTimes_; };
596
597 virtual void validateResfileVersion() = 0;
598
599 std::string diffResfiles(const ms_mascotresfilebase * resfile) const;
600 virtual bool getCrosslinking(ms_crosslinking_configfile *crosslinkingFile) const = 0;
601
602 void prepareKeepAlive(const char * keepAliveText, const bool resetStartTime);
603 virtual void propagateKeepAlive(const int keepAliveInterval,
604 const char * keepAliveText,
605 const bool propagateToAppended,
606 const bool resetStartTime) = 0;
607
608 virtual std::string getPepSumCacheFilename(
609 const unsigned int flags,
610 double minProbability,
611 int maxHitsToReport,
612 const char * unigeneIndexFile,
613 double ignoreIonsScoreBelow,
614 int minPepLenInPepSummary,
615 const char * singleHit,
616 const unsigned int flags2) const = 0;
617
618 virtual std::string getPepSumCacheFilename(const ms_mascotresults_params & parameters) const = 0;
619
620 // Equivalent to ms_mascotresfile_dat::getNumHits(const section sec=SEC_SUMMARY)
621 virtual int getNumHitsInProteinSummary(const ms_peptide::PSM_TYPE psmType) const = 0;
622
624 virtual bool willCreatePepSumCache(
625 const unsigned int flags,
626 double minProbability,
627 int maxHitsToReport,
628 const char * unigeneIndexFile,
629 double ignoreIonsScoreBelow,
630 int minPepLenInPepSummary,
631 const char * singleHit,
632 const unsigned int flags2) const = 0;
633
635 virtual bool willCreatePepSumCache(const ms_mascotresults_params &parameters) const = 0;
636
638 virtual bool willCreatePepSumCache(const ms_mascotresults_params & parameters,
639 const ms_mascotoptions & opts,
640 std::string & peptideSummaryCacheFileName,
641 unsigned int & cacheStatus) const = 0;
642
643 virtual void buildPeptideSummaryImpl(ms_peptidesummary & pepSum,
644 const ms_mascotresults_params & parameters,
645 std::shared_ptr<msparser_internal::ms_mascotresultsbase> & results,
646 std::shared_ptr<msparser_internal::ms_peptidesummarybase> & iPepSum
647 ) const = 0;
648
649 virtual void buildProteinSummaryImpl(ms_proteinsummary & protSum,
650 const ms_mascotresults_params & parameters,
651 std::shared_ptr<msparser_internal::ms_mascotresultsbase> & results,
652 std::shared_ptr<msparser_internal::ms_proteinsummarybase> & iProtSum
653 ) const = 0;
654
655 virtual std::shared_ptr<msparser_internal::ms_inputquerybase> buildInputQueryImpl(const int q) const = 0;
656
657 virtual std::shared_ptr<msparser_internal::ms_searchparamsbase> buildSearchParamsImpl() const = 0;
658
659
660 int numQueries_; // For multifile, this is the total of all queries for all files.
661 std::string fileName_;
662 unsigned int flags_;
663 std::string cacheDirectory_;
664 std::string percolatorFeatures_; // Encoded string
665 bool percolatorUseRetentionTimes_; // Already encoded in percolatorFeatures_ but here for convenience.
666 std::vector<std::string> percolatorFileNames_;
667 std::string version_;
668
669 std::unique_ptr<ms_searchparams> params_;
670 std::vector<std::string> xmlSchemaPath_;
671
672 int keepAliveInterval_;
673 std::string keepAliveTextStr_;
674 std::string keepAliveText_[KA_LAST];
675 time_t keepAliveStartTime_;
676 // Following are mutable so outputKeepAlive can be a const function
677 mutable KA_TASK keepAliveTask_;
678 mutable time_t lastKeepAliveTime_;
679 mutable int keepAlivePercentage_;
680 mutable std::string keepAliveAccession_;
681 mutable int keepAliveHit_;
682 mutable int keepAliveQuery_;
683
684 ms_progress_info * progressMonitor_;
685 mutable ms_progress_info * pepSummaryProgressMonitor_;
686
687
688
689 private:
691 static bool willCreateCacheDat(const char * szFileName,
692 const unsigned int flags,
693 const char * cacheDirectory,
694 std::string * cacheFileName);
695
697 static bool willCreateCacheDat(const char * szFileName,
698 const ms_mascotoptions & opts,
699 const char * applicationName,
700 std::string & resfileCacheFileName,
701 unsigned int & cacheStatus);
702
703 std::string getKeepAliveString(const double elapsedTime) const;
704
705 std::vector<int> getPMFqueriesUsed() const;
706
707 void cacheMonoLinkModifications() const;
708
709 mutable std::map< std::pair<int, int>, ms_modification > monoLinkCache_;
710 mutable bool monoLinksCached_;
711
712 }; // end of resfile_group
714} // matrix_science namespace
715#endif // MS_MASCOTRESFILE_HPP
716
717/*------------------------------- End of File -------------------------------*/
This class represents the file crosslinking.xml.
Definition: ms_crosslinking_configfile.hpp:49
Represents a method object in crosslinking.xml
Definition: ms_crosslinking_method.hpp:50
Reads and parses the enzymes file that contains multiple enzyme definitions.
Definition: ms_enzyme.hpp:194
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
All errors are collected in an instance of this class.
Definition: ms_errors.hpp:37
This class encapsulates the input queries (peak lists) in the Mascot results file.
Definition: ms_inputquery.hpp:43
An instance of this class represents all the parameters specified in the Options section of mascot....
Definition: ms_mascotoptions.hpp:91
DECOY_ALGORITHM
Definitions for how the decoy sequences are generated.
Definition: ms_mascotoptions.hpp:156
Abstract base class of ms_mascotresfile_dat and ms_mascotresfile_msr.
Definition: ms_mascotresfilebase.hpp:72
virtual int getExecTime() const =0
Returns the time taken for the search.
PERCOLATOR_FILE_NAMES
Offsets into a vector of Percolator filenames.
Definition: ms_mascotresfilebase.hpp:123
virtual std::string getFastaPath(int idx=1) const =0
Returns the path to the FASTA file used.
virtual bool hasRT() const =0
Return true if the results file contains retention time data.
virtual std::vector< int > getSLDatabaseNumbersOfReference(const int idx) const =0
Return the database numbers of the spectral libraries whose reference database is at the given index.
virtual bool anyFastaMatches(const bool isDecoy=false) const =0
Returns true if there are any FASTA matches.
virtual int getDate() const =0
Returns the date and time of the search in seconds since midnight January 1st 1970.
virtual int getNumberOfResfiles() const =0
Multiple results files can be summed together and treated as 'one'.
virtual double getNumResidues(const int idx=0) const =0
Returns the number of residues in the FASTA file(s) searched.
virtual int getNumSeqs(const int idx=0) const =0
Returns the number of sequences in the FASTA file(s) searched.
virtual std::string getHeaderValue(const std::string &key) const =0
Return the header value for the given key.
KA_TASK
Processing some results files is computationally intensive. These are the tasks that can be performed...
Definition: ms_mascotresfilebase.hpp:89
virtual bool anySpectralLibraryMatches(const bool isDecoy=false) const =0
Returns true if there are any Spectral Library matches.
XML_SCHEMA
The results file contains embedded files in XML format and these need to be validated against a schem...
Definition: ms_mascotresfilebase.hpp:133
virtual bool anyErrorTolerantMatches(const bool isDecoy=false) const =0
Returns true if there are any Error Tolerant matches.
virtual int getJobNumber(const int resfileID=1) const =0
Return the job number for this file - obtained from the file name.
virtual int getNumLibraryEntries(const int idx=0) const =0
Returns the number of entries in the spectral library searched.
virtual double getObservedIntensity(const int query) const =0
Returns the experimental intensity for the peptide.
virtual double getObservedMrValue(const int query, const bool decoy=false) const =0
Returns the experimental mass value (as a relative mass) as entered by the user.
virtual int getObservedCharge(const int query, const bool decoy=false) const =0
The 'charge' returned will be 0 for Mr, otherwise it will be 1, -1, 2, -2, 3, -3 etc....
virtual DATABASE_TYPE getDatabaseType(const int idx) const =0
Return database type if available.
virtual bool getEnzyme(ms_enzymefile *efile, const char *enzymeFileName=0) const =0
Returns an object that represents the embedded enzyme file as a reduced enzymes file.
virtual std::string getUniqueTaskID() const =0
Returns the unique task ID used by Mascot Daemon.
virtual int getNumSeqsAfterTax(const int idx=0) const =0
Returns the number of sequences that passed the taxonomy filter in the FASTA file(s) searched.
virtual ms_inputquery getInputQuery(const int queryNum) const =0
Return the ms_inputquery object for the query given as argument.
virtual bool getUnimodXL(ms_umod_configfile *ufile, bool useSchemaFromResfile=false) const =0
Returns an object that represents the embedded unimod_xl file as a reduced unimod_xl....
virtual int getLibraryMods(std::vector< std::string > &modNames, std::vector< double > &modDeltas) const =0
Return all the library mod names and deltas.
virtual bool isDatabaseTypeAvailable() const =0
Check whether database types are available.
virtual std::string getSLFragmentToleranceUnit(int idx=1) const =0
Returns the unit of the effective spectral library fragment tolerance.
virtual bool getQuantitation(ms_quant_configfile *qfile) const =0
Returns an object that represents the embedded quantitation file as a reduced quantitation....
virtual bool anyTag() const =0
Returns true if any of the queries in the search contain tag or etag commands.
virtual bool getCrosslinking(ms_crosslinking_configfile *crosslinkingFile) const =0
RESFILE_TYPE
Supported results file formats.
Definition: ms_mascotresfilebase.hpp:145
virtual bool hasEnzyme() const =0
Return true if the results file contains information about the enzyme used.
virtual bool anyMSMS() const =0
Returns true if any of the queries in the search contain ions data.
virtual int getNumEtSeqsSearched(const int idx=0) const =0
Returns the number of sequences searched in the second pass of an integrated error tolerant search.
virtual bool hasQuantitation() const =0
Return true if the results file contains quantitation data.
virtual bool isPMF() const =0
Returns true if the search was a PMF search (SEARCH=PMF).
virtual std::string getMascotVer() const =0
Returns the version of Mascot used to perform the search.
virtual bool isMSMS() const =0
Returns true if the search was an MSMS search (SEARCH=MIS).
virtual std::string getCacheFileName() const =0
Returns the filename of the cache file; see ms_mascotresfile_msr::getCacheFileName() and ms_mascotres...
virtual bool getUnimod(ms_umod_configfile *ufile, bool useSchemaFromResfile=false) const =0
Returns an object that represents the embedded unimod file as a reduced unimod_2.xml file.
virtual bool anyCrosslinkedMatches(const bool isDecoy=false) const =0
Returns true if there are any Crosslinked matches.
virtual int appendResfile(const char *filename, int flags=RESFILE_USE_PARENT_PARAMS, const char *cacheDirectory=0)=0
Multiple results files can be summed together and treated as 'one'.
virtual bool getTaxonomy(ms_taxonomyfile *tfile) const =0
Returns an object that represents the embedded taxonomy file as a reduced taxonomy file.
virtual double getMassValue(const std::string &key) const =0
Return the residue or modification mass for the given key.
virtual int getMultiFileQueryNumber(const int localQuery, const int fileId) const =0
Return the multi-file query number from the local query number in an appended file.
virtual double getFirstPassThreshold() const =0
Return the threshold value for the first pass of an automated error tolerant search.
virtual std::string getSLExecCommand(int idx=1) const =0
Returns the library search command line and parameters (sl_exec_command).
virtual const ms_mascotresfilebase * getResfile(int id) const =0
virtual double getQplughole(const int query, const ms_peptide::PSM_TYPE pepType) const =0
Return the threshold score for homologous peptide match (MIS only).
virtual bool isErrorTolerant() const =0
Returns true if the search was an error tolerant search.
virtual void getHeaderKeyValues(std::vector< std::string > &keys, std::vector< std::string > &values) const =0
Return all the header key-value pairs.
virtual std::string getSearchParameter(const std::string &key) const =0
Return the search parameter the given key.
virtual int64_t getQmatch(const int query, const ms_peptide::PSM_TYPE pepType) const =0
Return the number of peptide masses within precursor tolerance of this query.
virtual std::string getCacheDirectory(bool processed=true) const =0
Returns the directory being used for cache files (if any).
virtual double getObservedMass(const int query) const =0
Returns the experimental mass value as entered by the user.
virtual bool isSQ() const =0
Returns true if the search was a sequence query search (SEARCH=SQ).
virtual std::string getFastaVer(int idx=1) const =0
Returns the FASTA file version.
virtual bool anyPMF() const =0
Returns true if any of the queries in the search just contain a single peptide mass.
virtual int getReferenceDatabaseNumberOfSL(const int idx) const =0
Return the database number of the reference database of a spectral library.
virtual bool getSrcQueryAndFileIdForMultiFile(const int q, int &gsqNewQuery, int &gsqFileId) const =0
Return the query number and file ID in the source results file.
virtual void getMassesKeyValues(std::vector< std::string > &keys, std::vector< double > &values) const =0
Return all the residue and modification masses as key-value pairs.
virtual std::string getRepeatSearchString(const int query, const bool fullQuery=false) const =0
To perform a repeat search need to build up appropriate string.
virtual void getSearchParametersKeyValues(std::vector< std::string > &keys, std::vector< std::string > &values) const =0
Return all the search parameters as key-value pairs.
virtual ms_mascotoptions::DECOY_ALGORITHM getDecoyTypeForDB(const int idx=1) const =0
Returns the decoy algorithm type for a given database.
virtual double getSLFragmentTolerance(int idx=1) const =0
Returns the effective spectral library fragment tolerance.
virtual int getNumQueries(const int resfileID=0) const =0
Returns the number of queries (peptide masses or ms-ms spectra).
ms_searchparams & params() const
Returns a reference to the search parameters class.
Definition: ms_mascotresfilebase.hpp:358
virtual std::string getFileName(const int id=1) const =0
Returns the name of the results file passed into the constructor.
virtual bool anySQ() const =0
Returns true if any of the queries in the search contain seq or comp commands.
FLAGS
Flags for opening the results file.
Definition: ms_mascotresfilebase.hpp:107
@ RESFILE_NOFLAG
Dat28 format: Read the whole file into memory. MSR format: Use standard SQLite methods to read the fi...
Definition: ms_mascotresfilebase.hpp:109
Class which provides constructor parameters for either ms_peptidesummary or ms_proteinsummary.
Definition: ms_mascotresults_params.hpp:32
Reads and parses the masses file with residue and atom masses.
Definition: ms_masses.hpp:48
The class represents a single modification-entry in mod_file.
Definition: ms_modfile.hpp:134
PSM_TYPE
Specifies the search pass and origin of the peptide match.
Definition: ms_peptide.hpp:107
Use this class to get peptide summary results.
Definition: ms_peptidesummary.hpp:51
Contains information of the current progress of a task being performed.
Definition: ms_progress_info.hpp:40
Definition: ms_proteinsummary.hpp:45
Use this class in order to read/write quantitation.xml.
Definition: ms_quant_configfile.hpp:52
An object of this class represent a single quantitation method from quantitation.xml.
Definition: ms_quant_method.hpp:51
This class encapsulates the search parameters in the Mascot results file.
Definition: ms_searchparams.hpp:47
Use this class in order to read in a taxonomy file.
Definition: ms_taxonomyfile.hpp:145
This class represents the file unimod.xml.
Definition: ms_umod_configfile.hpp:54
DATABASE_TYPE
Definition: ms_databaseoptions.hpp:39