|
Last change
on this file was
5800,
checked in by westram, 17 years ago
|
- translate_gene_sequence() defaults to EMBL
1 (if no codon specified) and to codon_start 0
- added fixEmptyQualifiers():
- searches for empty data and replaces it by '<empty>' (currently only done for qualifier 'replace')
- called before writing features to
- silently skip empty lines before or after sections
|
|
File size:
1.5 KB
|
| Line | |
|---|
| 1 | // ================================================================ // |
|---|
| 2 | // // |
|---|
| 3 | // File : Feature.h // |
|---|
| 4 | // Purpose : // |
|---|
| 5 | // // |
|---|
| 6 | // Coded by Ralf Westram (coder@reallysoft.de) in November 2006 // |
|---|
| 7 | // Institute of Microbiology (Technical University Munich) // |
|---|
| 8 | // http://www.arb-home.de/ // |
|---|
| 9 | // // |
|---|
| 10 | // ================================================================ // |
|---|
| 11 | #ifndef FEATURE_H |
|---|
| 12 | #define FEATURE_H |
|---|
| 13 | |
|---|
| 14 | #ifndef TYPES_H |
|---|
| 15 | #include "types.h" |
|---|
| 16 | #endif |
|---|
| 17 | #ifndef LOCATION_H |
|---|
| 18 | #include "Location.h" |
|---|
| 19 | #endif |
|---|
| 20 | |
|---|
| 21 | class Feature { |
|---|
| 22 | string type; |
|---|
| 23 | LocationPtr location; |
|---|
| 24 | stringMap qualifiers; // qualifiers with content (content of multiple identical qualifiers gets merged) |
|---|
| 25 | |
|---|
| 26 | public: |
|---|
| 27 | Feature(const string& Type, const string& locationString); |
|---|
| 28 | |
|---|
| 29 | void addQualifiedEntry(const string& qualifier, const string& value); |
|---|
| 30 | |
|---|
| 31 | string createGeneName() const; // creates a (non-unique) default name for gene |
|---|
| 32 | |
|---|
| 33 | const string& getType() const { return type; } |
|---|
| 34 | const Location& getLocation() const { return *location; } |
|---|
| 35 | const stringMap& getQualifiers() const { return qualifiers; } |
|---|
| 36 | |
|---|
| 37 | void expectLocationInSequence(long seqLength) const; |
|---|
| 38 | |
|---|
| 39 | void fixEmptyQualifiers(); |
|---|
| 40 | }; |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | #else |
|---|
| 44 | #error Feature.h included twice |
|---|
| 45 | #endif // FEATURE_H |
|---|
| 46 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.