72 && !
Get().back()->GetLiteral().IsSetSeq_data()
73 && !
Get().back()->GetLiteral().IsSetFuzz()) {
75 Set().back()->SetLiteral().SetLength() +=
len;
80 seg->SetLiteral().SetLength(
len);
97 seg->SetLiteral().SetSeq_data().SetIupacaa().Set().assign(iupac_seq.
data(), iupac_seq.
length());
103 seg->SetLiteral().SetSeq_data().SetIupacna().Set().assign(iupac_seq.
data(), iupac_seq.
length());
110 "CDelta_ext::AddLiteral(): unhandled mol type");
114 Set().push_back(seg);
153 #define CODING_CASE_EX(key, type, setter, len) \
154 case CSeqUtil::key: \
156 type& dest = lit.SetSeq_data().setter(); \
157 dest.Set().resize(len); \
158 return &dest.Set()[0]; \
160 #define CODING_CASE(name, type) \
161 CODING_CASE_EX(e_##name, type, Set##name, length)
174 #undef CODING_CASE_EX
178 "CDelta_ext_PackTarget: unexpected coding");
185 bool gaps_ok,
bool allow_packing)
224 seg->SetLoc().SetInt().SetFrom(from);
225 seg->SetLoc().SetInt().SetTo (to);
226 seg->SetLoc().SetId(
id);
227 seg->SetLoc().SetStrand(strand);
229 Set().push_back(seg);
#define CODING_CASE(name, type)
#define CODING_CASE_EX(key, type, setter, len)
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CDelta_ext_PackTarget(CDelta_ext &obj, bool gaps_ok)
virtual bool GapsOK(TCodingType) const
char * NewSegment(TCoding coding, TSeqPos length)
SIZE_TYPE GetOverhead(TCoding coding) const
void AddAndSplit(const CTempString &src, CSeq_data::E_Choice format, TSeqPos length, bool gaps_ok=false, bool allow_packing=true)
add a chunk of sequence, splitting it as necessary for the sake of compactness (isolating ambiguous p...
CDelta_seq & AddSeqRange(const CSeq_id &id, TSeqPos from, TSeqPos to, ENa_strand strand=eNa_strand_plus)
add a segment that refers to another segment
CDelta_seq & AddLiteral(TSeqPos len)
add a literal segment at the end this variant adds a gap literal
CSeqUtil::ECoding TCoding
static SIZE_TYPE Pack(const string &src, TCoding src_coding, vector< char > &dst, TCoding &dst_coding, TSeqPos length=ncbi::numeric_limits< TSeqPos >::max())
static TSeqPos Pack(CSeq_data *in_seq, TSeqPos uLength=ncbi::numeric_limits< TSeqPos >::max())
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
unsigned int TSeqPos
Type for sequence locations and lengths.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_STD::string::size_type SIZE_TYPE
const char * data(void) const
Return a pointer to the array represented.
size_type length(void) const
Return the length of the represented array.
size_type size(void) const
Return the length of the represented array.
ENa_strand
strand of nucleic acid
void SetLength(TLength value)
Assign a value to Length data member.
void SetSeq_data(TSeq_data &value)
Assign a value to Seq_data data member.
Tdata & Set(void)
Assign a value to data member.
EMol
molecule class in living organism
const Tdata & Get(void) const
Get the member data.
@ e_Ncbieaa
extended ASCII 1 letter aa codes
@ e_Ncbistdaa
consecutive codes for std aas
@ e_Iupacna
IUPAC 1 letter nuc acid code.
@ e_Ncbi8na
8 bit extended nucleic acid code
@ e_Ncbi4na
4 bit nucleic acid code
@ e_Iupacaa
IUPAC 1 letter amino acid code.
@ e_Ncbi8aa
8 bit extended amino acid codes
@ eMol_na
just a nucleic acid
constexpr bool empty(list< Ts... >) noexcept