MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / main_

Method main_

src/topp/Decharger.cpp:105–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 }
104
105 ExitCodes main_(int, const char **) override
106 {
107 //-------------------------------------------------------------
108 // parameter handling
109 //-------------------------------------------------------------
110 String infile = getStringOption_("in");
111 String outfile_fm = getStringOption_("out_fm");
112 String outfile_cm = getStringOption_("out_cm");
113 String outfile_p = getStringOption_("outpairs");
114
115 FeatureDeconvolution fdc;
116 Param const & dc_param = getParam_().copy("algorithm:FeatureDeconvolution:", true);
117
118 writeDebug_("Parameters passed to Decharger", dc_param, 3);
119
120 fdc.setParameters(dc_param);
121
122 //-------------------------------------------------------------
123 // loading input
124 //-------------------------------------------------------------
125
126 writeDebug_("Loading input file", 1);
127
128 typedef FeatureMap FeatureMapType;
129 FeatureMapType map_in, map_out;
130 FileHandler().loadFeatures(infile, map_in);
131
132 //-------------------------------------------------------------
133 // calculations
134 //-------------------------------------------------------------
135 ConsensusMap cm, cm2;
136 StopWatch a;
137 a.start();
138 fdc.compute(map_in, map_out, cm, cm2);
139 a.stop();
140 //std::cerr << "took: " << a.getClockTime() << " seconds\n\n\n";
141
142 //-------------------------------------------------------------
143 // writing output
144 //-------------------------------------------------------------
145
146 writeDebug_("Saving output files", 1);
147
148 cm.getColumnHeaders()[0].filename = infile;
149 cm2.getColumnHeaders()[0].filename = infile;
150
151 //annotate output with data processing info
152 addDataProcessing_(map_out, getProcessingInfo_(DataProcessing::CHARGE_DECONVOLUTION));
153 addDataProcessing_(cm, getProcessingInfo_(DataProcessing::CHARGE_DECONVOLUTION));
154 addDataProcessing_(cm2, getProcessingInfo_(DataProcessing::CHARGE_DECONVOLUTION));
155
156
157 FileHandler().storeConsensusFeatures(outfile_cm, cm);
158
159 if (!outfile_p.empty())
160 {
161 FileHandler().storeConsensusFeatures(outfile_p, cm2);
162 }

Callers

nothing calls this directly

Calls 10

addDataProcessing_Function · 0.85
setParametersMethod · 0.80
loadFeaturesMethod · 0.80
stopMethod · 0.80
storeFeaturesMethod · 0.80
copyMethod · 0.45
startMethod · 0.45
computeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected