本文整理汇总了C++中TransformationDescription::invert方法的典型用法代码示例。如果您正苦于以下问题:C++ TransformationDescription::invert方法的具体用法?C++ TransformationDescription::invert怎么用?C++ TransformationDescription::invert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransformationDescription
的用法示例。
在下文中一共展示了TransformationDescription::invert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main_
ExitCodes main_(int, const char**)
{
//-------------------------------------------------------------
// parameter handling
//-------------------------------------------------------------
String in = getStringOption_("in");
String out = getStringOption_("out");
String trafo_in = getStringOption_("trafo_in");
String trafo_out = getStringOption_("trafo_out");
Param model_params = getParam_().copy("model:", true);
String model_type = model_params.getValue("type");
model_params = model_params.copy(model_type + ":", true);
ProgressLogger progresslogger;
progresslogger.setLogType(log_type_);
//-------------------------------------------------------------
// check for valid input
//-------------------------------------------------------------
if (out.empty() && trafo_out.empty())
{
writeLog_("Error: Either a data or a transformation output file has to be provided (parameters 'out'/'trafo_out')");
return ILLEGAL_PARAMETERS;
}
if (in.empty() != out.empty())
{
writeLog_("Error: Data input and output parameters ('in'/'out') must be used together");
return ILLEGAL_PARAMETERS;
}
//-------------------------------------------------------------
// apply transformation
//-------------------------------------------------------------
TransformationXMLFile trafoxml;
TransformationDescription trafo;
trafoxml.load(trafo_in, trafo);
if (model_type != "none")
{
trafo.fitModel(model_type, model_params);
}
if (getFlag_("invert"))
{
trafo.invert();
}
if (!trafo_out.empty())
{
trafoxml.store(trafo_out, trafo);
}
if (!in.empty()) // load input
{
FileTypes::Type in_type = FileHandler::getType(in);
if (in_type == FileTypes::MZML)
{
MzMLFile file;
MSExperiment<> map;
applyTransformation_(in, out, trafo, file, map);
}
else if (in_type == FileTypes::FEATUREXML)
{
FeatureXMLFile file;
FeatureMap map;
applyTransformation_(in, out, trafo, file, map);
}
else if (in_type == FileTypes::CONSENSUSXML)
{
ConsensusXMLFile file;
ConsensusMap map;
applyTransformation_(in, out, trafo, file, map);
}
else if (in_type == FileTypes::IDXML)
{
IdXMLFile file;
vector<ProteinIdentification> proteins;
vector<PeptideIdentification> peptides;
file.load(in, proteins, peptides);
bool store_original_rt = getFlag_("store_original_rt");
MapAlignmentTransformer::transformRetentionTimes(peptides, trafo,
store_original_rt);
// no "data processing" section in idXML
file.store(out, proteins, peptides);
}
}
return EXECUTION_OK;
}