Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
MascotRemoteQuery Class Reference

Class which handles the communication between OpenMS and the Mascot server. More...

#include <OpenMS/FORMAT/MascotRemoteQuery.h>

Inheritance diagram for MascotRemoteQuery:
QObject DefaultParamHandler

Public Slots

void run ()
 

Signals

void done ()
 
void gotRedirect (const QHttpResponseHeader &resp)
 

Public Member Functions

void setQuerySpectra (const String &exp)
 sets the query spectra, given in MGF file format More...
 
const QByteArray & getMascotXMLResponse () const
 returns the Mascot XML response which contains the identifications More...
 
bool hasError () const
 predicate which returns true if an error occurred during the query More...
 
const StringgetErrorMessage () const
 returns the error message, if hasError can be used to check whether an error has occurred More...
 
Constructors and destructors
 MascotRemoteQuery (QObject *parent=0)
 default constructor More...
 
virtual ~MascotRemoteQuery ()
 destructor More...
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
virtual DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 

Protected Member Functions

virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Private Slots

void timedOut ()
 
void readyReadSlot (const QHttpResponseHeader &resp)
 
void httpRequestFinished (int request_id, bool error)
 
void httpDataReadProgress (int bytes_read, int bytes_total)
 slot connected to signal dataReadProgress of QHttp More...
 
void httpDataSendProgress (int bytes_sent, int bytes_total)
 slot connected to signal dataSendProgress of QHttp More...
 
void httpRequestStarted (int request_id)
 slot connected to signal requestStarted of QHttp, which indicates that the processing of request request_id has been started More...
 
void httpStateChanged (int state)
 
void httpDone (bool error)
 slot connected to signal done of QHttp More...
 
void readResponseHeader (const QHttpResponseHeader &response_header)
 slot connect to responseHeaderRecieved, which indicates that a new response header is available More...
 
void login ()
 
void execQuery ()
 
void getResults (QString results_path)
 
void followRedirect (const QHttpResponseHeader &resp)
 

Private Member Functions

MascotRemoteQueryoperator= (const MascotRemoteQuery &rhs)
 assignment operator More...
 
 MascotRemoteQuery (const MascotRemoteQuery &rhs)
 copy constructor More...
 
void endRun_ ()
 
void logHeader_ (const QHttpHeader &header, const String &what)
 Write HTTP header to error stream (for debugging) More...
 
void removeHostName_ (QString &url)
 Remove host name information from an url, e.g., "http://www.google.de/search" -> "search". More...
 

Private Attributes

String query_spectra_
 
QByteArray mascot_xml_
 
QHttp * http_
 
QString cookie_
 
String error_message_
 
QTimer timeout_
 
Int to_
 
String server_path_
 Path on mascot server. More...
 
String host_name_
 Hostname of the mascot server. More...
 
bool requires_login_
 Login required. More...
 
bool use_ssl_
 Use SSL connection. More...
 
String boundary_
 boundary string that will be embedded into the HTTP requests More...
 

Additional Inherited Members

- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 

Detailed Description

Class which handles the communication between OpenMS and the Mascot server.

