multiplierz.mzSearch - BlaisProteomics/multiplierz GitHub Wiki
mzSearch allows programmatic access to three popular database search engines for peptide identification; Mascot, Comet, and X! Tandem. The search interface allows the use of saved parameter files for each search engine, as well as in-program modification of parameters. All search results are converted to tabular data, able to be manipulated by mzReport or further annotated/processed by routines such as Pep2Gene or FDR analysis.
Configuration
Before you can use mzSearch, you must edit the Multiplierz settings to indicate the location of the server (in the case of Mascot) or executable (in the case of Comet or Tandem) to use. The settings file is located at C:\Users\<Your Username>\.multiplierz\settings.txt. If you have mzDesktop installed, the same settings can be changed in the Preferences menu.
Search Instances
All three engines are accessed through search objects, which store parameter data and which can trigger search runs:
multiplierz.mzSearch.MascotSearch
multiplierz.mzSearch.CometSearch
multiplierz.mzSearch.TandemSearch
A simple example of use, using the MascotSearch interface (CometSearch and TandemSearch work identically):
from multiplierz.mzSearch import MascotSearch
searcher = MascotSearch('C:\Path\To\Parameter\File')
psm_report = searcher.run_search('C:\Path\To\Data\File')
psm_report is now the path of an automatically generated tabular data file (usually an Excel-format file) containing the Peptide Spectral Matches (PSMs) found by the Mascot search. Also note that Mascot in particular has a security feature, which if enabled requires that a valid username and password be submitted with the call to .run_search():
psm_report = searcher.run_search('C:\Path\To\Data\File', username = 'Bob', password = 'very_secure_passw0rd')
Search parameters are accessible and settable through lookup syntax, and changes to parameter files can be written back to disk. The title of a given parameter is typically the name of the parameter in the source parameter format, e.g.;
searcher = CometSearch('C:\Path\To\Parameter\File.xml') # Comet-format parameter file.
tolerance_value = searcher['fragment_bin_tol']
searcher['minimum_peaks'] = 20
searcher.write('C:\Path\To\Updated\Parameter\File.xml')
Documentation on the Comet and X! Tandem parameter file formats can be found on their respective websites. For Mascot searches, a Multiplierz parameter file form is used.
Mascot Parameter Files
The Mascot parameter file format is a simple representation of the same data submitted by the Mascot web search submission form. Multiplierz uses several additional arguments beyond the standard Mascot Daemon format. See example_mascot_parameters.par for an example. Parameter files can be generated by opening the Mascot Search tool in mzDesktop (Tools->Mascot Search) and selecting File->Save Parameters in the menu bar. Notes on some of the parameters:
mascot_server : The remote Mascot server to send search requests to (or localhost, if submitting searches from the same computer on which Mascot is installed.) This will be the same address as provides the Mascot server homepage via a webbrowser.
USEREMAIL and USERNAME : Identifiers associated with the search (so that, e.g., your colleagues can track you down and complain that you're monopolizing server time...). This is not the same as the username for Mascot security.
DB : Database(s) to search. Note that multiple-database search is only available on Mascot versions 2.3 and later.
CLE : Cleavage enzyme, as written in the Mascot enzymes settings list.
TOL and TOLU : Tolerance and tolerance units for precursor peak identification.
ITOL and ITOLU : Tolerance and tolerance units for fragment peak identification.