1 /** 2 * UGENE - Integrated Bioinformatics Tools. 3 * Copyright (C) 2008-2021 UniPro <ugene@unipro.ru> 4 * http://ugene.net 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 2 9 * of the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 * MA 02110-1301, USA. 20 */ 21 22 #ifndef _U2_DI_PROPERTIES_SITECON_H_ 23 #define _U2_DI_PROPERTIES_SITECON_H_ 24 25 #include <assert.h> 26 27 #include <QList> 28 #include <QMap> 29 #include <QString> 30 31 #include <U2Core/DIProperties.h> 32 33 namespace U2 { 34 35 class DiPropertySitecon; 36 class DinucleotitePropertyRegistry { 37 public: 38 DinucleotitePropertyRegistry(); 39 ~DinucleotitePropertyRegistry(); 40 getProperties()41 QList<DiPropertySitecon *> getProperties() const { 42 return props; 43 } 44 45 private: 46 void registerProperty(const QString &str); 47 QList<DiPropertySitecon *> props; 48 }; 49 50 class DiPropertySitecon : public DiProperty { 51 public: 52 // todo: default val; 53 54 QMap<QString, QString> keys; 55 float original[16]; 56 float normalized[16]; 57 float average; 58 float sdeviation; 59 getOriginal(char c1,char c2)60 float getOriginal(char c1, char c2) const { 61 return original[index(c1, c2)]; 62 } getNormalized(char c1,char c2)63 float getNormalized(char c1, char c2) const { 64 return normalized[index(c1, c2)]; 65 } 66 }; 67 68 } // namespace U2 69 70 #endif 71