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__do_8cpp_source.html below:

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

68

void CMacroFunction_RemoveDescriptor::TheFunction()

70  if

(!m_DataIter->IsDescriptor()) {

74

m_DataIter->SetToDelete(

true

);

76

report[

"descriptor removal"

] = 1;

78

x_LogChangedQuals(fnc_log);

81 bool

CMacroFunction_RemoveDescriptor::x_ValidArguments()

const 83  return

(m_Args.empty());

92 void

CMacroFunction_RemoveSequence::TheFunction()

99

m_DataIter->SetToDelete(

true

);

101  log

<< m_DataIter->GetBestDescr() <<

": sequence removed"

;

105 bool

CMacroFunction_RemoveSequence::x_ValidArguments()

const 107  return

(m_Args.empty());

116 void

CMacroFunction_RemoveAlignment::TheFunction()

123

m_DataIter->SetToDelete(

true

);

125  log

<< m_DataIter->GetBestDescr() <<

" removed"

;

129 bool

CMacroFunction_RemoveAlignment::x_ValidArguments()

const 131  return

(m_Args.empty());

141 void

CMacroFunction_TrimStringQual::TheFunction()

149  int

nr_chars = (

int

)(m_Args[1]->GetInt());

150  if

(res_oi.empty() || nr_chars == 0) {

161  value

.erase(0, nr_chars);

162

SetQualStringValue(obj,

value

);

167  if

(m_QualsChangedCount) {

168

m_DataIter->SetModified();

171  log

<< m_DataIter->GetBestDescr() <<

": trimmed "

<< nr_chars <<

" characters from "

<< m_QualsChangedCount <<

" qualifiers"

;

176 bool

CMacroFunction_TrimStringQual::x_ValidArguments()

const 178  if

(m_Args.size() != 2) {

191 void

CMacroFunction_CorrectGeneticCodes::TheFunction()

195  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

215  if

(!

code

||

code

->GetId() == cds_gc) {

219

edit_feat->

SetData

().SetCdregion().SetCode(*

code

);

220

m_DataIter->SetModified();

223  log

<< m_DataIter->GetBestDescr() <<

": corrected genetic code"

;

227 bool

CMacroFunction_CorrectGeneticCodes::x_ValidArguments()

const 229  return

(m_Args.empty());

253

res_oi =

m_Args

[0]->GetObjects();

259  if

(res_oi.empty()) {

292

vector<CTempString> taxname_words;

295

vector<CTempString> words;

298  for

(

auto

& it : taxname_words) {

299

words.erase(

remove

(words.begin(), words.end(), it), words.end());

303  if

(new_field != field) {

312  if

(

m_Args

.size() != 1)

return false

;

334

vector<string> orig_seq, new_seq;

340

orig_seq.push_back(seq);

345

new_seq.push_back(seq);

351

new_seq.push_back(seq);

362  for

(

size_t n

= 0;

n

< new_seq.size(); ++

n

) {

364  log

<<

": changed primer seq from "

<< orig_seq[

n

];

365  log

<<

" to "

<< new_seq[

n

];

382 void

CMacroFunction_FixUSAandStatesAbbrev::TheFunction()

385  const CPubdesc

* const_pubdesc =

dynamic_cast<const CPubdesc

*

>

(

object

.GetPointer());

388  bool

modified =

false

;

402  else if

(const_block) {

420

m_DataIter->SetModified();

422  log

<< m_DataIter->GetBestDescr() <<

": fixed USA and state abbreviations"

;

427 bool

CMacroFunction_FixUSAandStatesAbbrev::x_ValidArguments()

const 429  return

(m_Args.empty());

439

void CMacroFunction_FixSourceQualCaps::TheFunction()

442

x_GetObjectsFromRef(res_oi, 0);

443  if

(res_oi.empty()) {

447

vector<string>

orig

, fixed;

451  bool

is_subsrc(

false

);

458  const string

field_name = (is_subsrc) ?

"name"

:

"subname"

;

468  bool

capitalize_after_colon(

false

);

485

SetQualStringValue(oi_field, new_value);

486

fixed.push_back(new_value);

490  if

(m_QualsChangedCount) {

491

m_DataIter->SetModified();

493  log

<< m_DataIter->GetBestDescr() <<

": "

;

494  for

(

size_t i

= 0;

i

< fixed.size(); ++

i

) {

495  log

<<

" corrected "

<<

orig

[

i

] <<

" to "

<< fixed[

i

];

501 bool

CMacroFunction_FixSourceQualCaps::x_ValidArguments()

const 513 void

CMacroFunction_FixMouseStrain::TheFunction()

516

x_GetObjectsFromRef(res_oi, 0);

517  if

(res_oi.empty()) {

521

vector<string>

orig

, fixed;

539  string

orig_value =

value

;

541

new_value = orig_value;

549

SetQualStringValue(oi_field, new_value);

550

fixed.push_back(new_value);

554  if

(m_QualsChangedCount) {

555

m_DataIter->SetModified();

557  log

<< m_DataIter->GetBestDescr() <<

": "

;

558  for

(

size_t i

= 0;

i

< fixed.size(); ++

i

) {

559  log

<<

" corrected "

<<

orig

[

i

] <<

" to "

<< fixed[

i

];

565 bool

CMacroFunction_FixMouseStrain::x_ValidArguments()

const 577 void

CMacroFunction_FixAuthorCaps::TheFunction()

589

vector<string>

orig

, fixed;

596  string

newValue(orig_value);

597  bool

fix_abbrev(

false

), fix_short_words(

false

);

598  bool

cap_after_apostrophe(

true

);

600

s_FixCapitalizationInElement(newValue, fix_abbrev, fix_short_words, cap_after_apostrophe)) {

602  orig

.push_back(orig_value);

603

SetQualStringValue(oi, newValue);

604

fixed.push_back(newValue);

608  if

(m_QualsChangedCount) {

609

m_DataIter->SetModified();

611  log

<< m_DataIter->GetBestDescr() <<

": "

;

612  for

(

size_t i

= 0;

i

< fixed.size(); ++

i

) {

613  log

<<

" fixed author last name capitalization: from "

<<

orig

[

i

] <<

" to "

<< fixed[

i

] <<

"\n"

;

619 bool

CMacroFunction_FixAuthorCaps::x_ValidArguments()

const 659  bool

punct_only = (++index <

m_Args

.size()) ?

m_Args

[index]->GetBool() :

false

;

670  bool

first_is_upper(

true

);

736  size_t

as =

m_Args

.size();

737  if

(as < 1 || as > 2) {

757  string

new_country = country;

778  if

(cap_after_apostrophe) {

782  if

(fix_short_words) {

797  string

fixed_title(title);

810  bool

cap_after_apostrophe(

true

);

811  bool

fix_abbrev(

false

), fix_short_words(

false

);

857  string

affiliation = affil_std.

GetAffil

();

889  string

div = affil_std.

GetDiv

();

919  string

city = affil_std.

GetCity

();

991  if

(

state

.length() == 2) {

1041  if

(!affil.

IsStd

()) {

1058  if

(!affil.

IsStd

()) {

1088

vector<string>

orig

, fixed;

1110  orig

.push_back(orig_value);

1112

fixed.push_back(newValue);

1116  bool

ambiguous =

false

, day_first =

false

;

1119  bool

month_ambiguous =

false

;

1134  while

(desc_it && ambiguous) {

1138  if

((*subsrc)->IsSetName() && !

NStr::EqualCase

(orig_value, (*subsrc)->GetName())) {

1156  bool

month_ambiguous =

false

;

1167

fixed.push_back(newValue);

1173  orig

.push_back(orig_value);

1175

fixed.push_back(newValue);

1186  for

(

size_t i

= 0;

i

< fixed.size(); ++

i

) {

1188  log

<<

" corrected "

<<

orig

[

i

] <<

" to "

<< fixed[

i

];

1209  string

additional(

"altitude: "

+

value

);

1210  bool

modified(

false

);

1213  if

((*subsrc)->IsSetName()) {

1214  string

new_note = (*subsrc)->GetName() +

";"

+ additional;

1215

(*subsrc)->SetName() = new_note;

1232  if

(lat_lon.empty())

1235  bool

format_correct =

false

, precision_correct =

false

, lat_in_range =

false

, lon_in_range =

false

;

1236  double

lat_value = 0.0, lon_value = 0.0;

1237  string

orig_value(lat_lon);

1241  if

(!format_correct) {

1247

fix = fix.substr(0, pos);

1248  string

extra_text = fix.substr(pos + 2,

NPOS

);

1266 void

CMacroFunction_Resolve::TheFunction()

1270

m_Result->SetNotSet();

1275

m_Result->SetObjects(m_Args[0]->

GetObjects

());

1279

x_GetObjectsFromRef(objs, 0);

1281

m_Result->SetNotSet();

1284

m_Result->SetObjects(objs);

1289 bool

CMacroFunction_Resolve::x_ValidArguments()

const 1291  if

(m_Args.size() != 1)

1305 void

CMacroFunction_ResolveBioSourceQuals::TheFunction()

1313

vector<string> field_names;

1314

field_names.push_back(

"pcr-primers..forward..seq"

);

1315

field_names.push_back(

"pcr-primers..forward..name"

);

1316

field_names.push_back(

"pcr-primers..reverse..seq"

);

1317

field_names.push_back(

"pcr-primers..reverse..name"

);

1318

field_names.push_back(

"org.taxname"

);

1319

field_names.push_back(

"org.common"

);

1320

field_names.push_back(

"org.orgname.lineage"

);

1321

field_names.push_back(

"org.orgname.div"

);

1326  ITERATE

(vector<string>, it, field_names) {

1328

objs.push_back(res_oi.front());

1333  if

(!objs.empty()) {

1334

m_Result->SetObjects(objs);

1338 bool

CMacroFunction_ResolveBioSourceQuals::x_ValidArguments()

const 1340  return

(m_Args.empty());

1348 void

CMacroFunction_ResolveNASeq::TheFunction()

1366 bool

CMacroFunction_ResolveNASeq::x_ValidArguments()

const 1378 void

CMacroFunction_ChangeSeqInst::TheFunction()

1383  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

1384  if

(!orig_molinfo || !scope) {

1396

new_inst->Assign(bseq->

GetInst

());

1397  CObjectInfo

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

1400  const string

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

1407

m_QualsChangedCount++;

1410  if

(m_QualsChangedCount) {

1414  cmd

->AddCommand(*chgInst);

1415

m_DataIter->RunCommand(

cmd

, m_CmdComposite);

1420  log

<<

"Changed "

<< field <<

" to "

<< m_Args[1]->GetString() <<

" for sequence "

<< best_seqid;

1425 bool

CMacroFunction_ChangeSeqInst::x_ValidArguments()

const 1427  size_t

arg_size = m_Args.size();

1428  if

(arg_size != 2) {

1432  for

(

size_t i

= 0;

i

< arg_size; ++

i

) {

1445 void

CMacroFunction_RemoveLineageSourceNotes::TheFunction()

1452

vector<string> orig_value;

1455  if

((*orgmod)->IsSetSubname()) {

1456

orig_value.push_back((*orgmod)->GetSubname());

1463  if

((*subsrc)->IsSetName()) {

1464

orig_value.push_back((*subsrc)->GetName());

1471

vector<string> new_value;

1474  if

((*orgmod)->IsSetSubname()) {

1475

new_value.push_back((*orgmod)->GetSubname());

1482  if

((*subsrc)->IsSetName()) {

1483

new_value.push_back((*subsrc)->GetName());

1489  while

(

i

< orig_value.size()) {

1490  if

(j < new_value.size()) {

1494  msg

.append(

"removed note "

+ orig_value[

i

] +

" where lineage is "

+ bsrc->

GetLineage

());

1498  msg

.append(

"removed note "

+ orig_value[

i

] +

" where lineage is "

+ bsrc->

GetLineage

());

1503

m_DataIter->SetModified();

1505  log

<< m_DataIter->GetBestDescr() <<

": "

<<

msg

;

1510 bool

CMacroFunction_RemoveLineageSourceNotes::x_ValidArguments()

const 1512  return

(m_Args.empty());

1532  log

<<

"Removed gaps from the alignment"

;

1543

orig_denseg.

Assign

(denseg);

1551  if

(!denseg.

Equals

(orig_denseg)) {

1560  return

(

m_Args

.empty());

1569 void

CMacroFunction_RmvDuplStructComments::TheFunction()

1574  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

1575  if

(!bseq || !scope)

1583

vector<CConstRef<CSeqdesc> > struct_comments;

1591  if

(struct_comments.size() < 2)

1594

vector<CConstRef<CSeqdesc> >::const_iterator it1 = struct_comments.begin();

1595

vector<CConstRef<CSeqdesc> >::const_iterator it2(it1);

1596  while

(it1 != struct_comments.end()) {

1599  while

(it2 != struct_comments.end()) {

1600  if

((*it2)->Equals((**it1))) {

1605

duplicates[seh1].

insert

(*it1);

1607

duplicates[seh2].

insert

(*it2);

1615  if

(duplicates.

empty

())

1621  for

( ; it != duplicates.

end

(); ++it) {

1624  cmd

->AddCommand(*del_cmd);

1630

m_DataIter->RunCommand(

cmd

, m_CmdComposite);

1632  log

<< m_DataIter->GetBestDescr() <<

": Removed "

<<

count

<<

" duplicate structured comments"

;

1637 bool

CMacroFunction_RmvDuplStructComments::x_ValidArguments()

const 1639  return

(m_Args.empty());

1647 void

CMacroFunction_ReorderStructComment::TheFunction()

1662  const CComment_rule

& rule = rules->FindCommentRule(prefix);

1664

m_QualsChangedCount++;

1665

m_DataIter->SetModified();

1668

report[

"reordering structured comments"

] = m_QualsChangedCount;

1670

x_LogChangedQuals(fnc_log);

1675  log

<<

"No rule was found for this prefix: "

<< prefix;

1678  LOG_POST

(

Error

<<

"No rule was found for this prefix: "

<< prefix);

1683 bool

CMacroFunction_ReorderStructComment::x_ValidArguments()

const 1685  return

(m_Args.empty());

1698  if

(!bseq || !scope) {

1713

edited_desc->

Assign

(*desc_it);

1719  cmd

->AddCommand(*edit_cmd);

1723  log

<<

m_DataIter

->GetBestDescr() <<

": Created a BARCODE dbxref"

;

1729  return

(

m_Args

.empty());

1735  const CSeq_id

& seqid = **seqid_it;

1761  if

((*dbtag)->IsSetTag()) {

1763

(*dbtag)->GetTag().AsString(ss_tag);

1779

bold_xref->

SetTag

().SetStr(barcode_id);

1788 void

CMacroFunction_AddProteinTitles::TheFunction()

1792  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

1793  if

(!bseq || bseq->

IsNa

() || !scope) {

1803  string

defline = sequence::CDeflineGenerator().GenerateDefline(bsh, sequence::CDeflineGenerator::fAllProteinNames);

1805  if

(!defline.empty()) {

1808

new_desc->SetTitle(defline);

1813

m_DataIter->RunCommand(

cmd

, m_CmdComposite);

1814

m_QualsChangedCount++;

1816

report[

"protein title instantiation"

] = m_QualsChangedCount;

1818

x_LogChangedQuals(fnc_log);

1822 bool

CMacroFunction_AddProteinTitles::x_ValidArguments()

const 1824  return

(m_Args.empty());

1863

eTrimResult = trimmer.

Trim

( edited_bsh, from, to );

1909  return

(

m_Args

.empty());

1919

void CMacroFunction_PrintCSV::TheFunction()

1921  if

(!m_DataIter->IsSetOutputStream())

1925  const string

& del = (m_Args.size() == 2) ? m_Args[1]->GetString() :

kEmptyStr

;

1930  if

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

1933  else if

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

1934

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

1936  else if

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

1939  if

(

val

.AreObjects()) {

1940

res_oi =

val

.GetObjects();

1942  else if

(

val

.IsInt()) {

1946  else if

(

val

.IsString()) {

1952  if

(res_oi.empty()) {

1957  for

(

auto

& it : res_oi) {

1960  for

(

auto

& iter : objs) {

1984 bool

CMacroFunction_PrintCSV::x_ValidArguments()

const 1986  if

(m_Args.empty() || m_Args.size() > 2)

1989  bool

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

1993  if

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

2004

void CMacroFunction_PrintTSV::TheFunction()

2006  if

(!m_DataIter->IsSetOutputStream())

2017  if

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

2020  else if

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

2021

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

2023  else if

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

2026  if

(

val

.AreObjects()) {

2027

res_oi =

val

.GetObjects();

2029  else if

(

val

.IsInt()) {

2033  else if

(

val

.IsString()) {

2039  if

(res_oi.empty()) {

2044  for

(

auto

& it : res_oi) {

2047  for

(

auto

& iter : objs) {

2071 bool

CMacroFunction_PrintTSV::x_ValidArguments()

const 2073  if

(m_Args.empty() || m_Args.size() > 2)

2076  bool

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

2080  if

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

2091

void CMacroFunction_PrintVerbatim::TheFunction()

2093  if

(!m_DataIter->IsSetOutputStream())

2102  if

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

2105  else if

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

2106

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

2108  else if

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

2111  if

(

val

.AreObjects()) {

2112

res_oi =

val

.GetObjects();

2114  else if

(

val

.IsInt()) {

2118  else if

(

val

.IsString()) {

2119

ostr <<

val

.GetString();

2124  if

(res_oi.empty()) {

2128  for

(

auto

& it : res_oi) {

2131  for

(

auto

& iter : objs) {

2155 bool

CMacroFunction_PrintVerbatim::x_ValidArguments()

const 2157  if

(m_Args.empty() || m_Args.size() > 1)

2160  bool

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

2175  string

modified_name = name;

2176  if

(name ==

"other"

) {

2177

modified_name =

"note"

;

2179  else if

(name ==

"nat-host"

) {

2180

modified_name =

"host"

;

2182  else if

(name ==

"substrain"

) {

2183

modified_name =

"sub_strain"

;

2185  else if

(name ==

"subclone"

) {

2186

modified_name =

"sub_clone"

;

2188  else if

(name ==

"plasmid-name"

) {

2189

modified_name =

"plasmid"

;

2191  else if

(name ==

"transposon_name"

) {

2192

modified_name =

"transposon"

;

2194  else if

(name ==

"insertion-seq-name"

) {

2195

modified_name =

"insertion_seq"

;

2198  return

modified_name;

2202  const string

& append_del,

const string

& multiple_del,

CNcbiOstream

& ostr)

2207  const string

& class_name = res_oi.front().field.GetName();

2208  bool

all_the_same =

true

;

2209  for

(

auto

& it : res_oi) {

2210  if

(it.field.GetName() != class_name) {

2211

all_the_same =

false

;

2219

unordered_map<string, vector<string>> qualifiers;

2220  for

(

auto

& it : res_oi) {

2223  CObjectInfo

name_oi = it.field.GetClassMemberIterator(index).GetMember();

2224  CObjectInfo

value_oi = it.field.GetClassMemberIterator(++index).GetMember();

2230  for

(

const auto

& it : qualifiers) {

2231

ostr << it.first <<

"="

<<

NStr::Join

(it.second, multiple_del) << append_del;

2233  return

!qualifiers.empty();

2237

void CMacroFunction_PrintBankit::TheFunction()

2239  if

(!m_DataIter->IsSetOutputStream())

2244  string

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

kEmptyStr

;

2251  if

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

2254  else if

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

2255

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

2257  else if

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

2260  if

(

val

.AreObjects()) {

2261

res_oi =

val

.GetObjects();

2263  else if

(

val

.IsInt()) {

2267  else if

(

val

.IsString()) {

2268

ostr <<

val

.GetString() << append_del;

2271  else if

(

val

.AreStrings()) {

2272

ostr <<

NStr::Join

(

val

.GetStrings(), multiple_del) << append_del;

2276  if

(res_oi.empty()) {

2286  bool

appended =

false

;

2287  for

(

auto

& it : res_oi) {

2290  for

(

auto

& iter : objs) {

2293  if

(appended) ostr << multiple_del;

2298  if

(appended) ostr << multiple_del;

2306  if

(appended) ostr << multiple_del;

2311  if

(appended) ostr << multiple_del;

2324 bool

CMacroFunction_PrintBankit::x_ValidArguments()

const 2326  if

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

2329  bool

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

2333  for

(

size_t

index = 1; index < m_Args.size(); ++index) {

2334  if

(!m_Args[index]->IsString())

2347

void CMacroFunction_PrintLiteral::TheFunction()

2349  if

(!m_DataIter->IsSetOutputStream())

2353  string str

= m_Args[0]->GetString();

2354  bool

print_once = (m_Args.size() == 2) ? m_Args[1]->GetBool() :

false

;

2357  if

(!m_DataIter->HasBeenCompleted()) {

2359

m_DataIter->SetCompleted();

2367  LOG_POST

(

Error

<<

"CMacroFunction_PrintLiteral: could not print literal "

<<

str

);

2371 bool

CMacroFunction_PrintLiteral::x_ValidArguments()

const 2373  if

(m_Args.empty() || m_Args.size() > 2)

2376  if

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

2378  if

(m_Args.size() == 2 && !m_Args[1]->IsBool())

2388

void CMacroFunction_ToUnknownLengthGap::TheFunction()

2392  CRef<CScope>

scope = m_DataIter->GetScopedObject().scope;

2393  if

(!bseq || !bseq->

IsNa

() || !scope) {

2396  if

(m_Args[0]->GetInt() <= 0)

2404

new_inst->Assign(bsh.

GetInst

());

2405  if

(new_inst->IsSetRepr() &&

2407

new_inst->IsSetExt() &&

2408

new_inst->GetExt().IsDelta()) {

2410  auto

literals = new_inst->SetExt().SetDelta().Set();

2411  for

(

auto

&& it : literals) {

2412  if

(it->IsLiteral()) {

2413  auto

& lit = it->SetLiteral();

2414  if

(lit.IsSetSeq_data() && lit.GetSeq_data().IsGap() &&

2415

lit.IsSetLength() && lit.GetLength() == gap_len && !lit.IsSetFuzz()) {

2417

m_QualsChangedCount++;

2423  if

(m_QualsChangedCount) {

2426  cmd

->AddCommand(*chgInst);

2427

m_DataIter->RunCommand(

cmd

, m_CmdComposite);

2430  log

<< m_DataIter->GetBestDescr() <<

": converted "

<< m_QualsChangedCount <<

" estimated length gap of size "

<< gap_len <<

" to unknown length gap"

;

2435 bool

CMacroFunction_ToUnknownLengthGap::x_ValidArguments()

const 2437  return

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

CSeq_entry_Handle GetSeqEntryForSeqdesc(CRef< CScope > scope, const CSeqdesc &seq_desc)

CRef< CGenetic_code > GetGeneticCodeForBioseq(CBioseq_Handle bh)

GetGeneticCodeForBioseq A function to construct the appropriate CGenetic_code object to use when cons...

@Affil.hpp User-defined methods of the data storage class.

const string & GetLineage(void) const

const string & GetTaxname(void) const

bool RemoveLineageSourceNotes()

bool IsSetTaxname(void) const

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

void AddCommand(IEditCommand &command)

static string CountryFixupItem(const string &input, bool capitalize_after_colon)

void RemovePureGapSegs()

Remove any segments in which every row has a gap (these can arise when ExtractRows is used)

void Compact()

Join adjacent mergeable segments to create a more compact alignment.

void Assign(const CSerialObject &obj, ESerialRecursionMode how=eRecursive)

overloaded Assign()

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

CMacroBioData_BioSourceIter - iterates over all biosource descriptors and features in the seq-entry.

@Name_std.hpp User-defined methods of the data storage class.

CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:

ostream & AsString(ostream &s) const

static bool TrimJunk(string &seq)

static bool Fixi(string &seq)

@Pubdesc.hpp User-defined methods of the data storage class.

virtual EResult Trim(objects::CBioseq_Handle &bioseq_handle, TSignedSeqPos &left, TSignedSeqPos &right)

void TrimAlignments(CRef< CCmdComposite > command, objects::CBioseq_Handle bsh, const objects::CBioseq::TId &seqids, TSeqPos from, TSeqPos to)

void AdjustAndTranslate(objects::CBioseq_Handle bsh, int length, int from, int to, CRef< CCmdComposite > command, objects::CScope &scope, map< objects::CBioseq_Handle, set< objects::CSeq_feat_Handle > > &product_to_cds)

void TrimSeqGraphs(CRef< CCmdComposite > command, objects::CBioseq_Handle bsh, const objects::CBioseq::TId &seqids, TSeqPos from, TSeqPos to, int length)

namespace ncbi::objects::

bool HasExceptionText(const string &exception_text) const

Returns whether or not the given exception_text is set for this feature.

static string FixLatLonFormat(string orig_lat_lon, bool guess=false)

static string FixDateFormat(const string &orig_date)

Attempt to fix the format of the date Returns a blank if the format of the date cannot be determined.

static void IsCorrectLatLonFormat(string lat_lon, bool &format_correct, bool &precision_correct, bool &lat_in_range, bool &lon_in_range, double &lat_value, double &lon_value)

static string FixAltitude(const string &value)

static void DetectDateFormat(const string &orig_date, bool &ambiguous, bool &day_first)

static bool GetBestId(CSeq_id_Handle, CScope &, string &)

const_iterator begin() const

const_iterator end() const

iterator_bool insert(const value_type &val)

void FixAbbreviationsInElement(string &result, bool fix_end_of_sentence=true)

API (CDeflineGenerator) for computing sequences' titles ("definitions").

static auto & FixOrdinalNumbers

static auto & FixCapitalizationInElement

static auto & CapitalizeAfterApostrophe

static auto & FixUSAAbbreviationInAffil

static auto & FixKnownAbbreviationsInElement

static auto & ResetCapitalization

static auto & FixShortWordsInElement

static auto & FindReplaceString_CountryFixes

static auto & FixOrgNames

static auto & FixAffiliationShortWordsInElement

static auto & FixupMouseStrain

static auto & FixStateAbbreviationsInCitSub

static auto & FixCountryCapitalization

static auto & InsertMissingSpacesAfterNo

static auto & FixStateAbbreviationsInAffil

static auto & InsertMissingSpacesAfterCommas

vector< CConstRef< CObject > > GetObjects(CSeq_entry_Handle seh, const string &field, CFieldNamePanel::EFieldType field_type, int subtype, const string &ncRNA_class, CConstRef< objects::CSeq_submit > submit, CRef< CEditingActionConstraint > constraint, vector< CSeq_entry_Handle > *descr_context=nullptr)

static void DLIST_NAME() remove(DLIST_LIST_TYPE *list, DLIST_TYPE *item)

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

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 NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

#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.

virtual void TheFunction()

Function implementation.

bool StringsAreEquivalent(const string &name1, const string &name2)

static Int4 s_FixCapsInPubAffil_Affil(objects::CAffil &affil, bool punct_only)

map< objects::CBioseq_Handle, set< objects::CSeq_feat_Handle > > m_ProductToCds

bool SetQualStringValue(CObjectInfo &oi, const string &value)

Functions make the action and collect statistics.

virtual void TheFunction()

Function implementation.

static string s_GetBarcodeId(const objects::CBioseq &bseq)

virtual void TheFunction()

Function implementation.

static Int4 s_FixCapsInPubAffil_Country(objects::CAffil &affil, bool punct_only)

CRef< CMacroCmdComposite > m_CmdComposite

static Int4 s_FixCapsInPubAffil_NoAffilDiv(objects::CAffil &affil, bool punct_only)

static Int4 s_FixCapsInPubAffil_Street(objects::CAffil &affil, bool punct_only)

static Int4 s_FixCapsInPubAffil_Div(objects::CAffil &affil, bool punct_only)

static CRef< objects::CDbtag > s_MakeBarcodeDbXref(const string &barcode_id)

DEFINE_MACRO_FUNCNAME(CMacroFunction_RemoveSequence, "RemoveSequence")

class CMacroFunction_RemoveSequence RemoveSequence()

static Int4 s_FixCapsInPubAffil_Sub(objects::CAffil &affil, bool punct_only)

list< SResolvedField > TObs

static string s_ConvertAltitudeToMeters(const string &value)

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

virtual void TheFunction()

Function implementation.

void Dereference()

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

const TObs & GetObjects() const

static Int4 s_FixCapitalizationInAuthor(objects::CName_std &auth_names)

bool ResolveIdentToObjects(const CObjectInfo &oi, const string &identifier, CMQueryNodeValue &v)

Resolve name to the list of objects.

bool SetSimpleTypeValue(CObjectInfo &oi, const CMQueryNodeValue &value, objects::edit::EExistingText existing_text=objects::edit::eExistingText_replace_old)

Set single node data to the node specified by parameter of type CObjectInfo.

static void s_FixCapitalizationInCountryString(string &country, bool punct_only)

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

static bool s_AddAltitudeToSubSourceNote(objects::CBioSource &bsrc, const string &value)

CObjectInfo GetPrimitiveObjInfo(const CObjectInfo &info)

void SetCollDateType(bool ambiguous)

static bool s_HasBarcodeDbXref(const objects::CBioseq &bseq, const string &barcode_id)

static string s_FixCapitalizationInTitle(const string &title, bool first_is_upper, const objects::CSeq_entry_Handle &seh)

EType GetDataType() const

static string s_GetModifierName(const string &name)

class CMacroFunction_PrintBankit PrintBankit(field_name|object, multiple_del, append_del) The last tw...

void GetPrimitiveObjectInfos(CMQueryNodeValue::TObs &objs, const CMQueryNodeValue::SResolvedField &info)

string TransformForCSV(const string &str)

Int4 m_QualsChangedCount

Number of changed qualifiers during the function call.

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 ...

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

Resolve not necessarily existing dot qualified ASN.1 name (field_name) starting from the object infor...

static Int4 s_FixCapsInPubAffil_City(objects::CAffil &affil, bool punct_only)

static bool s_PrintContainer(const CMQueryNodeValue::TObs &res_oi, const string &append_del, const string &multiple_del, CNcbiOstream &ostr)

static bool s_FixCapitalizationInElement(string &value, bool fix_abbrev, bool fix_short_words, bool cap_after_apostrophe)

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

virtual void TheFunction()

Function implementation.

static string s_FixLatLonFormat(objects::CBioSource &bsrc, const string &value)

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

void x_LogFunction(CNcbiOstrstream &logstr)

ECollDateType GetCollDateType() const

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

virtual void TheFunction()

Function implementation.

virtual bool x_ValidArguments() const

Tests the number and the type of function arguments.

static const char * kBOLDDb

static bool s_RemoveOrgName(const objects::CBioSource &bsrc, string &field)

CIRef< IMacroBioDataIter > m_DataIter

static Int4 s_FixCapsInPubAffil(objects::CAffil &affil, bool punct_only)

static bool s_RemoveSegGaps(objects::CSeq_align &align)

void x_FixCapsInPubAffilCountry(objects::CAffil &affil, bool punct_only)

virtual void TheFunction()

Function implementation.

objects::CBioseq_Handle GetBioseqForSeqFeat(const objects::CSeq_feat &f, objects::CScope &scope)

size_t TMemberIndex

Type used for indexing class members and choice variants.

virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)

Set object to copy of another one.

static const TObjectType * SafeCast(TTypeInfo type)

virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const

Check if both objects contain the same values.

@ ePrimitiveValueString

string|char*|const char*

@ ePrimitiveValueInteger

(signed|unsigned) (char|short|int|long)

@ ePrimitiveValueEnum

enum

TObjectPtr GetObjectPtr(void) const

Get pointer to object.

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.

const string & GetName(void) const

Get type name.

EPrimitiveValueType GetPrimitiveValueType(void) const

Get type of primitive value.

Int8 GetPrimitiveValueInt8(void) const

Get data as Int8.

EResult

This indicates what happened with the trim.

vector< STrimRule > TTrimRuleVec

Multiple STrimRules are allowed, which are applied from smallest bases_to_check to largest bases_to_c...

@ eMeaningOfAmbig_OnlyCompletelyUnknown

Here, only N for nucleotides and X for amino acids is considered ambiguous.

@ eResult_NoTrimNeeded

Bioseq is left unchanged because it did not need to be trimmed at all.

@ eResult_SuccessfullyTrimmed

Bioseq is now trimmed.

CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri=kPriority_Default, EExist action=eExist_Throw)

Add bioseq, return bioseq handle.

CBioseq_Handle GetBioseqHandle(const CSeq_id &id)

Get bioseq handle by seq-id.

CConstRef< CBioseq > GetCompleteBioseq(void) const

Get the complete bioseq.

CSeq_id_Handle GetAccessSeq_id_Handle(void) const

Get any CSeq_id_Handle handle that can be used to access this bioseq Use GetSeq_id_Handle() if it's n...

CSeq_entry_Handle GetSeq_entry_Handle(void) const

Get parent Seq-entry handle.

void SetInst(TInst &v) const

CBioseq_EditHandle GetEditHandle(void) const

Get 'edit' version of handle.

TInst_Length GetInst_Length(void) const

CScope & GetScope(void) const

Get scope this handle belongs to.

const TInst & GetInst(void) const

CSeq_entry_Handle GetSeq_entry_Handle(void) const

TObjectType * GetPointer(void) const THROWS_NONE

Get pointer,.

CRef< C > Ref(C *object)

Helper functions to get CRef<> and CConstRef<> objects.

TObjectType * GetPointer(void) THROWS_NONE

Get pointer,.

TObjectType & GetObject(void) const

Get object.

int32_t Int4

4-byte (32-bit) signed integer

#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.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

NCBI_NS_STD::string::size_type SIZE_TYPE

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

Convert Int8 to string.

static string PrintableString(const CTempString str, TPrintableMode mode=fNewLine_Quote|fNonAscii_Passthru)

Get a printable version of the specified string.

int TPrintableMode

Bitwise OR of EPrintableMode flags.

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.

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 whitespace in a string (in-place)

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

Convert int to string.

static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)

Find the pattern in the string.

static string Join(const TContainer &arr, const CTempString &delim)

Join strings using the specified delimiter.

static string ParseEscapes(const CTempString str, EEscSeqRange mode=eEscSeqRange_Standard, char user_char='?')

Parse C-style escape sequences in the specified string.

static bool EqualCase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-sensitive equality of a substring with another 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 string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

static string & ToUpper(string &str)

Convert string to upper case – string& version.

@ fNonAscii_Passthru

Allow non-ASCII but printable characters.

@ fNewLine_Quote

Display "\n" instead of actual linebreak.

@ fSplit_Tokenize

All delimiters are merged and trimmed, to get non-empty tokens only.

@ eNocase

Case insensitive compare.

void SetAffil(const TAffil &value)

Assign a value to Affil data member.

void SetCountry(const TCountry &value)

Assign a value to Country data member.

void SetSub(const TSub &value)

Assign a value to Sub data member.

bool IsSetStreet(void) const

street address, not ANSI Check if a value has been assigned to Street data member.

bool IsSetCity(void) const

Author Affiliation, City Check if a value has been assigned to City data member.

bool IsSetAffil(void) const

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

const TStreet & GetStreet(void) const

Get the Street member data.

const TAffil & GetAffil(void) const

Get the Affil member data.

const TSub & GetSub(void) const

Get the Sub member data.

bool IsSetDiv(void) const

Author Affiliation, Division Check if a value has been assigned to Div data member.

const TCountry & GetCountry(void) const

Get the Country member data.

const TStd & GetStd(void) const

Get the variant data.

void SetCity(const TCity &value)

Assign a value to City data member.

void SetStreet(const TStreet &value)

Assign a value to Street data member.

void SetDiv(const TDiv &value)

Assign a value to Div data member.

bool IsStd(void) const

Check if variant Std is selected.

bool IsSetCountry(void) const

Author Affiliation, Country Check if a value has been assigned to Country data member.

const TCity & GetCity(void) const

Get the City member data.

bool IsSetAffil(void) const

Author Affiliation, Name Check if a value has been assigned to Affil data member.

const TDiv & GetDiv(void) const

Get the Div member data.

TStd & SetStd(void)

Select the variant.

bool IsSetSub(void) const

Author Affiliation, County Sub Check if a value has been assigned to Sub data member.

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.

void SetOrg(TOrg &value)

Assign a value to Org data member.

TSubtype & SetSubtype(void)

Assign a value to Subtype data member.

@ eSubtype_collection_date

DD-MMM-YYYY format.

@ eSubtype_lat_lon

+/- decimal degrees

bool IsSetDb(void) const

name of database or system Check if a value has been assigned to Db data member.

void SetInitials(const TInitials &value)

Assign a value to Initials data member.

const TTag & GetTag(void) const

Get the Tag member data.

void SetTag(TTag &value)

Assign a value to Tag data member.

bool IsSetTag(void) const

appropriate tag Check if a value has been assigned to Tag data member.

const TInitials & GetInitials(void) const

Get the Initials member data.

void SetLast(const TLast &value)

Assign a value to Last data member.

const TDb & GetDb(void) const

Get the Db member data.

void SetFirst(const TFirst &value)

Assign a value to First data member.

bool IsSetInitials(void) const

first + middle initials Check if a value has been assigned to Initials data member.

bool IsSetLast(void) const

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

void SetDb(const TDb &value)

Assign a value to Db data member.

bool IsSetFirst(void) const

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

@ eSubtype_other

ASN5: old-name (254) will be added to next spec.

TSub & SetSub(void)

Select the variant.

bool IsSub(void) const

Check if variant Sub is selected.

bool IsSetLens(void) const

lengths in ids order within segs Check if a value has been assigned to Lens data member.

bool IsSetDim(void) const

dimensionality Check if a value has been assigned to Dim data member.

bool IsSetNumseg(void) const

number of segments here Check if a value has been assigned to Numseg data member.

void SetSegs(TSegs &value)

Assign a value to Segs data member.

bool IsSetSegs(void) const

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

bool IsSetStarts(void) const

start OFFSETS in ids order within segs Check if a value has been assigned to Starts data member.

const TSegs & GetSegs(void) const

Get the Segs member data.

bool IsDenseg(void) const

Check if variant Denseg is selected.

bool IsSetIds(void) const

sequences in order Check if a value has been assigned to Ids data member.

bool IsSetData(void) const

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

bool IsSetCode(void) const

genetic code used Check if a value has been assigned to Code data member.

bool IsCdregion(void) const

Check if variant Cdregion is selected.

const TData & GetData(void) const

Get the Data member data.

const TCode & GetCode(void) const

Get the Code member data.

void SetData(TData &value)

Assign a value to Data data member.

const TCdregion & GetCdregion(void) const

Get the variant data.

bool IsGeneral(void) const

Check if variant General is selected.

const TGeneral & GetGeneral(void) const

Get the variant data.

void SetPub(TPub &value)

Assign a value to Pub data member.

const TInst & GetInst(void) const

Get the Inst member data.

const TSource & GetSource(void) const

Get the variant data.

const TId & GetId(void) const

Get the Id member data.

void SetInst(TInst &value)

Assign a value to Inst data member.

TSource & SetSource(void)

Select the variant.

bool IsSetId(void) const

equivalent identifiers Check if a value has been assigned to Id data member.

@ eRepr_delta

sequence made by changes (delta) to others

@ e_User

user defined object

@ e_Title

a title for this sequence

@ e_Source

source of materials, includes Org-ref

@ eMol_na

just a nucleic acid

const TContact & GetContact(void) const

Get the Contact member data.

void SetContact(TContact &value)

Assign a value to Contact data member.

void SetCit(TCit &value)

Assign a value to Cit data member.

bool IsSetCit(void) const

citation for this submission Check if a value has been assigned to Cit data member.

bool IsSetContact(void) const

who to contact Check if a value has been assigned to Contact data member.

void SetContact(TContact &value)

Assign a value to Contact data member.

bool IsSetContact(void) const

WARNING: this will replace the above Check if a value has been assigned to Contact data member.

unsigned int

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

where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig

Functions that resolve field names described in asn format.

const GenericPointer< typename T::ValueType > T2 value

#define EDIT_EACH_PUB_ON_PUBEQUIV(Itr, Var)

#define FOR_EACH_SEQID_ON_BIOSEQ(Itr, Var)

FOR_EACH_SEQID_ON_BIOSEQ EDIT_EACH_SEQID_ON_BIOSEQ.

#define FOR_EACH_DBXREF_ON_ORGREF(Itr, Var)

FOR_EACH_DBXREF_ON_ORGREF EDIT_EACH_DBXREF_ON_ORGREF.

#define FOR_EACH_ORGMOD_ON_BIOSOURCE(Itr, Var)

FOR_EACH_ORGMOD_ON_BIOSOURCE EDIT_EACH_ORGMOD_ON_BIOSOURCE.

#define FOR_EACH_SUBSOURCE_ON_BIOSOURCE(Itr, Var)

FOR_EACH_SUBSOURCE_ON_BIOSOURCE EDIT_EACH_SUBSOURCE_ON_BIOSOURCE.

#define EDIT_EACH_SUBSOURCE_ON_BIOSOURCE(Itr, Var)

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

For example, if bases_to_check is 10 and max_bases_allowed_to_be_ambig is 5, then on each iteration w...

void GetProductToCDSMap(objects::CScope &scope, map< objects::CBioseq_Handle, set< objects::CSeq_feat_Handle > > &product_to_cds)


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