68 const string& featType,
69 const vector<pair<int, int>>& vecIntervals,
70 const vector<pair<bool, bool>>& vecPartials,
71 const vector<pair<string, string>>& vecAttributes)
82 for (
int i=0;
i < vecIntervals.size(); ++
i) {
83 TSeqPos intervalFrom = vecIntervals[
i].first;
84 TSeqPos intervalTo = vecIntervals[
i].second;
85 bool partialFrom = vecPartials[
i].first;
86 bool partialTo = vecPartials[
i].second;
88 if (intervalFrom > intervalTo) {
89 swap(intervalFrom, intervalTo);
90 swap(partialFrom, partialTo);
95 CSeq_interval(*pId, intervalFrom, intervalTo, intervalStrand));
119 vector<string> vecAttrs;
121 vecAttrs.push_back(pQual->GetQual() +
":" + pQual->GetVal());
124 vector<string> vecLoc;
130 out <<
"C5ColImportData:\n";
131 out <<
" Type = " << typeStr <<
"\n";
132 out <<
" Range = " << locationStr <<
"\n";
133 out <<
" Attributes = " <<
NStr::Join(vecAttrs,
", ") <<
"\n";
145 "Feature type not recognized");
147 vector<string> recognizedTypes {
148 "gene",
"mrna",
"cds",
"cdregion",
"rrna",
"trna"
153 if (find(recognizedTypes.begin(), recognizedTypes.end(),
type) ==
154 recognizedTypes.end()) {
156 throw errorBadFeatureType;
159 if (
type ==
"gene") {
163 if (
type ==
"mrna") {
167 if (
type ==
"rrna") {
171 if (
type ==
"trna") {
175 if (
type ==
"cds" ||
type ==
"cdregion") {
@ eExtreme_Positional
numerical value
C5ColImportData(const CIdResolver &, CImportMessageHandler &)
CRef< CSeq_feat > mpFeature
void Initialize(const std::string &, const std::string &, const std::vector< std::pair< int, int >> &, const std::vector< std::pair< bool, bool >> &, const std::vector< std::pair< std::string, std::string >> &)
virtual void Serialize(CNcbiOstream &) override
void xFeatureSetType(const std::string &)
const CIdResolver & mIdResolver
void AmendMessage(const std::string &amend)
ESubtype GetSubtype(void) const
static CTempString SubtypeValueToName(ESubtype eSubtype)
Turns a ESubtype into its string value which is NOT necessarily related to the identifier of the enum...
namespace ncbi::objects::
void AddQualifier(const string &qual_name, const string &qual_val)
Add a qualifier to this feature.
std::ofstream out("events_result.xml")
main entry point for tests
unsigned int TSeqPos
Type for sequence locations and lengths.
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
void Add(const CSeq_loc &other)
Simple adding of seq-locs.
TSeqPos GetStop(ESeqLocExtremes ext) const
void Reset(void)
Reset reference object.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static string & ToLower(string &str)
Convert string to lower case – string& version.
void SetLocation(TLocation &value)
Assign a value to Location data member.
const TQual & GetQual(void) const
Get the Qual member data.
const TLocation & GetLocation(void) const
Get the Location member data.
const TData & GetData(void) const
Get the Data member data.
void SetData(TData &value)
Assign a value to Data data member.
ENa_strand
strand of nucleic acid
bool IsNull(void) const
Check if variant Null is selected.
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...