void FeatureGroupingAlgorithmLabeled::group(const std::vector<FeatureMap<> > & maps, ConsensusMap & out) { //check that the number of maps is ok if (maps.size() != 1) throw Exception::IllegalArgument(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Exactly one map must be given!"); if (out.getFileDescriptions().size() != 2) throw Exception::IllegalArgument(__FILE__, __LINE__, __PRETTY_FUNCTION__, "Two file descriptions must be set in 'out'!"); //initialize LabeledPairFinder LabeledPairFinder pm; pm.setParameters(param_.copy("", true)); //convert to consensus map std::vector<ConsensusMap> input(1); ConsensusMap::convert(0, maps[0], input[0]); //run pm.run(input, out); }
TEST_NOT_EQUAL(ptr, nullPointer) END_SECTION START_SECTION((virtual ~LabeledPairFinder())) delete ptr; END_SECTION START_SECTION((static BaseGroupFinder* create())) BaseGroupFinder* base_ptr = nullptr; BaseGroupFinder* base_nullPointer = nullptr; base_ptr = LabeledPairFinder::create(); TEST_NOT_EQUAL(base_ptr, base_nullPointer) END_SECTION START_SECTION((static const String getProductName())) LabeledPairFinder spf; TEST_STRING_EQUAL(spf.getProductName(),"labeled_pair_finder") END_SECTION FeatureMap features; features.resize(10); //start features[0].setRT(1.0f); features[0].setMZ(1.0f); features[0].setCharge(1); features[0].setOverallQuality(1); features[0].setIntensity(4.0f); //best features[1].setRT(1.5f); features[1].setMZ(5.0f);