59 #define NCBI_USE_ERRCODE_X Objtools_Edit
75 "Cannot initialize with a NULL bioseq handle");
130 "Cannot promote a non-Ftable annotation");
210 CSeq_feat::TXref::iterator it = feat.
SetXref().begin();
211 while ( it != feat.
SetXref().end() ) {
229 if (
data[
data.length() - 1] ==
'*' ) {
247 descr->
Set().push_back(desc);
248 prot.SetDescr(*descr);
290 if ( feat.
GetXref().empty() ) {
303 if ( (rna_map == 0) || (rna_map->
find(mrna) == rna_map->
end()) ) {
339 annot->
SetData().SetFtable().push_back(mcds);
392 descr->
Set().push_back(desc);
469 static const string kRNA =
"RNA";
470 static const string kCDS =
"CDS";
471 const string* ftype = feat.
GetData().
IsRna() ? &kRNA : &kCDS;
475 CSeq_feat::TQual::iterator it = feat.
SetQual().begin();
476 while ( it != feat.
SetQual().end() ) {
482 << qual.
GetVal() <<
" replacing " <<
id);
490 if ( feat.
GetQual().empty() ) {
542 if ( it != sc_BiomolMap.end() ) {
560 feat.
SetProduct().SetWhole().Assign(*prod_id);
583 bool partial_left,
bool partial_right)
const
587 prot->SetData().SetProt(prp);
594 prot->SetLocation(*loc);
636 bool include_stop,
bool remove_trailingX)
639 if ( include_stop ) {
642 if ( remove_trailingX ) {
665 bool changed =
false;
667 if ( partial5 && partial3 ) {
669 }
else if ( partial5 ) {
671 }
else if ( partial3 ) {
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eExtreme_Biological
5' and 3'
User-defined methods of the data storage class.
@Gb_qual.hpp User-defined methods of the data storage class.
ESubtype GetSubtype(void) const
@Seq_descr.hpp User-defined methods of the data storage class.
namespace ncbi::objects::
class CStaticArrayMap<> is an array adaptor that provides an STLish interface to statically-defined a...
TBase::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const struct type types[]
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define LOG_POST_X(err_subcode, message)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Warning(CExceptionArgs_Base &args)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
bool IsPartialStart(ESeqLocExtremes ext) const
check start or stop of location for e_Lim fuzz
void SetPartialStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
void SetPartialStop(bool val, ESeqLocExtremes ext)
bool IsPartialStop(ESeqLocExtremes ext) const
static void TranslateCdregion(string &prot, const CBioseq_Handle &bsh, const CSeq_loc &loc, const CCdregion &cdr, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=0, ETranslationLengthProblemOptions options=eThrowException)
translation coding region into ncbieaa protein sequence
CBioseq_Handle GetBioseqHandleFromTSE(const CSeq_id &id, const CTSE_Handle &tse)
Get bioseq handle for sequence withing one TSE.
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add bioseq, return bioseq handle.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CSeq_loc_Mapper_Base & SetMergeAbutting(void)
Merge only abutting intervals, keep overlapping.
@ eLocationToProduct
Map from the feature's location to product.
const CSeq_annot_Handle & GetAnnot(void) const
Get handle to seq-annot for this feature.
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
void SetDescr(TDescr &v) const
CBioseq_EditHandle MoveTo(const CSeq_entry_EditHandle &entry, int index=-1) const
Move current bioseq into seq-entry.
void Remove(void) const
Remove current annot.
virtual CConstRef< CSeq_feat > GetSeq_feat(void) const
void SetInst_Mol(TInst_Mol v) const
void SetInst_Seq_data(TInst_Seq_data &v) const
void SetInst_Length(TInst_Length v) const
CConstRef< CSeq_annot > GetCompleteSeq_annot(void) const
Complete and return const reference to the current seq-annot.
CConstRef< CSeq_id > GetSeqId(void) const
Get id which can be used to access this bioseq handle Throws an exception if none is available.
CSeq_annot_EditHandle AttachAnnot(CSeq_annot &annot) const
Attach an annotation.
void SetInst_Repr(TInst_Repr v) const
CSeq_entry_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
CBioseq_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
CSeq_annot_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
CScope & GetScope(void) const
Get scope this handle belongs to.
CSeq_entry_Handle GetExactComplexityLevel(CBioseq_set::EClass cls) const
Return level with exact complexity, or empty handle if not found.
CSeqFeatData::E_Choice GetFeatType(void) const
SAnnotSelector & SetResolveNone(void)
SetResolveNone() is equivalent to SetResolveMethod(eResolve_None).
TCoding GetCoding(void) const
Target sequence coding.
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
TObjectType * ReleaseOrNull(void)
Release a reference to the object and return a pointer to the object.
void Reset(void)
Reset reference object.
TObjectType * Release(void)
Release a reference to the object and return a pointer to the object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
const TVal & GetVal(void) const
Get the Val member data.
TXref & SetXref(void)
Assign a value to Xref data member.
void SetData(TData &value)
Assign a value to Data data member.
const TData & GetData(void) const
Get the Data member data.
bool IsProt(void) const
Check if variant Prot is selected.
void SetLocation(TLocation &value)
Assign a value to Location data member.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
const TLoc & GetLoc(void) const
Get the Loc member data.
void SetProduct(TProduct &value)
Assign a value to Product data member.
const TQual & GetQual(void) const
Get the Qual member data.
const TLocation & GetLocation(void) const
Get the Location member data.
list< CRef< CCode_break > > TCode_break
const TData & GetData(void) const
Get the Data member data.
bool CanGetData(void) const
Check if it is safe to call GetData method.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
bool IsPub(void) const
Check if variant Pub is selected.
void SetData(TData &value)
Assign a value to Data data member.
bool CanGetLocation(void) const
Check if it is safe to call GetLocation method.
TPseudo GetPseudo(void) const
Get the Pseudo member data.
void SetLoc(TLoc &value)
Assign a value to Loc data member.
const TProduct & GetProduct(void) const
Get the Product member data.
bool IsSetQual(void) const
Check if a value has been assigned to Qual data member.
bool IsSetPseudo(void) const
annotated on pseudogene? Check if a value has been assigned to Pseudo data member.
const TXref & GetXref(void) const
Get the Xref member data.
bool CanGetProduct(void) const
Check if it is safe to call GetProduct method.
const TQual & GetQual(void) const
Get the Qual member data.
void ResetXref(void)
Reset Xref data member.
TQual & SetQual(void)
Assign a value to Qual data member.
bool IsSetVal(void) const
Check if a value has been assigned to Val data member.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
bool IsRna(void) const
Check if variant Rna is selected.
void ResetQual(void)
Reset Qual data member.
@ e_Pub
publication applies to this seq
@ eClass_nuc_prot
nuc acid and coded proteins
@ eClass_gen_prod_set
genomic products, chrom+mRNA+protein
void SetCompleteness(TCompleteness value)
Assign a value to Completeness data member.
void SetData(TData &value)
Assign a value to Data data member.
bool IsSetCompleteness(void) const
Check if a value has been assigned to Completeness data member.
TId & SetId(void)
Assign a value to Id data member.
void SetBiomol(TBiomol value)
Assign a value to Biomol data member.
EMol
molecule class in living organism
TCompleteness GetCompleteness(void) const
Get the Completeness member data.
list< CRef< CSeq_feat > > TFtable
bool IsFtable(void) const
Check if variant Ftable is selected.
const TData & GetData(void) const
Get the Data member data.
Tdata & Set(void)
Assign a value to data member.
void SetTech(TTech value)
Assign a value to Tech data member.
TMolinfo & SetMolinfo(void)
Select the variant.
@ eRepr_raw
continuous sequence
@ eCompleteness_complete
complete biological entity
@ eCompleteness_no_left
missing 5' or NH3 end
@ eCompleteness_no_right
missing 3' or COOH end
@ eCompleteness_no_ends
missing both ends
@ eTech_concept_trans
conceptual translation
@ e_Ncbieaa
extended ASCII 1 letter aa codes
@ eBiomol_pre_RNA
precursor RNA of any sort really
@ eBiomol_transcribed_RNA
transcribed RNA other than existing classes
constexpr bool empty(list< Ts... >) noexcept
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...
bool AddSeqEntryToSeqEntry(const objects::CSeq_entry *entry, objects::CSeq_entry_Handle seh, CRef< CCmdComposite > cmd, bool &has_nuc, bool &has_prot, bool create_general_only)