Skip to content

Commit

Permalink
Do not write an empty <ModificationList> element when there are no mo…
Browse files Browse the repository at this point in the history
…difications with Unimod Ids: (#500)
  • Loading branch information
vagisha authored Feb 4, 2025
1 parent 0d1b806 commit fe000c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ void writeModificationList(Status validationStatus) throws PxException
*/
Element mod_list = new Element("ModificationList");
var mods = validationStatus.getModifications();
if(mods.size() == 0)
if(mods.size() == 0 || mods.stream().noneMatch(Modification::isValid))
{
mod_list.addChild(new CvParamElement("MS", "MS:1002864", "No PTMs are included in the dataset"));
}
Expand Down

0 comments on commit fe000c3

Please sign in to comment.