the main_ function is called after all parameters are read
| 130 | |
| 131 | // the main_ function is called after all parameters are read |
| 132 | ExitCodes main_(int, const char **) override |
| 133 | { |
| 134 | //------------------------------------------------------------- |
| 135 | // parsing parameters |
| 136 | //------------------------------------------------------------- |
| 137 | // |
| 138 | // Read input, check for same length and get that length |
| 139 | QCBase::Status status; |
| 140 | UInt64 number_exps(0); |
| 141 | StringList in_raw = updateFileStatus_(status, number_exps, "in_raw", QCBase::Requires::RAWMZML); |
| 142 | StringList in_postFDR = updateFileStatus_(status, number_exps, "in_postFDR", QCBase::Requires::POSTFDRFEAT); |
| 143 | StringList in_trafo = updateFileStatus_(status, number_exps, "in_trafo", QCBase::Requires::TRAFOALIGN); |
| 144 | |
| 145 | // load databases and other single file inputs |
| 146 | String in_contaminants = getStringOption_("in_contaminants"); |
| 147 | vector<FASTAFile::FASTAEntry> contaminants; |
| 148 | if (!in_contaminants.empty()) |
| 149 | { |
| 150 | FASTAFile().load(in_contaminants, contaminants); |
| 151 | status |= QCBase::Requires::CONTAMINANTS; |
| 152 | } |
| 153 | |
| 154 | //the additional file the user passed, with annotate genenames & protnames |
| 155 | String fasta_file = getStringOption_("in_fasta"); |
| 156 | vector<FASTAFile::FASTAEntry> prot_description; |
| 157 | if(!fasta_file.empty()) |
| 158 | { |
| 159 | OPENMS_LOG_INFO << "Loading FASTA ... " << fasta_file << std::endl; |
| 160 | FASTAFile().load(fasta_file, prot_description); |
| 161 | } |
| 162 | |
| 163 | ConsensusMap cmap; |
| 164 | String in_cm = getStringOption_("in_cm"); |
| 165 | ConsensusXMLFile().load(in_cm, cmap); |
| 166 | for (ConsensusFeature & cf: cmap) // make sure that the first PeptideIdentification of a ConsensusFeature is the one with the highest Score |
| 167 | { |
| 168 | sortVectorOfPeptideIDsbyScore_(cf.getPeptideIdentifications()); |
| 169 | } |
| 170 | std::vector<FeatureMap> fmaps; |
| 171 | if (in_postFDR.empty()) |
| 172 | { |
| 173 | status |= QCBase::Requires::POSTFDRFEAT; |
| 174 | fmaps = cmap.split(ConsensusMap::SplitMeta::COPY_ALL); |
| 175 | bool is_labeled_cmap = QCBase::isLabeledExperiment(cmap); |
| 176 | if (is_labeled_cmap) // for labeled input (e.g. iTRAQ/TMT/SILAC) |
| 177 | { |
| 178 | OPENMS_LOG_INFO << "Labeled data detected!" << std::endl; |
| 179 | if (number_exps != 1) // no features given, but >1 trafos... |
| 180 | { |
| 181 | throw Exception::Precondition(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, String("More than one mzML or TrafoXML were given, but this is not supported in 'labeled' mode.")); |
| 182 | } |
| 183 | // number_exps can remain 1, since we only need to annotate the first FMap with metavalues (the others only have exact copies) |
| 184 | // ... |
| 185 | } |
| 186 | else // unlabeled == LFQ mode |
| 187 | { |
| 188 | throw Exception::NotImplemented(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION); |
| 189 | // currently missing: |
nothing calls this directly
no test coverage detected