本文整理汇总了C++中PeakSpectrum::getStringDataArrays方法的典型用法代码示例。如果您正苦于以下问题:C++ PeakSpectrum::getStringDataArrays方法的具体用法?C++ PeakSpectrum::getStringDataArrays怎么用?C++ PeakSpectrum::getStringDataArrays使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PeakSpectrum
的用法示例。
在下文中一共展示了PeakSpectrum::getStringDataArrays方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mergeAnnotatedSpectra
specGen.getCommonIonSpectrum(exp_spec_2, AASequence::fromString("PEPTEDI"), 3, true, 3);
param.setValue("add_metainfo", "true");
specGen.setParameters(param);
specGen.getCommonIonSpectrum(theo_spec_1, AASequence::fromString("PEPTIDE"), 3, true, 3);
specGen.getCommonIonSpectrum(theo_spec_2, AASequence::fromString("PEPTEDI"), 4, true, 3);
START_SECTION(static PeakSpectrum mergeAnnotatedSpectra(PeakSpectrum & first_spectrum, PeakSpectrum & second_spectrum))
PeakSpectrum merged_spec = OPXLSpectrumProcessingAlgorithms::mergeAnnotatedSpectra(theo_spec_1, theo_spec_2);
TEST_EQUAL(merged_spec.size(), 36)
TEST_EQUAL(merged_spec.getIntegerDataArrays().size(), 1)
TEST_EQUAL(merged_spec.getIntegerDataArrays()[0].size(), 36)
TEST_EQUAL(merged_spec.getStringDataArrays()[0].size(), 36)
TEST_EQUAL(merged_spec.getIntegerDataArrays()[0][10], 3)
TEST_EQUAL(merged_spec.getStringDataArrays()[0][10], "[alpha|ci$y2]")
TEST_EQUAL(merged_spec.getIntegerDataArrays()[0][20], 2)
TEST_EQUAL(merged_spec.getStringDataArrays()[0][20], "[alpha|ci$y2]")
TEST_REAL_SIMILAR(merged_spec[10].getMZ(), 83.04780)
TEST_REAL_SIMILAR(merged_spec[20].getMZ(), 132.04732)
for (Size i = 0; i < merged_spec.size()-1; ++i)
{
TEST_EQUAL(merged_spec[i].getMZ() <= merged_spec[i+1].getMZ(), true)
}
END_SECTION
START_SECTION(static void getSpectrumAlignment(std::vector <std::pair <Size, Size> >& alignment, const PeakSpectrum & s1, const PeakSpectrum & s2, double tolerance, bool relative_tolerance, double intensity_cutoff = 0.0))
示例2: min
ptr->setParameters (p);
ptr->load();
ptr->simulate(spec, peptide, rnd_gen, 1);
PeakMap exp;
MzMLFile mz_file;
#if OPENMS_BOOST_VERSION_MINOR < 56
mz_file.load(OPENMS_GET_TEST_DATA_PATH("SvmTheoreticalSpectrumGenerator_test.mzML"),exp);
TEST_EQUAL(spec.size(), 7);
#else
mz_file.load(OPENMS_GET_TEST_DATA_PATH("SvmTheoreticalSpectrumGenerator_test_boost58.mzML"),exp);
TEST_EQUAL(spec.size(), 8);
// the extra peak:
TEST_EQUAL(spec.getStringDataArrays()[0][2], "YIon 0++") // TODO: ion_nr is always zero, its actually y4++
TEST_EQUAL(spec.getIntegerDataArrays()[0][2], 2)
#endif
TEST_EQUAL(exp.size(), 1);
if(exp.size())
{
TEST_EQUAL(spec.size(), exp[0].size());
Size min_size = min(spec.size(), exp[0].size());
for(Size i = 0; i<min_size; ++i)
{
TEST_REAL_SIMILAR(spec[i].getPosition()[0],(exp[0][i]).getPosition()[0]);
TEST_REAL_SIMILAR(spec[i].getIntensity(),(exp[0][i]).getIntensity());
}
}