Ejemplo n.º 1
0
  QTClusterFinder::QTClusterFinder() :
    BaseGroupFinder(), feature_distance_(FeatureDistance())
  {
    setName(getProductName());

    defaults_.setValue("use_identifications", "false", "Never link features that are annotated with different peptides (only the best hit per peptide identification is taken into account).");
    defaults_.setValidStrings("use_identifications", StringList::create("true,false"));

    defaults_.insert("", feature_distance_.getDefaults());

    defaultsToParam_();
  }
Ejemplo n.º 2
0
  StablePairFinder::StablePairFinder() :
    Base()
  {
    //set the name for DefaultParamHandler error messages
    Base::setName(getProductName());

    defaults_.setValue("second_nearest_gap", 2.0, "Only link features whose distance to the second nearest neighbors (for both sides) is larger by 'second_nearest_gap' than the distance between the matched pair itself.");
    defaults_.setMinFloat("second_nearest_gap", 1.0);

    defaults_.setValue("use_identifications", "false", "Never link features that are annotated with different peptides (features without ID's always match; only the best hit per peptide identification is considered).");
    defaults_.setValidStrings("use_identifications", ListUtils::create<String>("true,false"));

    defaults_.insert("", FeatureDistance().getDefaults());

    Base::defaultsToParam_();
  }
Ejemplo n.º 3
0
  StablePairFinder::StablePairFinder() :
    Base()
  {
    //set the name for DefaultParamHandler error messages
    Base::setName(getProductName());

    defaults_.setValue("second_nearest_gap", 2.0, "The distance to the second nearest neighbors must be larger by this factor than the distance to the matching element itself.");
    defaults_.setMinFloat("second_nearest_gap", 1.0);

    defaults_.setValue("use_identifications", "false", "Never link features that are annotated with different peptides (only the best hit per peptide identification is taken into account).");
    defaults_.setValidStrings("use_identifications", ListUtils::create<String>("true,false"));

    defaults_.insert("", FeatureDistance().getDefaults());

    Base::defaultsToParam_();
  }
Ejemplo n.º 4
0
 void QTClusterFinder::setParameters_(DoubleReal max_intensity,
                                      DoubleReal max_mz)
 {
   if (max_mz < 1e-16 || max_mz > 1e16 || max_intensity < -1e16 || max_intensity > 1e16)
   {
       throw Exception::IllegalArgument(__FILE__, __LINE__, __PRETTY_FUNCTION__,
                                        "Maximum mz or intensity out of range (mz,intensity): " + String(max_mz) + ", " + String(max_intensity));
   }
   use_IDs_ = String(param_.getValue("use_identifications")) == "true";
   max_diff_rt_ = param_.getValue("distance_RT:max_difference");
   max_diff_mz_ = param_.getValue("distance_MZ:max_difference");
   // compute m/z tolerance in Da (if given in ppm; for the hash grid):
   if (param_.getValue("distance_MZ:unit") == "ppm")
   {
     max_diff_mz_ *= max_mz * 1e-6;
   }
   Param distance_params = param_.copy("");
   distance_params.remove("use_identifications");
   feature_distance_ = FeatureDistance(max_intensity, true);
   feature_distance_.setParameters(distance_params);
 }