Export dot p of library spectrum vs midas data

Export dot p of library spectrum vs midas data heyang  2024-05-30 10:40


Could anyone tell us how to export dot p value after compare library std spectrum vs midas data. We can find this value which present in spectra match (see attached). But can't find a way to export these values.


Nick Shulman responded:  2024-05-30 15:29
I cannot think of any way to that in Skyline but if you send me your Skyline document I might be able to figure something out.
I am thinking it might be straightforward to write a computer program which gives you all of the dot products the matching spectra in a pair of libraries.

In Skyline you can use the menu item:
File > Share
to create a .zip file containing your Skyline document and supporting files including spectral libraries.

Files which are less than 50MB can be attached to these support requests. You can always upload larger files here:
-- Nick
heyang responded:  2024-05-31 05:22
Thanks, Nick. Attached is the skyline file and not sure MIDAS and library also included. If not, please let me know.

Nick Shulman responded:  2024-05-31 15:11
I wrote a program to calculate the dot products between all of the spectra in two different libraries.
I have attached the results of running that program on the dataset.
The dot product values in the last column are not exactly the same as what you see in Skyline because Skyline only uses the m/z values that Skyline can figure out the ion type of (e.g. "y7++").
But the dot product values are very close to what you see in Skyline.

Let me know if this TSV file is useful.
I can give you the program that I used to generate it after I finish making it into something usable.
-- Nick
heyang responded:  2024-06-11 06:18
Thank you, Nick and it is very helpful.

Could you send us the program and also the instructions? We appreciate your help and will mention this in the publication.

One more question is about dot p value shown in the skyline. Both of my collage and me use same version of skyline (, However dot p value from same data is a little different.

Nick Shulman responded:  2024-06-14 11:38
The program that I wrote to calculate the dot products between the spectra in two library (.blib or .midas) files can be downloaded here:

I think the reason that this program produces slightly different dot products from Skyline comes from the fact that it has a different way of deciding which intensities to put into the vectors in the dot product calculation.

When computing the dot product of two spectra, you usually want to only include the signal that came from the target peptide. If there is extraneous signal in the spectrum that came from something else, you do not want that included in the dot product.

Skyline figures out the m/z's of all of the predicted fragment ions of the peptide, and, for each of those m/z values, figures out how much signal is in the two spectra, and each of those intensities is in the vector for calculating the dot product.

This other program cannot do that because it does not know anything about amino acid masses or fragmentation, so, what it does, instead, is just look at the spectrum in the first library that was specified on the commandline, and, every nonzero intensity becomes a value in the first vector, and the corresponding signal from the spectrum from the second value becomes a value in the second vector.

I think this works well when the first spectrum is a predicted spectrum from Prosit, because those spectra do not have much extraneous noise from things that are not associated with the peptide of interest. But, the numbers are going to be a little different because Prosit and Skyline have different ways of deciding what the predicted fragments of a peptide are.
-- Nick