Failure opening document - modification name error

Failure opening document - modification name error joshuasmith  2022-08-30
Hi all,

We are doing untargeted PTM discovery and I have a document with a large number of modifications that I have manually entered and integrated. I saved the file and when I tried to reopen it, I got the message I have pasted below, and it won't open. I have just spent the better part of 16 hours manually QC'ing this document, and so I would be really, really disappointed if my file is now unusable. Is there any way to fix this?


Failure opening C:\Users\Josh Smith\iCloudDrive\Documents\Projects\Adductomics\SHIELD\PAA_analysis\
The file contains an error on line 5833 at column 9.
No modification named Unknown 712.3934 (C) was found in this document.
OK More Info
System.Reflection.TargetInvocationException: There is an error in XML document (5833, 9). ---> System.InvalidOperationException: There is an error in XML document (5833, 9). ---> System.IO.InvalidDataException: No modification named Unknown 712.3934 (C) was found in this document.
   at pwiz.Skyline.Model.DocSettings.TransitionLosses.FromLossProtos(SrmSettings settings, IEnumerable`1 lossProtos) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\DocSettings\Loss.cs:line 388
   at pwiz.Skyline.Model.TransitionDocNode.FromTransitionProto(AnnotationScrubber scrubber, SrmSettings settings, TransitionGroup group, ExplicitMods mods, IsotopeDistInfo isotopeDist, ExplicitTransitionValues pre422ExplicitTransitionValues, CrosslinkBuilder crosslinkBuilder, Transition transitionProto) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\TransitionDocNode.cs:line 719
   at pwiz.Skyline.Model.Serialization.DocumentReader.ReadTransitionListXml(XmlReader reader, TransitionGroupDocNode nodeGroup, ExplicitMods mods, ExplicitTransitionValues pre422ExplicitTransitionValues) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\Serialization\DocumentReader.cs:line 1457
   at pwiz.Skyline.Model.Serialization.DocumentReader.ReadTransitionGroupXml(XmlReader reader, Peptide peptide, ExplicitMods mods) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\Serialization\DocumentReader.cs:line 1332
   at pwiz.Skyline.Model.Serialization.DocumentReader.ReadTransitionGroupListXml(XmlReader reader, Peptide peptide, ExplicitMods mods) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\Serialization\DocumentReader.cs:line 1258
   at pwiz.Skyline.Model.Serialization.DocumentReader.ReadPeptideXml(XmlReader reader, PeptideGroup group, Boolean isCustomMolecule) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\Serialization\DocumentReader.cs:line 905
   at pwiz.Skyline.Model.Serialization.DocumentReader.ReadPeptideListXml(XmlReader reader, PeptideGroup group) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\Serialization\DocumentReader.cs:line 840
   at pwiz.Skyline.Model.Serialization.DocumentReader.ReadPeptideGroupXml(XmlReader reader) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\Serialization\DocumentReader.cs:line 810
   at pwiz.Skyline.Model.Serialization.DocumentReader.ReadPeptideGroupListXml(XmlReader reader) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\Serialization\DocumentReader.cs:line 651
   at pwiz.Skyline.Model.Serialization.DocumentReader.ReadXml(XmlReader reader) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\Serialization\DocumentReader.cs:line 616
   at pwiz.Skyline.Model.SrmDocument.ReadXml(XmlReader reader) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Model\SrmDocument.cs:line 2074
   at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable, Boolean wrappedAny)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSrmDocument.Read1_srm_settings()
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at pwiz.Skyline.SkylineWindow.<>c__DisplayClass744_0.<OpenFile>b__0(IProgressMonitor progressMonitor) in C:\proj\skyline_21_2\pwiz_tools\Skyline\SkylineFiles.cs:line 328
   at pwiz.Skyline.Controls.LongWaitDlg.RunWork(Action`1 performWork) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Controls\LongWaitDlg.cs:line 254
   --- End of inner exception stack trace ---
   at pwiz.Skyline.Util.Helpers.WrapAndThrowException(Exception x) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Util\Util.cs:line 1941
   at pwiz.Skyline.Controls.LongWaitDlg.PerformWork(Control parent, Int32 delayMillis, Action`1 performWork) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Controls\LongWaitDlg.cs:line 202
   at pwiz.Skyline.Controls.LongWaitDlg.PerformWork(Control parent, Int32 delayMillis, Action`1 performWork) in C:\proj\skyline_21_2\pwiz_tools\Skyline\Controls\LongWaitDlg.cs:line 140
   at pwiz.Skyline.SkylineWindow.OpenFile(String path, FormEx parentWindow) in C:\proj\skyline_21_2\pwiz_tools\Skyline\SkylineFiles.cs:line 345
