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_FEATURE_TYPE_H_
23 #define _U2_FEATURE_TYPE_H_
24 
25 #include <U2Core/global.h>
26 
27 namespace U2 {
28 
29 class U2CORE_EXPORT U2FeatureTypes {
30 public:
31     enum U2FeatureType {
32         Invalid = 0,
33         AaRich = 1,
34         Acetylation = 2,
35         ActiveSite = 3,
36         Adenylation = 4,
37         Allele = 5,
38         AlphaHelix = 6,
39         AlteredSite = 7,
40         Amidation = 8,
41         AssemblyGap = 9,
42         Attenuator = 10,
43         BHlhDomain = 11,
44         Basic = 12,
45         BetaSheet = 13,
46         BetaStrandRegion = 14,
47         BiotinBindingSite = 15,
48         Blocked = 16,
49         C2 = 17,
50         CRegion = 18,
51         CaatSignal = 19,
52         Calcium = 20,
53         CatalyticRegion = 21,
54         Cds = 22,
55         CellAttachment = 23,
56         Cellular = 24,
57         Centromere = 25,
58         CholesterolBindingSite = 26,
59         CleavageSite = 27,
60         CoiledCoil = 28,
61         CollagenType = 29,
62         Comment = 30,
63         Conflict = 31,
64         ConnectingPeptide = 32,
65         Cub = 33,
66         Cytoplasmic = 34,
67         DLoop = 35,
68         DSegment = 36,
69         Disulfide = 37,
70         Egf = 38,
71         Enhancer = 39,
72         Exon = 40,
73         Exoplasmic = 41,
74         Extracellular = 42,
75         Farnesyl = 43,
76         Fibronectin = 44,
77         FivePrimeClip = 45,
78         FivePrimeUtr = 46,
79         Formylation = 47,
80         GammaCarboxyglumaticAcid = 48,
81         Gap = 49,
82         GcSignal = 50,
83         Gene = 51,
84         GeranylGeranyl = 52,
85         Glycosylation = 53,
86         GlycosylationSite = 54,
87         GpiAnchor = 55,
88         HelicalRegion = 56,
89         HemeBindingSite = 57,
90         HmgBox = 58,
91         Homeodomain = 59,
92         Hth = 60,
93         HydrogenBondedTurn = 61,
94         Hydroxylation = 62,
95         IDna = 63,
96         Immunoglobulin = 64,
97         Insertion = 65,
98         Intracellular = 66,
99         Intron = 67,
100         JRegion = 68,
101         JSegment = 69,
102         Kh = 70,
103         Kinase = 71,
104         LeucineZipper = 72,
105         LeucineZipperDomain = 73,
106         Loci = 74,
107         Ltr = 75,
108         MRna = 76,
109         MatureChain = 77,
110         MaturePeptide = 78,
111         Methylation = 79,
112         Minus10Signal = 80,
113         Minus35Signal = 81,
114         MiscBindingSite = 82,
115         MiscBond = 83,
116         MiscDifference = 84,
117         MiscDnaRnaBindingRegion = 85,
118         MiscDomain = 86,
119         MiscFeature = 87,
120         MiscLipid = 88,
121         MiscMarker = 89,
122         MiscMetal = 90,
123         MiscNpBindingRegion = 91,
124         MiscRecombination = 92,
125         MiscRegion = 93,
126         MiscResidueModification = 94,
127         MiscRna = 95,
128         MiscSignal = 96,
129         MiscSite = 97,
130         MiscStructure = 98,
131         MobileElement = 99,
132         ModifiedBase = 100,
133         Mutation = 101,
134         Myristate = 102,
135         NAcylDiglyceride = 103,
136         NRegion = 104,
137         NcRna = 105,
138         NonConsecutiveResidues = 106,
139         Nuclease = 107,
140         OldSequence = 108,
141         Operon = 109,
142         OriT = 110,
143         Overhang = 111,
144         Palmitate = 112,
145         Periplasmic = 113,
146         Ph = 114,
147         Phosphorylation = 115,
148         PolyASignal = 116,
149         PolyASite = 117,
150         PolyAa = 118,
151         Precursor = 119,
152         PrecursorRna = 120,
153         Primer = 121,
154         PrimerBindingSite = 122,
155         PrimaryTranscript = 123,
156         ProcessedActivePeptide = 124,
157         Promoter = 125,
158         PromoterEukaryotic = 126,
159         PromoterProkaryotic = 127,
160         Propeptide = 128,
161         Proprotein = 129,
162         Protease = 130,
163         Protein = 131,
164         ProteinBindingSite = 132,
165         Provirus = 133,
166         PyridoxalPhBindingSite = 134,
167         PyrrolidoneCarboxylicAcid = 135,
168         RRna = 136,
169         Rbs = 137,
170         Region = 138,
171         Regulatory = 139,
172         RepeatRegion = 140,
173         RepeatUnit = 141,
174         RepetitiveRegion = 142,
175         ReplicationOrigin = 143,
176         SRegion = 144,
177         Satellite = 145,
178         ScRna = 146,
179         SeconadaryStructure = 147,
180         Sh2 = 148,
181         Sh3 = 149,
182         SignalPeptide = 150,
183         SignalSequence = 151,
184         Silencer = 152,
185         Similarity = 153,
186         Site = 154,
187         SnRna = 155,
188         SnoRna = 156,
189         Source = 157,
190         SplicingSignal = 158,
191         SplicingVariant = 159,
192         StemLoop = 160,
193         Sts = 161,
194         Sulfatation = 162,
195         TRna = 163,
196         TataSignal = 164,
197         Telomere = 165,
198         Terminator = 166,
199         Thioether = 167,
200         Thiolester = 168,
201         ThreePrimeClip = 169,
202         ThreePrimeUtr = 170,
203         TmRna = 171,
204         TransitPeptide = 172,
205         TransmembraneRegion = 173,
206         Transposon = 174,
207         Uncertainty = 175,
208         Unsure = 176,
209         VRegion = 177,
210         VSegment = 178,
211         Variant = 179,
212         Variation = 180,
213         Virion = 181,
214         ZincFinger = 182,
215         ZincFingerDomain = 183,
216         RestrictionSite = 184
217     };
218 
219     enum Alphabet {
220         Alphabet_None = 0,
221         Alphabet_Nucleic = 1 << 0,
222         Alphabet_Amino = 1 << 1
223     };
224     Q_DECLARE_FLAGS(Alphabets, Alphabet)
225 
226     static QList<U2FeatureType> getTypes(const Alphabets &alphabets);
227     static QString getVisualName(U2FeatureType type);
228     static U2FeatureType getTypeByName(const QString &visualName);
229 
230     class U2FeatureTypeInfo {
231     public:
232         U2FeatureTypeInfo(U2FeatureType featureType = U2FeatureTypes::Invalid, const QString &visualName = "", Alphabets alphabets = Alphabet_None);
233 
234         U2FeatureType featureType;
235         QString visualName;
236         Alphabets alphabets;
237     };
238 
239 private:
240     static QList<U2FeatureTypeInfo> initFeatureTypes();
241     const static QList<U2FeatureTypeInfo> typeInfos;
242     static QHash<U2FeatureType, int> typeInfoIndexByType;
243 };
244 
245 typedef U2FeatureTypes::U2FeatureType U2FeatureType;
246 
247 }  // namespace U2
248 
249 Q_DECLARE_OPERATORS_FOR_FLAGS(U2::U2FeatureTypes::Alphabets)
250 
251 #endif  // _U2_FEATURE_TYPE_H_
252