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

NCBI C++ ToolKit: src/algo/blast/unit_tests/api/magicblast_unit_test.cpp Source File

62 using namespace ncbi

;

85

m_OptHandle.

Reset

();

118

ifstream istr(

"data/magicblast_nonmatch.asn"

);

124

m_OptHandle->SetMismatchPenalty(-8);

125

m_OptHandle->SetGapExtensionCost(8);

126

m_OptHandle->SetPaired(

true

);

127  CMagicBlast

magicblast(query_factory, db_adapter, m_OptHandle);

130  const size_t

kExpectedNumResults = 1;

131

BOOST_REQUIRE_EQUAL(

results

->size(), kExpectedNumResults);

137

ifstream istr(

"data/magicblast_concordant.asn"

);

143

m_OptHandle->SetPaired(

true

);

144  CMagicBlast

magicblast(query_factory, db_adapter, m_OptHandle);

147  const size_t

kExpectedNumResults = 3;

148  const size_t

kExpectedConcordant = 3;

149

BOOST_REQUIRE_EQUAL(

results

->size(), kExpectedNumResults);

153  if

(re->IsConcordant()) ++

count

;

155

BOOST_REQUIRE_EQUAL(

count

, kExpectedConcordant);

161

ifstream istr(

"data/magicblast_discordant.asn"

);

167

m_OptHandle->SetPaired(

true

);

168  CMagicBlast

magicblast(query_factory, db_adapter, m_OptHandle);

171  const size_t

kExpectedNumResults = 4;

172  const size_t

kExpectedDiscordant = 4;

173

BOOST_REQUIRE_EQUAL(

results

->size(), kExpectedNumResults);

177  if

(!re->IsConcordant()) ++

count

;

179

BOOST_REQUIRE_EQUAL(

count

, kExpectedDiscordant);

185

ifstream istr(

"data/magicblast_queries.asn"

);

191

m_OptHandle->SetMismatchPenalty(-8);

192

m_OptHandle->SetGapExtensionCost(8);

193

m_OptHandle->SetCutoffScore(49);

194  CMagicBlast

magicblast(query_factory, db_adapter, m_OptHandle);

197  const size_t

kExpectedNumResults = 4;

198

BOOST_REQUIRE_EQUAL(

results

->Get().size(), kExpectedNumResults);

201

vector<SMatch> expected_hits(kExpectedNumResults);

207

expected_hits[results_idx].score = 49;

208

expected_hits[results_idx].prod_length = 49;

218

expected_hits[results_idx].exons.push_back(exon);

228

expected_hits[results_idx].exons.push_back(exon);

232

expected_hits[results_idx].score = 49;

233

expected_hits[results_idx].prod_length = 49;

243

expected_hits[results_idx].exons.push_back(exon);

253

expected_hits[results_idx].exons.push_back(exon);

257

expected_hits[results_idx].score = 49;

258

expected_hits[results_idx].prod_length = 49;

268

expected_hits[results_idx].exons.push_back(exon);

278

expected_hits[results_idx].exons.push_back(exon);

282

expected_hits[results_idx].score = 49;

283

expected_hits[results_idx].prod_length = 49;

293

expected_hits[results_idx].exons.push_back(exon);

303

expected_hits[results_idx].exons.push_back(exon);

307  for

(

auto

it:

results

->Get()) {

310

BOOST_REQUIRE(it->GetSegs().IsSpliced());

313

it->GetNamedScore(

"score"

, score);

314

BOOST_REQUIRE_EQUAL(score, expected_hits[results_idx].score);

318

expected_hits[results_idx].prod_length);

320

BOOST_REQUIRE_EQUAL(seg.

GetExons

().size(),

321

expected_hits[results_idx].exons.size());

324  auto

expected_exon = expected_hits[results_idx].exons.begin();

325  for

