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

Go to the SVN repository for this file.

1 /* $Id: unit_test_biosample_chk.cpp 96649 2022-04-25 14:15:53Z ludwigf $
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 * Author: Colleen Bollin, NCBI
27 *
28 * File Description:
29 * Unit tests for biosample_chk.
30 *
31 * ===========================================================================
32 */
33 
34 #include <ncbi_pch.hpp>
35 
36 #include <corelib/ncbi_system.hpp>
37 
38 // This macro should be defined before inclusion of test_boost.hpp in all
39 // "*.cpp" files inside executable except one. It is like function main() for
40 // non-Boost.Test executables is defined only in one *.cpp file - other files
41 // should not include it. If NCBI_BOOST_NO_AUTO_TEST_MAIN will not be defined
42 // then test_boost.hpp will define such "main()" function for tests.
43 //
44 // Usually if your unit tests contain only one *.cpp file you should not
45 // care about this macro at all.
46 //
47 //#define NCBI_BOOST_NO_AUTO_TEST_MAIN
48 
49 // This header must be included before all Boost.Test headers if there are any
50 #include <corelib/test_boost.hpp>
51 
58 #include <common/ncbi_export.h>
60 
63 
64 
66 {
67  BOOST_CHECK_EQUAL(expected.size(), observed.size());
68  TFieldDiffList::const_iterator ex = expected.begin();
69  TFieldDiffList::const_iterator ob = observed.begin();
70  while (ex != expected.end() && ob != observed.end()) {
71  string ex_str = (*ex)->GetFieldName() + ":"
72  + (*ex)->GetSrcVal() + ":"
73  + (*ex)->GetSampleVal();
74  string ob_str = (*ob)->GetFieldName() + ":"
75  + (*ob)->GetSrcVal() + ":"
76  + (*ob)->GetSampleVal();
77  BOOST_CHECK_EQUAL(ex_str, ob_str);
78  ex++;
79  ob++;
80  }
81  while (ex != expected.end()) {
82  string ex_str = (*ex)->GetFieldName() + ":"
83  + (*ex)->GetSrcVal() + ":"
84  + (*ex)->GetSampleVal();
85  BOOST_CHECK_EQUAL(ex_str, "");
86  ex++;
87  }
88  while (ob != observed.end()) {
89  string ob_str = (*ob)->GetFieldName() + ":"
90  + (*ob)->GetSrcVal() + ":"
91  + (*ob)->GetSampleVal();
92  BOOST_CHECK_EQUAL("", ob_str);
93  ob++;
94  }
95 }
96 
97 
98 BOOST_AUTO_TEST_CASE(Test_GetBiosampleDiffs)
99 {
100  CRef<CBioSource> test_src(new CBioSource());
101  CRef<CBioSource> test_sample(new CBioSource());
102 
103  test_src->SetOrg().SetTaxname("A");
104  test_sample->SetOrg().SetTaxname("B");
105 
107  expected.push_back(CRef<CFieldDiff>(new CFieldDiff("Organism Name", "A", "B")));
108  TFieldDiffList diff_list = test_src->GetBiosampleDiffs(*test_sample);
109  CheckDiffs(expected, diff_list);
110 
111  // ignore differences that can be autofixed
114  diff_list = test_src->GetBiosampleDiffs(*test_sample);
115  CheckDiffs(expected, diff_list);
116 
117  // ignore differences that are allowed if BioSample is missing a value
119  diff_list = test_src->GetBiosampleDiffs(*test_sample);
120  CheckDiffs(expected, diff_list);
121 
122  // ignore certain diffs in Org-ref
123  unit_test_util::SetOrgMod(*test_sample, COrgMod::eSubtype_acronym, "acronym");
124  diff_list = test_src->GetBiosampleDiffs(*test_sample);
125  CheckDiffs(expected, diff_list);
126 
127  // ignore some case differences
130  diff_list = test_src->GetBiosampleDiffs(*test_sample);
131  CheckDiffs(expected, diff_list);
132 
133  try {
134  test_src->UpdateWithBioSample(*test_sample, false);
135  BOOST_CHECK_EQUAL("Expected exception to be thrown", "Exception not thrown!");
136  } catch (CException& e) {
137  BOOST_CHECK_EQUAL(e.GetMsg(), "Conflicts found");
138  }
139 
140  try {
141  test_src->UpdateWithBioSample(*test_sample, true);
142  BOOST_CHECK_EQUAL(test_src->GetOrg().GetTaxname(), "B");
143  vector<string> vals;
144  vals.push_back("male");
145  vals.push_back("1");
146  vals.push_back("abc");
147  vector<string>::iterator sit = vals.begin();
148  ITERATE(CBioSource::TSubtype, it, test_src->GetSubtype()) {
149  if (sit == vals.end()) {
150  BOOST_CHECK_EQUAL("Unexpected SubSource Value", (*it)->GetName());
151  } else {
152  BOOST_CHECK_EQUAL((*it)->GetName(), *sit);
153  sit++;
154  }
155  }
156  BOOST_CHECK_EQUAL(test_src->GetOrg().IsSetOrgMod(), false);
157  } catch (CException& e) {
158  BOOST_CHECK_EQUAL("Unexpected exception", e.GetMsg());
159  }
160 
161 #if 0
162  // commented out as a result of SQD-4222
163  // ignore name elements if in taxname
165  test_src->SetOrg().SetTaxname("B XYZ");
166  test_sample->SetOrg().SetTaxname("B XYZ");
167 
168  expected.clear();
169  diff_list = test_src->GetBiosampleDiffs(*test_sample);
170  CheckDiffs(expected, diff_list);
171 #endif
172 
173 }
174 
175 
176 BOOST_AUTO_TEST_CASE(Test_UpdateWithBioSample)
177 {
178  CRef<CBioSource> src(new CBioSource());
180  src->SetOrg().SetTaxname("Campylobacter jejuni Cj3");
181  unit_test_util::SetTaxon(*src, 1365660);
183  src->SetOrg().SetOrgname().SetLineage("Bacteria; Proteobacteria; Epsilonproteobacteria; Campylobacterales; Campylobacteraceae; Campylobacter");
184  src->SetOrg().SetOrgname().SetGcode(11);
185  src->SetOrg().SetOrgname().SetDiv("BCT");
186 
187  CRef<CBioSource> biosample(new CBioSource());
188  biosample->SetOrg().SetTaxname("Campylobacter jejuni Cj3");
189  unit_test_util::SetTaxon(*biosample, 1365660);
190  unit_test_util::SetOrgMod(*biosample, COrgMod::eSubtype_nat_host, "Homo sapiens");
192  biosample->SetOrg().SetOrgname().SetLineage("Bacteria; Proteobacteria; Epsilonproteobacteria; Campylobacterales; Campylobacteraceae; Campylobacter");
193  biosample->SetOrg().SetOrgname().SetGcode(11);
194  biosample->SetOrg().SetOrgname().SetDiv("restricted access");
197 
198  src->UpdateWithBioSample(*biosample, true);
199 
200  TFieldDiffList diff_list = src->GetBiosampleDiffs(*biosample);
202  CheckDiffs(expected, diff_list);
203  BOOST_CHECK_EQUAL(src->GetOrg().GetOrgname().GetDiv(), "BCT");
204 
205 }
206 
207 
208 const string sc_TestSQD1833_Src = "\
209 BioSource ::= { \
210  genome genomic, \
211  org { \
212  taxname \"Escherichia coli\", \
213  db { \
214  { \
215  db \"taxon\", \
216  tag id 562 \
217  } \
218  }, \
219  orgname { \
220  name binomial { \
221  genus \"Escherichia\", \
222  species \"coli\" \
223  }, \
224  lineage \"Bacteria; Proteobacteria; Gammaproteobacteria; \
225  Enterobacteriales; Enterobacteriaceae; Escherichia\", \
226  gcode 11, \
227  div \"BCT\" \
228  } \
229  } \
230 } \
231 ";
232 
233 
234 const string sc_TestSQD1833_Smpl = "\
235 BioSource ::= { \
236  org { \
237  taxname \"Escherichia coli\", \
238  db { \
239  { \
240  db \"taxon\", \
241  tag id 562 \
242  } \
243  }, \
244  syn { \
245  \"bacterium E3\", \
246  \"Enterococcus coli\", \
247  \"Bacterium coli commune\", \
248  \"Bacterium coli\", \
249  \"Bacillus coli\" \
250  }, \
251  orgname { \
252  name binomial { \
253  genus \"Escherichia\", \
254  species \"coli\" \
255  }, \
256  mod { \
257  { \
258  subtype nat-host, \
259  subname \"Homo sapiens\" \
260  }, \
261  { \
262  subtype strain, \
263  subname \"CS01\" \
264  } \
265  }, \
266  lineage \"Bacteria; Proteobacteria; Gammaproteobacteria; \
267  Enterobacteriales; Enterobacteriaceae; Escherichia\", \
268  gcode 11, \
269  div \"BCT\" \
270  } \
271  }, \
272  subtype { \
273  { \
274  subtype collection-date, \
275  name \"24-Jun-2013\" \
276  }, \
277  { \
278  subtype country, \
279  name \"USA: Santa Clara\" \
280  }, \
281  { \
282  subtype isolation-source, \
283  name \"Human fecal sample\" \
284  } \
285  } \
286 } \
287 ";
288 
289 
290 BOOST_AUTO_TEST_CASE(Test_SQD_1833)
291 {
292  CBioSource src;
293  {{
295  istr >> MSerial_AsnText >> src;
296  }}
297 
298  CBioSource smpl;
299  {{
301  istr >> MSerial_AsnText >> smpl;
302  }}
303 
304 
305  try {
306  src.UpdateWithBioSample(smpl, false);
307  vector<string> vals;
308  vals.push_back("24-Jun-2013");
309  vals.push_back("USA: Santa Clara");
310  vals.push_back("Human fecal sample");
311  vector<string>::iterator sit = vals.begin();
313  if (sit == vals.end()) {
314  BOOST_CHECK_EQUAL("Unexpected SubSource Value", (*it)->GetName());
315  } else {
316  BOOST_CHECK_EQUAL((*it)->GetName(), *sit);
317  sit++;
318  }
319  }
320  } catch (CException& e) {
321  BOOST_CHECK_EQUAL("Unexpected exception", e.GetMsg());
322  }
323 
324 
325 }
326 
327 
328 BOOST_AUTO_TEST_CASE(Test_GP_9113)
329 {
330  CBioSource src;
331  src.SetOrg().SetTaxname("a");
332  CBioSource smpl;
333  smpl.SetOrg().SetTaxname("a");
334  smpl.SetOrg().SetTaxId(TAX_ID_CONST(123));
335 
336  try {
337  src.UpdateWithBioSample(smpl, true);
338  BOOST_CHECK_EQUAL(src.GetOrg().GetDb().front()->GetTag().GetId(), 123);
339  } catch (CException& e) {
340  BOOST_CHECK_EQUAL("Unexpected exception", e.GetMsg());
341  }
342 
343 
344 }
345 
346 
347 BOOST_AUTO_TEST_CASE(Test_FuzzyStrainMatch)
348 {
349  BOOST_CHECK_EQUAL(COrgMod::FuzzyStrainMatch("abc", "ABC"), true);
350  BOOST_CHECK_EQUAL(COrgMod::FuzzyStrainMatch("ab c", "ABC"), true);
351  BOOST_CHECK_EQUAL(COrgMod::FuzzyStrainMatch("a/b c", "ABC"), true);
352  BOOST_CHECK_EQUAL(COrgMod::FuzzyStrainMatch("a/b c", "AB:C"), true);
353  BOOST_CHECK_EQUAL(COrgMod::FuzzyStrainMatch("a/b d", "AB:C"), false);
354 }
355 
356 
357 BOOST_AUTO_TEST_CASE(Test_SQD_1836)
358 {
359  CRef<CBioSource> src(new CBioSource());
360  src->SetOrg().SetTaxname("Porphyromonas sp. KLE 1280");
361  CRef<CDbtag> taxid(new CDbtag());
362  taxid->SetDb("taxon");
363  taxid->SetTag().SetId(997829);
364  src->SetOrg().SetDb().push_back(taxid);
365  CRef<COrgMod> m1(new COrgMod());
367  m1->SetSubname("KLE 1280");
368  src->SetOrg().SetOrgname().SetMod().push_back(m1);
369 
370  CRef<CBioSource> smpl(new CBioSource());
371  smpl->Assign(*src);
372 
373  CRef<CDbtag> hmp(new CDbtag());
374  hmp->SetDb("HMP");
375  hmp->SetTag().SetId(1121);
376  src->SetOrg().SetDb().push_back(hmp);
377 
378  try {
379  src->UpdateWithBioSample(*smpl, false);
380  BOOST_CHECK_EQUAL(src->GetOrg().GetDb().size(), 2);
381  } catch (CException& e) {
382  BOOST_CHECK_EQUAL("Unexpected exception", e.GetMsg());
383  }
384 
385 
386 }
387 
388 
389 BOOST_AUTO_TEST_CASE(Test_SQD_1865)
390 {
391  CRef<CBioSource> src(new CBioSource());
392  src->SetOrg().SetTaxname("Salmo salar");
393 
394  CRef<CBioSource> smpl(new CBioSource());
395  smpl->Assign(*src);
396  CRef<COrgMod> om(new COrgMod());
397  om->SetSubtype(COrgMod::eSubtype_strain);
398  om->SetSubname("missing");
399  smpl->SetOrg().SetOrgname().SetMod().push_back(om);
400 
401  try {
402  src->UpdateWithBioSample(*smpl, false);
403  BOOST_CHECK_EQUAL(src->GetOrg().IsSetOrgMod(), false);
404  } catch (CException& e) {
405  BOOST_CHECK_EQUAL("Unexpected exception", e.GetMsg());
406  }
407 
408  CRef<COrgMod> om2(new COrgMod());
410  om2->SetSubname("wild");
411  src->SetOrg().SetOrgname().SetMod().push_back(om2);
412 
413  try {
414  // this should delete the strain on src
415  src->UpdateWithBioSample(*smpl, true);
416  BOOST_CHECK_EQUAL(src->GetOrg().IsSetOrgMod(), false);
417  } catch (CException& e) {
418  BOOST_CHECK_EQUAL("Unexpected exception", e.GetMsg());
419  }
420 
421 
422 }
423 
424 
425 BOOST_AUTO_TEST_CASE(Test_WGS_693)
426 {
427  CRef<CBioSource> src(new CBioSource());
428  src->SetOrg().SetTaxname("xyz metagenome");
429  CRef<COrgMod> src_om_note(new COrgMod(COrgMod::eSubtype_other, "source om"));
430  src->SetOrg().SetOrgname().SetMod().push_back(src_om_note);
431  CRef<CSubSource> src_ss_note(new CSubSource(CSubSource::eSubtype_other, "source ss"));
432  src->SetSubtype().push_back(src_ss_note);
433 
434  CRef<CBioSource> smpl(new CBioSource());
435  smpl->SetOrg().SetTaxname(src->GetOrg().GetTaxname());
436  CRef<COrgMod> smpl_om_note(new COrgMod(COrgMod::eSubtype_other, "sample om"));
437  smpl->SetOrg().SetOrgname().SetMod().push_back(smpl_om_note);
438  CRef<CSubSource> smpl_ss_note(new CSubSource(CSubSource::eSubtype_other, "sample ss"));
439  smpl->SetSubtype().push_back(smpl_ss_note);
440 
441  // because there is no lineage, should complain about notes differing
442  TFieldDiffList diff_list = src->GetBiosampleDiffs(*smpl);
443  BOOST_CHECK_EQUAL(diff_list.size(), 2);
444 
445  // should not complain if specified lineage is found
446  src->SetOrg().SetOrgname().SetLineage("unclassified sequences; metagenomes");
447  smpl->SetOrg().SetOrgname().SetLineage("unclassified sequences; metagenomes");
448  diff_list = src->GetBiosampleDiffs(*smpl);
449  BOOST_CHECK_EQUAL(diff_list.size(), 0);
450 }
451 
452 
453 BOOST_AUTO_TEST_CASE(Test_SQD_2021)
454 {
455  CRef<CBioSource> src(new CBioSource());
456  src->SetOrg().SetTaxname("Sulfitobacter sp. NB-68");
458  src->SetOrg().SetOrgname().SetMod().push_back(cc1);
460  src->SetOrg().SetOrgname().SetMod().push_back(cc2);
461 
462  CRef<CBioSource> smpl(new CBioSource());
463  smpl->Assign(*src);
464 
465  // no differences should be reported
466  TFieldDiffList diff_list = src->GetBiosampleDiffs(*smpl);
467  BOOST_CHECK_EQUAL(diff_list.size(), 0);
468 
469  src->UpdateWithBioSample(*smpl, true);
470  BOOST_CHECK_EQUAL(src->GetOrg().GetOrgname().GetMod().size(), 2);
471 
472 }
473 
474 
475 BOOST_AUTO_TEST_CASE(Test_SQD_2022)
476 {
477  CRef<CBioSource> src(new CBioSource());
478  src->SetOrg().SetTaxname("Triticum aestivum");
480  src->SetSubtype().push_back(c1);
482  src->SetSubtype().push_back(m1);
483 
484  CRef<CBioSource> smpl(new CBioSource());
485  smpl->SetOrg().SetTaxname("Triticum aestivum");
487  smpl->SetSubtype().push_back(c2);
489  smpl->SetSubtype().push_back(m2);
490 
491  // differences should be reported
492  TFieldDiffList diff_list = src->GetBiosampleDiffs(*smpl);
493  BOOST_CHECK_EQUAL(diff_list.size(), 2);
494  // no differences should be reported if local copy
495  diff_list = src->GetBiosampleDiffs(*smpl, true);
496  BOOST_CHECK_EQUAL(diff_list.size(), 0);
497 
498  src->UpdateWithBioSample(*smpl, true, true);
499  BOOST_CHECK_EQUAL(src->GetSubtype().front()->GetName(), "4D");
500  BOOST_CHECK_EQUAL(src->GetSubtype().back()->GetName(), "short arm");
501 
502 }
503 
504 
505 BOOST_AUTO_TEST_CASE(Test_SQD_2028)
506 {
507  CRef<CBioSource> src(new CBioSource());
508  src->SetOrg().SetTaxname("Triticum aestivum");
509  CRef<COrgMod> n1(new COrgMod(COrgMod::eSubtype_old_name, "old name 1"));
510  src->SetOrg().SetOrgname().SetMod().push_back(n1);
511  CRef<COrgMod> l1(new COrgMod(COrgMod::eSubtype_old_lineage, "old lineage 1"));
512  src->SetOrg().SetOrgname().SetMod().push_back(l1);
513  CRef<COrgMod> s1(new COrgMod(COrgMod::eSubtype_gb_synonym, "synonym 1"));
514  src->SetOrg().SetOrgname().SetMod().push_back(s1);
515 
516  CRef<CBioSource> smpl(new CBioSource());
517  smpl->SetOrg().SetTaxname("Triticum aestivum");
518  CRef<COrgMod> n2(new COrgMod(COrgMod::eSubtype_old_name, "old name 2"));
519  smpl->SetOrg().SetOrgname().SetMod().push_back(n2);
520  CRef<COrgMod> l2(new COrgMod(COrgMod::eSubtype_old_lineage, "old lineage 2"));
521  smpl->SetOrg().SetOrgname().SetMod().push_back(l2);
522  CRef<COrgMod> s2(new COrgMod(COrgMod::eSubtype_gb_synonym, "synonym 2"));
523  smpl->SetOrg().SetOrgname().SetMod().push_back(s2);
524 
525  // no differences should be reported
526  TFieldDiffList diff_list = src->GetBiosampleDiffs(*smpl);
527  BOOST_CHECK_EQUAL(diff_list.size(), 0);
528 
529 }
530 
531 
532 BOOST_AUTO_TEST_CASE(Test_SQD_2189)
533 {
534  // need to report diffs if one BioSource is metagenomic and the other is not
535  CRef<CBioSource> src(new CBioSource());
536  src->SetOrg().SetTaxname("Bacteria");
537 
538  CRef<CBioSource> smpl(new CBioSource());
539  smpl->Assign(*src);
540 
541  // both do not have metagenomic
542  TFieldDiffList diff_list = src->GetBiosampleDiffs(*smpl);
543  BOOST_CHECK_EQUAL(diff_list.size(), 0);
544 
545  // only one has metagenomice
546  CRef<CSubSource> mt(new CSubSource());
548  mt->SetName("");
549  src->SetSubtype().push_back(mt);
550 
551  diff_list = src->GetBiosampleDiffs(*smpl);
552  BOOST_CHECK_EQUAL(diff_list.size(), 1);
553  BOOST_CHECK_EQUAL(diff_list[0]->GetFieldName(), "metagenomic");
554  BOOST_CHECK_EQUAL(diff_list[0]->GetSrcVal(), "true");
555  BOOST_CHECK_EQUAL(diff_list[0]->GetSampleVal(), "");
556 
557  // both have metagenomic
558  CRef<CSubSource> mt2(new CSubSource());
560  mt2->SetName("true");
561  smpl->SetSubtype().push_back(mt2);
562  diff_list = src->GetBiosampleDiffs(*smpl);
563  BOOST_CHECK_EQUAL(diff_list.size(), 0);
564 
565 }
566 
567 
vector< CRef< CFieldDiff > > TFieldDiffList
Definition: BioSource.hpp:53
void UpdateWithBioSample(const CBioSource &biosample, bool force, bool is_local_copy=false)
Definition: BioSource.cpp:704
TFieldDiffList GetBiosampleDiffs(const CBioSource &biosample, bool is_local_copy=false) const
Definition: BioSource.cpp:1327
Definition: Dbtag.hpp:53
@OrgMod.hpp User-defined methods of the data storage class.
Definition: OrgMod.hpp:54
static bool FuzzyStrainMatch(const string &strain1, const string &strain2)
Definition: OrgMod.cpp:1093
bool IsSetOrgMod(void) const
Definition: Org_ref.cpp:169
static const char * expected[]
Definition: bcp.c:42
#define TAX_ID_CONST(id)
Definition: ncbimisc.hpp:1112
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define MSerial_AsnText
I/O stream manipulators –.
Definition: serialbase.hpp:696
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
const TSubtype & GetSubtype(void) const
Get the Subtype member data.
Definition: BioSource_.hpp:539
void SetSubtype(TSubtype value)
Assign a value to Subtype data member.
Definition: SubSource_.hpp:319
list< CRef< CSubSource > > TSubtype
Definition: BioSource_.hpp:145
const TOrg & GetOrg(void) const
Get the Org member data.
Definition: BioSource_.hpp:509
void SetGenome(TGenome value)
Assign a value to Genome data member.
Definition: BioSource_.hpp:428
void SetOrg(TOrg &value)
Assign a value to Org data member.
Definition: BioSource_.cpp:108
void SetName(const TName &value)
Assign a value to Name data member.
Definition: SubSource_.hpp:359
TSubtype & SetSubtype(void)
Assign a value to Subtype data member.
Definition: BioSource_.hpp:545
void SetTag(TTag &value)
Assign a value to Tag data member.
Definition: Dbtag_.cpp:66
void SetDb(const TDb &value)
Assign a value to Db data member.
Definition: Dbtag_.hpp:229
const TMod & GetMod(void) const
Get the Mod member data.
Definition: OrgName_.hpp:839
const TDiv & GetDiv(void) const
Get the Div member data.
Definition: OrgName_.hpp:1005
void SetSubtype(TSubtype value)
Assign a value to Subtype data member.
Definition: OrgMod_.hpp:316
const TTaxname & GetTaxname(void) const
Get the Taxname member data.
Definition: Org_ref_.hpp:372
const TDb & GetDb(void) const
Get the Db member data.
Definition: Org_ref_.hpp:491
void SetSubname(const TSubname &value)
Assign a value to Subname data member.
Definition: OrgMod_.hpp:356
const TOrgname & GetOrgname(void) const
Get the Orgname member data.
Definition: Org_ref_.hpp:541
@ eSubtype_gb_synonym
used by taxonomy database
Definition: OrgMod_.hpp:117
@ eSubtype_other
ASN5: old-name (254) will be added to next spec.
Definition: OrgMod_.hpp:125
@ eSubtype_nat_host
natural host of this specimen
Definition: OrgMod_.hpp:104
@ eSubtype_strain
Definition: OrgMod_.hpp:85
@ eSubtype_biovar
Definition: OrgMod_.hpp:96
@ eSubtype_old_name
Definition: OrgMod_.hpp:124
@ eSubtype_acronym
Definition: OrgMod_.hpp:102
@ eSubtype_culture_collection
Definition: OrgMod_.hpp:118
@ eSubtype_old_lineage
Definition: OrgMod_.hpp:123
Defines to provide correct exporting from DLLs in some configurations.
CRef< objects::CObjectManager > om
Utility stuff for more convenient using of Boost.Test library.
void CheckDiffs(const TFieldDiffList &expected, const TFieldDiffList &observed)
BOOST_AUTO_TEST_CASE(Test_GetBiosampleDiffs)
const string sc_TestSQD1833_Src
const string sc_TestSQD1833_Smpl
void SetTaxon(objects::CBioSource &src, size_t taxon)
void SetSubSource(objects::CBioSource &src, objects::CSubSource::TSubtype subtype, string val)
void SetOrgMod(objects::CBioSource &src, objects::COrgMod::TSubtype subtype, string val)
#define const
Definition: zconf.h:232
Modified on Thu Apr 25 08:18:05 2024 by modify_doxy.py rev. 669887