106 vector<CTempString> values;
108 while (!reader.
AtEOF())
115 if (*current.
begin() ==
'#')
121 if (values.size() == 5)
124 new_cols.
name = values[0];
126 if (values[2] !=
"-")
134 new_cols.
mode = values[3][0];
135 new_cols.
source = values[4];
149 strdata.erase(it->first - removed, it->second);
150 removed += it->second;
161 string* encoded_str =
nullptr;
162 vector< char >* encoded_vec =
nullptr;
167 encoded_str = &lit.
SetSeq_data().SetIupacna().Set();
170 encoded_str = &lit.
SetSeq_data().SetIupacaa().Set();
173 encoded_vec = &lit.
SetSeq_data().SetNcbi2na().Set();
176 encoded_vec = &lit.
SetSeq_data().SetNcbi4na().Set();
179 encoded_vec = &lit.
SetSeq_data().SetNcbi8na().Set();
182 encoded_vec = &lit.
SetSeq_data().SetNcbipna().Set();
185 encoded_vec = &lit.
SetSeq_data().SetNcbi8aa().Set();
188 encoded_str = &lit.
SetSeq_data().SetNcbieaa().Set();
191 encoded_vec = &lit.
SetSeq_data().SetNcbipaa().Set();
194 encoded_vec = &lit.
SetSeq_data().SetNcbistdaa().Set();
209 decoded.erase(start, stop-start+1);
230 for (CDelta_ext::Tdata::iterator it = data.begin(); it != data.end();)
233 CDelta_ext::Tdata::iterator removable = it++;
236 int local_removed = 0;
240 const int start = it_locs->first;
241 if (start < current_abs+orig_lit_len-local_removed &&
242 current_abs < start+it_locs->second)
245 int local_start =
max(start-current_abs, 0);
246 int local_end = start+it_locs->second-local_removed-current_abs-1;
249 local_removed += (local_end-local_start+1);
253 data.erase(removable);
265 current_abs += orig_lit_len;
284 if (delta_seq.
IsLoc())
327 if (data.
mode ==
'X')
333 if (data.
mode ==
'M')
350 feat->
SetLocation().SetInt().SetFrom(it_loc->first + 1);
351 feat->
SetLocation().SetInt().SetTo(it_loc->first + it_loc->second);
352 feat->
SetData().SetImp().SetKey(
"misc_feature");
356 set_annot->
SetData().SetFtable().push_back(feat);
370 CSeq_entry::TSet::TSeq_set::iterator it = entry.
SetSet().
SetSeq_set().begin();
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.
TSeqPos GetLength(void) const
bool IsSetLength(void) const
bool xCheckLen(const objects::CBioseq &inst) const
void xTrimData(objects::CSeq_inst &inst, const Tlocs &col) const
void PostProcess(objects::CSeq_entry &entry)
void LoadFile(ILineReader &linereader)
void xTrimLiteral(objects::CSeq_literal &lit, int start, int end) const
void xTrimExt(objects::CSeq_inst &inst, const Tlocs &col) const
CForeignContaminationScreenReportReader(const CTable2AsnContext &context)
const CTable2AsnContext & m_context
bool AnnotateOrRemove(objects::CSeq_entry &entry) const
~CForeignContaminationScreenReportReader()
static SIZE_TYPE Convert(const CTempString &src, TCoding src_coding, TSeqPos pos, TSeqPos length, string &dst, TCoding dst_coding)
void GetLabel(string *label, ELabelType type) const
namespace ncbi::objects::
TSeqPos m_minimal_sequence_length
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Abstract base class for lightweight line-by-line reading.
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
Operators to edit gaps in sequences.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
const TPrim & Get(void) const
CTempString GetCurrentLine(void) const
virtual bool AtEOF(void) const =0
Indicates (negatively) whether there is any more input.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
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.
bool empty(void) const
Return true if the represented string is empty (i.e., the length is zero)
void clear(void)
Clears the string.
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.
const_iterator begin() const
Return an iterator to the string's starting position.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
@ fSplit_ByPattern
Require full delimiter strings.
static const char label[]
void SetLocation(TLocation &value)
Assign a value to Location data member.
void SetComment(const TComment &value)
Assign a value to Comment data member.
void SetData(TData &value)
Assign a value to Data data member.
const TSeq & GetSeq(void) const
Get the variant data.
TSet & SetSet(void)
Select the variant.
bool IsSeq(void) const
Check if variant Seq is selected.
bool IsSet(void) const
Check if variant Set is selected.
TSeq & SetSeq(void)
Select the variant.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
TLiteral & SetLiteral(void)
Select the variant.
void SetLength(TLength value)
Assign a value to Length data member.
void SetData(TData &value)
Assign a value to Data data member.
TId & SetId(void)
Assign a value to Id data member.
bool IsSetSeq_data(void) const
the sequence Check if a value has been assigned to Seq_data data member.
const TInst & GetInst(void) const
Get the Inst member data.
void SetSeq_data(TSeq_data &value)
Assign a value to Seq_data data member.
const TIupacna & GetIupacna(void) const
Get the variant data.
void SetExt(TExt &value)
Assign a value to Ext data member.
const TLiteral & GetLiteral(void) const
Get the variant data.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
bool IsLoc(void) const
Check if variant Loc is selected.
const TId & GetId(void) const
Get the Id member data.
bool IsSetExt(void) const
extensions for special types Check if a value has been assigned to Ext data member.
bool IsSetInst(void) const
the sequence data Check if a value has been assigned to Inst data member.
TLength GetLength(void) const
Get the Length member data.
bool IsDelta(void) const
Check if variant Delta is selected.
void SetInst(TInst &value)
Assign a value to Inst data member.
const TExt & GetExt(void) const
Get the Ext member data.
const TDelta & GetDelta(void) const
Get the variant data.
const Tdata & Get(void) const
Get the member data.
bool IsLiteral(void) const
Check if variant Literal is selected.
bool IsSetSeq_data(void) const
may have the data Check if a value has been assigned to Seq_data data member.
void SetLength(TLength value)
Assign a value to Length data member.
list< CRef< CDelta_seq > > Tdata
bool IsGap(void) const
Check if variant Gap is selected.
void SetSeq_data(TSeq_data &value)
Assign a value to Seq_data data member.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
E_Choice Which(void) const
Which variant is currently selected.
@ e_Ncbipna
nucleic acid probabilities
@ e_Ncbieaa
extended ASCII 1 letter aa codes
@ e_Ncbistdaa
consecutive codes for std aas
@ e_Ncbi2na
2 bit nucleic acid code
@ e_Iupacna
IUPAC 1 letter nuc acid code.
@ e_Ncbipaa
amino acid probabilities
@ 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