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

NCBI C++ ToolKit: src/algo/id_mapper/unit_test/unit_test_id_mapper.cpp Source File

42 #if BOOST_VERSION >= 105900 43 # include <boost/test/tools/output_test_stream.hpp> 45 # include <boost/test/output_test_stream.hpp> 47 using

boost::test_tools::output_test_stream;

61

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"SequenceNames"

)

72

OrigLoc->

SetWhole

().SetLocal().SetStr(

"chr1"

);

79

OrigLoc->

SetWhole

().SetLocal().SetStr(

"chr8_gl000196_random"

);

82

Result = Mapper.

Map

(*OrigLoc, PrimarySpec);

92

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"SequenceNames"

)

103

OrigLoc->

SetWhole

().SetLocal().SetStr(

"chr1"

);

112

Mapper.

Guess

(*OrigLoc, GuessSpec);

118

BOOST_CHECK(RoundTripped->

Equals

(*OrigLoc));

127

GCService.

GetAssembly

(

"GCF_000003205.2"

,

"SequenceNames"

)

138

OrigLoc->

SetWhole

().SetLocal().SetStr(

"chrUn.004.10843"

);

152

GCService.

GetAssembly

(

"GCF_000001405.12"

,

"SequenceNames"

)

164

OrigLoc->

SetInt

().SetId().SetLocal().SetStr(

"chr1_random"

);

165

OrigLoc->

SetInt

().SetFrom(500000);

166

OrigLoc->

SetInt

().SetTo(510000);

169

BOOST_CHECK(Result.

NotNull

());

172

Expected->

SetInt

().SetId().Set(

"NT_113872.1"

);

173

Expected->

SetInt

().SetFrom(57066);

174

Expected->

SetInt

().SetTo(67066);

178

BOOST_CHECK(Result->

Equals

(*Expected));

182

OrigLoc->

SetInt

().SetId().SetLocal().SetStr(

"chr6_random"

);

183

OrigLoc->

SetInt

().SetFrom(65878);

184

OrigLoc->

SetInt

().SetTo(67000);

188

Mapper.

Guess

(*OrigLoc, GuessSpec);

190

Result = Mapper.

Map

(*OrigLoc, MapSpec);

191

BOOST_CHECK(Result.

NotNull

());

194

Expected->

SetInt

().SetId().Set(

"NT_113898.1"

);

195

Expected->

SetInt

().SetFrom(65878);

196

Expected->

SetInt

().SetTo(67000);

199

BOOST_CHECK(Result->

Equals

(*Expected));

200

Result = Mapper.

Map

(*Result, GuessSpec);

201

BOOST_CHECK(Result.

NotNull

());

202

BOOST_CHECK(OrigLoc->

Equals

(*Result));

206

OrigLoc->

SetInt

().SetId().SetLocal().SetStr(

"chr5_random"

);

207

OrigLoc->

SetInt

().SetFrom(113060);

208

OrigLoc->

SetInt

().SetTo(114325);

211

Mapper.

Guess

(*OrigLoc, GuessSpec);

213

Result = Mapper.

Map

(*OrigLoc, MapSpec);

214

BOOST_CHECK(Result.

NotNull

());

217

Expected->

SetInt

().SetId().Set(

"NT_113890.1"

);

218

Expected->

SetInt

().SetFrom(113060);

219

Expected->

SetInt

().SetTo(114325);

222

BOOST_CHECK(Result->

Equals

(*Expected));

223

Result = Mapper.

Map

(*Result, GuessSpec);

224

BOOST_CHECK(Result.

NotNull

());

225

BOOST_CHECK(OrigLoc->

Equals

(*Result));

235

GCService.

GetAssembly

(

"GCF_000001405.12"

,

"SequenceNames"

)

247

OrigLoc->

SetInt

().SetId().SetLocal().SetStr(

"chr1_random"

);

248

OrigLoc->

SetInt

().SetFrom(500000);

249

OrigLoc->

SetInt

().SetTo(510000);

254

Expected->

SetInt

().SetId().Set(

"NT_113872.1"

);

255

Expected->

SetInt

().SetFrom(57066);

256

Expected->

SetInt

().SetTo(67066);

260

BOOST_CHECK(Result->

Equals

(*Expected));

270

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"AllSequences"

)

282

OrigLoc.

SetInt

