92 #include <unordered_set>
98 #define NCBI_USE_ERRCODE_X Objtools_Rd_Feature
108 static const char *
const kCdsFeatName =
"CDS";
142 Uchar best_weight = UCHAR_MAX;
145 Uchar new_weight = std_order[(*it)->Which()];
146 if (new_weight < best_weight)
149 best_weight = new_weight;
160 {
'A', list<char>({
'A'})},
161 {
'G', list<char>({
'G'})},
162 {
'C', list<char>({
'C'})},
163 {
'T', list<char>({
'T'})},
164 {
'U', list<char>({
'U'})},
165 {
'M', list<char>({
'A',
'C'})},
166 {
'R', list<char>({
'A',
'G'})},
167 {
'W', list<char>({
'A',
'T'})},
168 {
'S', list<char>({
'C',
'G'})},
169 {
'Y', list<char>({
'C',
'T'})},
170 {
'K', list<char>({
'G',
'T'})},
171 {
'V', list<char>({
'A',
'C',
'G'})},
172 {
'H', list<char>({
'A',
'C',
'T'})},
173 {
'D', list<char>({
'A',
'G',
'T'})},
174 {
'B', list<char>({
'C',
'G',
'T'})},
175 {
'N', list<char>({
'A',
'C',
'G',
'T'})}
314 const string &seq_id,
319 const string& feat_name,
323 const string &seq_id );
331 const unsigned int line_number,
380 const string &feat_name,
381 const string& qual,
const string&
val,
385 const string& qual_val,
386 const string& feat_name,
397 EQual qtype,
const string& qual,
const string&
val);
399 const string &feat_name,
409 const string& feat_name,
414 const string& qual,
const string&
val);
781 {
"Asp or Asn",
'B' },
782 {
"Asparagine",
'N' },
783 {
"Aspartate",
'D' },
784 {
"Aspartic Acid",
'D' },
790 {
"Glu or Gln",
'Z' },
791 {
"Glutamate",
'E' },
792 {
"Glutamic Acid",
'E' },
793 {
"Glutamine",
'Q' },
798 {
"Histidine",
'H' },
801 {
"Isoleucine",
'I' },
803 {
"Leu or Ile",
'J' },
808 {
"Methionine",
'M' },
811 {
"Phenylalanine",
'F' },
815 {
"Pyrrolysine",
'O' },
817 {
"Selenocysteine",
'U' },
822 {
"Termination",
'*' },
824 {
"Threonine",
'T' },
826 {
"Tryptophan",
'W' },
842 "environmental_sample",
848 "ribosomal_slippage",
856 : m_reader(reader), m_LineNumber(
line_num), m_pMessageListener(pMessageListener)
905 out_offset = new_offset;
923 bool isminus =
false;
924 bool ispoint =
false;
926 bool partial5 =
false;
927 bool partial3 =
false;
931 string start, stop, feat, qual,
val, stnd;
935 if (line.
empty ())
return false;
942 numtkns = tkns.size ();
959 if(
val.length() >= 2 &&
val[0] ==
'"' &&
val[
val.length()-1] ==
'"' ) {
967 bool has_start =
false;
968 if (! start.empty ()) {
969 if (start [0] ==
'<') {
973 len = start.length ();
974 if (
len > 1 && start [
len - 1] ==
'^') {
976 start [
len - 1] =
'\0';
983 bool has_stop =
false;
984 if (! stop.empty ()) {
985 if (stop [0] ==
'>') {
994 if ( startv <= 0 || stopv <= 0 ) {
1000 if (! stnd.empty ()) {
1001 if (stnd ==
"minus" || stnd ==
"-" || stnd ==
"complement") {
1019 if ((has_start && startv < 0) || (has_stop && stopv < 0)) {
1026 loc_info.
start_pos = ( startv < 0 ? -1 : startv);
1027 loc_info.
stop_pos = ( stopv < 0 ? -1 : stopv);
1176 vector<string> &out_tokens )
1181 string::size_type startPosOfNextRoundOfTokenization = 0;
1182 while ( startPosOfNextRoundOfTokenization < line.
size() ) {
1183 auto posAfterSpaces = line.
find_first_not_of(
" ", startPosOfNextRoundOfTokenization );
1184 if( posAfterSpaces == string::npos ) {
1188 string::size_type posOfTab = line.
find(
'\t', posAfterSpaces );
1189 if( posOfTab == string::npos ) {
1190 posOfTab = line.
length();
1195 string &new_token = out_tokens.back();
1196 copy( line.
begin() + posAfterSpaces, line.
begin() + posOfTab, back_inserter(new_token) );
1199 startPosOfNextRoundOfTokenization = ( posOfTab + 1 );
1216 vector<string> &out_tokens )
1220 if( line.
empty() ) {
1230 if( start_of_qual == line.
end() ) {
1233 auto start_of_whitespace_after_qual = find_if( start_of_qual, line.
end(),
CIsSpace() );
1234 auto start_of_val = find_if( start_of_whitespace_after_qual, line.
end(),
CIsNotSpace() );
1243 string &qual = out_tokens.back();
1244 copy( start_of_qual, start_of_whitespace_after_qual, back_inserter(qual) );
1247 if( start_of_val != line.
end() ) {
1249 string &
val = out_tokens.back();
1250 copy( start_of_val, line.
end(), back_inserter(
val) );
1258 auto first_column_start = line.
begin();
1259 auto first_whitespace = find_if( first_column_start, line.
end(),
CIsSpace() );
1260 auto second_column_start = find_if( first_whitespace, line.
end(),
CIsNotSpace() );
1261 auto second_whitespace = find_if( second_column_start, line.
end(),
CIsSpace() );
1262 auto third_column_start = find_if( second_whitespace, line.
end(),
CIsNotSpace() );
1263 auto third_whitespace = find_if( third_column_start, line.
end(),
CIsSpace() );
1265 auto sixth_column_start = find_if( third_whitespace, line.
end(),
CIsNotSpace() );
1266 auto sixth_whitespace = find_if( sixth_column_start, line.
end(),
CIsSpace() );
1269 string &
first = out_tokens.back();
1270 copy( first_column_start, first_whitespace, back_inserter(
first) );
1273 string &second = out_tokens.back();
1274 copy( second_column_start, second_whitespace, back_inserter(second) );
1277 string &third = out_tokens.back();
1278 copy( third_column_start, third_whitespace, back_inserter(third) );
1280 if( sixth_column_start != line.
end() ) {
1286 string &sixth = out_tokens.back();
1287 copy( sixth_column_start, sixth_whitespace, back_inserter(sixth) );
1314 syn.push_back (
val);
1336 EQual qtype,
const string& val
1374 fun.push_back (
val);
1381 prod.push_back (
val);
1417 kCdsFeatName,
"transl_table",
val);
1436 if (ch >
' ' && ch !=
'"' && ch !=
'\'')
return false;
1447 const static char* kOrder =
"ORDER";
1450 string::size_type pos = 0;
1456 if( pos >= line.
length() ) {
1479 for( ; loc_iter; ++loc_iter ) {
1480 if( ! mix_pieces.empty() ) {
1481 mix_pieces.push_back( loc_piece_null );
1485 mix_pieces.push_back( new_piece );
1489 if( mix_pieces.size() > 1 ) {
1522 string normalized_string =
str;
1523 normalized_string.erase(
1525 end(normalized_string),
1526 [](
char c) {
return isspace(c);}),
1527 end(normalized_string));
1532 if (pos_end != string::npos) {
1533 string pos_str = normalized_string.substr (5, pos_end - 5);
1535 if (aa_start != string::npos) {
1537 if (seq_start != string::npos &&
1538 seq_start < aa_start+3) {
1542 size_t aa_length = (seq_start ==
NPOS) ?
1543 pos_str.size() - (aa_start+3) :
1544 seq_start - (aa_start+3);
1546 string abbrev = pos_str.substr (aa_start + 3, aa_length);
1554 aa->SetNcbieaa (t_iter->second);
1555 ext_trna.
SetAa(*aa);
1556 pos_str = pos_str.substr (0, aa_start);
1559 pos_str = pos_str.substr (0, pos_str.length() - 1);
1596 for( ; pos <
str.length(); ++pos ) {
1597 switch(
str[pos] ) {
1632 if( ! strToConvert.
empty() &&
isdigit(strToConvert[0]) ) {
1645 strFeatureName, strQualifierName, strToConvert );
1659 strFeatureName, strQualifierName, strToConvert );
1716 rrp.
SetExt().SetGen().SetQuals().Set().push_back(q);
1736 const auto aaval_it =
sm_TrnaKeys.find(aa_string.c_str());
1742 taa.SetNcbieaa(aaval_it->second);
1743 if (aa_string ==
"fMet" ||
1744 aa_string ==
"iMet" ||
1745 aa_string ==
"Ile2") {
1752 "tRNA",
"product",
val);
1764 "tRNA",
"anticodon",
val );
1798 if (
val.size() != 3) {
1804 for (
char char1 : s_IUPACmap.at(
val[0])) {
1805 for (
char char2 : s_IUPACmap.at(
val[1])) {
1806 for (
char char3 : s_IUPACmap.at(
val[2])) {
1808 codons.insert(codon_index);
1814 trna_ext.
SetAa().SetNcbieaa();
1815 for (
const auto codon_index :
codons) {
1816 trna_ext.
SetCodon().push_back(codon_index);
1836 const char*
str =
nullptr;
1846 if (
val !=
"other") {
1848 const vector<string>& allowed_values =
1850 if (find(allowed_values.cbegin(), allowed_values.cend(),
val)
1851 == allowed_values.cend()) {
1888 str =
"dbSnpSynonymyData";
1901 str =
"stsUserObject";
1917 str =
"cloneUserObject";
1944 const string &feat_name,
1961 if (g_iter != sm_GenomeKeys.end ()) {
1967 feat_name,
"organelle",
val );
2020 slist.push_back (ssp);
2039 mlist.push_back (omp);
2051 if (qual.empty ())
return false;
2062 if( ! potential_normalized_qual.
empty() ) {
2063 normalized_qual = potential_normalized_qual;
2067 auto& qlist = sfp->
SetQual ();
2069 gbq->
SetQual() = normalized_qual;
2075 qlist.push_back (gbq);
2088 typedef pair<TChoiceCI, TChoiceCI> TChoiceEqualRange;
2089 TChoiceEqualRange cds_equal_range =
2091 if( cds_equal_range.first == cds_equal_range.second )
2099 TStringToGeneAndLineMap locusToGeneAndLineMap;
2100 TStringToGeneAndLineMap locusTagToGeneAndLineMap;
2101 const TChoiceEqualRange gene_equal_range =
2103 for( TChoiceCI gene_choice_ci = gene_equal_range.first;
2104 gene_choice_ci != gene_equal_range.second;
2110 locusToGeneAndLineMap.insert(
2112 gene_ref.
GetLocus(), gene_feat_ref_and_line));
2115 locusTagToGeneAndLineMap.insert(
2123 for( TChoiceCI cds_choice_ci = cds_equal_range.first;
2124 cds_choice_ci != cds_equal_range.second ; ++cds_choice_ci)
2127 const TSeqPos cds_line_num = cds_choice_ci->second.m_uLineNum;
2132 if( ! pGeneXrefOnCDS ) {
2143 const string locus =
2148 const string locus_tag =
2157 typedef TStringToGeneAndLineMap::iterator TStrToGeneCI;
2158 typedef pair<TStrToGeneCI, TStrToGeneCI> TStrToGeneEqualRange;
2162 TStrToGeneEqualRange locus_equal_range =
2164 for( TStrToGeneCI locus_gene_ci = locus_equal_range.first;
2165 locus_gene_ci != locus_equal_range.second;
2169 auto gene_feat = locus_gene_ci->second.m_pFeat;
2170 if (gene_feat->GetData().GetGene().IsSetLocus_tag() &&
2171 gene_feat->GetData().GetGene().GetLocus_tag() != locus_tag) {
2175 locusGeneMatches.
insert(locus_gene_ci->second);
2181 TStrToGeneEqualRange locus_tag_equal_range =
2183 for( TStrToGeneCI locus_tag_gene_ci = locus_tag_equal_range.first;
2184 locus_tag_gene_ci != locus_tag_equal_range.second;
2185 ++locus_tag_gene_ci )
2188 auto gene_feat = locus_tag_gene_ci->second.m_pFeat;
2189 if (gene_feat->GetData().GetGene().IsSetLocus() &&
2190 gene_feat->GetData().GetGene().GetLocus() != locus) {
2194 locusTagGeneMatches.
insert(locus_tag_gene_ci->second);
2198 if( locusGeneMatches.
empty() ) {
2200 matchingGenes.
swap(locusTagGeneMatches);
2201 }
else if( locusTagGeneMatches.
empty() ) {
2203 matchingGenes.
swap(locusGeneMatches);
2207 locusGeneMatches.
begin(), locusGeneMatches.
end(),
2208 locusTagGeneMatches.
begin(), locusTagGeneMatches.
end(),
2209 inserter(matchingGenes, matchingGenes.
begin()));
2217 const CSeq_loc & gene_loc = gene_feat_and_line_ci->m_pFeat->GetLocation();
2218 const TSeqPos gene_line_num = gene_feat_and_line_ci->m_uLineNum;
2226 if( pCdsMinusGeneLoc &&
2227 ! pCdsMinusGeneLoc->
IsNull() &&
2228 ! pCdsMinusGeneLoc->
IsEmpty() )
2231 if( gene_line_num > 0 ) {
2232 gene_lines.push_back(gene_line_num);
2247 matchingGenes.
empty() )
2251 pNewGene->
SetData().SetGene().Assign( *pGeneXrefOnCDS );
2258 the_ftable.push_back(pNewGene);
2266 locusToGeneAndLineMap.insert(
2268 pGeneXrefOnCDS->
GetLocus(), gene_feat_and_line));
2271 locusTagToGeneAndLineMap.insert(
2291 string lqual = qual;
2325 const string& feat_name,
2327 const string& val) {
2333 if (qual !=
"note") {
2334 string error_message =
2335 qual +
" is not a valid qualifier for this feature. Converting to note.";
2338 feat_name, qual,
kEmptyStr, error_message);
2345 const string &feat_name,
2368 if (o_iter != sm_OrgRefKeys.end ()) {
2369 EOrgRef rtype = o_iter->second;
2374 if (s_iter != sm_SubSrcKeys.end ()) {
2382 if (m_iter != sm_OrgModKeys.end ()) {
2396 if (q_iter != sm_QualKeys.end ()) {
2397 EQual qtype = q_iter->second;
2439 sfdata.
SetPub().SetPub().Set().push_back( new_pub );
2449 sfdata.
SetProt().SetActivity().push_back(
val );
2482 if (
val ==
"experimental") {
2484 }
else if (
val ==
"not_experimental" ||
val ==
"non_experimental" ||
2485 val ==
"not-experimental" ||
val ==
"non-experimental") {
2493 string prefix, remainder;
2501 feat_name, qual,
val);
2507 string val_copy =
val;
2582 syn.push_back (
val);
2606 static const char* digits =
"0123456789";
2612 dblist.push_back (dbt);
2635 feat_name, qual,
val,
2656 feat_name, qual,
val,
2657 "Invalid transcript_id : " +
val);
2661 for (
const auto&
id : ids) {
2662 auto id_string =
id->GetSeqIdString(
true);
2664 if (res.second ==
false) {
2667 feat_name, qual,
val,
2668 "Transcript ID " + id_string +
" appears on multiple mRNA features"
2695 feat_name, qual,
val,
2696 "Invalid protein_id : " +
val);
2701 for (
const auto&
id : ids) {
2702 auto id_string =
id->GetSeqIdString(
true);
2704 if (res.second ==
false) {
2707 feat_name, qual,
val,
2708 "Protein ID " + id_string +
" appears on multiple CDS features"
2731 feat_name, qual,
val );
2747 if( line.
length() < 6 ) {
2751 if( line[0] ==
'=' ) {
2753 "===================================================================";
2757 }
else if( line[0] ==
' ') {
2804 const Int4 orig_start = start;
2818 if (loc_info.
is_point || start == stop ) {
2820 if (mix_set.empty())
2835 if( stop != (start+1) ) {
2870 if( ! mix_set.empty() ) {
2871 const CSeq_loc & last_loc = *mix_set.back();
2881 mix_set.push_back(loc);
2901 if (feat.empty ())
return false;
2943 rrp.
SetExt().SetGen().SetClass(
"snRNA");
2947 rrp.
SetExt().SetGen().SetClass(
"scRNA");
2951 rrp.
SetExt().SetGen().SetClass(
"snoRNA");
2962 rrp.
SetExt().SetName(
"misc_RNA");
3025 imp.
SetKey (
"misc_feature");
3046 const string& strFeatureName,
3047 const string& strQualifierName,
3048 const string& strQualifierValue,
3049 const string& strErrorMessage,
3067 const string & strFeatureName,
3068 const string & strQualifierName,
3069 const string & strQualifierValue,
3070 const string& strErrorMessage,
3081 strQualifierName, strQualifierValue));
3083 pErr->AddOtherLine(*line_it);
3094 const unsigned int line_number,
3114 curr_feat_intervals_done =
false;
3122 if (
last.IsInt() &&
last.GetInt().IsSetStrand())
3124 strand =
last.GetInt().GetStrand();
3127 if (
last.IsPnt() &&
last.GetPnt().IsSetStrand())
3129 strand =
last.GetPnt().GetStrand();
3139 for (
auto pSeqLoc : feat.
SetLocation().SetMix().Set()) {
3140 if (pSeqLoc->IsPnt()) {
3141 auto& seq_point = pSeqLoc->SetPnt();
3142 const auto old_strand =
3143 seq_point.IsSetStrand() ?
3144 seq_point.GetStrand() :
3147 seq_point.SetStrand(strand);
3148 if (old_strand != strand) {
3173 (!feat->
SetData().SetPub().IsSetPub() ||
3174 feat->
SetData().SetPub().GetPub().Get().empty())) {
3179 string msg =
"Reference feature is empty. Skipping feature.";
3210 const string& qual_val,
3211 const string& feat_name,
3260 string feat, qual, qual_value;
3261 string curr_feat_name;
3265 bool ignore_until_next_feature_key =
false;
3272 const bool bIgnoreWebComments =
3296 bool curr_feat_intervals_done =
false;
3298 if (! in_annotname.
empty ()) {
3301 annot->
SetName (in_annotname);
3302 descr.
Set().push_back (annot);
3328 if (line [0] ==
'[') {
3345 if( loc_with_nulls ) {
3352 replace( qual_value.begin(), qual_value.end(),
'\"',
'\'' );
3375 best_CDS_finder.
AddFeat( *sfp );
3381 ignore_until_next_feature_key =
false;
3383 curr_feat_name = feat;
3389 ignore_until_next_feature_key =
true;
3392 }
else if (ignore_until_next_feature_key) {
3403 qual_value.empty ()) {
3405 if( curr_feat_intervals_done ) {
3409 ignore_until_next_feature_key =
true;
3423 curr_feat_intervals_done =
true;
3426 else if (!feat.empty()) {
3432 curr_feat_intervals_done =
true;
3460 const string &seq_id,
3491 if (id->IsGenbank())
3506 const string& feat_name,
3510 const string &seq_id1 )
3519 if (!
val.empty ()) {
3546 out_annotname.
clear();
3600 ReadSeqAnnot( lr, pMessageListener ).ReleaseOrNull() );
3615 const string& seqid,
3616 const string& annotname,
3628 const string& seqid,
3629 const string& annotname,
3637 return impl.ReadSequinFeatureTable(seqid, annotname,
flags, filter);
3666 const string& seqid_prefix)
3676 while (orig_seqid.
empty () && !pLineReader->AtEOF() ) {
3680 static_cast<unsigned>(pLineReader->GetLineNumber()),
3686 if (seqid_prefix.empty()) {
3689 if (orig_seqid.
find(
'|') == string::npos)
3690 temp_seqid = seqid_prefix + orig_seqid;
3694 temp_seqid = seqid_prefix + orig_seqid.
substr(4);
3696 orig_seqid = temp_seqid;
3707 const string& seqid_prefix
3718 const string& seqid_prefix
3739 const list<string>& stringFlags,
3759 struct SCSeqidCompare
3764 return *left < *right;
3781 seq_map[seq_id->GetPointer()].Reset(&*seqit);
3786 while ( !reader.
AtEOF() ) {
3789 if (entry.
IsSeq()) {
3793 _ASSERT(annot->GetData().IsFtable());
3794 if (annot->GetData().GetFtable().empty()) {
3802 seq = seq_map[feat_id].GetPointer();
3807 <<
"ReadSequinFeatureTables: unable to find match for "
3820 unsigned int line_number,
3826 return impl.CreateSeqFeat (feat,
location,
flags, (seq_id ? *seq_id :
string() ), filter);
3832 const string& feat_name,
3838 const string &seq_id
3843 impl.AddFeatQual (sfp, feat_name, qual,
val,
flags, seq_id) ;
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.
@ eExtreme_Biological
5' and 3'
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.
void remove_if(Container &c, Predicate *__pred)
bool AddFeat(const CSeq_feat &new_cds)
bool x_AddQualifierToFeature(CRef< CSeq_feat > sfp, const string &feat_name, const string &qual, const string &val, const TFlags flags)
static void PutProgress(const CTempString &seq_id, const unsigned int line_number, ILineErrorListener *pListener)
CSeq_annot::C_Data::TFtable TFtable
bool x_TryToParseOffset(const CTempString &sLine, Int4 &out_offset)
void AddFeatQual(CRef< CSeq_feat > sfp, const string &feat_name, const string &qual, const string &val, const TFlags flags, const string &seq_id)
@ eQual_mobile_element_type
@ eQual_ribosomal_slippage
@ eQual_secondary_accession
bool x_AddQualifierToImp(CRef< CSeq_feat > sfp, CSeqFeatData &sfdata, EQual qtype, const string &qual, const string &val)
static bool ParseInitialFeatureLine(const CTempString &line_arg, CTempStringEx &out_seqid, CTempStringEx &out_annotname)
bool x_AddNoteToFeature(CRef< CSeq_feat > sfp, const string ¬e)
CConstRef< CSeq_feat > TFeatConstRef
void x_TokenizeStrict(const CTempString &line, vector< string > &out_tokens)
bool x_AddQualifierToGene(CSeqFeatData &sfdata, EQual qtype, const string &val)
ILineReader *const GetLineReaderPtr(void)
string x_TrnaToAaString(const string &val)
bool x_AddIntervalToFeature(CTempString strFeatureName, CRef< CSeq_feat > &sfp, const SFeatLocInfo &loc_info)
unsigned int m_LineNumber
void x_ProcessQualifier(const string &qual_name, const string &qual_val, const string &feat_name, CRef< CSeq_feat > feat, TFlags flags)
void x_InitId(const CTempString &seq_id, const TFlags flags)
multimap< CSeqFeatData::E_Choice, SFeatAndLineNum > TChoiceToFeatMap
bool x_AddQualifierToRna(CRef< CSeq_feat > sfp, EQual qtype, const string &val)
void x_ResetFeat(CRef< CSeq_feat > &feat, bool &curr_feat_intervals_done)
CRef< CSeq_annot > ReadSequinFeatureTable(const CTempString &seqid, const CTempString &annotname, const TFlags flags, ITableFilter *filter)
bool x_ParseTrnaExtString(CTrna_ext &ext_trna, const string &str)
void x_CreateGenesFromCDSs(CRef< CSeq_annot > sap, TChoiceToFeatMap &choiceToFeatMap, const TFlags flags)
long x_StringToLongNoThrow(CTempString strToConvert, CTempString strFeatureName, CTempString strQualifierName, ILineError::EProblem eProblem=ILineError::eProblem_Unset)
ILineErrorListener * m_pMessageListener
void x_FinishFeature(CRef< CSeq_feat > &feat, TFtable &ftable)
CFeatureTableReader_Imp(ILineReader *reader, unsigned int line_num, ILineErrorListener *pMessageListener)
bool x_AddGBQualToFeature(CRef< CSeq_feat > sfp, const string &qual, const string &val)
bool x_IsWebComment(CTempString line)
CFeature_table_reader::TFlags TFlags
ILineErrorListener *const GetErrorListenerPtr(void)
bool x_StringIsJustQuotes(const string &str)
void x_GetPointStrand(const CSeq_feat &feat, CSeq_interval::TStrand &strand) const
CRef< CSeq_feat > CreateSeqFeat(const string &feat, CSeq_loc &location, const TFlags flags, const string &seq_id, ITableFilter *filter)
SIZE_TYPE x_MatchingParenPos(const string &str, SIZE_TYPE open_paren_pos)
bool x_AddQualifierToCdregion(CRef< CSeq_feat > sfp, CSeqFeatData &sfdata, EQual qtype, const string &val)
void x_TokenizeLenient(const CTempString &line, vector< string > &out_tokens)
void x_UpdatePointStrand(CSeq_feat &feat, CSeq_interval::TStrand strand) const
unordered_set< string > m_ProcessedProteinIds
bool x_ParseFeatureTableLine(const CTempString &line, SFeatLocInfo &loc_info, string &feat, string &qual, string &val, Int4 offset)
bool x_AddQualifierToBioSrc(CSeqFeatData &sfdata, const string &feat_name, EOrgRef rtype, const string &val)
CFeatureTableReader_Imp & operator=(const CFeatureTableReader_Imp &value)
~CFeatureTableReader_Imp(void)
bool x_AddCodons(const string &val, CTrna_ext &trna_ext) const
bool x_SetupSeqFeat(CRef< CSeq_feat > sfp, const string &feat, const TFlags flags, ITableFilter *filter)
unordered_set< string > m_ProcessedTranscriptIds
void x_ProcessMsg(int line_num, ILineError::EProblem eProblem, EDiagSev eSeverity, const std::string &strFeatureName=kEmptyStr, const std::string &strQualifierName=kEmptyStr, const std::string &strQualifierValue=kEmptyStr, const std::string &strErrorMessage=kEmptyStr, const ILineError::TVecOfLines &vecOfOtherLines=ILineError::TVecOfLines())
void x_ProcessMsg(ILineError::EProblem eProblem, EDiagSev eSeverity, const std::string &strFeatureName=kEmptyStr, const std::string &strQualifierName=kEmptyStr, const std::string &strQualifierValue=kEmptyStr, const std::string &strErrorMessage=kEmptyStr, const ILineError::TVecOfLines &vecOfOtherLines=ILineError::TVecOfLines())
CFeatureTableReader_Imp(const CFeatureTableReader_Imp &value)
CFeature_table_reader(TReaderFlags fReaderFlags=0)
CRef< CSerialObject > ReadObject(ILineReader &lr, ILineErrorListener *pErrors) override
Read an object from a given line reader, render it as the most appropriate Genbank object.
long TFlags
binary OR of EFlags
static bool ParseInitialFeatureLine(const CTempString &line_arg, CTempStringEx &out_seqid, CTempStringEx &out_annotname)
If line_arg is a feature line (e.g.
static void ReadSequinFeatureTables(ILineReader &reader, CSeq_entry &entry, const TFlags flags=0, ILineErrorListener *pMessageListener=nullptr, ITableFilter *filter=nullptr)
@ fSuppressBadKeyWarning
= 0x400 (Suppress 'bad key' errors; Not recommended.)
@ fReportDiscouragedKey
= 0x40 (Report discouraged keys into the error container)
@ fKeepBadKey
= 0x02 (As much as possible, try to use bad keys as if they were acceptable)
@ fIgnoreWebComments
= 0x08 (ignore web comment lines such as lines that start with " INFO:", or consist of many equals si...
@ fAllIdsAsLocal
= 0x100 (Do not attempt to parse accessions)
@ fLeaveProteinIds
= 0x80 (Leave all protein_id as a qualifiers)
@ fCreateGenesFromCDSs
= 0x10 (If a CDS has a gene xref, create a gene with the same intervals if one doesn't already exist....
@ fPreferGenbankId
= 0x200 (Prefer Genbank accession ids)
@ fTranslateBadKey
= 0x04 (yields misc_feature /standard_name="...")
@ fCDSsMustBeInTheirGenes
= 0x20 (If a CDS has a gene xref, it *must* be inside of that gene)
CRef< CSeq_annot > ReadSeqAnnot(ILineReader &lr, ILineErrorListener *pErrors) override
Read an object from a given line reader, render it as a single Seq-annot, if possible.
unique_ptr< CFeatureTableReader_Imp > m_pImpl
static CRef< CSeq_annot > x_ReadFeatureTable(CFeatureTableReader_Imp &reader, const CTempString &seqid, const CTempString &annot_name, const TFlags flags, ITableFilter *filter)
static CRef< CSeq_feat > CreateSeqFeat(const string &feat, CSeq_loc &location, const TFlags flags=0, ILineErrorListener *pMessageListener=nullptr, unsigned int line=0, std::string *seq_id=nullptr, ITableFilter *filter=nullptr)
static void AddFeatQual(CRef< CSeq_feat > sfp, const string &feat_name, const string &qual, const string &val, const TFlags flags=0, ILineErrorListener *pMessageListener=nullptr, int line=0, const string &seq_id=std::string())
static void AddStringFlags(const list< string > &stringFlags, TFlags &baseFlags)
CRef< CSeq_annot > ReadSequinFeatureTable(const TFlags flags=0, ITableFilter *filter=nullptr, const string &seqid_prefix=kEmptyStr)
@Gb_qual.hpp User-defined methods of the data storage class.
static const CTrans_table & GetTransTable(int id)
static int CodonToIndex(char base1, char base2, char base3)
*** Import *********************************************** * * Features imported from other databases...
static void GetPrefixAndRemainder(const string &inference, string &prefix, string &remainder)
static CObjReaderLineException * Create(EDiagSev eSeverity, unsigned int uLine, const std::string &strMessage, EProblem eProblem=eProblem_GeneralParsingError, const std::string &strSeqId=string(""), const std::string &strFeatureName=string(""), const std::string &strQualifierName=string(""), const std::string &strQualifierValue=string(""), CObjReaderLineException::EErrCode eErrCode=eFormat, const TVecOfLines &vecOfOtherLines=TVecOfLines())
Please use this instead of the constructor because the ctor is protected.
@OrgMod.hpp User-defined methods of the data storage class.
@RNA_ref.hpp User-defined methods of the data storage class.
static void AddGeneOntologyTerm(CSeq_feat &feature, const CTempString &qual, const CTempString &val)
Defines and provides stubs for a general interface to a variety of file readers.
static void xAddStringFlagsWithMap(const list< string > &stringFlags, const map< string, TReaderFlags > flagMap, TReaderFlags &baseFlags)
void SetRegion(const TRegion &v)
void SetBiosrc(TBiosrc &v)
static bool IsDiscouragedQual(EQualifier qual)
EQualifier
List of available qualifiers for feature keys.
void SetBond(const TBond &v)
static bool CanHaveGene(ESubtype subtype)
void SetSite(const TSite &v)
static const CSiteList * GetSiteList()
ESubtype GetSubtype(void) const
static bool IsDiscouragedSubtype(ESubtype subtype)
static E_Choice GetTypeFromSubtype(ESubtype subtype)
void SetCdregion(TCdregion &v)
@ eSubtype_bad
These no longer need to match the FEATDEF values in the C toolkit's objfdef.h.
@ eSubtype_transit_peptide_aa
@ eSubtype_sig_peptide_aa
@ eSubtype_mat_peptide_aa
static EQualifier GetQualifierType(CTempString qual)
convert qual string to enumerated value
static const CBondList * GetBondList()
static CTempString GetQualifierAsString(EQualifier qual)
Convert a qualifier from an enumerated value to a string representation or empty if not found.
static ESubtype SubtypeNameToValue(CTempString sName)
Turn a string into its ESubtype which is NOT necessarily related to the identifier of the enum.
static bool IsRegulatory(ESubtype subtype)
static const vector< string > & GetRegulatoryClassList()
bool IsFtable(void) const
namespace ncbi::objects::
const CGene_ref * GetGeneXref(void) const
See related function in util/feature.hpp.
void SetGeneXref(CGene_ref &value)
void SetProtXref(CProt_ref &value)
void SetPartialStart(bool val, ESeqLocExtremes ext)
void SetPartialStop(bool val, ESeqLocExtremes ext)
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
void SetRightOf(bool val)
void SetPartialStart(bool val, ESeqLocExtremes ext)
void SetPartialStop(bool val, ESeqLocExtremes ext)
class CStaticArrayMap<> is an array adaptor that provides an STLish interface to statically-defined a...
TBase::const_iterator const_iterator
Simple implementation of ILineReader for i(o)streams.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)
add a data field to the user object that holds a given value
@ eParse_Number
Parse a real or integer number, otherwise string.
virtual bool PutError(const ILineError &)=0
Store error in the container, and return true if error was stored fine, and return false if the calle...
virtual void PutProgress(const string &sMessage, const Uint8 iNumDone=0, const Uint8 iNumTotal=0)=0
This is used for processing progress messages.
virtual EDiagSev Severity(void) const
@ eProblem_InvalidQualifier
@ eProblem_QualifierBadValue
@ eProblem_NumericQualifierValueIsNotANumber
@ eProblem_InternalPartialsInFeatLocation
@ eProblem_FeatMustBeInXrefdGene
@ eProblem_UnrecognizedFeatureName
@ eProblem_FeatureNameNotAllowed
@ eProblem_IncompleteFeature
@ eProblem_QualifierWithoutFeature
@ eProblem_FeatureBadStartAndOrStop
@ eProblem_NumericQualifierValueHasExtraTrailingCharacters
@ eProblem_UnrecognizedSquareBracketCommand
@ eProblem_UnrecognizedQualifierName
@ eProblem_BadFeatureInterval
@ eProblem_DiscouragedFeatureName
@ eProblem_NoFeatureProvidedOnIntervals
@ eProblem_DiscouragedQualifierName
virtual const std::string & ErrorMessage(void) const
vector< unsigned int > TVecOfLines
virtual EProblem Problem(void) const =0
Abstract base class for lightweight line-by-line reading.
Use to give a feature filter to CFeature_table_reader.
EAction
How a given feature name should be handled.
@ eAction_Okay
Just accept the feat.
@ eAction_Disallowed
Do not accept the feat and give message eProblem_FeatureNameNotAllowed.
virtual EAction GetFeatAction(const string &feature_name) const =0
Returns how we should treat the given feature name.
const_iterator_pair equal_range(const key_type &key) const
iterator insert(const value_type &val)
container_type::iterator iterator
container_type::value_type value_type
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator_pair equal_range(const key_type &key) const
const_iterator end() const
Include a standard set of the NCBI C++ Toolkit most basic headers.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
static unsigned int line_num
static const char * str(char *buf, int n)
static const char location[]
const TResidue codons[4][4]
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
#define ENTREZ_ID_FROM(T, value)
#define ERR_POST_X(err_subcode, message)
Error posting with default error code and given error subcode.
EDiagSev
Severity level for the posted diagnostics.
@ eDiag_Error
Error message.
@ eDiag_Warning
Warning message.
void Warning(CExceptionArgs_Base &args)
virtual void UngetLine(void)=0
Unget current line, which must be valid.
virtual Uint8 GetLineNumber(void) const =0
Returns the current line number (counting from 1, not 0).
virtual bool AtEOF(void) const =0
Indicates (negatively) whether there is any more input.
const string AsFastaString(void) const
static SIZE_TYPE ParseIDs(CBioseq::TId &ids, const CTempString &s, TParseFlags flags=fParse_Default)
Parse a string representing one or more Seq-ids, appending the results to IDS.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
@ fParse_PartialOK
Warn rather than throwing an exception when a FASTA-style ID set contains unparsable portions,...
@ fParse_AnyLocal
Treat otherwise unidentified strings as local accessions as long as they don't resemble FASTA-style I...
@ fParse_Default
By default in ParseIDs and IsValid, allow raw parsable non-numeric accessions and plausible local acc...
@ fParse_ValidLocal
Treat otherwise unidentified strings as raw accessions, provided that they pass rudimentary validatio...
@ eFasta
Tagged ID in NCBI's traditional FASTA style.
bool IsPartialStart(ESeqLocExtremes ext) const
check start or stop of location for e_Lim fuzz
ENa_strand GetStrand(void) const
Get the location's strand.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
CRef< CSeq_loc > Subtract(const CSeq_loc &other, TOpFlags flags, ISynonymMapper *syn_mapper, ILengthGetter *len_getter) const
Subtract seq-loc from this, merge/sort resulting ranges depending on flags.
const CSeq_loc & GetEmbeddingSeq_loc(void) const
Get the nearest seq-loc containing the current range.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
void SetNull(void)
Override all setters to incorporate cache invalidation.
bool IsPartialStop(ESeqLocExtremes ext) const
void Reset(void)
Reset reference object.
TObjectType * GetPointerOrNull(void) const THROWS_NONE
Get pointer value.
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
bool Empty(void) const THROWS_NONE
Check if CRef is empty – not pointing to any object, which means having a null value.
int32_t Int4
4-byte (32-bit) signed integer
unsigned char Uchar
Alias for unsigned char.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
NCBI_NS_STD::string::size_type SIZE_TYPE
const_iterator end() const
Return an iterator to the string's ending position (one past the end of the represented sequence)
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
CTempStringEx substr(size_type pos) const
Obtain a substring from this string, beginning at a given offset.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate spaces in a string (in-place)
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
bool empty(void) const
Return true if the represented string is empty (i.e., the length is zero)
void clear(void)
Clear value to an empty string.
static long StringToLong(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to long.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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.
size_type length(void) const
Return the length of the represented array.
CTempString substr(size_type pos) const
Obtain a substring from this string, beginning at a given offset.
size_type find_first_not_of(const CTempString match, size_type pos=0) const
Find the first occurrence of any character not in the matching string within the current string,...
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
size_type find(const CTempString match, size_type pos=0) const
Find the first instance of the entire matching string within the current string, beginning at an opti...
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate spaces in a string.
size_type size(void) const
Return the length of the represented array.
static string & ToLower(string &str)
Convert string to lower case – string& version.
static const size_type npos
const_iterator begin() const
Return an iterator to the string's starting position.
@ fAllowTrailingSymbols
Ignore trailing non-numerics characters.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
@ eTrunc_End
Truncate trailing spaces only.
@ eTrunc_Begin
Truncate leading spaces only.
@ eNocase
Case insensitive compare.
void SetSubtype(TSubtype value)
Assign a value to Subtype data member.
list< CRef< CSubSource > > TSubtype
void SetGenome(TGenome value)
Assign a value to Genome data member.
void SetOrg(TOrg &value)
Assign a value to Org data member.
void SetName(const TName &value)
Assign a value to Name data member.
EGenome
biological context
TSubtype & SetSubtype(void)
Assign a value to Subtype data member.
@ eSubtype_collection_date
DD-MMM-YYYY format.
@ eSubtype_insertion_seq_name
@ eSubtype_transposon_name
@ eSubtype_fwd_primer_seq
sequence (possibly more than one; semicolon-separated)
@ eSubtype_lat_lon
+/- decimal degrees
@ eSubtype_rev_primer_name
@ eSubtype_collected_by
name of person who collected the sample
@ eSubtype_fwd_primer_name
@ eSubtype_rev_primer_seq
sequence (possibly more than one; semicolon-separated)
@ eSubtype_isolation_source
@ eSubtype_environmental_sample
@ eSubtype_endogenous_virus_name
@ eSubtype_identified_by
name of person who identified the sample
@ eGenome_endogenous_virus
TSyn & SetSyn(void)
Assign a value to Syn data member.
void SetAllele(const TAllele &value)
Assign a value to Allele data member.
bool IsSetLocus_tag(void) const
systematic gene name (e.g., MI0001, ORF0069) Check if a value has been assigned to Locus_tag data mem...
bool IsSetLocus(void) const
Official gene symbol Check if a value has been assigned to Locus data member.
void SetLocus(const TLocus &value)
Assign a value to Locus data member.
void SetLocus_tag(const TLocus_tag &value)
Assign a value to Locus_tag data member.
void SetMaploc(const TMaploc &value)
Assign a value to Maploc data member.
const TLocus_tag & GetLocus_tag(void) const
Get the Locus_tag member data.
const TLocus & GetLocus(void) const
Get the Locus member data.
void SetDesc(const TDesc &value)
Assign a value to Desc data member.
bool IsStr(void) const
Check if variant Str is selected.
void SetTag(TTag &value)
Assign a value to Tag data member.
const TStr & GetStr(void) const
Get the variant data.
TStr & SetStr(void)
Select the variant.
void SetType(TType &value)
Assign a value to Type data member.
void SetDb(const TDb &value)
Assign a value to Db data member.
TId & SetId(void)
Select the variant.
void SetDiv(const TDiv &value)
Assign a value to Div data member.
void SetSubtype(TSubtype value)
Assign a value to Subtype data member.
void SetTaxname(const TTaxname &value)
Assign a value to Taxname data member.
list< CRef< COrgMod > > TMod
void SetGcode(TGcode value)
Assign a value to Gcode data member.
void SetMgcode(TMgcode value)
Assign a value to Mgcode data member.
TMod & SetMod(void)
Assign a value to Mod data member.
void SetOrgname(TOrgname &value)
Assign a value to Orgname data member.
void SetSubname(const TSubname &value)
Assign a value to Subname data member.
void SetLineage(const TLineage &value)
Assign a value to Lineage data member.
@ eSubtype_gb_acronym
used by taxonomy database
@ eSubtype_gb_synonym
used by taxonomy database
@ eSubtype_dosage
chromosome dosage of hybrid
@ eSubtype_nat_host
natural host of this specimen
@ eSubtype_metagenome_source
@ eSubtype_specimen_voucher
@ eSubtype_gb_anamorph
used by taxonomy database
@ eSubtype_culture_collection
@ eSubtype_forma_specialis
TActivity & SetActivity(void)
Assign a value to Activity data member.
TEc & SetEc(void)
Assign a value to Ec data member.
void SetDesc(const TDesc &value)
Assign a value to Desc data member.
TProcessed GetProcessed(void) const
Get the Processed member data.
bool IsSetProcessed(void) const
Check if a value has been assigned to Processed data member.
void SetProcessed(TProcessed value)
Assign a value to Processed data member.
TName & SetName(void)
Assign a value to Name data member.
@ eProcessed_signal_peptide
@ eProcessed_transit_peptide
TPmid & SetPmid(void)
Select the variant.
void SetQual(const TQual &value)
Assign a value to Qual data member.
TTRNA & SetTRNA(void)
Select the variant.
TName & SetName(void)
Select the variant.
void SetVal(const TVal &value)
Assign a value to Val data member.
TType GetType(void) const
Get the Type member data.
void ResetAa(void)
Reset Aa data member.
E_Choice Which(void) const
Which variant is currently selected.
void SetAnticodon(TAnticodon &value)
Assign a value to Anticodon data member.
void SetExt(TExt &value)
Assign a value to Ext data member.
bool IsSetExt(void) const
generic fields for ncRNA, tmRNA, miscRNA Check if a value has been assigned to Ext data member.
TCodon & SetCodon(void)
Assign a value to Codon data member.
void SetAa(TAa &value)
Assign a value to Aa data member.
void SetType(TType value)
Assign a value to Type data member.
const TExt & GetExt(void) const
Get the Ext member data.
@ e_Name
for naming "other" type
@ eType_scRNA
will become ncRNA, with RNA-gen.class = scRNA
@ eType_snoRNA
will become ncRNA, with RNA-gen.class = snoRNA
@ eType_ncRNA
non-coding RNA; subsumes snRNA, scRNA, snoRNA
@ eType_snRNA
will become ncRNA, with RNA-gen.class = snRNA
void SetQual(const TQual &value)
Assign a value to Qual data member.
vector< CRef< CDbtag > > TDbxref
TDbxref & SetDbxref(void)
Assign a value to Dbxref data member.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
E_Choice Which(void) const
Which variant is currently selected.
void SetLocation(TLocation &value)
Assign a value to Location data member.
void SetComment(const TComment &value)
Assign a value to Comment data member.
void SetPartial(TPartial value)
Assign a value to Partial data member.
void SetProduct(TProduct &value)
Assign a value to Product data member.
void SetCode(TCode &value)
Assign a value to Code data member.
const TLocation & GetLocation(void) const
Get the Location member data.
void SetExcept(TExcept value)
Assign a value to Except data member.
void SetExt(TExt &value)
Assign a value to Ext data member.
const TData & GetData(void) const
Get the Data member data.
bool CanGetData(void) const
Check if it is safe to call GetData method.
void SetData(TData &value)
Assign a value to Data data member.
void SetExp_ev(TExp_ev value)
Assign a value to Exp_ev data member.
const TComment & GetComment(void) const
Get the Comment member data.
void SetVal(const TVal &value)
Assign a value to Val data member.
void SetPseudo(TPseudo value)
Assign a value to Pseudo data member.
const TGene & GetGene(void) const
Get the variant data.
void SetExcept_text(const TExcept_text &value)
Assign a value to Except_text data member.
const TProt & GetProt(void) const
Get the variant data.
void ResetLocation(void)
Reset Location data member.
const TRna & GetRna(void) const
Get the variant data.
TQual & SetQual(void)
Assign a value to Qual data member.
void SetFrame(TFrame value)
Assign a value to Frame data member.
bool IsSetLocation(void) const
feature made from Check if a value has been assigned to Location data member.
void SetKey(const TKey &value)
Assign a value to Key data member.
bool CanGetComment(void) const
Check if it is safe to call GetComment method.
@ e_not_set
No variant selected.
@ e_Region
named region (globin locus)
@ e_Pub
publication applies to this seq
@ eExp_ev_experimental
any reasonable experimental check
@ eExp_ev_not_experimental
similarity, pattern, etc
@ eFrame_not_set
not set, code uses one
@ eFrame_three
reading frame
bool IsMix(void) const
Check if variant Mix is selected.
bool IsEmpty(void) const
Check if variant Empty is selected.
ENa_strand
strand of nucleic acid
list< CRef< CSeq_loc > > Tdata
const Tdata & Get(void) const
Get the member data.
bool IsNull(void) const
Check if variant Null is selected.
const TMix & GetMix(void) const
Get the variant data.
@ e_MaxChoice
== e_Named_annot_track+1
TSet & SetSet(void)
Select the variant.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
bool IsSeq(void) const
Check if variant Seq is selected.
TSeq & SetSeq(void)
Select the variant.
Tdata & Set(void)
Assign a value to data member.
void SetData(TData &value)
Assign a value to Data data member.
void SetDesc(TDesc &value)
Assign a value to Desc data member.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
TName & SetName(void)
Select the variant.
list< CRef< CSeq_id > > TId
list< CRef< CSeq_feat > > TFtable
double value_type
The numeric datatype used by the parser.
const GenericPointer< typename T::ValueType > T2 value
Multi-threading – classes, functions, and features.
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
static const char * prefix[]
SStaticPair< const char *, CFeatureTableReader_Imp::EOrgRef > TOrgRefKey
static bool s_LineIndicatesOrder(const CTempString &line)
static const TOrgRefKey orgref_key_to_subtype[]
DEFINE_STATIC_ARRAY_MAP(TQualMap, sm_QualKeys, qual_key_to_subtype)
CStaticPairArrayMap< const char *, CFeatureTableReader_Imp::EOrgRef, PCase_CStr > TOrgRefMap
static const int s_NumQualsWithCaps
SStaticPair< const char *, CBioSource::EGenome > TGenomeKey
static CRef< CSeq_loc > s_LocationJoinToOrder(const CSeq_loc &loc)
static string s_FixQualCapitalization(const string &qual)
static const map< const char *, int, PNocase_CStr > sm_TrnaKeys
CStaticPairArrayMap< const char *, CFeatureTableReader_Imp::EQual, PCase_CStr > TQualMap
CStaticPairArrayMap< const char *, CBioSource::EGenome, PCase_CStr > TGenomeMap
static const TSubSrcKey subsrc_key_to_subtype[]
static const TGenomeKey genome_key_to_subtype[]
CStaticPairArrayMap< const char *, CSubSource::ESubtype, PNocase_CStr > TSubSrcNoCaseMap
static set< const char *, PCase_CStr > sc_SingleKeys
static const string s_QualsWithCaps[]
SStaticPair< const char *, CFeatureTableReader_Imp::EQual > TQualKey
CStaticPairArrayMap< const char *, COrgMod::ESubtype, PCase_CStr > TOrgModMap
CStaticPairArrayMap< const char *, CSubSource::ESubtype, PCase_CStr > TSubSrcMap
SStaticPair< const char *, COrgMod::ESubtype > TOrgModKey
SStaticPair< const char *, CSubSource::ESubtype > TSubSrcKey
static const TQualKey qual_key_to_subtype[]
static const TOrgModKey orgmod_key_to_subtype[]
CConstRef< CSeq_id > GetBestId(const CBioseq &bioseq)
CRef< CSeq_loc > GetSeqLocFromString(const string &text, const CSeq_id *id, CGetSeqLocFromStringHelper *helper)
#define RAW_FIELD_IS_EMPTY_OR_UNSET(Var, Fld)
RAW_FIELD_IS_EMPTY_OR_UNSET macro.
#define FIELD_EQUALS(Var, Fld, Value)
FIELD_EQUALS base macro.
bool operator!=(const SFeatAndLineNum &rhs) const
bool operator<(const SFeatAndLineNum &rhs) const
int Compare(const SFeatAndLineNum &rhs) const
bool operator==(const SFeatAndLineNum &rhs) const
SFeatAndLineNum(TFeatConstRef pFeat, TSeqPos uLineNum)
bool operator()(const CSeq_id *left, const CSeq_id *right) const
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...