Library Match - Forcing spectrum selection

Library Match - Forcing spectrum selection r smith  2022-02-21


We are currently analysing some PRM runs in Skyline and we are including many DDA MS runs to expand our spectral library to increase coverage on our peptides of interest. Where there are multiple spectrum matches for a given peptide, is it possible to force Skyline to use a particular spectrum to match ions to - particularly in the context of analysing fragment ions in the XIC view?

In relation to this, how does Skyline decide which spectrum to use? Is it based on ID score?

Many thanks
Ryan Smith

Nick Shulman responded:  2022-02-21
When you are creating a spectral library from peptide search results, a program called "BlibFilter" is responsible for deciding which spectrum is the "best" spectrum to be included in the final non-redundant library. BlibFilter uses a dot product to find the most representative spectrum. There is a little bit of a description of that on this page:

Kaipo responded:  2022-02-21
As Nick mentioned, BlibFilter chooses the best spectrum for the non-redundant library. However, Skyline runs BlibFilter with an option that takes the spectrum with the highest score assigned by the search engine (rather than computing dot products). If multiple spectra tie, the one with the highest TIC is used.
r smith responded:  2022-02-22
Thanks for the responses. So does Skyline run BlibFilter with that option enable by default? In that case the selected spectra are actually selected entirely on identification score, not dot product?

Does BlibFilter take into account spectra across multiple runs? So that it is matching fragment ions (and displaying them in the chromatogram viewer) to the "best" of the spectra across all the identification files (in our case Mascot DAT) loaded into this Skyline project? Or are the fragment ions displayed in the chromatogram view always being matched to in-silico spectra?

Nick Shulman responded:  2022-02-22
Yes, Skyline always runs BlibFilter.exe with the "-b true" flag which tells BlibFilter to use the best scoring peaks.

I am not sure I understand your question.

When you create a spectral library in Skyline, the first thing that happens is that a program called "BlibBuild.exe" creates a file whose name ends in ".redundant.blib". That file contains all of the spectra from all of your runs.
The next thing that happens is that "BlibFilter.exe" looks at the ".redundant.blib" file and creates a smaller file whose name just ends in ".blib".
In the end, you might end up with a file called "MyLibrary.redundant.blib" and "MyLibrary.blib".

The only thing that BlibFilter.exe looks at when it is doing its job is that "MyLibrary.redundant.blib" file.

"MyLibrary.redundant.blib" is called the "redundant library", and it contains spectra from all of the runs.
"MyLibrary.blib" is called the "non-redundant library" and it contains only one spectrum for any particular peptide sequence and charge state.

If you create a spectral library in Skyline by going to "Settings > Peptide Settings > Library > Build", then there is a checkbox "keep redundant library". If you uncheck that, then Skyline will delete the ".redundant.blib" file after BlibFilter.exe has done its work. If you leave that checkbox checked, then the .redundant.blib file will still be there.
If you create a spectral library by doing "File > Import > Peptide Search", there is no checkbox for keeping the redundant library, and I believe Skyline always keeps it.

When Skyline is choosing which transitions to add to your document, or calculating the library dot product, Skyline looks at the one spectrum in the non-redundant library.
If Skyline sees that there is a redundant library in the same folder as the non-redundant library, Skyline adds a dropdown to the top of the Library Match window which allows you to look at the other spectra in the redundant library.

If you ever decide that the .redundant.blib file is taking up too much space on your hard drive, you can delete it. The only thing in Skyline that this will affect is that dropdown at the top of the Library Match window.

In theory, if you do not like the way that BlibFilter.exe has done its job, you could run it yourself on the .redundant.blib file:
BlibFilter.exe MyLibrary.redundant.blib MyLibrary.blib

In all cases, BlibFilter.exe chooses one spectrum from the .redundant.blib file to go into the non-redundant .blib file.
Depending on whether your command line does or does not include "-b true", BlibFilter.exe will either look at the spectrum scores, or will do the dot product to find the most representative spectrum.
BlibFilter never does anything like creating a hybrid spectrum which is a combination of candidate spectra. The spectrum in the non-redundant .blib file will always be a real spectrum that came from one particular peptide spectrum match in your search results.

-- Nick