public PeptideGroupDocNode(PeptideGroup id, Annotations annotations, ProteinMetadata proteinMetadata,
     PeptideDocNode[] children, bool autoManageChildren)
     : base(id, annotations, children, autoManageChildren)
 {
     if (Equals(id.Name, proteinMetadata.Name))
         proteinMetadata = proteinMetadata.ChangeName(null);  // Make it clear that the name hasn't been altered
     if (Equals(id.Description, proteinMetadata.Description))
         proteinMetadata = proteinMetadata.ChangeDescription(null);  // Make it clear that the description hasn't been altered
     _proteinMetadata = proteinMetadata;
 }
 public PeptideGroupDocNode(PeptideGroup id, Annotations annotations, ProteinMetadata proteinMetadata,
                            PeptideDocNode[] children, bool autoManageChildren)
     : base(id, annotations, children, autoManageChildren)
 {
     if (Equals(id.Name, proteinMetadata.Name))
     {
         proteinMetadata = proteinMetadata.ChangeName(null);  // Make it clear that the name hasn't been altered
     }
     if (Equals(id.Description, proteinMetadata.Description))
     {
         proteinMetadata = proteinMetadata.ChangeDescription(null);  // Make it clear that the description hasn't been altered
     }
     _proteinMetadata = proteinMetadata;
 }
        public PeptideGroupDocNode ChangeDescription(string desc)
        {
            var newMetadata = _proteinMetadata.ChangeDescription(desc);

            return(ChangeProteinMetadata(newMetadata));
        }