().SetId().Set(

"NC_000001.10"

);

283

OrigLoc.

SetInt

().SetFrom(50000000);

284

OrigLoc.

SetInt

().SetTo(50000001);

290

Expected.

SetInt

().SetId().Set(

"AL356789.16"

);

291

Expected.

SetInt

().SetFrom(56981);

292

Expected.

SetInt

().SetTo(56982);

296

BOOST_CHECK(Result->

Equals

(Expected));

306

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"AllSequences"

)

318

OrigLoc.

SetInt

().SetId().Set(

"NC_000001.10"

);

319

OrigLoc.

SetInt

().SetFrom(50000000);

320

OrigLoc.

SetInt

().SetTo(50000001);

326

Expected.

SetInt

().SetId().Set(

"GL000006.1"

);

327

Expected.

SetInt

().SetFrom(19971918);

328

Expected.

SetInt

().SetTo(19971919);

332

BOOST_CHECK(Result->

Equals

(Expected));

341

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"AllSequences"

)

356

orig_ival.

SetTo

(5001);

363

exp_ival.

SetId

().Set(

"CM000663.1"

);

365

exp_ival.

SetTo

(100236284);

368

BOOST_CHECK(Result->

Equals

(Expected));

378

GCService.

GetAssembly

(

"GCA_000001405.1"

,

"AllSequences"

)

393

orig_ival.

SetTo

(5001);

400

exp_ival.

SetId

().Set(

"CM000663.1"

);

402

exp_ival.

SetTo

(100236284);

405

BOOST_CHECK(Result->

Equals

(Expected));

415

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"AllSequences"

)

427

OrigLoc.

SetInt

().SetId().Set(

"AL451051.6"

);

428

OrigLoc.

SetInt

().SetFrom(5000);

429

OrigLoc.

SetInt

().SetTo(5001);

435

Expected.

SetInt

().SetId().Set(

"GL000006.1"

);

436

Expected.

SetInt

().SetFrom(70208201);

437

Expected.

SetInt

().SetTo(70208202);

441

BOOST_CHECK(Result->

Equals

(Expected));

451

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"SequenceNames"

)

462

OrigLoc->

SetWhole

().SetLocal().SetStr(

"1"

);

468

OrigLoc->

SetWhole

().SetLocal().SetStr(

"C1"

);

469

Result = Mapper.

Map

(*OrigLoc, MapSpec);

473

OrigLoc->

SetWhole

().SetLocal().SetStr(

"LG1"

);

474

Result = Mapper.

Map

(*OrigLoc, MapSpec);

478

OrigLoc->

SetWhole

().SetLocal().SetStr(

"WAKKAWAKKA1"

);

479

Result = Mapper.

Map

(*OrigLoc, MapSpec);

482

OrigLoc->

SetWhole

().SetLocal().SetStr(

"chrUn_KN707606v1_decoy"

);

483

Result = Mapper.

Map

(*OrigLoc, MapSpec);

484

BOOST_CHECK_EQUAL(Result.

IsNull

(),

true

);

494

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"SequenceNames"

)

506

OrigLoc->

SetInt

().SetId().SetLocal().SetStr(

"LG2"

);

507

OrigLoc->

SetInt

().SetFrom(123456789);

508

OrigLoc->

SetInt

().SetTo(123456798);

514

Expected->

SetInt

().SetId().Set(

"NT_022135.16"

);

515

Expected->

SetInt

().SetFrom(13205452);

516

Expected->

SetInt

().SetTo(13205461);

520

BOOST_CHECK(Result->

Equals

(*Expected));

523

Mapper.

Guess

(*OrigLoc, GuessSpec);

524

BOOST_CHECK_EQUAL(GuessSpec.

ToString

(),

"NotPrim:Private:NotSet::LG%s:CHRO:TOP"

);

529

BOOST_CHECK(RoundTrip->

Equals

(*OrigLoc));

542

OrigLoc->

SetWhole

().SetLocal().SetStr(

"1"

);

550

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"SequenceNames"

)

563

GCService.

GetAssembly

(

"GCA_000001405.1"

,

"SequenceNames"

)

589

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"SequenceNames"

)

595  bool

Result = Mapper.

Guess

(*OrigLoc, GuessSpec);

597

BOOST_CHECK_EQUAL(Result,

true

);

598

