Export search results

This utility enables Mascot search results to be exported in a variety of "machine readable" formats. When used interactively, the file format is chosen and customised using a web browser form, displayed by choosing Export Search Results in the format controls of a results report and pressing Format As. In addition, the utility can be executed by scripts, with the options specified on the command line.

Custom XML and CSV

The information contained in these two formats is identical. XML is ideal for importing into a relational database. CSV can be opened in spreadsheets such as Microsoft Excel.

For a Peptide Mass Fingerprint, the result information is structured in a very similar way to a Concise Protein Summary report. For search results that include MS/MS data, you can choose whether to structure the protein list and associated peptide matches in a similar way to a Peptide Summary report or a Protein Family report. To create an export that contains information equivalent to a particular Mascot HTML report, the settings of the format controls must match, plus:

Type of search HTML Report Threshold type Protein Scoring Same-sets Sub-sets Group proteins
PMF Concise Protein Summary N/A N/A checked 1 N/A
MS/MS Peptide Summary Identity As format controls checked As format controls not checked
MS/MS Protein Family Report Homology MudPIT checked 1 checked

Precise details for individual data items, such as the data type and whether it is optional, can be found in the XML schema. The schema introduced with Mascot 2.1 is mascot_search_results_1.xsd, (documentation). The need to add additional data structures for Mascot 2.2, including quantitation results, would have broken this schema, so a new schema has been created: mascot_search_results_2.xsd, (documentation). For general XML Schema considerations, see the section further down this page. Documentation was auto-generated using xs3p.

The CSV file contains identical data, organised for display as a spreadsheet. The column headers of tables are the same as the XML element names, but the row headers are plain text words and phrases. (If you need to change the delimiter to something other than a comma, edit export_dat_2.pl and change the value of $delimiter, near the top of the script.)

There are no column headers for quantitation information exported in CSV format. For the peptide level quantitation information, labels precede values, in-row. Protein level information follows, in-row, after the last peptide match of each hit. For each protein ratio, there are four values following each ratio label: protein ratio, number of peptide ratios used, SD(geo) for the peptide ratios, and an asterisk if the protein ratio is significantly different from unity. If the distribution is not normal, SD(geo) is in square brackets.

Protein quantitation information is only available if peptide quantitation has been selected. In addition to the peptide ratios displayed in the HTML report, the export also includes the intensity values for each component. These values are post-normalisation and post-isotope correction.

Usage

For interactive use, the controls are divided into blocks, with the first block corresponding to the format controls of a results report.

The Optional Search Information block controls which ancillary information is exported. Most of the options are self-explanatory.

The data items in the Header section are

  • Search title
  • Timestamp (W3C Date and Time format, e.g. 2005-03-12T08:29:11Z)
  • User
  • Email
  • Report URI (URL or relative path, if executed at command line)
  • MS data path or URL
  • Search type
  • Mascot version
  • Database
  • Fasta file
  • Total sequences
  • Total residues
  • Sequences after taxonomy filter
  • Number of entries searched in error tolerant mode (if applicable)
  • Number of queries
  • Warnings messages from the search (as required)

According to the type of search, the Header section may be followed by:

  • Decoy search summary statistics
  • Fixed modifications
  • Variable modifications
  • Search parameters
  • Format parameters
  • Quantitation normalisation factors

For speed and efficiency, leave the checkboxes marked with asterisks under Optional Protein Hit Information unchecked. (See Optional Protein Hit Information for further information on the use of these checkboxes).

pepXML

pepXML is the interchange format for database search results used in the Institute for Systems Biology Trans-Proteomic Pipeline.

The pepXML format is only applicable to MS/MS search results, and represents "raw" peptide match data. Information is exported for all matches to all queries, (MS/MS spectra). For each match, extensive information is provided for the first protein in which the peptide is found and more limited information for all the other proteins. This can make the output file very large.

Precise details for individual data items, such as the data type and whether it is optional, can be found in the XML schema. Schema documentation has been generated by xs3p. For general XML Schema considerations, see the section further down this page.

Usage

For speed and efficiency, leave all the checkboxes under Optional Protein Hit Information unchecked. (See Optional Protein Hit Information for further information on the use of these checkboxes).

