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_ENZYME_MODEL_H_
23 #define _U2_ENZYME_MODEL_H_
24 
25 #include <QByteArray>
26 #include <QSharedData>
27 #include <QSharedDataPointer>
28 #include <QString>
29 
30 #include <U2Core/global.h>
31 
32 namespace U2 {
33 
34 class DNAAlphabet;
35 
36 #define QUALIFIER_LEFT_TERM "left_end_term"
37 #define QUALIFIER_LEFT_OVERHANG "left_end_seq"
38 #define QUALIFIER_LEFT_TYPE "left_end_type"
39 #define QUALIFIER_LEFT_STRAND "left_end_strand"
40 #define QUALIFIER_RIGHT_TERM "right_end_term"
41 #define QUALIFIER_RIGHT_OVERHANG "right_end_seq"
42 #define QUALIFIER_RIGHT_TYPE "right_end_type"
43 #define QUALIFIER_RIGHT_STRAND "right_end_strand"
44 #define QUALIFIER_SOURCE "fragment_source"
45 #define QUALIFIER_INVERTED "fragment_inverted"
46 #define OVERHANG_TYPE_BLUNT "blunt"
47 #define OVERHANG_TYPE_STICKY "sticky"
48 #define OVERHANG_STRAND_DIRECT "direct"
49 #define OVERHANG_STRAND_COMPL "rev-compl"
50 
51 #define ANNOTATION_GROUP_FRAGMENTS "fragments"
52 #define ANNOTATION_GROUP_ENZYME "enzyme"
53 
54 #define ENZYME_CUT_UNKNOWN 0x7FFFFF
55 #define ENZYME_LIST_SEPARATOR ","
56 
57 class U2ALGORITHM_EXPORT EnzymeSettings {
58 public:
59     static const QString DATA_DIR_KEY;
60     static const QString DATA_FILE_KEY;
61     static const QString LAST_SELECTION;
62     static const QString ENABLE_HIT_COUNT;
63     static const QString MAX_HIT_VALUE;
64     static const QString MIN_HIT_VALUE;
65     static const QString MAX_RESULTS;
66     static const QString COMMON_ENZYMES;
67 };
68 
69 class U2ALGORITHM_EXPORT EnzymeData : public QSharedData {
70 public:
71     EnzymeData();
72 
73     QString id;
74     QString accession;
75     QString type;
76     QByteArray seq;
77     int cutDirect;  // starts from the first char in direct strand
78     int cutComplement;  // starts from the first char in complement strand, negative->right offset
79     QString organizm;
80     const DNAAlphabet *alphabet;
81 };
82 
83 typedef QSharedDataPointer<EnzymeData> SEnzymeData;
84 
85 }  // namespace U2
86 
87 #endif
88