1 #ifndef ALGO_SEQUENCE___GENE_MODEL__HPP
2 #define ALGO_SEQUENCE___GENE_MODEL__HPP
62 switch ( GetErrCode() ) {
64 return "Unknown error";
66 return "MicroIntron generation failure";
88 fMaximizeTranslation = 0x2000,
99 fCreateCdregion = 0x004,
100 fPromoteAllFeatures = 0x008,
101 fPropagateOnly = 0x010,
102 fForceTranslateCds = 0x020,
103 fForceTranscribeMrna = 0x040,
104 fDensegAsExon = 0x080,
105 fGenerateLocalIds = 0x100,
106 fGenerateStableLocalIds = 0x200,
107 fPropagateNcrnaFeats = 0x400,
108 fTrustProteinSeq = 0x800,
111 fDeNovoProducts = 0x4000,
112 fAddTranslatedCDSAssembly = 0x8000,
113 fDropManeMarkup = 0x00010000,
114 fSkipLocationCheck = 0x00020000,
116 fDefaults = fCreateGene | fCreateMrna | fCreateCdregion |
117 fGenerateLocalIds | fPropagateNcrnaFeats
128 static const TSeqPos kDefaultAllowedUnaligned = 10;
134 void SetAllowedUnaligned(
TSeqPos);
142 CleanAlignment(
const objects::CSeq_align& align);
153 eTryToPreserveProductPositions
156 AdjustAlignment(
const objects::CSeq_align& align,
TSeqRange range, EProductPositionsMode
mode = eForceProductFrom0);
164 objects::CSeq_annot& annot,
165 objects::CBioseq_set& seqs,
167 const objects::CSeq_feat* cdregion_on_mrna =
NULL);
170 objects::CSeq_annot &annot,
171 objects::CBioseq_set &seqs);
176 void ConvertLocToAnnot(
177 const objects::CSeq_loc &loc,
178 objects::CSeq_annot& annot,
179 objects::CBioseq_set& seqs,
180 objects::CCdregion::EFrame frame = objects::CCdregion::eFrame_one,
186 void SetFeatureExceptions(objects::CSeq_feat& feat,
187 const objects::CSeq_align* align =
NULL);
196 void RecomputePartialFlags(objects::CSeq_annot& annot);
214 size_t unaligned_ends_partialness_thr = kDefaultAllowedUnaligned);
220 const objects::CSeq_loc& product_cds_loc,
221 bool convert_overlaps =
true);
224 static void CreateMicroIntrons(
225 objects::CScope& scope,
226 objects::CBioseq_Handle bsh,
227 const string& annot_name =
"",
229 bool ignore_errors =
false);
236 static void x_SetAnnotName(objects::SAnnotSelector& sel,
const string& annot_name);
250 fDefaults = fCreateGene | fCreateMrna | fCreateCdregion
257 static void CreateGeneModelFromAlign(
const objects::CSeq_align& align,
258 objects::CScope& scope,
259 objects::CSeq_annot& annot,
260 objects::CBioseq_set& seqs,
262 TSeqPos allowed_unaligned = 10);
266 objects::CScope& scope,
267 objects::CSeq_annot& annot,
268 objects::CBioseq_set& seqs,
270 TSeqPos allowed_unaligned = 10);
275 static void SetFeatureExceptions(objects::CSeq_feat& feat,
276 objects::CScope& scope,
277 const objects::CSeq_align* align =
NULL);
280 static void SetPartialFlags(objects::CScope& scope,
286 static void RecomputePartialFlags(objects::CScope& scope,
287 objects::CSeq_annot& annot);
User-defined methods of the data storage class.
virtual const char * GetErrCodeString(void) const override
Get error code interpreted as text.
NCBI_EXCEPTION_DEFAULT(CAlgoFeatureGeneratorException, CException)
CRef< objects::CSeq_feat > ConvertAlignToAnnot(const objects::CSeq_align &align, objects::CSeq_annot &annot, objects::CBioseq_set &seqs, Int8 gene_id=0, const objects::CSeq_feat *cdregion_on_mrna=NULL)
Convert an alignment to an annotation.
unique_ptr< SImplementation > m_impl
CFeatureGenerator(objects::CScope &scope)
EProductPositionsMode
Adjust alignment to the specified range (cross-the-origin range on circular chromosome is indicated b...
EIntronStitchThresholdFlags
void ConvertAlignToAnnot(const list< CRef< objects::CSeq_align > > &aligns, objects::CSeq_annot &annot, objects::CBioseq_set &seqs)
CFeatureGenerator(CRef< objects::CScope > scope)
int TFeatureGeneratorFlags
int TGeneModelCreateFlags
namespace ncbi::objects::
Include a standard set of the NCBI C++ Toolkit most basic headers.
unsigned int TSeqPos
Type for sequence locations and lengths.
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
int64_t Int8
8-byte (64-bit) signed integer
#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.
#define NCBI_XALGOSEQ_EXPORT
range(_Ty, _Ty) -> range< _Ty >
Defines NCBI C++ exception handling.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.