(

auto

exon: seg.

GetExons

()) {

328

BOOST_REQUIRE_EQUAL(exon->GetProduct_start().GetNucpos(),

331

BOOST_REQUIRE_EQUAL(exon->GetProduct_end().GetNucpos(),

334

BOOST_REQUIRE_EQUAL(exon->GetGenomic_start(),

337

BOOST_REQUIRE_EQUAL(exon->GetGenomic_end(),

341

BOOST_REQUIRE_EQUAL(exon->GetProduct_strand(),

344

BOOST_REQUIRE_EQUAL(exon->GetGenomic_strand(),

348  if

(!expected_exon->acceptor.empty()) {

349

BOOST_REQUIRE(exon->CanGetAcceptor_before_exon());

350

BOOST_REQUIRE_EQUAL(exon->GetAcceptor_before_exon().GetBases(),

354  if

(!expected_exon->donor.empty()) {

355

BOOST_REQUIRE(exon->CanGetDonor_after_exon());

356

BOOST_REQUIRE_EQUAL(exon->GetDonor_after_exon().GetBases(),

357

expected_exon->

donor

);

369

ifstream istr(

"data/magicblast_paired.asn"

);

373  bool

queries_paired =

false

;

374  auto

q = m_Queries->GetSeq_set().begin();

375

BOOST_REQUIRE(q != m_Queries->GetSeq_set().end());

376  const CBioseq

& bioseq = (*q)->GetSeq();

382

queries_paired = obj.

HasField

(

"has_pair"

);

386

BOOST_REQUIRE(queries_paired);

391

m_OptHandle->SetPaired(

true

);

392  CMagicBlast

magicblast(query_factory, db_adapter, m_OptHandle);

395  const size_t

kExpectedNumResults = 3;

396

BOOST_REQUIRE_EQUAL(

results

->Get().size(), kExpectedNumResults);

399

vector<SMatch> expected_hits(2 * kExpectedNumResults);

406

expected_hits[results_idx].score = 68;

407

expected_hits[results_idx].prod_length = 75;

417

expected_hits[results_idx].exons.push_back(exon);

421

expected_hits[results_idx].score = 74;

422

expected_hits[results_idx].prod_length = 75;

432

expected_hits[results_idx].exons.push_back(exon);

436

expected_hits[results_idx].score = 68;

437

expected_hits[results_idx].prod_length = 75;

447

expected_hits[results_idx].exons.push_back(exon);

451

expected_hits[results_idx].score = 74;

452

expected_hits[results_idx].prod_length = 75;

462

expected_hits[results_idx].exons.push_back(exon);

466

expected_hits[results_idx].score = 68;

467

expected_hits[results_idx].prod_length = 75;

477

expected_hits[results_idx].exons.push_back(exon);

481

expected_hits[results_idx].score = 74;

482

expected_hits[results_idx].prod_length = 75;

492

expected_hits[results_idx].exons.push_back(exon);

496  for

(

auto

seg:

results

->Get()) {

499

BOOST_REQUIRE(seg->GetSegs().IsDisc());

500

BOOST_REQUIRE_EQUAL(seg->GetSegs().GetDisc().Get().size(), 2u);

502  for

(

auto

it: seg->GetSegs().GetDisc().Get()) {

504

BOOST_REQUIRE(it->GetSegs().IsSpliced());

507

it->GetNamedScore(

"score"

, score);

508

BOOST_REQUIRE_EQUAL(score, expected_hits[results_idx].score);

513

expected_hits[results_idx].prod_length);

515

BOOST_REQUIRE_EQUAL(seg.

GetExons

().size(),

516

expected_hits[results_idx].exons.size());

519  auto

expected_exon = expected_hits[results_idx].exons.begin();

520  for

(

auto

exon: seg.

GetExons

()) {

523

BOOST_REQUIRE_EQUAL(exon->GetProduct_start().GetNucpos(),

526

BOOST_REQUIRE_EQUAL(exon->GetProduct_end().GetNucpos(),

529

BOOST_REQUIRE_EQUAL(exon->GetGenomic_start(),

532

BOOST_REQUIRE_EQUAL(exon->GetGenomic_end(),

536

BOOST_REQUIRE_EQUAL(exon->GetProduct_strand(),

539

BOOST_REQUIRE_EQUAL(exon->GetGenomic_strand(),

543  if

(!expected_exon->acceptor.empty()) {

544

BOOST_REQUIRE(exon->CanGetAcceptor_before_exon());

546

exon->GetAcceptor_before_exon().GetBases(),

550  if

(!expected_exon->donor.empty()) {

551

BOOST_REQUIRE(exon->CanGetDonor_after_exon());

552

BOOST_REQUIRE_EQUAL(exon->GetDonor_after_exon().GetBases(),

553

expected_exon->

donor

);

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

BOOST_AUTO_TEST_SUITE_END() static int s_GetSegmentFlags(const CBioseq &bioseq)

Interface to create a BlastSeqSrc suitable for use in CORE BLAST from a a variety of BLAST database/s...

Handle to the nucleotide mapping options to the BLAST algorithm.

NCBI C++ Object Manager free implementation of IQueryFactory.

bool HasField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const

Verify that a named field exists.

Ensure direct dependencies on enough of the core xncbi library to satisfy shared libraries that depen...

CRef< CMagicBlastResultSet > RunEx(void)

CRef< CSeq_align_set > Run(void)

Run the RNA-Seq mapping.

@ eBlastDbIsNucleotide

nucleotide

#define MSerial_AsnText

I/O stream manipulators –.

void Reset(void)

Reset reference object.

bool IsStr(void) const

Check if variant Str is selected.

const TStr & GetStr(void) const

Get the variant data.

const TType & GetType(void) const

Get the Type member data.

TProduct_length GetProduct_length(void) const

Get the Product_length member data.

const TExons & GetExons(void) const

Get the Exons member data.

ENa_strand

strand of nucleic acid

const Tdata & Get(void) const

Get the member data.

bool CanGetDescr(void) const

Check if it is safe to call GetDescr method.

const TDescr & GetDescr(void) const

Get the Descr member data.

Declares class which provides internal BLAST database representations to the internal BLAST APIs.

Declares CMagicBlast, the C++ API for the BLAST RNA-Seq mapping engine.

BOOST_AUTO_TEST_CASE(MappingNonMatch)

Magic spell ;-) needed for some weird compilers... very empiric.

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...

CRef< CSearchDatabase > m_Db

CRef< CMagicBlastOptionsHandle > m_OptHandle

~CMagicBlastTestFixture()

CRef< CBioseq_set > m_Queries

Contains a single Bioseq.

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


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