| | |
The PolChemDef class provides a complete set of chemical entities fully qualifying a polymer chemistry definition, like Proteins, Saccharides or Nucleic acids. More...
| Header: | #include <PolChemDef.hpp> |
| PolChemDef() | |
| PolChemDef(const MsXpS::libXpertMassCore::PolChemDefSpec &pol_chem_def_spec) | |
| virtual | ~PolChemDef() |
| bool | calculateDelimitedCodes() |
| QString | deduceIsotopicDataFilePath() const |
| QStringList | differenceBetweenMonomers(double threshold, MsXpS::libXpertMassCore::Enums::MassType mass_type) |
| QString | formatXmlDtd() |
| MsXpS::libXpertMassCore::CleavageAgentCstSPtr | getCleavageAgentCstSPtrByName(const QString &name) const |
| int | getCleavageAgentIndexByName(const QString &name) const |
| const std::vector<MsXpS::libXpertMassCore::CleavageAgentSPtr> & | getCleavageAgentsCstRef() const |
| std::vector<MsXpS::libXpertMassCore::CleavageAgentSPtr> & | getCleavageAgentsRef() |
| int | getCodeLength() const |
| MsXpS::libXpertMassCore::CrossLinkerCstSPtr | getCrossLinkerCstSPtrByName(const QString &name) const |
| const std::vector<MsXpS::libXpertMassCore::CrossLinkerSPtr> & | getCrossLinkersCstRef() const |
| std::vector<MsXpS::libXpertMassCore::CrossLinkerSPtr> & | getCrossLinkersRef() |
| const QString & | getDelimitedCodes() |
| MsXpS::libXpertMassCore::FragmentationPathwayCstSPtr | getFragmentationPathwayCstSPtrByName(const QString &name) const |
| int | getFragmentationPathwayIndexByName(const QString &name) const |
| const std::vector<MsXpS::libXpertMassCore::FragmentationPathwaySPtr> & | getFragmentationPathwaysCstRef() const |
| std::vector<MsXpS::libXpertMassCore::FragmentationPathwaySPtr> & | getFragmentationPathwaysRef() |
| const MsXpS::libXpertMassCore::Ionizer & | getIonizerCstRef() const |
| MsXpS::libXpertMassCore::Ionizer & | getIonizerRef() |
| MsXpS::libXpertMassCore::IsotopicDataCstSPtr | getIsotopicDataCstSPtr() const |
| QString | getIsotopicDataFilePath() const |
| MsXpS::libXpertMassCore::IsotopicDataSPtr | getIsotopicDataSPtr() |
| const MsXpS::libXpertMassCore::Formula & | getLeftCap() const |
| MsXpS::libXpertMassCore::ModifCstSPtr | getModifCstSPtrByName(const QString &name) const |
| int | getModifIndexByName(const QString &name) const |
| const std::vector<MsXpS::libXpertMassCore::ModifSPtr> & | getModifsCstRef() const |
| std::vector<MsXpS::libXpertMassCore::ModifSPtr> & | getModifsRef() |
| MsXpS::libXpertMassCore::MonomerSPtr | getMonomerCstSPtrByCode(const QString &code) const |
| MsXpS::libXpertMassCore::MonomerSPtr | getMonomerCstSPtrByName(const QString &name) const |
| int | getMonomerIndexByCode(const QString &code) const |
| int | getMonomerIndexByName(const QString &name) const |
| const std::vector<MsXpS::libXpertMassCore::MonomerSPtr> & | getMonomersCstRef() const |
| std::vector<MsXpS::libXpertMassCore::MonomerSPtr> & | getMonomersRef() |
| QString | getName() const |
| const MsXpS::libXpertMassCore::Formula & | getRightCap() const |
| QString | getXmlDataDirPath() const |
| QString | getXmlDataFilePath() const |
| bool | isChemicallyEquivalent(const MsXpS::libXpertMassCore::PolChemDef &other) const |
| bool | isValid() const |
| void | setCodeLength(int code_length) |
| void | setIonizer(const MsXpS::libXpertMassCore::Ionizer &ionizer) |
| void | setIsotopicDataFilePath(const QString &file_path) |
| void | setIsotopicDataSPtr(MsXpS::libXpertMassCore::IsotopicDataSPtr isotopic_data_sp) |
| void | setLeftCap(const MsXpS::libXpertMassCore::Formula &formula) |
| void | setName(const QString &name) |
| void | setRightCap(const MsXpS::libXpertMassCore::Formula &formula) |
| void | setXmlDataFilePath(const QString &file_path) |
| bool | validate(MsXpS::libXpertMassCore::ErrorList *error_list_p) const |
| bool | writeXmlFile() |
| bool | operator!=(const MsXpS::libXpertMassCore::PolChemDef &other) const |
| bool | operator==(const MsXpS::libXpertMassCore::PolChemDef &other) const |
| std::size_t | loadIsotopicData(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp, const QString &file_path = QString()) |
| bool | renderXmlPolChemDefFile(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp) |
| bool | renderXmlPolChemDefFileVersion1(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp) |
| bool | renderXmlPolChemDefFileVersion2(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp) |
| std::size_t | writeIsotopicData(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp, const QString &file_path = QString()) |
| std::vector<MsXpS::libXpertMassCore::CleavageAgentSPtr> | m_cleavageAgents |
| int | m_codeLength |
| std::vector<MsXpS::libXpertMassCore::CrossLinkerSPtr> | m_crossLinkers |
| QString | m_delimitedCodes |
| std::vector<MsXpS::libXpertMassCore::FragmentationPathwaySPtr> | m_fragmentationPathways |
| MsXpS::libXpertMassCore::Ionizer | m_ionizer |
| QString | m_isotopicDataFilePath |
| MsXpS::libXpertMassCore::Formula | m_leftCap |
| std::vector<MsXpS::libXpertMassCore::ModifSPtr> | m_modifs |
| std::vector<MsXpS::libXpertMassCore::MonomerSPtr> | m_monomers |
| QString | m_name |
| std::vector<MsXpS::libXpertMassCore::PolChemDefCstSPtr> | m_polChemDefs |
| MsXpS::libXpertMassCore::Formula | m_rightCap |
| QString | m_xmlDataFilePath |
| MsXpS::libXpertMassCore::IsotopicDataSPtr | msp_isotopicData |
The PolChemDef class provides a full set of chemical entity definitions (Isotopes, Monomers, chemical Modifications, CrossLinks), chemical reaction models (in the liquid or gas phase, like Polymer cleavage: CleavageAgent or Oligomer fragmentation: FragmentationPathway)
...
Constructs a polymer chemistry definition.
Constructs a polymer chemistry definition on the basis of pol_chem_def_spec.
The pol_chem_def_spec polymer chemistry definition specification provides the name of the polymer chemistry definition and of the file that contains it.
[virtual noexcept] PolChemDef::~PolChemDef()Destroys the polymer chemistry definition
Constructs a string with the codes of all the Monomers in this PolChemDef instance.
The codes are delimited by the '@' character.
Returns true.
Returns the path of the isotopic data file.
The deduction is based on the fact that the file should have "isotopic-data.dat" as its name.
Returns a string list with the mass difference between all the Monomers in this PolChemDef instace.
If the difference is below the threshold, the difference is added to the string list, otherwise it is skipped. The masses that are compared between every two monomers is of mass_type.
Returns a string with the XML DTD for a polymer chemistry definition file.
Returns a pointer to the CleavageAgent instance known under name.
If no CleavageAgent by that name is known, nullptr is returned.
Returns the index of the CleavageAgent in the member container of these instances or -1 if that was not found.
The search is performed using the name of the CleavageAgent.
Returns a const reference to the list of modifications.
Returns a pointer to the list of CleavageAgent instances.
Returns the code length.
Returns a pointer to the CrossLinker instance known under name.
If no CrossLinker by that name is known, nullptr is returned.
Returns a const reference to the list of modifications.
Returns a pointer to the list of CrossLinker instances.
Returns a string with the codes of all the Monomers in this PolChemDef instance.
The codes are delimited by the '@' character.
Returns a pointer to the FragmentationPathway instance known under name.
If no FragmentationPathway by that name is known, nullptr is returned.
Returns the index of the FragmentationPathway in the member container of these instances or -1 if that was not found.
The search is performed using the name of the FragmentationPathway.
Returns a const reference to the list of modifications.
Returns a pointer to the list of FragmentationPathway instances.
Returns a const reference to the ionizer.
Returns a pointer to the ionizer.
Returns the isotopic data as const shared pointer..
Returns the path of the isotopic data file.
Returns the isotopic data as non-const shared pointer..
Returns the left cap formula.
Returns a pointer to the Modif instance known under name.
If no Modif by that name is known, nullptr is returned.
Returns the index of the Modif in the member container of these instances or -1 if that was not found.
The search is performed using the name of the Modif.
Returns a const reference to the list of modifications.
Returns a pointer to the list of modifications.
Returns a pointer to the Monomer instance known under code.
If no Monomer by that code is known, nullptr is returned.
Returns a pointer to the Monomer instance known under name.
If no Monomer by that name is known, nullptr is returned.
Returns the index of the Monomer in the member container of these instances or -1 if that was not found.
The search is performed using the code of the Monomer.
Returns the index of the Monomer in the member container of these instances or -1 if that was not found.
The search is performed using the name of the Monomer.
Returns a const reference to the list of modifications.
Returns a pointer to the list of Monomer instances.
Returns the name of this PolChemDef instance.
Returns the right cap formula.
Returns the absolute directory path of this PolChemDef instance.
Returns the file path of this PolChemDef instance.
Returns true if this PolChemDef is equal to other, false otherwise.
The comparison is deep, with all the various chemical entities in the various containers being compared (not their pointers, but the objects themselves).
Note: The names and the data file paths are not compared, because this comparison operator is aimed at comparing the chemistries of the PolChemDef.
Returns the validity status of thie PolChemDef instance.
[static] std::size_t PolChemDef::loadIsotopicData(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp, const QString &file_path = QString())Loads the isotopic data stored in the file file_path.
The data loaded from file are parsed and validated. Upon parsing of the file, the data are stored in the pol_chem_def_sp instance's isotopic data member.
If file_path is empty, it is reconstructed using the directory of the polymer chemistry definition and the fact that the isotopic data file name is "isotopic-data.dat".
Returns the count of parsed isotopes.
[static] bool PolChemDef::renderXmlPolChemDefFile(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp)Parses the polymer chemistry definition file and updates pol_chem_def_sp accordingly.
Upon parsing of the file and validation of the data, the pol_chem_def_sp is updated, essentially initializing it with the data from the file.
Note that the pol_chem_def_sp should have a working set of isotopic data.
Returns true if the parsing was successful and false otherwise.
[static] bool PolChemDef::renderXmlPolChemDefFileVersion1(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp)Parses the polymer chemistry definition file and updates pol_chem_def_sp accordingly.
Upon parsing of the file and validation of the data, the pol_chem_def_sp is updated, essentially initializing it with the data from the file.
Note that the pol_chem_def_sp should have a working set of isotopic data.
Returns true if the parsing was successful and false otherwise.
[static] bool PolChemDef::renderXmlPolChemDefFileVersion2(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp)Parses the polymer chemistry definition file and updates pol_chem_def_sp accordingly.
Upon parsing of the file and validation of the data, the pol_chem_def_sp is updated, essentially initializing it with the data from the file.
Note that the pol_chem_def_sp should have a working set of isotopic data.
Returns true if the parsing was successful and false otherwise.
Sets the code_length.
Sets the ionizer to ionizer.
Sets the path of the isotopic data file to file_path.
Sets the isotopic data to isotopic_data_sp.
Sets the left cap formula.
Sets the name of this PolChemDef instance.
Sets the right cap formula.
Sets the file_path of this PolChemDef instance.
Validates this PolChemDef instance by checking the validity of all its members data. Returns true if validation was successful, false otherwise. Any error is added to error_list_p if non-nullptr.
[static] std::size_t PolChemDef::writeIsotopicData(MsXpS::libXpertMassCore::PolChemDefSPtr pol_chem_def_sp, const QString &file_path = QString())Writes the isotopic data in the pol_chem_def_sp PolChemDef instance to file file_path.
Returns the count of isotopes written to file.
Writes the polymer chemistry definition to file.
The file's name is from m_xmlDataFilePath.
Returns true if successful, false otherwise.
Returns true if this and other differ.
Returns the negated result of operator==().
Returns true if this PolChemDef is equal to other, false otherwise.
The comparison is deep, with all the various chemical entities in the various containers being compared (not their pointers, but the objects themselves).
Note: The names and the data file paths are not compared, because this comparison operator is aimed at comparing the chemistries of the PolChemDef.
This variable holds the container of CleavageAgents defining the various ways to cleave Polymer sequences of this PolChemDef instance.
This variable holds the maximum length of a Monomer code in this defintion.
The valid syntax of a Monomer code is that the first character of the code is uppercase and all the remaining ones are lowercase. The total number of characters cannot exceed m_codeLength.
The container of CrossLinkers defined to be part of this PolChemDef instance.
This variable holds the set of Monomer codes separated by '@' characters, like "@Ala@Tyr@Phe@".
This variable holds the container of FragmentationPathways defining the various ways to fragment Oligomer sequences of this PolChemDef instance.
This variable holds the ionization agent that governs the manner the Polymer sequences of this polymer chemistry definition are ionized by default.
This variable holds the path to the file that contains this polymer chemistry definition's isotopic data.
This variable holds the Formula that defines how of the left end of a polymer sequence of this PolChemDef needs to be capped in order to finalize the polymerization state of the Polymer sequence.
See also PolChemDef::m_rightCap.
This variable holds the container of Modifs defined to be part of this PolChemDef instance.
This variable holds the container of Monomers defined to be part of this PolChemDef instance.
This variable holds the name of the polymer chemistry definition, like protein-1-letter or nucac, for example.
This name is typically identical to both the name of the directory where all the data defining this PolChemDef is stored and the name of the XML file that contains the definition itself.
This variable holds the container of PolChemDef instances available in the repositories.
This variable holds the Formula that defines how of the right end of a polymer sequence of this PolChemDef needs to be capped in order to finalize the polymerization state of the Polymer sequence.
See also PolChemDef::m_leftCap.
This variable holds the path to the XML data file that contains the description of this polymer chemistry definition.
This variable holds the isotopic data defining the fundamentals of this PolChemDef instance.