Example #1
0
    //reimplemented to
    // - catch non-PSI CVs
    // - check if binaryDataArray name and type match
    void MzMLValidator::handleTerm_(const String & path, const CVTerm & parsed_term)
    {
      //some CVs cannot be validated because they use 'part_of' which spoils the inheritance
      if (parsed_term.accession.hasPrefix("GO:"))
        return;

      if (parsed_term.accession.hasPrefix("BTO:"))
        return;

      //check binary data array terms
      if (path.hasSuffix("/binaryDataArray/cvParam/@accession"))
      {
        //binary data array
        if (cv_.isChildOf(parsed_term.accession, "MS:1000513"))
        {
          binary_data_array_ = parsed_term.accession;
        }
        //binary data type
        if (cv_.isChildOf(parsed_term.accession, "MS:1000518"))
        {
          binary_data_type_ = parsed_term.accession;
        }
        //if both are parsed, check if they match
        if (binary_data_type_ != "" && binary_data_array_ != "")
        {
          if (!cv_.getTerm(binary_data_array_).xref_binary.contains(binary_data_type_))
          {
            errors_.push_back(String("Binary data array of type '") + binary_data_array_ + " ! " + cv_.getTerm(binary_data_array_).name + "' cannot have the value type '" + binary_data_type_ + " ! " + cv_.getTerm(binary_data_type_).name + "'.");
          }
        }
      }

      SemanticValidator::handleTerm_(path, parsed_term);
    }
Example #2
0
	void ColoringSettingsDialog::maxTFChanged()
	{
		String text = String(((float)max_tf_slider->value()) / 10.0);
		text = text.trimRight("0");
		if (text.hasSuffix(".")) text += "0";
		max_tf_label->setText(text.c_str());
	}
Example #3
0
	void ColoringSettingsDialog::forceMinValueChanged()
	{
		String text = String(((float)force_min_value_slider->value()) / 10.0);
		text = text.trimRight("0");
		if (text.hasSuffix(".")) text += "0";
		force_min_value_label->setText(text.c_str());
	}
Example #4
0
 bool DigestionEnzymeRNA::setValueFromFile(const String& key, const String& value)
 {
   if (DigestionEnzyme::setValueFromFile(key, value))
   {
     return true;
   }
   if (key.hasSuffix(":ThreePrimeGain"))
   {
     setThreePrimeGain(value);
     return true;
   }
   if (key.hasSuffix(":FivePrimeGain"))
   {
     setFivePrimeGain(value);
     return true;
   }
   return false;
 }
Example #5
0
 bool DigestionEnzyme::setValueFromFile(const String& key, const String& value)
 {
   if (key.hasSuffix(":Name"))
 {
     setName(value);
     return true;
 }
   if (key.hasSuffix(":RegEx"))
 {
     setRegEx(value);
     return true;
 }
   if (key.hasSuffix(":RegExDescription"))
 {
     setRegExDescription(value);
     return true;
 }
   if (key.hasSubstring(":Synonyms:"))
 {
     addSynonym(value);
     return true;
 }
   return false;
 }