1 /* 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information 6 * 7 * This software/database is a "United States Government Work" under the 8 * terms of the United States Copyright Act. It was written as part of 9 * the author's official duties as a United States Government employee and 10 * thus cannot be copyrighted. This software/database is freely available 11 * to the public for use. The National Library of Medicine and the U.S. 12 * Government have not placed any restriction on its use or reproduction. 13 * 14 * and reliability of the software and data, the NLM 15 * Although all reasonable efforts have been taken to ensure the accuracyand the U.S. 16 * Government do not and cannot warrant the performance or results that 17 * may be obtained by using this software or data. The NLM and the U.S. 18 * Government disclaim all warranties, express or implied, including 19 * warranties of performance, merchantability or fitness for any particular 20 * purpose. 21 * 22 * Please cite the author in any work or product based on this material. 23 * 24 * =========================================================================== 25 * 26 * Author: Douglas J. Slotta 27 * 28 * File Description: 29 * Code for converting OMSSA to PepXML 30 * 31 */ 32 33 #ifndef PEPXML_HPP 34 #define PEPXML_HPP 35 36 #include <algo/ms/formats/pepxml/pepXML__.hpp> 37 #include <objects/omssa/omssa__.hpp> 38 #include "msmerge.hpp" 39 40 BEGIN_NCBI_SCOPE 41 BEGIN_SCOPE(objects) 42 BEGIN_SCOPE(omssa) 43 44 45 class NCBI_XOMSSA_EXPORT CPepXML : public CMsms_pipeline_analysis { 46 47 typedef CMsms_pipeline_analysis Tparent; 48 49 public: 50 51 // constructor CPepXML(void)52 CPepXML(void) {} 53 // destructor ~CPepXML(void)54 ~CPepXML(void) {} 55 56 /** 57 * convert OMSSA to PepXML 58 * 59 * @param inOMSSA the ASN.1 structure to search to be copied 60 */ 61 void ConvertFromOMSSA(CMSSearch& inOMSSA, CRef <CMSModSpecSet> Modset, string basename, string newname); 62 63 private: 64 // Prohibit copy constructor and assignment operator 65 CPepXML(const CPepXML& value); 66 CPepXML& operator=(const CPepXML& value); 67 68 string ConvertDouble(double n); 69 char ConvertAA(char in); 70 CRef<CModification_info> ConvertModifications(CRef<CMSHits> msHits, CRef<CMSModSpecSet> Modset, set<int>& vModSet, 71 CMSSearch& inOMSSA); 72 void ConvertModSetting(CRef<CSearch_summary> sSum, CRef<CMSModSpecSet> Modset, int modnum, bool fixed); 73 void ConvertScanID(CRef<CSpectrum_query> sQuery, string SpecID, int query, int charge); 74 string GetProteinName(CRef<CMSPepHit> pHit); 75 void ConvertMSHitSet(CRef<CMSHitSet> pHitSet, CMsms_run_summary::TSpectrum_query& sQueries, CRef<CMSModSpecSet> Modset, set<int>& variableMods, CMSSearch& inOMSSA); 76 77 typedef pair<char, double> TAminoAcidMassPair; 78 typedef map<char, double> TAminoAcidMassMap; 79 80 TAminoAcidMassMap m_aaMassMap; 81 set<char> m_staticModSet; 82 83 float m_scale; 84 int m_index; 85 }; 86 87 88 END_SCOPE(omssa) 89 END_SCOPE(objects) 90 END_NCBI_SCOPE 91 92 #endif // MSMERGE_HPP 93