NCBI C++ ToolKit
|
Search Toolkit Book for CSearchHelper
class to hold various helper functions for CSearch More...
#include "omssa.hpp"
(Private to src/algo/ms/omssa
.)
Public Types | |
typedef map< int, string > | TTaxNameMap |
read in taxonomy file More... | |
Static Public Member Functions | |
static void | SaveOneFile (CMSSearch &MySearch, const string Filename, ESerialDataFormat FileFormat, bool IncludeRequest, bool bz2) |
static int | ReadModFiles (const string &ModFileName, const string &UserModFileName, const string &Path, CRef< CMSModSpecSet > Modset) |
read in modification files. More... | |
static void | ReadTaxFile (string &Filename, TTaxNameMap &TaxNameMap) |
static void | ConditionXMLStream (CObjectOStreamXml *xml_out) |
correctly set up xml stream More... | |
static int | ReadFile (const string &Filename, const EMSSpectrumFileType FileType, CMSSearch &MySearch) |
Read in a spectrum file. More... | |
static int | LoadAnyFile (CMSSearch &MySearch, CConstRef< CMSInFile > InFile, bool *SearchEngineIterative=0) |
Read in any input file. More... | |
static int | ReadSearchRequest (const string &Filename, const ESerialDataFormat DataFormat, CMSSearch &MySearch) |
Read in an MSRequest. More... | |
static int | ReadCompleteSearch (const string &Filename, const ESerialDataFormat DataFormat, bool bz2, CMSSearch &MySearch) |
Read in a complete search (typically for an iterative search) More... | |
static int | SaveAnyFile (CMSSearch &MySearch, CMSSearchSettings::TOutfiles OutFiles, CRef< CMSModSpecSet > Modset) |
Write out a complete search. More... | |
static void | ValidateSearchSettings (CRef< CMSSearchSettings > &Settings) |
Validates Search Settings. More... | |
static void | CreateSearchSettings (string FileName, CRef< CMSSearchSettings > &Settings) |
create search setting object from file or brand new More... | |
typedef map<int, string> CSearchHelper::TTaxNameMap |
|
static |
correctly set up xml stream
xml_out | xml output stream |
Definition at line 135 of file omssa.cpp.
References CObjectOStreamXml::SetReferenceSchema(), and CObjectOStream::SetWriteNamedIntegersByValue().
Referenced by SaveOneFile().
|
static |
create search setting object from file or brand new
FileName | name of search settings file |
Settings | output |
Definition at line 379 of file omssa.cpp.
References ERR_POST, eSerial_Xml, Fatal(), ObjectInfo(), and CObjectIStream::Open().
Referenced by COMSSA::Run().
|
static |
Read in any input file.
InFile | type and name of file to be read in |
MySearch | the search i/o object |
SearchEngineIterative | set to true if this should be an iterative search |
Definition at line 224 of file omssa.cpp.
References eMSSpectrumFileType_asc, eMSSpectrumFileType_dta, eMSSpectrumFileType_dtablank, eMSSpectrumFileType_dtaxml, eMSSpectrumFileType_mgf, eMSSpectrumFileType_oms, eMSSpectrumFileType_omx, eMSSpectrumFileType_omxbz2, eMSSpectrumFileType_pkl, eMSSpectrumFileType_pks, eMSSpectrumFileType_sciex, eMSSpectrumFileType_unknown, eMSSpectrumFileType_xml, eSerial_AsnBinary, eSerial_Xml, ReadCompleteSearch(), ReadFile(), and ReadSearchRequest().
Referenced by COMSSA::Run().
|
static |
Read in a complete search (typically for an iterative search)
Filename | name of file |
Dataformat | xml or asn.1 |
bz2 | is the file bzip2 compressed? |
MySearch | the search |
Definition at line 193 of file omssa.cpp.
References ERR_POST, CCompressionStream::fOwnProcessor, in(), ObjectInfo(), CObjectIStream::Open(), and Warning().
Referenced by LoadAnyFile(), COMSSAMerge::Run(), and COmssa2pepxmlApplication::Run().
|
static |
Read in a spectrum file.
Filename | name of file |
FileType | type of file to be read in |
MySearch | the search |
Definition at line 147 of file omssa.cpp.
References ERR_POST, Fatal(), and CMSSearch_Base::SetRequest().
Referenced by LoadAnyFile().
|
static |
read in modification files.
probably should be in some helper class
ModFileName | mods.xml |
UserModFileName | usermods.xml |
Path | program path |
Modset | the data structure containing the mods |
bz2 | use bzip2 compression |
Definition at line 61 of file omssa.cpp.
References CMSModSpecSet::Append(), Critical(), ERR_POST, eSerial_Xml, Fatal(), CDirEntry::GetDir(), CDirEntry::IsAbsolutePath(), ObjectInfo(), CObjectIStream::Open(), Path(), and Warning().
Referenced by COMSSA::Run(), and COmssa2pepxmlApplication::Run().
|
static |
Read in an MSRequest.
Filename | name of file |
Dataformat | xml or asn.1 |
MySearch | the search |
Definition at line 169 of file omssa.cpp.
References ERR_POST, in(), ObjectInfo(), CObjectIStream::Open(), CMSSearch_Base::SetRequest(), and Warning().
Referenced by LoadAnyFile(), and COMSSA::Run().
|
static |
Definition at line 116 of file omssa.cpp.
References NStr::fSplit_Tokenize, NStr::Split(), and NStr::StringToInt().
|
static |
Write out a complete search.
Modset | modifications used in search |
OutFiles | list of output files |
MySearch | the search |
Definition at line 298 of file omssa.cpp.
References CPepXML::ConvertFromOMSSA(), eMSSerialDataFormat_asnbinary, eMSSerialDataFormat_asntext, eMSSerialDataFormat_csv, eMSSerialDataFormat_none, eMSSerialDataFormat_pepxml, eMSSerialDataFormat_xml, eMSSerialDataFormat_xmlbz2, ERR_POST, Error(), eSerial_AsnBinary, eSerial_AsnText, eSerial_Xml, CObjectOStream::Open(), SaveOneFile(), and CMSSearch_Base::SetResponse().
Referenced by COMSSA::Run().
|
static |
MySearch | |
iOutFile | |
Filename | |
FileFormat | |
txt_out |
Definition at line 265 of file omssa.cpp.
References ConditionXMLStream(), eSerial_Xml, CCompressionStream::fOwnProcessor, ObjectInfo(), CObjectOStream::Open(), and CMSSearch_Base::SetResponse().
Referenced by SaveAnyFile().
|
static |
Validates Search Settings.
Settings |
Definition at line 366 of file omssa.cpp.
References ERR_POST, Fatal(), CMSSearchSettings::Validate(), and Warning().
Referenced by COMSSA::Run().