本文整理汇总了C++中ConsensusMap::getDataProcessing方法的典型用法代码示例。如果您正苦于以下问题:C++ ConsensusMap::getDataProcessing方法的具体用法?C++ ConsensusMap::getDataProcessing怎么用?C++ ConsensusMap::getDataProcessing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConsensusMap
的用法示例。
在下文中一共展示了ConsensusMap::getDataProcessing方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DataValue
TEST_EQUAL(map.getExperimentType() == "label-free", true)
TEST_EQUAL(map.getMetaValue("name1") == DataValue("value1"), true)
TEST_EQUAL(map.getMetaValue("name2") == DataValue(2), true)
//file descriptions
TEST_EQUAL(map.getFileDescriptions()[0].filename == "data/MapAlignmentFeatureMap1.xml", true)
TEST_EQUAL(map.getFileDescriptions()[0].label, "label")
TEST_EQUAL(map.getFileDescriptions()[0].size, 144)
TEST_EQUAL(map.getFileDescriptions()[0].getMetaValue("name3") == DataValue("value3"), true)
TEST_EQUAL(map.getFileDescriptions()[0].getMetaValue("name4") == DataValue(4), true)
TEST_STRING_EQUAL(map.getFileDescriptions()[1].filename, "data/MapAlignmentFeatureMap2.xml")
TEST_EQUAL(map.getFileDescriptions()[1].label, "")
TEST_EQUAL(map.getFileDescriptions()[1].size, 0)
TEST_EQUAL(map.getFileDescriptions()[1].getMetaValue("name5") == DataValue("value5"), true)
TEST_EQUAL(map.getFileDescriptions()[1].getMetaValue("name6") == DataValue(6.0), true)
//data processing
TEST_EQUAL(map.getDataProcessing().size(), 2)
TEST_STRING_EQUAL(map.getDataProcessing()[0].getSoftware().getName(), "Software1")
TEST_STRING_EQUAL(map.getDataProcessing()[0].getSoftware().getVersion(), "0.91a")
TEST_EQUAL(map.getDataProcessing()[0].getProcessingActions().size(), 1)
TEST_EQUAL(map.getDataProcessing()[0].getProcessingActions().count(DataProcessing::DEISOTOPING), 1)
TEST_STRING_EQUAL(map.getDataProcessing()[0].getMetaValue("name"), "dataProcessing")
TEST_STRING_EQUAL(map.getDataProcessing()[1].getSoftware().getName(), "Software2")
TEST_STRING_EQUAL(map.getDataProcessing()[1].getSoftware().getVersion(), "0.92a")
TEST_EQUAL(map.getDataProcessing()[1].getProcessingActions().size(), 2)
TEST_EQUAL(map.getDataProcessing()[1].getProcessingActions().count(DataProcessing::SMOOTHING), 1)
TEST_EQUAL(map.getDataProcessing()[1].getProcessingActions().count(DataProcessing::BASELINE_REDUCTION), 1)
//protein identifications
TEST_EQUAL(map.getProteinIdentifications().size(), 2)
TEST_EQUAL(map.getProteinIdentifications()[0].getHits().size(), 2)
TEST_EQUAL(map.getProteinIdentifications()[0].getHits()[0].getSequence(), "ABCDEFG")
TEST_EQUAL(map.getProteinIdentifications()[0].getHits()[1].getSequence(), "HIJKLMN")
示例2: outputTo
ExitCodes outputTo(ostream& os)
{
//-------------------------------------------------------------
// Parameter handling
//-------------------------------------------------------------
// File names
String in = getStringOption_("in");
// File type
FileHandler fh;
FileTypes::Type in_type = FileTypes::nameToType(getStringOption_("in_type"));
if (in_type == FileTypes::UNKNOWN)
{
in_type = fh.getType(in);
writeDebug_(String("Input file type: ") + FileTypes::typeToName(in_type), 2);
}
if (in_type == FileTypes::UNKNOWN)
{
writeLog_("Error: Could not determine input file type!");
return PARSE_ERROR;
}
MSExperiment<Peak1D> exp;
FeatureMap feat;
ConsensusMap cons;
if (in_type == FileTypes::FEATUREXML) //features
{
FeatureXMLFile().load(in, feat);
feat.updateRanges();
}
else if (in_type == FileTypes::CONSENSUSXML) //consensus features
{
ConsensusXMLFile().load(in, cons);
cons.updateRanges();
}
//-------------------------------------------------------------
// meta information
//-------------------------------------------------------------
if (getFlag_("m"))
{
os << endl
<< "-- General information --" << endl
<< endl
<< "file name: " << in << endl
<< "file type: " << FileTypes::typeToName(in_type) << endl;
//basic info
os << endl
<< "-- Meta information --" << endl
<< endl;
if (in_type == FileTypes::FEATUREXML) //features
{
os << "Document id : " << feat.getIdentifier() << endl << endl;
}
else if (in_type == FileTypes::CONSENSUSXML) //consensus features
{
os << "Document id : " << cons.getIdentifier() << endl << endl;
}
}
//-------------------------------------------------------------
// data processing
//-------------------------------------------------------------
if (getFlag_("p"))
{
//basic info
os << endl
<< "-- Data processing information --" << endl
<< endl;
//get data processing info
vector<DataProcessing> dp;
if (in_type == FileTypes::FEATUREXML) //features
{
dp = feat.getDataProcessing();
}
else if (in_type == FileTypes::CONSENSUSXML) //consensus features
{
dp = cons.getDataProcessing();
}
int i = 0;
for (vector<DataProcessing>::iterator it = dp.begin(); it != dp.end(); ++it)
{
os << "Data processing " << i << endl;
os << "\tcompletion_time: " << (*it).getCompletionTime().getDate() << 'T' << (*it).getCompletionTime().getTime() << endl;
os << "\tsoftware name: " << (*it).getSoftware().getName() << " version " << (*it).getSoftware().getVersion() << endl;
for (set<DataProcessing::ProcessingAction>::const_iterator paIt = (*it).getProcessingActions().begin(); paIt != (*it).getProcessingActions().end(); ++paIt)
{
os << "\t\tprocessing action: " << DataProcessing::NamesOfProcessingAction[*paIt] << endl;
}
}
++i;
}
//.........这里部分代码省略.........