BOOST_CHECK_EQUAL(GuessSpec.

ToString

(),

"Prim:RefSeq:Gi:::CHRO:TOP"

);

604

GCService.

GetAssembly

(

"GCA_000001405.1"

,

"SequenceNames"

)

610  bool

Result = Mapper.

Guess

(*OrigLoc, GuessSpec);

612

BOOST_CHECK_EQUAL(Result,

true

);

613

BOOST_CHECK_EQUAL(GuessSpec.

ToString

(),

"NotPrim:RefSeq:Gi:::CHRO:TOP"

);

624

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"SequenceNames"

)

633

list<CConstRef<CSeq_id> > Synonyms;

638

BOOST_CHECK_EQUAL(Synonyms.size(), (

size_t

)5);

644

BOOST_CHECK_EQUAL(Synonyms.size(), (

size_t

)7);

654

GCService.

GetAssembly

(

"GCF_000001405.25"

,

"AllSequences"

)

667

orig_ival.

SetId

().Set(

"gi|224515577"

);

669

orig_ival.

SetTo

(3478538);

676

expect_ival.

SetId

().Set(

"NT_113891.2"

);

677

expect_ival.

SetFrom

(3478538);

678

expect_ival.

SetTo

(3478538);

682

BOOST_CHECK(Result->

Equals

(ExpectLoc));

691

GCService.

GetAssembly

(

"GCF_000001405.11"

,

"AllSequences"

)

695

GCService.

GetAssembly

(

"GCF_000001405.25"

,

"AllSequences"

)

705

orig_ival.

SetId

().Set(

"NT_078074.1"

);

707

orig_ival.

SetTo

(146371);

711

OldMapper.

Guess

(OrigLoc, GuessSpec);

715

remap_ival.

SetId

().Set(

"gi|224589821"

);

716

remap_ival.

SetFrom

(40301888);

717

remap_ival.

SetTo

(40507252);

727

expect_ival.

SetId

().Set(

"NC_000009.11"

);

728

expect_ival.

SetFrom

(40301888);

729

expect_ival.

SetTo

(40507252);

733

BOOST_CHECK(Result->

Equals

(ExpectLoc));

744

GCService.

GetAssembly

(

"GCF_000001405.13"

,

"SequenceNames"

)

757

OrigLoc.

SetInt

().SetId().SetLocal().SetStr(

"23-499"

);

758

OrigLoc.

SetInt

().SetFrom(50000000);

759

OrigLoc.

SetInt

().SetTo(50000001);

762

BOOST_CHECK(Result.

IsNull

());

764

OrigLoc.

SetInt

().SetId().SetLocal().SetStr(

"333"

);

765

Result = Mapper.

Map

(OrigLoc, MapSpec);

766

BOOST_CHECK(Result.

IsNull

());

768

OrigLoc.

SetInt

().SetId().SetLocal().SetStr(

"425"

);

769

Result = Mapper.

Map

(OrigLoc, MapSpec);

770

BOOST_CHECK(Result.

IsNull

());

782

GCService.

GetAssembly

(

"GCF_001858045.2"

,

"Scaffolds"

)

795

OrigLoc.

SetWhole

().SetGenbank().SetAccession(

"MT"

);

799

BOOST_CHECK(Result.

IsNull

());

808

GCService.

GetAssembly

(

"GCF_001858045.2"

,

"Scaffolds"

)

821

OrigLoc.

SetWhole

().SetGenbank().SetAccession(

"MT"

);

826

BOOST_CHECK(Result.

NotNull

());

829

ExpectLoc.

SetWhole

().SetGenbank().SetAccession(

"GU238433"

);

830

ExpectLoc.

SetWhole

().SetGenbank().SetVersion(1);

831

BOOST_CHECK(Result->

Equals

(ExpectLoc));

845

GCService.

GetAssembly

(

"GCF_000001215.2"

,

"SequenceNames"

));

859

OrigLoc.

SetInt

().SetId().SetPdb().SetMol().Set(

"2LHe"

);

860

OrigLoc.

SetInt

().SetId().SetPdb().SetChain(116);

861

OrigLoc.

SetInt

().SetFrom(1322833);

862

OrigLoc.

SetInt

().SetTo(1322945);

865

BOOST_CHECK(Result.

NotNull

());

877

GCService.

GetAssembly

(

"GCF_000307585.1"

,

"SequenceNames"

));

