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

Method main_

src/topp/MetaProSIP.cpp:2900–3603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2898 }
2899
2900 ExitCodes main_(int, const char**) override
2901 {
2902 String file_extension_ = getStringOption_("plot_extension");
2903 Int debug_level = getIntOption_("debug");
2904 String in_mzml = getStringOption_("in_mzML");
2905 String in_features = getStringOption_("in_featureXML");
2906 double mz_tolerance_ppm_ = getDoubleOption_("mz_tolerance_ppm");
2907 double rt_tolerance_s = getDoubleOption_("rt_tolerance_s");
2908
2909 double weight_merge_window_ = getDoubleOption_("weight_merge_window");
2910 double intensity_threshold_ = getDoubleOption_("intensity_threshold");
2911 double decomposition_threshold = getDoubleOption_("decomposition_threshold");
2912
2913 Size min_consecutive_isotopes = (Size)getIntOption_("min_consecutive_isotopes");
2914
2915 String qc_output_directory = getStringOption_("qc_output_directory");
2916
2917 Size n_heatmap_bins = getIntOption_("heatmap_bins");
2918 double score_plot_y_axis_min = getDoubleOption_("score_plot_yaxis_min");
2919
2920 String tmp_path = File::getTempDirectory();
2921 tmp_path.substitute('\\', '/');
2922
2923 // Do we want to create a qc report?
2924 if (!qc_output_directory.empty())
2925 {
2926 QString executable = getStringOption_("r_executable").toQString();
2927 // convert path to absolute path
2928 QDir qc_dir(qc_output_directory.toQString());
2929 qc_output_directory = String(qc_dir.absolutePath());
2930
2931 // trying to create qc_output_directory if not present
2932 if (!qc_dir.exists())
2933 {
2934 qc_dir.mkpath(qc_output_directory.toQString());
2935 }
2936 // check if R and dependencies are installed
2937 StringList package_names;
2938 package_names.push_back("gplots");
2939
2940 bool R_is_working = RIntegration::checkRDependencies(tmp_path, package_names, executable);
2941 if (!R_is_working)
2942 {
2943 OPENMS_LOG_INFO << "There was a problem detecting one of the required R libraries." << endl;
2944 return EXTERNAL_PROGRAM_ERROR;
2945 }
2946 }
2947
2948 String out_csv = getStringOption_("out_csv");
2949 ofstream out_csv_stream(out_csv.c_str());
2950 out_csv_stream << fixed << setprecision(4);
2951
2952 String out_peptide_centric_csv = getStringOption_("out_peptide_centric_csv");
2953 ofstream out_peptide_csv_stream(out_peptide_centric_csv.c_str());
2954 out_peptide_csv_stream << fixed << setprecision(4);
2955
2956 String labeling_element = getStringOption_("labeling_element");
2957

Callers

nothing calls this directly

Calls 15

randomFunction · 0.85
absolutePathMethod · 0.80
setLogTypeMethod · 0.80
toUpperMethod · 0.80
getSequenceMethod · 0.80
setMSLevelsMethod · 0.80
sortSpectraMethod · 0.80
getPrecursorsMethod · 0.80
setParametersMethod · 0.80
getMaxRTMethod · 0.80
getMinRTMethod · 0.80
getMetaValueMethod · 0.80

Tested by

no test coverage detected