NCBI C++ ToolKit
strain_serotype_influenza.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: strain_serotype_influenza.cpp 42189 2019-01-09 22:13:08Z asztalos $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Andrea Asztalos
27  */
28 
29 #include <ncbi_pch.hpp>
30 #include <objmgr/feat_ci.hpp>
33 
38 
39 #include <wx/msgdlg.h>
40 
43 
45 {
46  if (!tse)
47  return CRef<CCmdComposite>();
48 
49  m_Seh = tse;
50  CRef<CCmdComposite> composite(new CCmdComposite(title));
52  x_ApplyToSeqAndFeat(composite);
53  }
54  else {
55  x_ParseStrainSerotype(composite);
56  }
57  return composite;
58 }
59 
61 {
62  if (!tse)
63  return CRef<CCmdComposite>();
64 
65  parser.m_Seh = tse;
66  CRef<CCmdComposite> composite(new CCmdComposite(title));
67  parser.x_ParseStrainSerotype(composite, overwrite);
68  return composite;
69 }
70 
72 {
73  bool modified=false;
74  switch (m_Type) {
76  modified = x_AddToInfluenzaNames(biosource);
77  break;
79  modified = x_FixupOrganismNames(biosource);
80  break;
82  modified = x_SplittingQualifiersAtCommas(biosource);
83  break;
85  modified = x_SplittingStructCollections(biosource);
86  break;
88  modified = x_TrimmingOrganismNames(biosource);
89  break;
90  default:
91  break;
92  }
93  return modified;
94 }
95 
97 {
98  if (!biosource.IsSetTaxname() || !NStr::StartsWith(biosource.GetTaxname(), "Influenza A virus", NStr::eNocase))
99  return false;
100 
101  bool modified = false;
102  if (biosource.IsSetOrgMod()) {
103  string strain_str, serotype_str;
104  bool found_strain = false, found_serotype = false;
105 
106  FOR_EACH_ORGMOD_ON_BIOSOURCE(orgmod, biosource)
107  if ((*orgmod)->IsSetSubtype() && (*orgmod)->IsSetSubname()) {
108  if ((*orgmod)->GetSubtype() == COrgMod::eSubtype_strain) {
109  strain_str = (*orgmod)->GetSubname();
110  found_strain = true;
111  }
112  if ((*orgmod)->GetSubtype() == COrgMod::eSubtype_serotype) {
113  serotype_str = (*orgmod)->GetSubname();
114  found_serotype = true;
115  }
116 
117  }
118  if (!found_strain || !found_serotype)
119  return false;
120  // both modifiers should be present
121 
122  string infl_name = "Influenza A virus";
123  string infl_name_wstrain = infl_name + " (" + strain_str + ")";
124  string new_name = infl_name + " (" + strain_str + "(" + serotype_str + "))";
125 
126  string old_taxname = biosource.GetOrg().GetTaxname();
127  NStr::TruncateSpacesInPlace(old_taxname);
128 
129  if (NStr::Equal(old_taxname, infl_name, NStr::eNocase)
130  || NStr::Equal(old_taxname, infl_name_wstrain, NStr::eNocase)) {
131  biosource.SetOrg().SetTaxname(new_name);
132  modified = true;
133  modified |= edit::CleanupForTaxnameChange(biosource);
134  }
135  }
136  return modified;
137 }
138 
140 {
141  if (!biosource.IsSetTaxname() || !NStr::StartsWith(biosource.GetTaxname(), "Influenza A virus", NStr::eNocase))
142  return false;
143 
144  bool modified = false;
145  string new_taxname = biosource.GetOrg().GetTaxname();
146  while (NStr::FindNoCase(new_taxname, " ") != NPOS) {
147  NStr::ReplaceInPlace(new_taxname, " ", " ");
148  }
149 
150  NStr::ReplaceInPlace(new_taxname, "( ", "(");
151  NStr::ReplaceInPlace(new_taxname, " (", "("); // for the case: "strain (sero"
152  NStr::ReplaceInPlace(new_taxname, " )", ")");
153 
154  // correct for too much space deletion
155  SIZE_TYPE pos = NStr::FindNoCase(new_taxname, "virus(");
156  if (pos != NPOS)
157  new_taxname.insert(pos + 5, " ");
158 
159  NStr::TruncateSpacesInPlace(new_taxname);
160  if (!NStr::Equal(new_taxname, biosource.GetOrg().GetTaxname(), NStr::eCase)) {
161  biosource.SetOrg().SetTaxname(new_taxname);
162  modified = true;
163  modified |= edit::CleanupForTaxnameChange(biosource);
164  }
165  return modified;
166 }
167 
169 {
170  bool modified = false;
171  if (biosource.IsSetOrgMod()) {
172 
173  bool found_multiple_strain = false;
174  list<string> array_str;
175  EDIT_EACH_ORGMOD_ON_BIOSOURCE(orgmod, biosource)
176  if ((*orgmod)->IsSetSubtype() && (*orgmod)->IsSetSubname()) {
177  if ((*orgmod)->GetSubtype() == COrgMod::eSubtype_strain) {
178  string multiple_strain = (*orgmod)->GetSubname();
179  if (NStr::FindNoCase(multiple_strain, ",") != NPOS) {
180 
181  found_multiple_strain = true;
182  NStr::Split(multiple_strain, ",", array_str, NStr::fSplit_Tokenize);
183  NStr::TruncateSpacesInPlace(array_str.front());
184  (*orgmod)->SetSubname() = array_str.front();
185  modified = true;
186  }
187  }
188  }
189 
190  if (found_multiple_strain && array_str.size()>1) {
191  list<string>::iterator it = array_str.begin();
192  it++;
193  for (it; it != array_str.end(); ++it) {
194  string strain = *it;
196  if (!strain.empty()) {
197  CRef<COrgMod> new_orgmod(new COrgMod(COrgMod_Base::eSubtype_strain, strain));
198  biosource.SetOrg().SetOrgname().SetMod().push_back(new_orgmod);
199  modified = true;
200  }
201  }
202  }
203  }
204  return modified;
205 }
206 
208 {
209  bool modified = false;
210  EDIT_EACH_ORGMOD_ON_BIOSOURCE(orgmod, biosource) {
211  if ((*orgmod)->IsSetSubtype() && (*orgmod)->IsSetSubname()) {
212  if ((*orgmod)->GetSubtype() == COrgMod::eSubtype_bio_material ||
213  (*orgmod)->GetSubtype() == COrgMod::eSubtype_culture_collection ||
214  (*orgmod)->GetSubtype() == COrgMod::eSubtype_specimen_voucher) {
215 
216  if (NStr::FindNoCase((*orgmod)->GetSubname(), ";") != NPOS) {
217 
218  string multiple_mod = (*orgmod)->GetSubname();
219  COrgMod_Base::TSubtype tsub = (*orgmod)->GetSubtype();
220  bool atleastone = false; // there is at least one string that is not empty
221  list<string> tmp;
222  list<string>::iterator iter;
223  NStr::Split(multiple_mod, ";", tmp, NStr::fSplit_Tokenize);
224 
225  for (iter = tmp.begin(); iter != tmp.end(); iter++) {
227  if (!(*iter).empty())
228  atleastone = true;
229  }
230 
231  if (atleastone) {
232  iter = tmp.begin();
233  while (iter != tmp.end() && (*iter).empty())
234  iter++;
235  (*orgmod)->SetSubname() = *iter;
236  modified = true;
237  orgmod++;
238 
239  iter++;
240  while (iter != tmp.end()) {
241  if (!(*iter).empty()) {
242  CRef<COrgMod> new_orgmod(new COrgMod(tsub, *iter));
243  biosource.SetOrg().SetOrgname().SetMod().insert(orgmod, new_orgmod);
244  modified = true;
245  }
246  iter++;
247  }
248  }
249  tmp.clear();
250  }
251  }
252  }
253  }
254  return modified;
255 }
256 
258 {
259  if (!biosource.IsSetTaxname())
260  return false;
261 
262  bool modified = false;
263  string old_taxname = biosource.GetOrg().GetTaxname();
264  NStr::TruncateSpacesInPlace(old_taxname);
265 
266  SIZE_TYPE pos = NStr::FindNoCase(old_taxname, " ");
267  vector<string> array_str;
268  if (pos != NPOS)
269  NStr::Split(old_taxname, " ", array_str, NStr::fSplit_Tokenize);
270  SIZE_TYPE len = 1;
271  if (array_str.size() > len) {
272  string new_taxname = kEmptyStr;
273  bool uncult = false; // flag to indicate whether it's an uncultured organism
274  if (NStr::Equal(array_str[0], "Uncultured", NStr::eNocase)) {
275  uncult = true;
276  new_taxname = array_str[0] + " ";
277  }
278 
279  short index = uncult ? 1 : 0;
280  bool is_spec_word = false;
281 
282  while (index < (short)array_str.size()
283  && ((uncult && index < 4) || (!uncult && index < 3))
284  && !is_spec_word) {
285 
286  if (NStr::Equal(array_str[index], "sp.", NStr::eNocase) ||
287  NStr::Equal(array_str[index], "aff.", NStr::eNocase) ||
288  NStr::Equal(array_str[index], "cf.", NStr::eNocase)) {
289  is_spec_word = true;
290  new_taxname += array_str[index] + " ";
291  index++;
292  if (index < (short)array_str.size()) {
293  new_taxname += array_str[index];
294  }
295  }
296  else {
297  if ((uncult && index < 3) || (!uncult && index < 2)) {
298  new_taxname += array_str[index] + " ";
299  }
300  }
301 
302  index++;
303  }
304 
306  if (new_taxname.back() == ':') {
307  new_taxname.pop_back();
308  }
309  if (!NStr::Equal(new_taxname, biosource.GetOrg().GetTaxname(), NStr::eCase)) {
310  biosource.SetOrg().SetTaxname() = new_taxname;
311  modified = true;
312  modified |= edit::CleanupForTaxnameChange(biosource);
313  }
314  }
315  return modified;
316 }
317 
319 {
320  // if this function is updated, please update
321  // void x_ParseStrainSerotype(CSeq_entry_Handle tse, CCmdComposite* composite, bool overwrite) function as well
322  // as this does the testing
323  int nr_conflicts = 0;
324  m_Parsable = false; // if there is at least one seq which can be parsed, this will be TRUE
325 
326  x_TestEntryForParsing(*(m_Seh.GetCompleteSeq_entry()), nr_conflicts);
327  for (CFeat_CI feat_it(m_Seh, SAnnotSelector(CSeqFeatData::e_Biosrc)); feat_it; ++feat_it) {
328  x_TestBiosourceForParsing(feat_it->GetOriginalFeature().GetData().GetBiosrc(), nr_conflicts);
329  }
330 
331  if (m_Parsable) { // if the Seq_entry is parsable
332  bool update;
333  if (nr_conflicts > 0) {
334  string error = NStr::NumericToString(nr_conflicts)
335  + " affected fields already contain a value. Do you wish to overwrite existing text?";
336  int answer = wxMessageBox(ToWxString(error), ToWxString("Warning"),
337  wxYES_NO | wxCANCEL | wxICON_QUESTION);
338 
339  switch (answer) {
340  case wxYES:
341  update = true;
342  x_ParseEntry(composite, update);
343  break;
344  case wxNO:
345  update = false;
346  x_ParseEntry(composite, update);
347  break;
348  case wxCANCEL:
349  break;
350  }
351  }
352  else if (nr_conflicts == 0) {
353  update = false;
354  x_ParseEntry(composite, update);
355  }
356  }
357 }
358 
360 {
361  int nr_conflicts = 0;
362  m_Parsable = false;
363 
364  x_TestEntryForParsing(*(m_Seh.GetCompleteSeq_entry()), nr_conflicts);
365  for (CFeat_CI feat_it(m_Seh, SAnnotSelector(CSeqFeatData::e_Biosrc)); feat_it; ++feat_it) {
366  x_TestBiosourceForParsing(feat_it->GetOriginalFeature().GetData().GetBiosrc(), nr_conflicts);
367  }
368 
369  if (m_Parsable) {
370  if (nr_conflicts > 0) {
371  x_ParseEntry(composite, overwrite);
372  }
373  else if (nr_conflicts == 0) {
374  x_ParseEntry(composite, false);
375  }
376  }
377 }
378 
380 {
382  if ((*it)->IsSource()) {
383  x_TestBiosourceForParsing((*it)->GetSource(), count);
384  }
385  }
386 
387  if (se.IsSet()) {
389  x_TestEntryForParsing(**it, count);
390  }
391  }
392 }
393 
394 
396 {
397  string strain, serotype;
398  if (x_IsParsableInfluenzaVirusName (biosource, strain, serotype)){
399  m_Parsable = true;
400  count += x_GetStrainSerotypeConflicts(biosource, strain, serotype);
401  }
402 }
403 
404 bool CStrainSerotypeInfluenza::x_IsParsableInfluenzaVirusName(const CBioSource& biosource, string& strain, string& serotype)
405 {
406  /* the name is not parseable if it's not "Influenza A virus" and the strain is missing
407  the presence of serotype is optional
408  */
409 
410  if (!biosource.IsSetTaxname() || !NStr::StartsWith(biosource.GetTaxname(), "Influenza A virus", NStr::eNocase)) {
411  return false;
412  }
413 
414  string taxname = biosource.GetOrg().GetTaxname();
416 
417  SIZE_TYPE pos = NStr::FindNoCase(taxname, "(");
418  list<string> array_str;
419  if (pos != NPOS) {
420  NStr::Split(taxname, "(", array_str, NStr::fSplit_Tokenize);
421 
422  // if there are more strings than strain and serotype
423  if (array_str.size() > 3) {
424  wxMessageBox(wxT("Warning"),
425  wxT("Cannot distinguish the strain from the serotype as there are additional '(' characters."),
426  wxOK);
427  return false;
428  }
429  else if (array_str.size() == 3) { // strain and serotype are both specified
430  strain = *(++array_str.begin());
431  serotype = array_str.back();
432 
433  // trimming the last ')' characters from the end if there are any
435  pos = NStr::FindNoCase(strain, ")");
436  while (pos != NPOS) {
437  strain.erase(pos);
438  pos = NStr::FindNoCase(strain, ")");
439  }
440 
441  pos = NStr::FindNoCase(serotype, ")");
442  while (pos != NPOS) {
443  serotype.erase(pos);
444  pos = NStr::FindNoCase(serotype, ")");
445  }
446  return true;
447  }
448  else if (array_str.size() == 2) { // only the strain is specified
449  strain = array_str.back();
450  pos = NStr::FindNoCase(strain, ")");
451  while (pos != NPOS) {
452  strain.erase(pos);
453  pos = NStr::FindNoCase(strain, ")");
454  }
455  return true;
456  }
457  }
458 
459  return false;
460 }
461 
462 int CStrainSerotypeInfluenza::x_GetStrainSerotypeConflicts(const CBioSource& biosource, const string& strain, const string& serotype)
463 {
464  /* return the number of cases when either the strain or the serotype is different from
465  the ones on the record (OrgMod qualifiers)
466  */
467  int count = 0;
468  if (biosource.GetOrg().IsSetOrgname() && biosource.GetOrg().GetOrgname().IsSetMod()) {
469  FOR_EACH_ORGMOD_ON_BIOSOURCE(orgmod, biosource) {
470  if ((*orgmod)->IsSetSubtype() && (*orgmod)->IsSetSubname()) {
471  if ((*orgmod)->GetSubtype() == COrgMod::eSubtype_strain)
472  if (!NStr::Equal((*orgmod)->GetSubname(), strain, NStr::eCase)) {
473  count++;
474  }
475 
476  if (!serotype.empty() && (*orgmod)->GetSubtype() == COrgMod::eSubtype_serotype)
477  if (!NStr::Equal((*orgmod)->GetSubname(), serotype, NStr::eCase)) {
478  count++;
479  }
480  }
481  }
482  }
483 
484  return count;
485 }
486 
487 
489 {
490  x_ParseDescriptors(*(m_Seh.GetCompleteSeq_entry()), composite, update);
491 
492  for (CFeat_CI feat_it(m_Seh, SAnnotSelector(CSeqFeatData::e_Biosrc)); feat_it; ++feat_it) {
493  CRef<CSeq_feat> new_feat(new CSeq_feat());
494  new_feat->Assign(feat_it->GetOriginalFeature());
495  if (x_ParseBiosource(new_feat->SetData().SetBiosrc(), update)) {
496  CRef<CCmdChangeSeq_feat> cmd(new CCmdChangeSeq_feat(*feat_it, *new_feat));
497  composite->AddCommand(*cmd);
498  }
499  }
500 }
501 
503 {
505  if ((*it)->IsSource()) {
506  const CSeqdesc& orig_desc = **it;
507  CRef<CSeqdesc> new_desc(new CSeqdesc);
508  new_desc->Assign(orig_desc);
509  if (x_ParseBiosource(new_desc->SetSource(), update)) {
510  CRef<CCmdChangeSeqdesc> cmd(new CCmdChangeSeqdesc(m_Seh.GetScope().GetSeq_entryHandle(se), orig_desc, *new_desc));
511  composite->AddCommand(*cmd);
512  }
513  }
514  }
515  if (se.IsSet()) {
517  x_ParseDescriptors(**it, composite, update);
518  }
519  }
520 }
521 
523 {
524  bool modified=false;
525  string strain, serotype;
526  if (x_IsParsableInfluenzaVirusName(biosource, strain, serotype)){
527  modified = x_UpdateStrainSerotype(biosource, strain, serotype, update);
528  }
529  return modified;
530 }
531 
532 
534  CBioSource& biosource, const string& strain, const string& serotype, bool update)
535 {
536  /* if update = true
537  update every OrgMod qualifier with the new strain & serotype values
538  where necessary, add new OrgMod qualifiers
539 
540  if update = false
541  do not overwrite the existing values with the new strain & serotype
542  where necessary, add new OrgMod qualifiers
543  */
544 
545  // the rest of the cases are when new OrgMod qualifiers need to be added to the biosource
546  COrgName& orgname = biosource.SetOrg().SetOrgname();
547  bool modified = false;
548 
549  bool found_strain = false, found_serotype = false;
550  EDIT_EACH_ORGMOD_ON_BIOSOURCE (orgmod, biosource){
551  if((*orgmod)->IsSetSubtype() && (*orgmod)->IsSetSubname()){
552  if ((*orgmod)->GetSubtype() == COrgMod::eSubtype_strain) {
553  found_strain=true;
554  if (update && !NStr::EqualCase((*orgmod)->GetSubname(), strain)){
555  (*orgmod)->SetSubname() = strain;
556  modified = true;
557  }
558  }
559 
560  if ((*orgmod)->GetSubtype() == COrgMod::eSubtype_serotype){
561  found_serotype=true;
562  if (update && !serotype.empty() && !NStr::EqualCase((*orgmod)->GetSubname(), serotype)){
563  (*orgmod)->SetSubname() = serotype;
564  modified=true;
565  }
566  }
567  }
568  }
569 
570  if (!found_strain){
571  CRef<COrgMod> new_strain(new COrgMod(COrgMod_Base::eSubtype_strain, strain));
572  orgname.SetMod().push_back(new_strain);
573  modified = true;
574  }
575  if (!serotype.empty() && !found_serotype){
576  CRef<COrgMod> new_serotype(new COrgMod(COrgMod_Base::eSubtype_serotype, serotype));
577  orgname.SetMod().push_back(new_serotype);
578  modified = true;
579  }
580  return modified;
581 }
582 
const string & GetTaxname(void) const
Definition: BioSource.cpp:340
bool IsSetOrgMod(void) const
Definition: BioSource.cpp:415
bool IsSetTaxname(void) const
Definition: BioSource.cpp:335
void AddCommand(IEditCommand &command)
CFeat_CI –.
Definition: feat_ci.hpp:64
@OrgMod.hpp User-defined methods of the data storage class.
Definition: OrgMod.hpp:54
CSeq_entry_Handle –.
Definition: Seq_entry.hpp:56
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
void x_ParseStrainSerotype(CCmdComposite *composite)
bool x_SplittingStructCollections(objects::CBioSource &biosource)
void x_ParseEntry(CCmdComposite *composite, bool update)
CRef< CCmdComposite > GetCommand(objects::CSeq_entry_Handle tse, const string &title)
void x_TestEntryForParsing(const objects::CSeq_entry &se, int &count)
bool x_FixupOrganismNames(objects::CBioSource &biosource)
void x_TestBiosourceForParsing(const objects::CBioSource &biosource, int &count)
bool x_TrimmingOrganismNames(objects::CBioSource &biosource)
bool x_UpdateStrainSerotype(objects::CBioSource &biosource, const string &strain, const string &serotype, bool update)
virtual bool x_ApplyToBioSource(objects::CBioSource &biosource)
void x_ParseDescriptors(const objects::CSeq_entry &se, CCmdComposite *composite, bool update)
bool x_IsParsableInfluenzaVirusName(const objects::CBioSource &biosource, string &strain, string &serotype)
bool x_AddToInfluenzaNames(objects::CBioSource &biosource)
int x_GetStrainSerotypeConflicts(const objects::CBioSource &biosource, const string &strain, const string &serotype)
bool x_SplittingQualifiersAtCommas(objects::CBioSource &biosource)
bool x_ParseBiosource(objects::CBioSource &biosource, bool update)
objects::CSeq_entry_Handle m_Seh
void x_ApplyToSeqAndFeat(CCmdComposite *composite)
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
static char tmp[3200]
Definition: utf8.c:42
void CleanupForTaxnameChange(CObjectInfo oi)
Definition: macro_util.cpp:526
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
NCBI_NS_STD::string::size_type SIZE_TYPE
Definition: ncbistr.hpp:132
#define kEmptyStr
Definition: ncbistr.hpp:123
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.
Definition: ncbistr.cpp:3461
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.
Definition: ncbistr.cpp:2993
#define NPOS
Definition: ncbistr.hpp:133
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate spaces in a string (in-place)
Definition: ncbistr.cpp:3201
static bool EqualCase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-sensitive equality of a substring with another string.
Definition: ncbistr.hpp:5325
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
Definition: ncbistr.hpp:5412
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.
Definition: ncbistr.hpp:673
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.
Definition: ncbistr.hpp:5384
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.
Definition: ncbistr.cpp:3405
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
Definition: ncbistr.hpp:2508
@ eTrunc_End
Truncate trailing spaces only.
Definition: ncbistr.hpp:2241
@ eNocase
Case insensitive compare.
Definition: ncbistr.hpp:1206
@ eCase
Case sensitive compare.
Definition: ncbistr.hpp:1205
const TOrg & GetOrg(void) const
Get the Org member data.
Definition: BioSource_.hpp:509
void SetOrg(TOrg &value)
Assign a value to Org data member.
Definition: BioSource_.cpp:108
const TTaxname & GetTaxname(void) const
Get the Taxname member data.
Definition: Org_ref_.hpp:372
bool IsSetMod(void) const
Check if a value has been assigned to Mod data member.
Definition: OrgName_.hpp:827
bool IsSetOrgname(void) const
Check if a value has been assigned to Orgname data member.
Definition: Org_ref_.hpp:529
TMod & SetMod(void)
Assign a value to Mod data member.
Definition: OrgName_.hpp:845
const TOrgname & GetOrgname(void) const
Get the Orgname member data.
Definition: Org_ref_.hpp:541
@ eSubtype_strain
Definition: OrgMod_.hpp:85
@ eSubtype_specimen_voucher
Definition: OrgMod_.hpp:106
@ eSubtype_serotype
Definition: OrgMod_.hpp:90
@ eSubtype_bio_material
Definition: OrgMod_.hpp:119
@ eSubtype_culture_collection
Definition: OrgMod_.hpp:118
void SetData(TData &value)
Assign a value to Data data member.
Definition: Seq_feat_.cpp:94
const TSet & GetSet(void) const
Get the variant data.
Definition: Seq_entry_.cpp:124
bool IsSet(void) const
Check if variant Set is selected.
Definition: Seq_entry_.hpp:263
TSource & SetSource(void)
Select the variant.
Definition: Seqdesc_.cpp:572
int len
#define wxT(x)
Definition: muParser.cpp:41
#define EDIT_EACH_ORGMOD_ON_BIOSOURCE(Itr, Var)
#define FOR_EACH_ORGMOD_ON_BIOSOURCE(Itr, Var)
FOR_EACH_ORGMOD_ON_BIOSOURCE EDIT_EACH_ORGMOD_ON_BIOSOURCE.
#define FOR_EACH_SEQENTRY_ON_SEQSET(Itr, Var)
FOR_EACH_SEQENTRY_ON_SEQSET EDIT_EACH_SEQENTRY_ON_SEQSET.
#define FOR_EACH_SEQDESC_ON_SEQENTRY(Itr, Var)
FOR_EACH_SEQDESC_ON_SEQENTRY EDIT_EACH_SEQDESC_ON_SEQENTRY.
USING_SCOPE(objects)
CRef< CCmdComposite > TestCStrainSerotypeInfluenza_Parse(CStrainSerotypeInfluenza &parser, CSeq_entry_Handle tse, const string &title, bool overwrite)
SAnnotSelector –.
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
Modified on Mon May 13 04:34:22 2024 by modify_doxy.py rev. 669887