A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/macro__fn__where_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/objutils/macro_fn_where.cpp Source File

36 #ifdef USE_VARIATION_LIB 37 int

Ncbi_library_version_mismatch__Full_rebuild_to_fix_20200522

65 #ifdef USE_VARIATION_LIB 66 #include <internal/variation/lib/Variant/Spdi.hpp> 67 #include <internal/variation/lib/Constructors/VcfForSpdi.hpp> 68 #include <internal/variation/lib/Primitives/Sequence.hpp> 69 #include <internal/variation/lib/Primitives/SeqId.hpp> 85

void CMacroFunction_ChoiceType::TheFunction()

88  if

(!m_Args.empty()) {

89

field_name = m_Args[0]->GetString();

93  if

(m_DataIter->GetChoiceType(field_name, choice_type)) {

94

m_Result->SetString(choice_type);

98 bool

CMacroFunction_ChoiceType::x_ValidArguments()

const 100  return

(m_Args.empty() || (m_Args.size() == 1 && m_Args[0]->IsString()));

113  if

(

m_Args

[index]->IsNotSet()) {

118  if

(

m_Args

[index]->IsRef()) {

122  if

(

m_Args

[index]->IsString()) {

129  if

(

m_Args

[index]->AreObjects()) {

131  bool

rval = !res_oi.empty();

133  for

(

const auto

& it : res_oi) {

136  string val

= it.field.GetPrimitiveValueString();

152  if

(

m_Args

[index]->AreStrings()) {

153  bool

rval = !

m_Args

[index]->GetStrings().empty();

158  bool

cont_element = (

m_Args

.size() == 2);

159  string

field_name =

m_Args

[index]->GetString();

162

container = field_name;

163

field_name =

m_Args

[++index]->GetString();

166  if

(

NStr::IsBlank

(field_name) || (cont_element && container.empty()))

179  size_t

as =

m_Args

.size();

180  if

(as != 1 && as != 2)

184  bool

first_ok =

m_Args

[index]->IsString() ||

m_Args

[index]->AreObjects() ||

m_Args

[index]->IsNotSet() ||

m_Args

[index]->IsRef();

190  for

(

auto

&& it :

m_Args

) {

212  if

(res_oi.empty()) {

224  while

(elem.

Valid

()) {

291  CObjectInfo

objInfo(&molinfo, molinfo.GetTypeInfo());

297  if

(

m_Args

.size() == 1) {

312  for

(

auto

& it :

m_Args

) {

313  if

(!it->IsString()) {

326 void

CMacroFunction_GetDBLink::TheFunction()

328  const string

field_type = m_Args[0]->GetString();

334  const auto

& user = desc_it->GetUser();

335  if

(user.GetType().IsStr() && user.GetType().GetStr() ==

"DBLink"

) {

337  if

(const_user_field) {

339  CObjectInfo

objInfo(&user_field, user_field.GetTypeInfo());

341

x_AssignReturnValue(objInfo,

"data.str"

);

343

x_AssignReturnValue(objInfo,

"data.strs"

);

349 bool

CMacroFunction_GetDBLink::x_ValidArguments()

const 351  return

(m_Args.size() == 1 && m_Args[0]->IsString());

377  return

(

m_Args

.size() == 1 &&

m_Args

[0]->IsString());

389

void CMacroFunction_RelatedFeatures::TheFunction()

392  string

field_name = m_Args[1]->GetString();

394  if

(m_Args.size() == 3) {

395

container = field_name;

396

field_name = m_Args[2]->GetString();

401  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

402  if

(!feat || !scope) {

407

NMacroUtil::TVecFeatList::iterator it = feat_list.begin();

408  if

(!feat_list.empty()) {

410  CObjectInfo

objInfo(related_feat.GetPointer(), related_feat.GetPointer()->GetTypeInfo());

411  if

(container.empty()) {

412

x_AssignReturnValue(objInfo, field_name);

415

x_AssignReturnValueFromContainer(objInfo, container, field_name);

420 bool

CMacroFunction_RelatedFeatures::x_ValidArguments()

const 422  if

(m_Args.size() != 2 && m_Args.size() != 3) {

425  for

(

auto

& it : m_Args) {

426  if

(!it->IsString()) {

442

void CMacroFunction_Features_For_Object::TheFunction()

446  string

container = (++index < m_Args.size()) ? m_Args[index]->GetString() :

kEmptyStr

;

447  string

field_name = (++index < m_Args.size()) ? m_Args[index]->GetString() :

kEmptyStr

;

448  if

(m_Args.size() != 3) {

449

field_name = container;

452  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

468  if

(m_Args.size() == 3) {

469

x_AssignReturnValueFromContainer(objInfo, container, field_name);

472

x_AssignReturnValue(objInfo, field_name);

478 bool

CMacroFunction_Features_For_Object::x_ValidArguments()

const 480  if

(m_Args.empty() || m_Args.size() > 3) {

483  for

(

auto

& it : m_Args) {

506

res_oi =

m_Args

[0]->GetObjects();

512  if

(res_oi.empty()) {

536

void CMacroFunction_CDSTranslation::TheFunction()

540  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

547  if

(prot_seq.empty()) {

551  if

(m_Nested == eNotNested) {

552

m_Result->SetString(prot_seq);

556

new_node->SetString(prot_seq);

557

m_Result->SetRef(new_node);

561 bool

CMacroFunction_CDSTranslation::x_ValidArguments()

const 563  return

(m_Args.empty());

573

void CMacroFunction_SeqID::TheFunction()

575

m_Result->SetNotSet();

580

vector<string> id_labels;

585  if

(bssh && bssh.

IsSetClass

() && bssh.

GetClass

() == objects::CBioseq_set::eClass_nuc_prot) {

595

m_Result->SetStrings(id_labels);

598 bool

CMacroFunction_SeqID::x_ValidArguments()

const 600  return

m_Args.empty();

610  for

(

const auto

& it : bseq.

GetId

()) {

613

id_labels.push_back(

label

);

615  if

(it->IsLocal() && local_id.empty()) {

619  if

(it->IsGeneral() && it->GetGeneral().IsSetDb() && it->GetGeneral().GetDb() ==

"BankIt"

) {

620

id_labels.push_back(

"BankIt"

+

label

);

621  size_t

pos =

label

.find(

"/"

);

623  string

prefix =

label

.substr(0, pos);

624

id_labels.push_back(

"BankIt"

+ prefix);

626

id_labels.push_back(prefix);

630  size_t

pos =

label

.find(

"/"

);

634

id_labels.push_back(

label

);

639  if

(it->IsGenbank()) {

642

id_labels.push_back(

label

);

655

void CMacroFunction_Accession::TheFunction()

657

m_Result->SetNotSet();

666

m_Result->SetString(acc);

670  LOG_POST

(

Error

<<

"CMacroFunction_Accession: failed when retrieving accession, "

<< e.

GetMsg

());

675 bool

CMacroFunction_Accession::x_ValidArguments()

const 677  return

m_Args.empty();

685

void CMacroFunction_InconsistentTaxa::TheFunction()

689  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

690  if

(!seqset || !scope) {

694  string

taxname, first_taxname;

695  bool

is_first(

true

), inconsistent(

false

);

700  if

(desc->GetSource().IsSetTaxname()) {

701

taxname = desc->GetSource().GetTaxname();

705  if

(feat_it && feat_it->GetData().GetBiosrc().IsSetTaxname()) {

706

taxname = feat_it->GetData().GetBiosrc().GetTaxname();

711

first_taxname = taxname;

717

inconsistent =

true

;

721

m_Result->SetBool(inconsistent);

724 bool

CMacroFunction_InconsistentTaxa::x_ValidArguments()

const 726  return

(m_Args.empty());

735

void CMacroFunction_StringLength::TheFunction()

746

res_oi = m_Args[0]->GetObjects();

749

x_GetObjectsFromRef(res_oi, 0);

752  if

(res_oi.empty()) {

763  if

(elem.

Valid

()) {

773 bool

CMacroFunction_StringLength::x_ValidArguments()

const 775  return

(m_Args.size() == 1 && (m_Args[0]->IsString() || m_Args[0]->AreObjects() || m_Args[0]->IsRef()));

783

void CMacroFunction_StructCommField::TheFunction()

787  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

791  const string

& field_name = m_Args[0]->GetString();

792

m_Result->SetNotSet();

801

x_AssignReturnValue(objInfo,

"data.str"

);

806  size_t

search_depth = 0;

828

x_AssignReturnValue(objInfo,

"data.str"

);

837 bool

CMacroFunction_StructCommField::x_ValidArguments()

const 839  return

(m_Args.size() == 1 && m_Args[0]->IsString());

847

void CMacroFunction_StructCommDatabase::TheFunction()

851  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

855

m_Result->SetNotSet();

859  if

(m_Nested == eNotNested) {

860

m_Result->SetString(prefix);

865

new_node->SetString(prefix);

866

m_Result->SetRef(new_node);

871  size_t

search_depth = 0;

887

vector<string> dbnames;

891

dbnames.push_back(prefix);

894  if

(!dbnames.empty()) {

895  if

(m_Nested == eNotNested) {

896

m_Result->SetStrings(dbnames);

900

new_node->SetStrings(dbnames);

901

m_Result->SetRef(new_node);

907 bool

CMacroFunction_StructCommDatabase::x_ValidArguments()

const 909  return

m_Args.empty();

916

void CMacroFunction_StructCommFieldname::TheFunction()

921  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

929  for

(

auto

& it : user_obj->

SetData

()) {

946  if

(m_Nested == eNotNested) {

947

m_Result->AssignFromObjectInfo(objs.front().field);

950

m_Result->SetObjects(objs);

954 bool

CMacroFunction_StructCommFieldname::x_ValidArguments()

const 956  return

m_Args.empty();

963

void CMacroFunction_GetDBXref::TheFunction()

968  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

972

m_Result->SetNotSet();

973

vector<string> values;

979  const CDbtag

& xref = **db_it;

980  string

db = xref.

GetDb

();

986

values.push_back(db +

":"

+

tag

);

991  for

(

const auto

& db_it : src->

GetOrg

().

GetDb

()) {

992  string

db = db_it->GetDb();

994  if

(db_it->GetTag().IsStr())

995  tag

= db_it->GetTag().GetStr();

996  if

(db_it->GetTag().IsId())

998

values.push_back(db +

":"

+

tag

);

1003  if

(m_Nested == eNotNested) {

1004

m_Result->SetStrings(values);

1009

new_node->SetStrings(values);

1010

m_Result->SetRef(new_node);

1014 bool

CMacroFunction_GetDBXref::x_ValidArguments()

const 1016  return

m_Args.empty();

1030 void

CMacroFunction_InTable::TheFunction()

1032  auto

arg_nr = m_Args.size();

1033  bool

cont_element = (m_Args[3]->IsInt());

1035  size_t

index = cont_element ? 2 : 1;

1036  const string

&

table_name

= m_Args[index]->GetString();

1037  int

col = (

int

)m_Args[++index]->GetInt();

1041  string delimiter

= m_Args[++index]->GetString();

1042  bool

merge_del = (++index < arg_nr) ? m_Args[index]->GetBool() :

false

;

1043  bool

split_firstcol = (++index < arg_nr) ? m_Args[index]->GetBool() :

false

;

1044  bool

convert_multi = (++index < arg_nr) ? m_Args[index]->GetBool() :

false

;

1045  bool

merge_firstcols = (++index < arg_nr) ? m_Args[index]->GetBool() :

false

;

1046  bool

case_sensitive = (++index < arg_nr) ? m_Args[index]->GetBool() :

true

;

1047  bool

multiple_spaces_only = (++index < arg_nr) ? m_Args[index]->GetBool() :

false

;

1050

merge_del, split_firstcol, convert_multi, merge_firstcols, multiple_spaces_only);

1052  bool

found =

false

;

1053  if

(m_Args[0]->AreStrings()) {

1054

found = m_DataIter->FindInTable(m_Args[0]->GetStrings(), case_sensitive);

1059  if

(m_Args[0]->IsString()) {

1063

x_AssignReturnValueFromContainer(oi, m_Args[0]->GetString(), m_Args[1]->GetString());

1064

res_oi = m_Result->GetObjects();

1066

m_Result->SetNotSet();

1067

m_Nested = eNotNested;

1073  else if

(m_Args[0]->AreObjects()) {

1074

res_oi = m_Args[0]->GetObjects();

1077

found = m_DataIter->FindInTable(res_oi, case_sensitive);

1080

m_Result->SetBool(found);

1083 bool

CMacroFunction_InTable::x_ValidArguments()

const 1085  auto

arg_nr = m_Args.size();

1086  if

(arg_nr < 4 && arg_nr > 11)

1089  bool

first_ok = m_Args[0]->IsString() ||

1090

m_Args[0]->AreStrings() ||

1091

m_Args[0]->AreObjects() ||

1092

m_Args[0]->IsNotSet() ||

1094  if

(!first_ok)

return false

;

1095  if

(m_Args[0]->IsRef()) {

1098  if

(!m_Args[2]->IsInt() && !m_Args[3]->IsInt())

1101  size_t

index = (m_Args[2]->IsInt()) ? 2 : 3;

1103  for

(

size_t i

= 1;

i

< index; ++

i

) {

1104  if

(!m_Args[

i

]->IsString())

1108  if

(!m_Args[index]->IsInt() || !m_Args[++index]->IsString())

1111  for

(

size_t i

= ++index;

i

< arg_nr; ++

i

) {

1112  if

(!m_Args[

i

]->IsBool())

1127 void

CMacroFunction_Contained::TheFunction()

1131  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

1132  if

(!feat || !scope)

1136  bool

contained =

false

;

1150

m_Result->SetBool(contained);

1153 bool

CMacroFunction_Contained::x_ValidArguments()

const 1155  return

(m_Args.size() == 1 && m_Args[0]->IsString());

1165  if

(start1 == stop2 + 1 || start2 == stop1 + 1) {

1178

void CMacroFunction_IllegalDbXref::TheFunction()

1182  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

1183  if

(!feat || !scope)

1186  const auto

& objs = m_Args[0]->GetObjects();

1187  if

(objs.empty() || objs.front().field.GetName() !=

"Dbtag"

) {

1188

m_Result->SetBool(

false

);

1194

validator::CValidator::TDbxrefValidFlags

flags

=

1195

validator::CValidator::IsValidDbxref(*

tag

,

false

,

false

);

1197  bool

non_valid =

flags

| validator::CValidator::eValid;

1198

m_Result->SetBool(non_valid);

1201 bool

CMacroFunction_IllegalDbXref::x_ValidArguments()

const 1203  return

(m_Args.size() == 1 && m_Args[0]->AreObjects());

1214  if

(

subname

.empty())

return

;

1216  string

inst, coll, id;

1226 void

CMacroFunction_StructVoucherPart::TheFunction()

1234  string

voucher_type;

1235  string

voucher_part = m_Args[index]->GetString();

1238  if

(m_Args[0]->IsString()) {

1239

voucher_type = m_Args[0]->GetString();

1241  else if

(m_Args[0]->AreObjects()) {

1242

res_oi = m_Args[0]->GetObjects();

1244  else if

(m_Args[0]->IsRef()) {

1245

x_GetObjectsFromRef(res_oi, 0);

1248  if

(voucher_type.empty() && res_oi.empty()) {

1259

vector<string> values;

1260

m_Result->SetNotSet();

1262  if

(!voucher_type.empty()) {

1271  auto

orgmod = *mod_it;

1272  if

(orgmod->IsSetSubtype() && orgmod->GetSubtype() == subtype && orgmod->IsSetSubname()) {

1278  for

(

auto

& it : res_oi) {

1280  s_ParseValues

(it.field.GetPrimitiveValueString(), part, values);

1285  if

(!values.empty()) {

1286  if

(m_Nested == eNotNested) {

1287

m_Result->SetStrings(values);

1292

new_node->SetStrings(values);

1293

m_Result->SetRef(new_node);

1298 bool

CMacroFunction_StructVoucherPart::x_ValidArguments()

const 1300  if

(m_Args.size() != 2)

1303  bool

first_ok = m_Args[0]->IsString() || m_Args[0]->AreObjects() || m_Args[0]->IsRef();

1304  return

first_ok && m_Args[1]->IsString();

1313

void CMacroFunction_GeneType::TheFunction()

1323

m_Result->SetNotSet();

1326

m_Result->SetString(

label

);

1330 bool

CMacroFunction_GeneType::x_ValidArguments()

const 1332  return

(m_Args.empty());

1340

void CMacroFunction_Label::TheFunction()

1350

m_Result->SetString(

label

);

1353 bool

CMacroFunction_Label::x_ValidArguments()

const 1355  return

(m_Args.size() == 1 && m_Args[0]->IsString());

1363

void CMacroFunction_VariationType::TheFunction()

1371

m_Result->SetString(var_class);

1374 bool

CMacroFunction_VariationType::x_ValidArguments()

const 1376  return

m_Args.empty();

1383

void CMacroFunction_RefAllele::TheFunction()

1393  if

(alleles.empty()) {

1394

m_Result->SetNotSet();

1397

m_Result->SetString(alleles.front());

1401 bool

CMacroFunction_RefAllele::x_ValidArguments()

const 1403  return

m_Args.empty();

1410

void CMacroFunction_AltAlleles::TheFunction()

1417  string str

= m_Args[0]->GetString();

1418  string

sDelimiter = (m_Args.size() == 1) ? m_Args[0]->GetString() :

"/"

;

1423  if

(alleles.empty()) {

1424

m_Result->SetNotSet();

1428  for

(

size_t i

= 1;

i

< alleles.size(); ++

i

) {

1429  if

(!alt_allele.empty()) {

1430

alt_allele += sDelimiter;

1432

alt_allele += alleles[

i

];

1434

m_Result->SetString(alt_allele);

1438 bool

CMacroFunction_AltAlleles::x_ValidArguments()

const 1440  if

(m_Args.empty()) {

1443  if

(m_Args.size() == 1 && m_Args[0]->IsString()) {

1454

void CMacroFunction_VcfSevenCol::TheFunction()

1461

m_Result->SetNotSet();

1478  LOG_POST

(

Error

<<

"CMacroFunction_VcfSevenCol: failed when retrieving accession, "

<< e.

GetMsg

());

1481

sResult += sAcc +

"\t"

;

1489  if

(dbtag && dbtag->IsSetTag()) {

1490  const auto

&

tag

= dbtag->GetTag();

1491  if

(

tag

.IsStr()) {

1492

snp_id =

tag

.GetStr();

1494  else if

(

tag

.IsId()) {

1497  else if

(

tag

.IsId8()) {

1504  if

(!alleles.empty()) {

1505  bool

isUsedVarLib(

false

);

1506 #ifdef USE_VARIATION_LIB 1508  if

(!seq_id.

IsNull

() && alleles.size() == 2) {

1509

NVariation::NPrimitives::CSeqId var_seq_id(NVariation::NPrimitives::CSeqId::FromDatatoolObject(*seq_id));

1510

NVariation::NVariant::CSpdi spdi(var_seq_id,

1514  auto

seq_cache(NVariation::NPrimitives::ISequenceFactory::CreateDefault(m_DataIter->GetScopedObject().scope)->GetSequence(var_seq_id,

1516  auto

vcf_var = NVariation::NConstructors::g_VcfFromSpdi(spdi, *seq_cache);

1518

sResult += snp_id +

"\t"

;

1519

sResult += vcf_var.Reference() +

"\t"

+ vcf_var.Alternate() +

"\t"

;

1520

isUsedVarLib =

true

;

1526  if

(!isUsedVarLib) {

1528

sResult += snp_id +

"\t"

;

1529  if

(alleles.empty()) {

1532

sResult += alleles.front();

1535  if

(alleles.size() < 2) {

1539  for

(

size_t i

= 1;

i

< alleles.size(); ++

i

) {

1540  if

(!alt_allele.empty()) {

1543

alt_allele += alleles[

i

];

1545

sResult += alt_allele;

1552  if

(!sResult.empty()) {

1553

m_Result->SetString(sResult);

1557 bool

CMacroFunction_VcfSevenCol::x_ValidArguments()

const 1559  return

m_Args.empty();

1565

void CMacroFunction_Consequence::TheFunction()

1573

m_Result->SetString(conseq);

1576 bool

CMacroFunction_Consequence::x_ValidArguments()

const 1578  return

m_Args.empty();

1585

void CMacroFunction_SnpID::TheFunction()

1592

m_Result->SetNotSet();

1595  if

(dbtag && dbtag->IsSetTag()) {

1597  const auto

&

tag

= dbtag->GetTag();

1598  if

(

tag

.IsStr()) {

1599

snp_id =

tag

.GetStr();

1601  else if

(

tag

.IsId()) {

1604  else if

(

tag

.IsId8()) {

1607

m_Result->SetString(snp_id);

1612 bool

CMacroFunction_SnpID::x_ValidArguments()

const 1614  return

m_Args.empty();

@ eExtreme_Positional

numerical value

const CBioseq & GetNucFromNucProtSet(void) const

CConstRef< CSeqdesc > GetClosestDescriptor(CSeqdesc::E_Choice choice, int *level=NULL) const

Subclass of the IQueryParseUserObject which is held as the user-defined object in each CQueryParseNod...

static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)

static bool ParseStructuredVoucher(const string &str, string &inst, string &coll, string &id)

ESubtype GetSubtype(void) const

namespace ncbi::objects::

CConstRef< CDbtag > GetNamedDbxref(const CTempString &db) const

Return a specified DB xref.

string GetGenePropertyString() const

const char * GetVariationClassString() const

CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const

Return a field reference representing the tokenized key, or a NULL reference if the key doesn't exist...

CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const

vector< string > TAlleles

list of alleles belonging to particular SNP a deletion is represented by a "-"

static void GetAlleles(const CMappedFeat &mapped_feat, TAlleles &Alleles)

Return list of alleles encoded in qual.

static CSnpBitfield GetBitfield(const CMappedFeat &)

Return bitfield information stored in the feature.

static const char table_name[]

static const char * str(char *buf, int n)

unsigned int TSeqPos

Type for sequence locations and lengths.

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

void Error(CExceptionArgs_Base &args)

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

const string & GetMsg(void) const

Get message string.

static const char * sm_BsrcForSeq

void x_AssignReturnValueFromContainer(const CObjectInfo &oi, const string &container, const string &field_name)

CLabel::ELabelType NameToLabelType(const string &name)

static bool s_ContainedIn(const CSeq_loc &loc1, const CSeq_loc &loc2, CScope *scope)

static const char * sm_BsrcForSeqdesc

static const char * sm_SeqForFeat

objects::CSeqdesc::E_Choice m_SeqdescType

objects::CSeqFeatData::ESubtype GetFeatSubtype(const string &feat_type)

void x_IsContainerElementPresent(const string &container, const string &field_name)

static const char * sm_Last

CMQueryNodeValue::EType GetPrimitiveFromRef(CMQueryNodeValue &node)

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

static const char * sm_SeqForDescr

class CMacroFunction_Sequence_For_Seqdesc SEQUENCE_FOR_SEQDESC(field_name) SEQUENCE_FOR_SEQFEAT(field...

list< SResolvedField > TObs

static const char * sm_MolinfoForFeat

void Dereference()

If it is a reference it is resolved to the first non reference type in the hierarchy.

void SetDataType(EType dt)

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

void x_AssignReturnValue(const CObjectInfo &oi, const string &field_name)

Assigns value to m_Result. It is mostly useful for functions used in the WHERE clause.

static const char * sm_First

CMacroFunction_FirstItem FIRSTOF(objects) - returns the first item from the list of objects LASTOF(ob...

virtual void TheFunction()

Function implementation.

EStructVoucherPart GetSVPartFromString(const string voucher_part)

static const char * sm_BsrcForFeat

bool GetFieldsByName(CMQueryNodeValue::TObs *results, const CObjectInfo &oi_i, const string &field_name)

Resolve existing dot qualified ASN.1 name (field_name) starting from the object information instance ...

static bool s_GatherIdLabels(const CBioseq_Handle &bsh, vector< string > &id_labels)

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

virtual void TheFunction()

Function implementation.

DEFINE_MACRO_FUNCNAME(CMacroFunction_IsPresent, "ISPRESENT")

class CMacroFunction_IsPresent ISPRESENT(field_name) ISPRESENT(container, element_name)

void x_GetObjectsFromRef(CMQueryNodeValue::TObs &objects, const size_t &index)

CRef< CMQueryNodeValue > m_Result

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

virtual void TheFunction()

Function implementation.

static const char * sm_BsrcForMolinfo

class CMacroFunction_GetSeqdesc BIOSOURCE_FOR_MOLINFO(field_name) or BIOSOURCE_FOR_MOLINFO(container,...

void x_IsSimpleTypePresent(const string &field_name)

void SetObjects(const TObs &obs)

static void s_ParseValues(const string &subname, NMacroUtil::EStructVoucherPart part, vector< string > &values)

class CMacroFunction_StructVoucherPart StructVoucherPart(type|object, part)

CIRef< IMacroBioDataIter > m_DataIter

vector< CConstRef< objects::CSeq_feat > > TVecFeatList

static const char * sm_MolinfoForBsrc

virtual void TheFunction()

Function implementation.

static bool IsPseudoFeature(const objects::CSeq_feat &feat)

static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)

size_t TMemberIndex

Type used for indexing class members and choice variants.

virtual const CTypeInfo * GetThisTypeInfo(void) const =0

static const TObjectType * SafeCast(TTypeInfo type)

@ ePrimitiveValueString

string|char*|const char*

@ ePrimitiveValueEnum

enum

string GetSeqIdString(bool with_version=false) const

Return seqid string with optional version for text seqid type.

CConstRef< CSeq_id > GetSeqId(void) const

@ fLabel_GeneralDbIsContent

For type general, use the database name as the tag and the (text or numeric) key as the content.

@ eContent

Untagged human-readable accession or the like.

TSeqPos GetStart(ESeqLocExtremes ext) const

Return start and stop positions of the seq-loc.

TSeqPos GetStop(ESeqLocExtremes ext) const

CElementIterator BeginElements(void) const

Create container elements iterator.

CObjectInfo GetPointedObject(void) const

Get data and type information of object to which this type refers.

CObjectInfo GetElement(void) const

Get element data and type information.

TObjectPtr GetObjectPtr(void) const

Get pointer to object.

TMemberIndex GetCurrentChoiceVariantIndex(void) const

Get index of currently selected choice variant.

CChoiceVariant GetCurrentChoiceVariant(void) const

Get data and type information of selected choice variant.

bool Valid(void) const

Is iterator valid.

CMemberIterator GetClassMemberIterator(TMemberIndex index) const

Create class member iterator that initially points to specified member.

ETypeFamily GetTypeFamily(void) const

Get data type family.

void GetPrimitiveValueString(string &value) const

Get string data.

CMemberIterator FindClassMember(const string &memberName) const

Find class member by its name.

Int4 GetPrimitiveValueInt4(void) const

Get data as Int4.

EPrimitiveValueType GetPrimitiveValueType(void) const

Get type of primitive value.

const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)

If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...

Int8 TestForOverlapEx(const CSeq_loc &loc1, const CSeq_loc &loc2, EOverlapType type, CScope *scope=0, TOverlapFlags flags=fOverlap_Default)

Updated version of TestForOverlap64().

@ eOverlap_Contained

2nd contained within 1st extremes

static void Translate(const string &seq, string &prot, const CGenetic_code *code, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=NULL, bool is_5prime_complete=true, bool is_3prime_complete=true)

Translate a string using a specified genetic code.

@ eGetId_Best

return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function

CBioseq_Handle GetBioseqHandle(const CSeq_id &id)

Get bioseq handle by seq-id.

CBioseq_set_Handle GetBioseq_setHandle(const CBioseq_set &seqset, EMissing action=eMissing_Default)

CConstRef< CBioseq > GetCompleteBioseq(void) const

Get the complete bioseq.

TClass GetClass(void) const

CBioseq_set_Handle GetParentBioseq_set(void) const

Return a handle for the parent Bioseq-set, or null handle.

CSeq_entry_Handle GetSeq_entry_Handle(void) const

Get parent Seq-entry handle.

CConstRef< CBioseq_set > GetCompleteBioseq_set(void) const

Return the complete bioseq-set object.

CConstRef< CSeq_id > GetSeqId(void) const

Get id which can be used to access this bioseq handle Throws an exception if none is available.

CSeq_entry_Handle GetParentEntry(void) const

Return a handle for the parent seq-entry of the bioseq.

bool IsSetClass(void) const

CScope & GetScope(void) const

Get scope this handle belongs to.

TObjectType * GetPointer(void) const THROWS_NONE

Get pointer,.

bool IsNull(void) const THROWS_NONE

Check if pointer is null – same effect as Empty().

TObjectType & GetObject(void) const

Get object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define USING_SCOPE(ns)

Use the specified namespace.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define BEGIN_SCOPE(ns)

Define a new scope.

static string Int8ToString(Int8 value, TNumToStringFlags flags=0, int base=10)

Convert Int8 to string.

static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)

Check if a string is blank (has no text).

static string IntToString(int value, TNumToStringFlags flags=0, int base=10)

Convert int to string.

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 EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive equality of a substring with another string.

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)

Test for equality of a substring with another string.

@ eNocase

Case insensitive compare.

static const char label[]

bool IsSetOrg(void) const

Check if a value has been assigned to Org data member.

const TOrg & GetOrg(void) const

Get the Org member data.

bool IsStr(void) const

Check if variant Str is selected.

const TTag & GetTag(void) const

Get the Tag member data.

bool IsStrs(void) const

Check if variant Strs is selected.

bool IsId(void) const

Check if variant Id is selected.

const TData & GetData(void) const

Get the Data member data.

const TDb & GetDb(void) const

Get the Db member data.

bool IsStr(void) const

Check if variant Str is selected.

TData & SetData(void)

Assign a value to Data data member.

const TStr & GetStr(void) const

Get the variant data.

const TLabel & GetLabel(void) const

Get the Label member data.

bool IsSetData(void) const

Check if a value has been assigned to Data data member.

TId GetId(void) const

Get the variant data.

bool IsSetDb(void) const

ids in taxonomic or culture dbases Check if a value has been assigned to Db data member.

const TDb & GetDb(void) const

Get the Db member data.

@ eSubtype_specimen_voucher

@ eSubtype_culture_collection

bool IsSetData(void) const

the specific data Check if a value has been assigned to Data data member.

bool IsCdregion(void) const

Check if variant Cdregion is selected.

const TLocation & GetLocation(void) const

Get the Location member data.

bool IsGene(void) const

Check if variant Gene is selected.

const TData & GetData(void) const

Get the Data member data.

bool IsSetDbxref(void) const

support for xref to other databases Check if a value has been assigned to Dbxref data member.

bool IsRna(void) const

Check if variant Rna is selected.

const TSource & GetSource(void) const

Get the variant data.

const TId & GetId(void) const

Get the Id member data.

const TMolinfo & GetMolinfo(void) const

Get the variant data.

@ e_User

user defined object

@ e_Molinfo

info on the molecule and techniques

@ e_Source

source of materials, includes Org-ref

@ eMol_na

just a nucleic acid

unsigned int

A callback function used to compare two keys in a database.

Functions that resolve field names described in asn format.

constexpr bool empty(list< Ts... >) noexcept

static const char delimiter[]

Utility macros and typedefs for exploring NCBI objects from seqfeat.asn.

#define FOR_EACH_ORGMOD_ON_BIOSOURCE(Itr, Var)

FOR_EACH_ORGMOD_ON_BIOSOURCE EDIT_EACH_ORGMOD_ON_BIOSOURCE.

#define FOR_EACH_DBXREF_ON_FEATURE


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4