This class provides a communication interface which is able to query the Mascot server and reports the identifications provided be the Mascot server

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
hostname string  Address of the host where Mascot listens, e.g. 'mascot-server' or '127.0.0.1'
host_port int80 min: 0Port where the Mascot server listens, 80 should be a good guess
server_path stringmascot  Path on the server where Mascot server listens, 'mascot' should be a good guess
timeout int1500 min: 0Timeout in seconds, after which the query is declared as failed.This is NOT the whole time the search takes, but the time in between two progress steps. Some Mascot servers freeze during this (unstable network etc) and idle forever, the connection is killed. Set this to 0 to disable timeout!
boundary stringGZWgAaYKjHFeUaLOLEIOMq  Boundary for the MIME section
use_proxy stringfalse true, falseFlag which enables the proxy usage for the http requests, please specify at least 'proxy_host' and 'proxy_port'
proxy_host string  Host where the proxy server runs on
proxy_port int0 min: 0Port where the proxy server listens
proxy_username string  Login name for the proxy server, if needed
proxy_password string  Login password for the proxy server, if needed
login stringfalse true, falseFlag which should be set 'true' if Mascot security is enabled; also set 'username' and 'password' then.
username string  Name of the user if login is used (Mascot security must be enabled!)
password string  Password of the user if login is used (Mascot security must be enabled!)
use_ssl stringfalse true, falseFlag indicating wether the server uses https or not.
export_params string_sigthreshold=0.99&_showsubsets=1&show_same_sets=1&report=0&percolate=0&query_master=0  Adjustable export parameters (passed to Mascot's 'export_dat_2.pl' script). Generally only parameters that control which hits to export are safe to adjust/add. Many settings that govern what types of information to include are required by OpenMS and cannot be changed. Note that setting 'query_master' to 1 may lead to incorrect protein references for peptides.

Note:

Constructor & Destructor Documentation

MascotRemoteQuery ( QObject parent = 0)

default constructor

virtual ~MascotRemoteQuery ( )
virtual

destructor

MascotRemoteQuery ( const MascotRemoteQuery rhs)
private

copy constructor

Member Function Documentation

void done ( )
signal
void endRun_ ( )
private
void execQuery ( )
privateslot
void followRedirect ( const QHttpResponseHeader &  resp)
privateslot
const String& getErrorMessage ( ) const

returns the error message, if hasError can be used to check whether an error has occurred

const QByteArray& getMascotXMLResponse ( ) const

returns the Mascot XML response which contains the identifications

void getResults ( QString  results_path)
privateslot
void gotRedirect ( const QHttpResponseHeader &  resp)
signal
bool hasError ( ) const

predicate which returns true if an error occurred during the query

void httpDataReadProgress ( int  bytes_read,
int  bytes_total 
)
privateslot

slot connected to signal dataReadProgress of QHttp

void httpDataSendProgress ( int  bytes_sent,
int  bytes_total 
)
privateslot

slot connected to signal dataSendProgress of QHttp

void httpDone ( bool  error)
privateslot

slot connected to signal done of QHttp

void httpRequestFinished ( int  request_id,
bool  error 
)
privateslot

slot connected to signal requestFinished of QHttp: "This signal is emitted when processing the request identified by id has finished. error is true if an error occurred during the processing; otherwise error is false"

void httpRequestStarted ( int  request_id)
privateslot

slot connected to signal requestStarted of QHttp, which indicates that the processing of request request_id has been started

void httpStateChanged ( int  state)
privateslot

slot connected to signal stateChanged of QHttp, which is emitted if the http state changed. See 'enum QHttp::State' of Qt docu for more info.

void logHeader_ ( const QHttpHeader &  header,
const String what 
)
private

Write HTTP header to error stream (for debugging)

void login ( )
privateslot
MascotRemoteQuery& operator= ( const MascotRemoteQuery rhs)
private

assignment operator

void readResponseHeader ( const QHttpResponseHeader &  response_header)
privateslot

slot connect to responseHeaderRecieved, which indicates that a new response header is available

void readyReadSlot ( const QHttpResponseHeader &  resp)
privateslot
void removeHostName_ ( QString &  url)
private

Remove host name information from an url, e.g., "http://www.google.de/search" -> "search".

Parameters
Theurl that will be manipulated.
void run ( )
slot
void setQuerySpectra ( const String exp)

sets the query spectra, given in MGF file format

void timedOut ( )
privateslot
virtual void updateMembers_ ( )
protectedvirtual

This method is used to update extra member variables at the end of the setParameters() method.

Also call it at the end of the derived classes' copy constructor and assignment operator.

The default implementation is empty.

Reimplemented from DefaultParamHandler.

Member Data Documentation

String boundary_
private

boundary string that will be embedded into the HTTP requests

QString cookie_
private
String error_message_
private
String host_name_
private

Hostname of the mascot server.

QHttp* http_
private
QByteArray mascot_xml_
private
String query_spectra_
private
bool requires_login_
private

Login required.

String server_path_
private

Path on mascot server.

QTimer timeout_
private
Int to_
private
bool use_ssl_
private

Use SSL connection.


OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 16:18:46 using doxygen 1.8.5