Limitations

  • Where elements and attributes are required by the schema, but the data is not available from Mascot, zero length strings are output. For example, the base_name, raw_data_type and raw_data attributes of an msms_run_summary element.
  • The schema includes extensive information for the first protein in which a peptide match is found, even though this may not be the preferred or final assignment.
  • The amino acid residues that bracket a peptide are only available if the result file is from Mascot 2.1 or later.
  • The num_matched_ions attribute of the search_hit element is the number of mass values used to score the match, not the total number of mass values that could be matched to all the calculated ion series.
  • In a search_result element, the start_scan and end_scan attributes are always set to 0.
  • modification_info elements are only exported for variable modifications, not for fixed.

mzIdentML

mzIdentML is the data exchange standard for database search results developed by the PSI Proteomics Informatics Standards Group. Originally, it was to be called analysisXML.

Precise details for individual data items, such as the data type and whether it is optional, can be found in the XML schema. Schema documentation is also available. For general XML Schema considerations, see the section further down this page.

A semantic validator for mzIdentML documents was developed by Andreas Bertsch as part of the OpenMS project. It is currently unavailable, but check this page for alternatives.

Usage

For speed and efficiency, leave all the checkboxes under Optional Protein Hit Information unchecked. (See Optional Protein Hit Information for further information on the use of these checkboxes).

Under Query Level Information, check Matched Fragment Ions to output tables of matching experimental and calculated m/z values for each peptide match. This is obviously time consuming and causes a substantial increase in the size of the output file. Check Export data for all Queries to output details for every MS/MS spectrum, including those that got no match to an exported protein and those that got no match at all. Again, this is time consuming and causes a substantial increase in the size of the output file.

mzTab

mzTab is a simple tab-delimited format for database search results developed by the PSI Proteomics Informatics Standards Group. Precise details for individual data items, such as the data type and whether it is optional, can be found in the specification document.

Usage

For speed and efficiency, leave starred checkboxes under Protein Hit Information unchecked.

DTASelect

DTASelect is an application that was written by David L. Tabb at The Scripps Research Institute. Originally intended for analysing Sequest results, it groups peptide matches into proteins and allows a variety of filters to be applied. Although DTASelect includes built-in support for Mascot result files, the information in the result file is not fully utilised and the interface is prone to break with new Mascot releases. Choosing DTASelect in this export utility creates a DTASelect intermediate file, DTASelect.txt, containing a more complete picture of the search results. This intermediate file is then read by DTASelect to create filtered reports.

The output file is compatible with DTASelect 1.9 only. DTASelect format is only applicable to MS/MS search results.

Usage

For speed and efficiency, it is advisable to choose MudPit scoring, an ions score cut-off of 10, and leave all the checkboxes under Optional Protein Hit Information unchecked. (See Optional Protein Hit Information for further information on the use of these checkboxes). Save the exported file to a directory, make this the current directory, and execute DTASelect.

The DTASelect spectrum filters, which can be supplied on the command line or taken from DTASelect.params, should include the following changes to the defaults:

–Mascot
to set Mascot mode
-1 10.0
to set the minimum ions score for 1+ peptides to 10
-2 10.0
to set the minimum ions score for 2+ peptides to 10
-3 10.0
to set the minimum ions score for 3+ peptides to 10
-d 20
to set the minimum for (1 / expectation value) to 20
-p 1
to set the distinct peptide threshold to 1
–mw 100.0
to set the minimum protein mass to 100

In a DTASelect report of Mascot results, the following columns are different from those in a DTASelect report of Sequest results:

Filename
Mascot result filename, query number and precursor charge, separated by periods
IonsScore
Mascot ions score
Signif
1 / expectation value
SpR
Peptide match rank, between 1 (highest) and 10 (lowest)
SpScore
Identity threshold score

Limitations

  • The output file is compatible with DTASelect 1.9 only
  • Hyperlinks to Sequest utilities will not work
  • The number of tryptic termini for a peptide is not available
  • The amino acid residues that bracket a peptide are only available if the result file is from Mascot 2.1 or later. For result files from earlier versions, question marks are displayed
  • DTASelect reports do not display variable terminus modifications

Mascot DAT File

A convenient way to download a copy of the "raw" Mascot result file. For security reasons, this will only succeed for result files in the daily directories under the Mascot data directory.

MGF Peak List

A convenient way to extract the peak list from a search result file. May be useful when you export an mzIdentML file, because the mzIdentML schema does not support inclusion of the peak list.

Optional Protein Hit Information

Only a limited amount of information about a protein hit is saved to a Mascot result file. For example, the protein sequence is not saved because this would make the result files unacceptably large. When missing information is required for a Mascot report, it has to be retrieved from the compressed database files.

