66 #include <wx/treebook.h>
69 #include <wx/choice.h>
70 #include <wx/textctrl.h>
71 #include <wx/stattext.h>
72 #include <wx/hyperlink.h>
73 #include <wx/checkbox.h>
74 #include <wx/msgdlg.h>
86 "annotated by transcript or proteomic data",
87 "rearrangement required for product",
88 "reasons given in citation",
97 vector<string> exceptions;
101 if (sc_LegalExceptions.find((*it).c_str()) != sc_LegalExceptions.end()) {
149 const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style ) :
164 Create(parent,
id, caption, pos,
size, style);
205 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
206 wxPanel::Create( parent,
id, pos,
size, style );
214 GetSizer()->SetSizeHints(
this);
267 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
268 itemPanel1->SetSizer(itemBoxSizer2);
270 wxFlexGridSizer* itemFlexGridSizer3 =
new wxFlexGridSizer(0, 2, 0, 0);
271 itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
273 wxStaticText* itemStaticText4 =
new wxStaticText( itemPanel1, wxID_STATIC,
_(
"Genetic Code"), wxDefaultPosition, wxDefaultSize, 0 );
274 itemFlexGridSizer3->Add(itemStaticText4, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
276 wxArrayString m_GeneticCodeStrings;
277 m_GeneticCode =
new wxChoice( itemPanel1,
ID_CHOICE1, wxDefaultPosition, wxDefaultSize, m_GeneticCodeStrings, 0 );
279 m_GeneticCode->SetToolTip(
_(
"Choose the genetic code that should be used to translate the nucleotide sequence. For more information, and for the translation tables themselves, see the NCBI Taxonomy page. If the genetic code is already populated from the taxonomy database, do not change this selection."));
280 itemFlexGridSizer3->Add(
m_GeneticCode, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
282 wxStaticText* itemStaticText6 =
new wxStaticText( itemPanel1, wxID_STATIC,
_(
"Reading Frame"), wxDefaultPosition, wxDefaultSize, 0 );
283 itemFlexGridSizer3->Add(itemStaticText6, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
285 wxArrayString m_FrameStrings;
286 m_FrameStrings.Add(
_(
"One"));
287 m_FrameStrings.Add(
_(
"Two"));
288 m_FrameStrings.Add(
_(
"Three"));
289 m_Frame =
new wxChoice( itemPanel1,
ID_CHOICE2, wxDefaultPosition, wxDefaultSize, m_FrameStrings, 0 );
291 m_Frame->SetToolTip(
_(
"Choose the reading frame in which to translate the sequence."));
292 itemFlexGridSizer3->Add(
m_Frame, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
294 wxStaticText* itemStaticText8 =
new wxStaticText( itemPanel1, wxID_STATIC,
_(
"Conflict"), wxDefaultPosition, wxDefaultSize, 0 );
295 itemFlexGridSizer3->Add(itemStaticText8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
299 itemFlexGridSizer3->Add(
m_ConflictCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
301 wxStaticText* itemStaticText10 =
new wxStaticText( itemPanel1, wxID_STATIC,
_(
"Protein Length"), wxDefaultPosition, wxDefaultSize, 0 );
302 itemFlexGridSizer3->Add(itemStaticText10, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
304 m_ProteinLengthTxt =
new wxStaticText( itemPanel1, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
305 itemFlexGridSizer3->Add(
m_ProteinLengthTxt, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
307 wxStaticLine* itemStaticLine12 =
new wxStaticLine( itemPanel1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
308 itemBoxSizer2->Add(itemStaticLine12, 0, wxGROW|wxALL, 5);
310 wxBoxSizer* itemBoxSizer13 =
new wxBoxSizer(wxHORIZONTAL);
311 itemBoxSizer2->Add(itemBoxSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
313 wxStaticText* itemStaticText14 =
new wxStaticText( itemPanel1, wxID_STATIC,
_(
"Protein Product"), wxDefaultPosition, wxDefaultSize, 0 );
314 itemBoxSizer13->Add(itemStaticText14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
316 wxArrayString m_ProductCtrlStrings;
328 m_ProductCtrl =
new wxOwnerDrawnComboBox( itemPanel1,
ID_COMBOBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_ProductCtrlStrings, wxCB_SIMPLE|wxTE_PROCESS_ENTER );
329 itemBoxSizer13->Add(
m_ProductCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
333 itemBoxSizer13->Add(
m_ForceNear, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
335 m_TranslationCtrl =
new wxTextCtrl( itemPanel1,
ID_TEXTCTRL27, wxEmptyString, wxDefaultPosition, wxSize(400, 100), wxTE_MULTILINE|wxTE_READONLY );
340 wxBoxSizer* itemBoxSizer18 =
new wxBoxSizer(wxHORIZONTAL);
341 itemBoxSizer2->Add(itemBoxSizer18, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
343 wxHyperlinkCtrl* itemHyperlinkCtrl19 =
new wxHyperlinkCtrl( itemPanel1,
ID_PREDICT_INTERVAL,
_(
"Predict Interval"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
344 itemBoxSizer18->Add(itemHyperlinkCtrl19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
351 wxHyperlinkCtrl* itemHyperlinkCtrl21 =
new wxHyperlinkCtrl( itemPanel1,
ID_HYPERLINKCTRL2,
_(
"Adjust for Stop Codon"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
352 itemHyperlinkCtrl21->SetNormalColour(wxColour(0, 0, 255));
353 itemHyperlinkCtrl21->SetVisitedColour(wxColour(0, 0, 255));
354 itemBoxSizer18->Add(itemHyperlinkCtrl21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
356 wxHyperlinkCtrl* itemHyperlinkCtrl22 =
new wxHyperlinkCtrl( itemPanel1,
ID_IMPORT_CDS_PROTEIN,
_(
"Import Protein Sequence"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
357 itemBoxSizer18->Add(itemHyperlinkCtrl22, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
359 wxBoxSizer* itemBoxSizer23 =
new wxBoxSizer(wxHORIZONTAL);
360 itemBoxSizer2->Add(itemBoxSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
381 string str = (*it)->GetName();
382 int id = (*it)->GetId();
402 string::size_type pos = code_name.find(
';');
403 code_name = (pos != string::npos) ? code_name.substr(0, pos) +
", etc." : code_name;
409 if (!wxPanel::TransferDataToWindow()) {
423 m_Scope->RemoveFromHistory(prot_bsh);
440 if (feat_seqid_handle)
445 NcbiWarningBox(
"Protein seq-id (" + seq_label +
") differs from CDS product-id (" + label_feat +
")");
447 m_Scope->RemoveFromHistory(bsh);
471 string codeName =
"";
476 codeId =
code.GetId();
477 codeName =
code.GetName();
485 string str = (*it)->GetName();
486 int id = (*it)->GetId();
521 wxWindow* w = this->GetParent();
523 wxTreebook* parent =
dynamic_cast<wxTreebook*
>(w);
541 for (
size_t i = 0;
i < parent->GetPageCount(); ++
i) {
555 if (!wxPanel::TransferDataFromWindow()) {
577 if (index != wxNOT_FOUND)
583 code->Set().push_back(ce);
594 switch (
m_Frame->GetSelection ()) {
669 bioseq.
SetId().push_back(new_id);
717 wxWindow* parent = this->GetParent();
718 wxTreebook* tbook =
dynamic_cast<wxTreebook*
>(parent);
723 for (
size_t i = 0;
i < tbook->GetPageCount(); ++
i) {
727 if (!exceptionPanel) {
731 if (locPanel && exceptionPanel) {
741 if (exceptionPanel) {
833 id->SetGeneral().SetDb(db);
834 id->SetGeneral().SetTag().SetStr(
tag);
838 id->SetLocal().SetStr(id_val);
854 wxYES == wxMessageBox(
_(
"Cannot retranslate with pseudo set, remove pseudo flag?"),
wxT(
"Remove pseudo"), wxYES_NO | wxICON_QUESTION))
861 for (
size_t i = 0;
i < parent->GetPageCount(); ++
i) {
883 size_t this_len = it.GetRange().GetLength();
885 if (
len + this_len <= new_len) {
887 new_loc->
Add(*this_loc);
890 new_loc->
Assign(*this_loc);
895 size_t len_wanted = new_len -
len;
897 if (len_wanted == 1) {
899 partial_loc->
SetPnt().SetPoint(start);
904 partial_loc->
SetInt().SetTo(start);
906 partial_loc->
SetInt().SetFrom(start);
917 new_loc->
Add(*partial_loc);
920 new_loc->
Assign(*partial_loc);
939 if (pos < loc_start) {
941 id->Assign(*(loc.
GetId()));
945 }
else if (pos > loc_stop) {
947 id->Assign(*(loc.
GetId()));
1004 vector_loc->
SetInt().SetId().Assign(*(loc.
GetId()));
1007 vector_loc->
SetInt().SetFrom(0);
1008 vector_loc->
SetInt().SetTo(stop +
mod - 1);
1011 vector_loc->
SetInt().SetFrom(stop -
mod + 1);
1017 const size_t usable_size = seq.
size();
1030 size_t length = usable_size / 3;
1032 for (
i = 0;
i < length; ++
i) {
1034 for (k = 0; k < 3; ++k, ++start) {
1045 new_loc->
Add(*this_loc);
1048 new_loc->
Assign(*this_loc);
1057 size_t extension = ((
i + 1) * 3) -
mod;
1058 last_interval->
SetInt().SetId().Assign(*(this_loc->
GetId()));
1069 new_loc->
Add(*last_interval);
1072 new_loc->
Assign(*last_interval);
1081 if (usable_size < 3 && !new_loc) {
1105 wxWindow* parent = this->GetParent();
1106 wxTreebook* tbook =
dynamic_cast<wxTreebook*
>(parent);
1114 for (
size_t i = 0;
i < tbook->GetPageCount(); ++
i) {
1118 if (!exceptionPanel) {
1122 if (locPanel && exceptionPanel) {
1134 if (exceptionPanel) {
1141 if (!prot_str.empty()) {
1145 if (pos != string::npos) {
1147 size_t len_wanted = 3 * (pos + 1);
1148 if (
m_EditedFeat->GetData().GetCdregion().IsSetFrame()) {
1156 if (len_wanted > 0) {
1167 int choice = wxMessageBox(
wxT(
"No stop codon found - extend to full length of sequence (and make partial)?"),
wxT(
"Error"),
1168 wxYES_NO | wxICON_ERROR,
NULL);
1169 if (choice == wxYES) {
1176 bsh =
m_Scope->GetBioseqHandle(*loc);
1253 catch (
const exception& e) {
1262 bool found_start_codon =
false;
1263 bool found_stop_codon =
false;
1270 TSeqPos from = (*exon_it)->GetGenomic_start();
1272 for (
auto &ins : insertions)
1275 from = ins.GetTo() + 1;
1276 if ((*exon_it)->IsSetGenomic_strand()) {
1277 exon2->
SetStrand((*exon_it)->GetGenomic_strand());
1281 cds_loc->
SetMix().Set().push_back(exon2);
1285 if ((*exon_it)->IsSetGenomic_strand()) {
1286 exon->
SetStrand((*exon_it)->GetGenomic_strand());
1291 cds_loc->
SetMix().Set().push_back(exon);
1297 if ((*mod_it)->IsStart_codon_found()) {
1298 found_start_codon = (*mod_it)->GetStart_codon_found();
1300 if ((*mod_it)->IsStop_codon_found()) {
1301 found_stop_codon = (*mod_it)->GetStop_codon_found();
1307 if (!cds_loc->
IsMix()) {
1311 string error =
"Unable to find coding region location for protein sequence " +
label +
". Import failed.";
1313 wxOK | wxICON_ERROR,
NULL);
1316 if (cds_loc->
GetMix().
Get().size() == 1) {
1321 if (!found_start_codon) {
1324 if (found_stop_codon) {
1327 if (cds_loc->
IsMix()) {
1338 wxWindow* parent = this->GetParent();
1339 wxTreebook* tbook =
dynamic_cast<wxTreebook*
>(parent);
1347 for (
size_t i = 0;
i < tbook->GetPageCount(); ++
i) {
1351 if (!exceptionPanel) {
1355 if (locPanel && exceptionPanel) {
1395 protein_entry->
SetSeq().
SetId().push_back(product_id);
1420 vector<string> format_ids;
1421 format_ids.push_back(
"file_loader_fasta");
1422 fileManager->LoadFormats(format_ids);
1424 vector<CIRef<IOpenObjectsPanelClient> > loadManagers;
1428 dlg.SetSize(710, 480);
1434 if (dlg.ShowModal() == wxID_OK) {
1436 if (!object_loader) {
1437 wxMessageBox(
wxT(
"Failed to get object loader"),
wxT(
"Error"),
1438 wxOK | wxICON_ERROR);
1455 const CObject& ptr = obj_it->GetObject();
1456 seq =
dynamic_cast<const CBioseq*
>(&ptr);
1461 if (entry && entry->
IsSeq()) {
1462 seq = &(entry->
GetSeq());
1467 if (seq && seq->
IsAa()) {
1470 wxMessageBox(
wxT(
"Please import a protein sequence file"),
wxT(
"Error"),
1471 wxOK | wxICON_ERROR);
1529 wxMessageBox(
wxT(
"A coding region usually has to have a protein translation unless it is pseudo"),
wxT(
"Warning"), wxOK | wxICON_ERROR,
this);
static CRef< CScope > m_Scope
@ eExtreme_Positional
numerical value
@ eExtreme_Biological
5' and 3'
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
bool GUI_AsyncExecUnit(IExecuteUnit &exec_unit, const wxString &msg)
CRef< objects::CSeq_id > GetNewProtId(objects::CBioseq_Handle bsh, int &offset, string &id_label, bool general_only)
bool IsGeneralIdProtPresent(objects::CSeq_entry_Handle tse)
CStaticArraySet< const char *, PNocase_CStr > TLegalExceptions
CRef< CSeq_loc > SeqLocExtend(const CSeq_loc &loc, TSeqPos pos, CScope *scope)
static CRef< CSeq_loc > TruncateSeqLoc(CRef< CSeq_loc > orig_loc, size_t new_len)
static CRef< CSeq_loc > ExtendToStopCodon(CRef< CSeq_feat > feat, CScope *scope)
ENa_strand GetStrandForLastInterval(const CSeq_loc &loc)
CBioseq_Handle GetBioseqHandleForMultihomeLocation(CScope &scope, const CSeq_loc &loc)
static void s_ExtendIntervalToEnd(CSeq_interval &ival, size_t len)
DEFINE_STATIC_ARRAY_MAP(TLegalExceptions, sc_LegalExceptions, s_ValidExceptions)
static const char * kUpdateGeneSpan
static const char *const s_ValidExceptions[]
virtual bool TransferDataFromWindow()
void SetExceptions(objects::CCdregion &cds)
void Init()
Initialises member variables.
wxStaticText * m_ProteinLengthTxt
bool Create(wxWindow *parent, wxWindowID id=ID_CCDSTRANSLATIONPANEL, const wxString &caption=_("CDS TranslationPanel"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
virtual bool TransferDataFromWindow()
static bool IsValidException(const string &text)
objects::CScope * m_Scope
void OnProductChanged(wxCommandEvent &event)
void AdjustForStopCodonHyperlinkClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL2
void SetProduct(objects::CSeq_feat &feat)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
wxTextCtrl * m_TranslationCtrl
virtual void SaveSettings() const
void CreateControls()
Creates the controls and sizers.
void OnRetranslateOnOkChanged(wxCommandEvent &event)
virtual void SetRegistryPath(const string ®_path)
virtual void LoadSettings()
map< string, CConstRef< objects::CSeq_id > > m_SeqIds
wxOwnerDrawnComboBox * m_ProductCtrl
~CCDSTranslationPanel()
Destructor.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void x_UpdateForceNear(const string &val)
bool ShouldCreateNewProductSeq()
void OnPredictIntervalHyperlinkClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_PREDICT_INTERVAL
wxCheckBox * m_ConflictCtrl
void SetProtein(objects::CBioseq &bioseq)
void OnRetranslateLinkHyperlinkClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_RETRANSLATE_LINK
void x_NormalizeGeneticCodeName(string &code_name)
wxHyperlinkCtrl * m_RetranslateLink
@ ID_RETRANSLATE_ON_OK_BTN
void x_SetProtein(const objects::CBioseq &protein, CRef< objects::CSeq_feat > cds, objects::CSeq_entry_Handle seh)
CRef< objects::CSeq_feat > m_EditedFeat
wxCheckBox * m_UpdatemRNASpan
void SetProductId(const string &val)
void OnImportCdsProteinHyperlinkClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_IMPORT_CDS_PROTEIN
virtual bool TransferDataToWindow()
CCDSTranslationPanel()
Constructors.
wxCheckBox * m_UpdateGeneSpan
static bool ShowToolTips()
Should we show tooltips?
void DisableRetranslateOnOk(bool exception, bool pseudo)
CRef< objects::CSeq_id > GetProductId()
CRef< objects::CBioseq > m_EditedBioseq
void x_SetLocationForProtein(CRef< objects::CSeq_feat > cds, objects::CSeq_entry_Handle seh)
wxCheckBox * m_RetranslateOnOkBtn
virtual void SetRegistryPath(const string &path)
static const CTrans_table & GetTransTable(int id)
static const CGenetic_code_table & GetCodeTable(void)
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
void SetSeq_loc(CSerialObject &object)
virtual bool TransferDataFromWindow()
CRef< objects::CSeq_loc > GetSeq_loc() const
IObjectLoader * GetObjectLoader()
void SetManagers(vector< CIRef< IOpenObjectsPanelClient > > &managers)
Output filtering parameters.
@ ePassThrough
all zeroes - no filtering
spliced protein to genomic alignment
CRef< objects::CSeq_align > FindAlignment(objects::CScope &scope, const objects::CSeq_id &protein, const objects::CSeq_loc &genomic, CProSplignOutputOptions output_options=CProSplignOutputOptions())
Aligns protein to a region on genomic sequence.
class CRegistryReadView provides a nested hierarchical view at a particular key.
bool GetBool(const string &key, bool default_val=false) const
void Set(const string &key, int val)
access a named key at this level, with no recursion
SeqMap related exceptions.
namespace ncbi::objects::
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
char GetCodonResidue(int state) const
static int NextCodonState(int state, unsigned char ch)
virtual bool PreExecute()=0
virtual bool PostExecute()=0
vector< SObject > TObjects
const_iterator end() const
const_iterator find(const key_type &key) const
static const char * str(char *buf, int n)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
void NcbiWarningBox(const string &message, const string &title="Warning")
specialized Message Box function for reporting non-critical errors
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
@ fParse_Default
By default in ParseIDs and IsValid, allow raw parsable non-numeric accessions and plausible local acc...
@ eFasta
Tagged ID in NCBI's traditional FASTA style.
bool IsPartialStart(ESeqLocExtremes ext) const
check start or stop of location for e_Lim fuzz
ENa_strand GetStrand(void) const
Get the location's strand.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
CConstRef< CSeq_loc > GetRangeAsSeq_loc(void) const
Get seq-loc for the current iterator position.
void Add(const CSeq_loc &other)
Simple adding of seq-locs.
bool IsSetStrand(EIsSetStrand flag=eIsSetStrand_Any) const
Check if strand is set for any/all part(s) of the seq-loc depending on the flag.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
void SetPartialStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
ENa_strand GetStrand(void) const
const CSeq_id & GetSeq_id(void) const
Get seq_id of the current location.
void SetStrand(ENa_strand strand)
Set the strand for all of the location's ranges.
void SetPartialStop(bool val, ESeqLocExtremes ext)
bool IsPartialStop(ESeqLocExtremes ext) const
TSeqPos GetStop(ESeqLocExtremes ext) const
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
CRef< CSeq_loc > Seq_loc_Add(const CSeq_loc &loc1, const CSeq_loc &loc2, CSeq_loc::TOpFlags flags, CScope *scope)
Add two seq-locs.
bool IsPseudo(const CSeq_feat &feat, CScope &scope)
Determines whether given feature is pseudo, using gene associated with feature if necessary Checks to...
static void Translate(const string &seq, string &prot, const CGenetic_code *code, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=NULL, bool is_5prime_complete=true, bool is_3prime_complete=true)
Translate a string using a specified genetic code.
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void RemoveTopLevelSeqEntry(const CTSE_Handle &entry)
Revoke TSE previously added using AddTopLevelSeqEntry() or AddBioseq().
vector< CSeq_entry_Handle > TTSE_Handles
const CTSE_Handle & GetTSE_Handle(void) const
Get CTSE_Handle of containing TSE.
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
TSeqPos GetBioseqLength(void) const
CConstRef< CSeq_id > GetSeqId(void) const
Get id which can be used to access this bioseq handle Throws an exception if none is available.
bool IsProtein(void) const
TInst_Length GetInst_Length(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
void SetCoding(TCoding coding)
const_iterator begin(void) const
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static bool EqualCase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-sensitive equality of a substring with another string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
static void TrimPrefixInPlace(string &str, const CTempString prefix, ECase use_case=eCase)
Trim prefix from a string (in-place)
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static const char label[]
bool IsSetSegs(void) const
Check if a value has been assigned to Segs data member.
TGenomic_strand GetGenomic_strand(void) const
Get the Genomic_strand member data.
const TSpliced & GetSpliced(void) const
Get the variant data.
list< CRef< CSpliced_seg_modifier > > TModifiers
bool IsSetGenomic_strand(void) const
Check if a value has been assigned to Genomic_strand data member.
list< CRef< CSpliced_exon > > TExons
const TExons & GetExons(void) const
Get the Exons member data.
bool IsSpliced(void) const
Check if variant Spliced is selected.
const TModifiers & GetModifiers(void) const
Get the Modifiers member data.
const TSegs & GetSegs(void) const
Get the Segs member data.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
bool IsSetCode(void) const
genetic code used Check if a value has been assigned to Code data member.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
void ResetCode(void)
Reset Code data member.
void SetProduct(TProduct &value)
Assign a value to Product data member.
void SetCode(TCode &value)
Assign a value to Code data member.
list< CRef< CGenetic_code > > Tdata
const TLocation & GetLocation(void) const
Get the Location member data.
bool IsSetConflict(void) const
conflict Check if a value has been assigned to Conflict data member.
TFrame GetFrame(void) const
Get the Frame member data.
const TData & GetData(void) const
Get the Data member data.
const TExcept_text & GetExcept_text(void) const
Get the Except_text member data.
bool IsSetExcept_text(void) const
explain if except=TRUE Check if a value has been assigned to Except_text data member.
const TCode & GetCode(void) const
Get the Code member data.
void ResetFrame(void)
Reset Frame data member.
void ResetConflict(void)
Reset Conflict data member.
void SetData(TData &value)
Assign a value to Data data member.
const TCdregion & GetCdregion(void) const
Get the variant data.
const TProduct & GetProduct(void) const
Get the Product member data.
const Tdata & Get(void) const
Get the member data.
void ResetProduct(void)
Reset Product data member.
void SetConflict(TConflict value)
Assign a value to Conflict data member.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
void SetFrame(TFrame value)
Assign a value to Frame data member.
TConflict GetConflict(void) const
Get the Conflict member data.
bool IsSetFrame(void) const
Check if a value has been assigned to Frame data member.
bool IsSetLocation(void) const
feature made from Check if a value has been assigned to Location data member.
@ eFrame_three
reading frame
void SetTo(TTo value)
Assign a value to To data member.
bool IsMix(void) const
Check if variant Mix is selected.
ENa_strand
strand of nucleic acid
TFrom GetFrom(void) const
Get the From member data.
virtual void Reset(void)
Reset the whole object.
void SetFrom(TFrom value)
Assign a value to From data member.
const Tdata & Get(void) const
Get the member data.
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
TStrand GetStrand(void) const
Get the Strand member data.
bool IsGi(void) const
Check if variant Gi is selected.
TTo GetTo(void) const
Get the To member data.
const TMix & GetMix(void) const
Get the variant data.
const TSeq & GetSeq(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
TSeq & SetSeq(void)
Select the variant.
TId & SetId(void)
Assign a value to Id data member.
void ResetId(void)
Reset Id data member.
void SetInst(TInst &value)
Assign a value to Inst data member.
void ResetInst(void)
Reset Inst data member.
@ eRepr_raw
continuous sequence
@ e_Ncbieaa
extended ASCII 1 letter aa codes
static void text(MDB_val *v)
const struct ncbi::grid::netcache::search::fields::SIZE size
#define ID_HYPERLINKCTRL2
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)