Nick Shulman responded:  2022-08-30
Here is a fixed version of that file. I had to edit the XML and add a definition for the modification named "Unknown 712.3934 (C)".
I did not know what mass etc. it should have, so I just put some numbers in there.
But, you should now be able to open the document without hitting this error.

In the past there have been some bugs where Skyline makes a mistake in terms of figuring out which modifications are still being used by the document. In this case, it seems that there used to be a modification in your document named "Unknown 712.3934 (C)" which must have had some neutral losses as part of its document. The peptide "ALVLIAFAQYLQQCPFEDHVK" now seems to have a modification whose name has a plus sign in it ("Unknown +712.3934 (C)", but a few of its transitions has a neutral loss referencing the old name "Unknown 712.3934 (C)".

If you are now able to open your document, it would be helpful if you would do "File > Share" to create a .zip file containing your Skyline document and supporting files including the audit log and extracted chromatograms.
If that .zip file is less than 50MB you can attach it to this support request. You can upload larger files here:

Also, if you happen to have an older version of your document which still had a modification named "Unknown 712.3934 (C)", it would be helpful if you could send it to me. I will try to figure out how to reproduce this bug in Skyline and eventually fix it.

-- Nick
joshuasmith responded:  2022-08-31

Thanks so much - so quick! It opened, currently importing all my samples again, I will share it with you when it finishes. As it's just the main document and not the chromatogram file, this won't have all my manually integrated peak boundaries, will it? Can I use my old chromatogram document to get those back? Aka, I would just save the fixed skyline document over the original corrupted file in the original directory, alongside the original chromatogram document, so that the fixed document file will point to the original chromatogram file - will that work? I obviously can just try it, but I also hate to risk corrupting something again.

Also, I don't have an older version of the document, but I can tell you exactly how it happened. I typically regularly save "..._backup" versions of my files in case things like this happen (I deal a lot with custom mods and so I'm unfortunately very familiar with the bugs you speak of). I typically hit save as, overwrite the old backup file, and then re-open the original file and keep working. I did that this time, but I realize now that the last thing I did before saving the backup was to alter the 712 Da modification definition to remove the neutral loss within the modification list editor (I also added the "+" to the name, because that's how I typically name the unannotated modifications we find, but I had made a typo and omitted it when I first created that modification). However, I did not remove the neutral loss transitions from the transition list. I then did the backup save. When I tried to re-open my original file, it gave me the error and wouldn't open. I then closed Skyline (panic move?) and when I tried to open either the original or the backup file, I got the same message again.

Nick Shulman responded:  2022-08-31
Yes, you should be able to overwrite your file "" with the one that I sent you. That way, the file will be right next to the .skyd file that it needs, and Skyline won't complain about needing to extract chromatograms again.
Just to be on the safe side, I would recommend that you copy the .skyd file somewhere else before you do that. There are cases where Skyline might decide to delete the .skyd file when it opens the .sky file if it thinks that the .skyd file does not contain any replicates that are in the .sky file. I would not expect anything like that to happen here, but you might as well back up that folder and especially the .skyd file before you try this.

Thank you for the repro steps. Yes, I see that if you remove a modification with a neutral loss from the document, there may still be some transitions with losses that reference the deleted modification and you will not be able to reopen the document after you save it. I will fix this.
-- Nick