45 #define NCBI_USE_ERRCODE_X Objtools_Fmt_CIGAR
58 m_IsFirstSubalign(
true),
66 m_FormatBy(eFormatBy_NotSet)
137 "Conversion of alignments of type dendiag and packed "
138 "not supported in current CIGAR output");
151 ERR_POST_X(1,
"CCIGAR_Formatter::x_GetRowById: "
152 "no row with a matching ID found: " <<
id.AsFastaString());
192 "Widths in alignments do not have clear semantics, "
193 "and thus are not supported in current CIGAR output");
256 frameshift = +(ref_piece.
GetLength()%width);
280 "Frameshift(s) in Spliced-exon-chunk's diag "
281 "not supported in current CIGAR output");
326 last_frameshift += frameshift;
333 if (last_frameshift) {
336 (last_frameshift < 0 ?
'F' :
'R'),
337 abs(last_frameshift));
342 last_frameshift = frameshift;
388 if (width_inverted) {
391 ds_for_alnmix = &ds_no_widths;
513 cigar << seg_len << seg_type;
static CRef< CScope > m_Scope
User-defined methods of the data storage class.
User-defined methods of the data storage class.
TSegTypeFlags GetSegType(TNumrow row, TNumseg seg, int offset=0) const
const CSeq_id & GetSeqId(TNumrow row) const
TDim GetNumRows(void) const
unsigned int TSegTypeFlags
TSignedRange GetRange(TNumrow row, TNumseg seg, int offset=0) const
int StrandSign(TNumrow row) const
TNumseg GetNumSegs(void) const
void Assign(const CSerialObject &obj, ESerialRecursionMode how=eRecursive)
overloaded Assign()
const TWidths & GetWidths(void) const
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
CRef< CSeq_align > CreateDensegFromStdseg(SSeqIdChooser *SeqIdChooser=0) const
---------------------------------------------------------------------------- PRE : the Seq-align has ...
CRef< CSeq_align > AsDiscSeg() const
Convert this alignment to a discontinuous segment.
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
int TSignedSeqPos
Type for signed sequence position.
#define ERR_POST_X(err_subcode, message)
Error posting with default error code and given error subcode.
#define STD_CATCH_ALL_X(err_subcode, message)
Standard handling of "exception"-derived exceptions; catches non-standard exceptions and generates "u...
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual void EndSubAlignment(void)
CScope * GetScope(void) const
TNumrow x_GetRowById(const CSeq_id &id)
void FormatByReferenceRow(TNumrow ref_row)
CConstRef< CSeq_id > m_TargetId
virtual void EndRows(void)
const CSeq_align & GetSeq_align(void) const
const CSeq_align * m_CurAlign
virtual void StartRow(void)
CConstRef< CSeq_id > m_RefId
void x_FormatLine(bool width_inverted)
void x_FormatAlignmentRows(void)
virtual void StartSubAlignment(void)
virtual void AddSegment(CNcbiOstream &cigar, char seg_type, TSeqPos seg_len)
virtual void AdjustSeqIdType(CConstRef< CSeq_id > &)
bool IsSetFlag(ECIGARFlags flag) const
virtual void StartRows(void)
void FormatByReferenceId(const CSeq_id &ref_id)
void FormatByTargetId(const CSeq_id &target_id)
virtual void EndAlignment(void)
void x_FormatDensegRows(const CDense_seg &ds, bool width_inverted)
virtual void StartAlignment(void)
CConstRef< CDense_seg > m_DenseSeg
virtual void AddRow(const string &)
void FormatByTargetRow(TNumrow target_row)
virtual void EndRow(void)
virtual ~CCIGAR_Formatter(void)
@ fCIGAR_GffForFlybase
Flybase flavour of GFF3.
bool IsSameBioseq(const CSeq_id &id1, const CSeq_id &id2, CScope *scope, CScope::EGetBioseqFlag get_flag=CScope::eGetBioseq_All)
Determines if two CSeq_ids represent the same CBioseq.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty – pointing to an object and has a non-null value.
bool NotNull(void) const THROWS_NONE
Check if pointer is not null – same effect as NotEmpty().
position_type GetLength(void) const
static TThisType GetEmpty(void)
#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.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
void SetFrom(TFrom value)
Assign a value to From data member.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
void SetTo(TTo value)
Assign a value to To data member.
const TDenseg & GetDenseg(void) const
Get the variant data.
TScore & SetScore(void)
Assign a value to Score data member.
E_Choice Which(void) const
Which variant is currently selected.
const TSpliced & GetSpliced(void) const
Get the variant data.
bool IsSetScore(void) const
for whole alignment Check if a value has been assigned to Score data member.
list< CRef< CSeq_align > > Tdata
const TScore & GetScore(void) const
Get the Score member data.
const TDisc & GetDisc(void) const
Get the variant data.
const Tdata & Get(void) const
Get the member data.
const TSegs & GetSegs(void) const
Get the Segs member data.
bool IsDenseg(void) const
Check if variant Denseg is selected.
#define row(bind, expected)