Skip to content

Commit fe000c3

Browse files
authored
Do not write an empty <ModificationList> element when there are no modifications with Unimod Ids: (#500)
1 parent 0d1b806 commit fe000c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

panoramapublic/src/org/labkey/panoramapublic/proteomexchange/PxXmlWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ void writeModificationList(Status validationStatus) throws PxException
391391
*/
392392
Element mod_list = new Element("ModificationList");
393393
var mods = validationStatus.getModifications();
394-
if(mods.size() == 0)
394+
if(mods.size() == 0 || mods.stream().noneMatch(Modification::isValid))
395395
{
396396
mod_list.addChild(new CvParamElement("MS", "MS:1002864", "No PTMs are included in the dataset"));
397397
}

0 commit comments

Comments
 (0)