Even though a single call for missing information may take only a fraction of a second, and is not noticeable when loading a Mascot report, this can become a problem if creating an export file requires thousands of calls. It is important to be aware of this, and not waste time retrieving information that is not actually required. This is a particular issue for an export format that represents "raw" result information, like pepXML. A list of all the proteins that contain all the peptides that had any matches to any of the spectra can be an extremely long list.

Description

The Fasta description line is saved for all peptide mass fingerprint protein hits. For an MS/MS search, Mascot tries to guess which protein hits will appear in the reports and saves their Fasta description lines to the result file. However, the actual hit list depends on many factors, and some hits may be missed, requiring the descriptions to be retrieved from the compressed database files.

Protein Mass

The protein mass is saved for all peptide mass fingerprint protein hits. For an MS/MS search, Mascot tries to guess which protein hits will appear in the reports and saves their masses to the result file. However, the actual hit list depends on many factors, and some hits may be missed, requiring the masses to be retrieved from the compressed database files.

On the Matrix Science public web site, the description and mass of a protein can only be exported if this information was saved to the result file. The following protein hit information options are not available on the public web site, and attempting to use them will have no effect.

Percent coverage

Percent coverage is never saved to the result file. It is calculated on the fly from the length and the set of peptides assigned to the protein.

Length in residues

Length in residues is never saved to the result file. It must be retrieved from the compressed database files.

pI

pI is never saved to the result file. The protein sequence must be retrieved from the compressed database files and the pI value calculated.

Taxonomy

Taxonomy is never saved to the result file. It must be retrieved from the compressed database files.

Taxonomy ID

Taxonomy ID is never saved to the result file. It must be retrieved from the compressed database files.

Protein sequence

The entire protein sequence is never saved to the result file. It must be retrieved from the compressed database files.

Command Line Execution

Result file conversion can be automated by using the export script as a command line utility. It must be executed in the cgi directory on a Mascot server. The command line arguments are URL-style name=value pairs, for example

export_dat_2.pl file=../data/20120223/F004651.dat do_export=1 export_format=CSV … other arguments … pep_scan_title=1 > ../data/20120223/F004651.csv

 

The Mascot 2.1 script, which exports a customisable XML file conforming to mascot_search_results_1.xsd, is called export_dat.pl. For backward compatibility, this script is still installed with later versions of Mascot, but functionality is frozen. The current script, export_dat_2.pl, creates a customisable XML file conforming to mascot_search_results_2.xsd. This script is the one selected when you choose Export search results from a Mascot result report, and should be used by any new applications.

To obtain the command-line arguments for a given output, use the form based interface to adjust the settings then choose "Show command line arguments". The command line can then be copied and pasted as required. To direct the output to a file, add a > symbol followed by the path to the output file, as in the example above.

Note that, if Mascot security is enabled, the arguments will include a security session ID, e.g. sessionid=billy_299425468615895. You don’t need to provide a session ID for command line operations, so best to drop this argument in case it becomes invalid before you try to use it.

The script should never output the HTML for the interactive download button when called from the command line, but this can happen if it is called from a CGI script. If this is a problem, add the argument generate_file=1.

Required Arguments

do_export
must be 1 to export results
export_format
XML or CSV or pepXML or DTASelect or MascotDAT or mzIdentML or MGF
file
relative or absolute path to result file

XML Schema

Versioning

The Mascot Search Results XML schema uses versioning to avoid applications breaking when the schema is updated. The schema definition is identified by a major version number and a minor version number.

When a change is made to the schema, and any instance document that was valid against the previous schema could become invalid, the major version number will be incremented. An example of such a change would be that a new type or element is added to the schema that is not optional. If a change is made to a schema that cannot break the validity of any existing document, such as adding a new type or element that is optional, then the minor version will be incremented.

There will be a separate schema file and name space for each major version and the file name contains the major version number. The schema also includes the major and minor version numbers as attributes of the top level element. An application that parses an instance document should compare the major and minor version attribute values against those which it was coded to support. It should not rely on an XML parser to verify the version numbers against the schema encoded restrictions, since the schema definition file used by the parser may be newer than when the application was written.

Validation

The instance documents created by this export utility have been validated against the corresponding schema definitions using XMLSpy. The following web tools can also be used:

No complex software is ever completely free of bugs. If you find an XML file created by the Export Search Results utility that fails to validate against the corresponding schema definition, please email full details to support@matrixscience.com and we will try to fix the problem as rapidly as possible.

On the other hand, if the XML file validates, but an error is reported by the application reading the file, then this is a bug in the application. In the first instance, please report this to the authors of the application.

Useful Resources

Standards and design:

Programming: