BiblioSpec input and output file formats


BiblioSpec makes use of several file formats for input and output. Below are descriptions of these along with links to additional information.

Database search result files

In most cases libraries are built from database search result files. Supported formats are listed on the BlibBuild page

BlibBuild .ssl file

For peptide or small molecule identifications that do not come from one of the supported database searches, BiblioSpec supports a generic tab-delimited text file format refered to as ssl (spectrum sequence list). Here is a small example file. An ssl file must have a header line with the following column names in it (the score-type, score, and retention-time columns are optional):

file       scan    charge  sequence        score-type      score   retention-time

additional columns for small molecule use may be included (the sequence column should be omitted for small molecule libraries - here is a small example file):

adduct     chemicalformula moleculename    inchikey        otherkeys

Each of the following lines contains information for one spectrum. The first column contains a full or relative path to a file containing the spectrum. The second column has an id for that spectrum, typically a scan number or index number. The third column is the charge state of the spectrum. The fourth column contains the peptide sequence, with the addition of any modifications given as a mass shift (the difference between the modified and unmodified residue) following the modified residues. For example,


Peptides with n-terminal modifications should have these mass shift follow the first residue.

The score-type column can be any of the following:
















and the score column is a floating point value representing the spectrum's score of that type. The retention time column can be used to specify retention times in minutes; otherwise the values from the spectrum file will be used. Scores fall into three categories: probability that identification is correct, probability that identification is incorrect, or not a probability score. This information can be found in the ScoreTypes table.

Library files

BiblioSpec library files are in the sqlite3 format, usually with a ".blib" filename extension. Each library is a small database that you can search and manipulate with standard SQL commands using, for example, the sqlite3 command line tools or SQLite Expert Personal.

BiblioSpec does not require that you know any SQL, but should you be interested in using these files outside of the BiblioSpec context the sqlite3 commands for building an empty library file with fully annotated tables are available here.

The libraries consist of these tables: LibInfo, Modifications, RefSpectra, RefSpectraPeaks, RefSpectraPeakAnnotations, SpectrumSourceFiles, ScoreTypes, and IonMobilityTypes.

Library as text

BlibToMs2 allows you to view the spectra in your library in the .ms2 text format. This format is recongnized by proteowizard's msconvert and can be converted into other formats such as .mzXML.

In an .ms2 file there are four types of lines. Lines beginning with 'H' are header lines and contain information about how the data was collected as well as comments. They appear at the beginning of the file. Lines beginning with 'S' are followed by the scan number and the precursor m/z. Lines beginning with 'Z' give the charge state followed by the mass of the ion at that charge state. Lines beginning with 'D' contain information relevant to the preceeding charge state. BlibToMs2's output will include D-lines with the sequence and modified sequence. The file is arranged with these S, Z and D lines for one spectrum followed by a peak list: a pair of values giving each peaks m/z and intensity. Here is an example file

Report files

BlibSearch writes results to a tab-delimited text file refered to as the report file. The header (lines beginning with '#') contains details of the search parameters. Next is a line naming each of the fields. Subsequent rows summarize one query-library match. The fields are as follows:

  • Query The identifier for the query spectrum.
  • LibId The number of the library with the match. The header lines will list all libraries being searched and assign each a number referenced in this column.
  • LibSpec The identifier for the library spectrum.
  • rank The rank of the match for this query spectrum. By default, ranks 1-5 are printed. In case of a tie (two matches with the same score) both matches will be given the same rank.
  • dotp The score given to this match (a dot product). Ranges from 0 (poor match) to 1 (two identical spectra).
  • query-mz The precursor m/z of the query spectrum.
  • query-z The charge of the query spectrum. If there was more than one in the spectrum file, they will be listed separated by comas.
  • lib-mz The precursor m/z of the library spectrum.
  • lib-z The charge of the library spectrum.
  • copies The number of spectra in the redundant library for this same sequence and charge state.
  • candidates The number of library spectra the query was compared to.
  • sequence The peptide sequence of the library spectrum.

Parameter files

All BibliSpec tools (with the exception of BlibBuild and LibToSqlite3) will accept a parameter file in which additional options can be specified. See each tool's documentation page for the specific options allowed. The file should contain one option per line with the full option name and value separated by an equals sign (=). Here is an example parameter file.