878

BOOST_CHECK(GenColl.

NotNull

());

892

OrigLoc.

SetInt

().SetFrom(1);

893

OrigLoc.

SetInt

().SetTo(41937);

896

BOOST_CHECK(Result.

NotNull

());

908

GCService.

GetAssembly

(

"GCA_000001215.4"

,

"SequenceNames"

));

909

BOOST_CHECK(GenColl.

NotNull

());

922

OrigLoc.

SetInt

().SetId().Set(

"211000022278760"

);

924

OrigLoc.

SetInt

().SetFrom(1);

925

OrigLoc.

SetInt

().SetTo(41937);

929

BOOST_CHECK(Result.

NotNull

());

932

OrigLoc.

SetInt

().SetId().SetLocal().SetStr(

"211000022278760"

);

934

Result = Mapper.

Map

(OrigLoc, MapSpec);

935

BOOST_CHECK(Result.

NotNull

());

1005

GCService.

GetAssembly

(

"GCF_000069185.1"

,

"SequenceNames"

));

1019

OrigLoc.

SetInt

().SetId().SetLocal().SetStr(

"1"

);

1020

OrigLoc.

SetInt

().SetFrom(1);

1021

OrigLoc.

SetInt

().SetTo(2);

1024

BOOST_CHECK(Result.

NotNull

());

1027

OrigLoc.

SetInt

().SetId().SetLocal().SetId(1);

1028

Result = Mapper.

Map

(OrigLoc, MapSpec);

1029

BOOST_CHECK(Result.

NotNull

());

1042

GCService.

GetAssembly

(

"GCF_000001405.39"

,

"SequenceNames"

));

1056

OrigLoc.

SetInt

().SetId().SetLocal().SetStr(

"chrUn_KI270752v1"

);

1057

OrigLoc.

SetInt

().SetFrom(1);

1058

OrigLoc.

SetInt

().SetTo(2);

1061

BOOST_CHECK(Result.

IsNull

());

1066

OrigLoc.

SetInt

().SetId().SetLocal().SetStr(

"Contig_2_5.15315"

);

1067

OrigLoc.

SetInt

().SetFrom(1);

1068

OrigLoc.

SetInt

().SetTo(2);

1070

Result = Mapper.

Map

(OrigLoc, MapSpec);

1071

BOOST_CHECK(Result.

IsNull

());

bool Guess(const objects::CSeq_loc &Loc, SIdSpec &Spec) const

CRef< objects::CSeq_loc > Map(const objects::CSeq_loc &Loc, const SIdSpec &Spec) const

void GetSynonyms(const objects::CSeq_id &BaseId, list< CConstRef< objects::CSeq_id > > &Synonyms, bool NcbiOnly=true) const

CRef< CGC_Assembly > GetAssembly(const string &acc, const string &mode)

User-defined methods of the data storage class.

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

Check if both objects contain the same values.

string GetSeqIdString(bool with_version=false) const

Return seqid string with optional version for text seqid type.

const CSeq_id * GetId(void) const

Get the id of the location return NULL if has multiple ids or no id at all.

bool IsNull(void) const THROWS_NONE

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

bool NotNull(void) const THROWS_NONE

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

void Reset(void)

Reset reference object.

bool NotNull(void) const THROWS_NONE

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

bool IsNull(void) const THROWS_NONE

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

TStr & SetStr(void)

Select the variant.

@ eGC_SequenceRole_top_level

@ eGC_SequenceRole_component

@ eGC_SequenceRole_scaffold

void SetTo(TTo value)

Assign a value to To data member.

const TId & GetId(void) const

Get the Id member data.

void SetId(TId &value)

Assign a value to Id data member.

void SetFrom(TFrom value)

Assign a value to From data member.

TGi GetGi(void) const

Get the variant data.

TLocal & SetLocal(void)

Select the variant.

const TInt & GetInt(void) const

Get the variant data.

void SetStrand(TStrand value)

Assign a value to Strand data member.

BOOST_AUTO_TEST_SUITE(psiblast_iteration)

string ToString(void) const

Utility stuff for more convenient using of Boost.Test library.

BOOST_AUTO_TEST_CASE(TestCaseUcscToRefSeqMapping)

BOOST_AUTO_TEST_SUITE_END()

Auxiliary class to convert a string into an argument count and vector.


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