Mascot: The trusted reference standard for protein identification by mass spectrometry for 25 years

Posted by Richard Jacob (June 16, 2023)

Mascot Daemon Export Extender

Mascot Daemon has two features to help with automation and creating pipelines. The first is the AutoExport feature that allows you to configure and export a report into a CSV file, mzIdentML file or other format that Mascot Server supports with the options you choose. This happens once the search is complete. The lesser known but more powerful feature is the External Processes Dialog. It is the key to customization and post search automation.

Mascot Distiller autoexport
Figure 1. Mascot Daemon auto export feature

With the External Processes settings, you can call external scripts and programs at different time points: when starting a task, before starting a search, after the search is complete and after the task is complete. The only real limitation is that you can only call one external task, although as we will see here it is not a binding limitation. We recently used this feature with complementary ions generated by TMTpro labeling, where Daemon calls an external script to convert complementary ions into reporter ions in order to use them for quantitation.

We had a customer request recently to export Distiller quantitation reports automatically after the search and quantitation is completed. Mascot Distiller supports command-line operations for several functions including the quantitation reports. The command template to run a quantitation report is as follows:

<Full path to Distiller executable> <full path to project file> -batch -quantout <full path to output file> -quantreport <quant python report name> [additional report parameters]

For example, the table-peptides.py report in CSV format would be run like:

"C:\Program Files\Matrix Science\Mascot Distiller\MascotDistiller.exe" "C:\ProgramData\Matrix Science\Mascot Daemon\MGF\166 Test \f4c0612f0fac0df8___mydata.raw.-1.rov" -batch -quantout "C:\ProgramData\Matrix Science\Mascot Daemon\MGF\166 Test\ f4c0612f0fac0df8___mydata.raw.-1.rov.csv" -quantreport table-peptides.py -exportFormat CSV

Writing these commands manually is tedious and prone to typos, so we have written a helper script called Mascot Daemon eXport Extender (MDXE). When called at task completion, MDXE will process all the files in the batch and can create multiple reports in one call. We tried to build a bit more flexibility into the script so that it can call other command line programs as well.

Mascot Daemon prerequisites

The Mascot Daemon computer will need a copy of Perl installed. The best option at the time of writing is Strawberry Perl. If Mascot Daemon is installed on the same computer as Mascot Server 2.6 or later, this second copy of Perl will not conflict with the version Mascot Server uses. Download and install any recent version of Strawberry Perl, and make sure perl.exe is in the system path.

If Mascot Daemon is installed on the same computer as Mascot Server version 2.5 or earlier, then the computer already has Perl installed and you don’t need to install another copy.

MDXE.pl arguments

The command line options for MDXE.pl are as follows:

-i input directory
Data directory, Mascot Daemon tag “<task_directory>”
-c config filename
Path to config file
-l Enable logging
The optional logging mode records a log to the task directory. The script records the input and output files names along with the expanded command line for each file.

Additional instructions about running Distiller reports are in the MDXEconfig_factory_default.txt file shipped with MDXE.pl.

Using MDXE in Daemon

Download MDXE.zip, extract and save MDXE.pl and MDXEconfig_factory_default.txt to a directory on the Mascot Daemon computer. For example, C:\scripts.

Make a copy of MDXEconfig_factory_default.txt. Enable (uncomment) or disable (comment out) the commands for the Distiller reports you need. It’s best to have different configuration files for different users and workflows.

Set up a Mascot Daemon task, then set up an external process to run the script after completing task. The command line to use might look like:

perl "C:\scripts\MDXE.pl" -c "C:\scripts\My_MDXEconfig.txt" -i "<task_directory>" -l

Mascot Daemon External processes dialog
Figure 2. Mascot Daemon External processes dialog with example MDXE.pl command line.

Mascot Daemon can pass tags to programs running as an external process, and here we use the task directory tag <task_directory>. In order to keep the external process command line shorter and more manageable, we pass a configuration file to MDXE that contains all the information about which program to run and with what parameters. MDXE.pl looks in the <task_directory> directory for files that match the input tag (specified in the configuration file), then loops through the project files and runs the commands for each one. The configuration file includes the descriptions of the accepted tags and other usage information, along with example commands to export the different Mascot Distiller quantitation reports.

Keywords: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

HTML tags are not allowed.