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

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

60 using namespace ncbi

;

90

x_ReadSeqEntriesFromFile();

93

x_SetupSubject(bioseq);

99

m_OptHandle.

Reset

();

100

m_SeqEntry.

Reset

();

115

subjects.push_back(ssl);

129

subjects.push_back(ssl);

136  const string

kPssmFile(

"data/pssm_freq_ratios.asn"

);

137

m_Pssm = TestUtil::ReadObject<CPssmWithParameters>(kPssmFile);

144  const string

kSeqEntryFile(

"data/7450545.seqentry.asn"

);

145

m_SeqEntry = TestUtil::ReadObject<CSeq_entry>(kSeqEntryFile);

150

BOOST_REQUIRE(m_Pssm &&

159

BOOST_REQUIRE_EQUAL(

false

, sa->

IsSetSegs

());

170

pair<TSeqRange, TSeqRange> first_hsp =

174

BOOST_REQUIRE_EQUAL(first_hsp.first.GetFrom(), hsp1_query.

GetFrom

());

175

BOOST_REQUIRE_EQUAL(first_hsp.first.GetTo(), hsp1_query.

GetTo

());

176

BOOST_REQUIRE_EQUAL(first_hsp.second.GetFrom(), hsp1_subj.

GetFrom

());

177

BOOST_REQUIRE_EQUAL(first_hsp.second.GetTo(), hsp1_subj.

GetTo

());

179  else if

(hsp_num == 2)

182  const

pair<TSeqRange, TSeqRange> second_hsp =

186

BOOST_REQUIRE_EQUAL(second_hsp.first.GetFrom(), hsp2_query.

GetFrom

());

187

BOOST_REQUIRE_EQUAL(second_hsp.first.GetTo(), hsp2_query.

GetTo

());

188

BOOST_REQUIRE_EQUAL(second_hsp.second.GetFrom(), hsp2_subj.

GetFrom

());

189

BOOST_REQUIRE_EQUAL(second_hsp.second.GetTo(), hsp2_subj.

GetTo

());

204

BOOST_REQUIRE_EQUAL(hsp.

GetTo

(), hsp1_query.

GetTo

());

206

BOOST_REQUIRE_EQUAL(hsp.

GetTo

(), hsp1_subj.

GetTo

());

216

m_Pssm->SetPssm().SetFinalData().SetScalingFactor(2);

217

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle),

222

m_Pssm->SetPssm().SetFinalData().ResetScores();

223

m_Pssm->SetPssm().SetIntermediateData().ResetFreqRatios();

224

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle),

229

m_Pssm->SetPssm().ResetQuery();

230

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle),

235

m_Pssm->SetPssm().SetQuery(*m_SeqSet);

236

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle),

241

m_Pssm->SetPssm().SetIsProtein(

false

);

242

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle),

250

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(empty_query, m_Subject, opts),

258  for

(

size_t i

= 0;

i

<

sizeof

(gis)/

sizeof

(*gis);

i

++) {

262

CreateSSeqLoc(*seqid, range));

263

queries.push_back(*sl);

268

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(qf, m_Subject, opts),

277

CreateSSeqLoc(*seqid, range));

278

queries.push_back(*sl);

292

CreateSSeqLoc(*seqid, range));

293

sequences.push_back(*sl);

295

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle),

301

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle),

307

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle),

313

BOOST_REQUIRE_THROW(

CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle),

319

x_SetupSubject(bioseq);

321  CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle);

325  const size_t

kNumExpectedAlignments = 2;

328

BOOST_REQUIRE_EQUAL(kNumExpectedAlignments, sas->

Size

());

331

CSeq_align_set::Tdata::const_iterator alignment_itr

332

= sas->

Get

().begin();

333

x_ValidatePssmVsGi7450545(*alignment_itr, 1);

335

x_ValidatePssmVsGi7450545(*alignment_itr, 2);

340  const size_t

kNumSubjects = 2;

342

x_SetupSubject(bioseq_set);

344  CPsiBl2Seq

blaster(m_Pssm, m_Subject, m_OptHandle);

346

BOOST_REQUIRE(

results

[0].GetErrors().empty());

349

BOOST_REQUIRE_EQUAL(kNumSubjects,

350

(

size_t

)m_Subject->MakeLocalQueryData(&opts)->GetNumQueries());

351

BOOST_REQUIRE_EQUAL(kNumSubjects,

354  const size_t

kNumExpectedAlignments = kNumSubjects;

356

BOOST_REQUIRE_EQUAL(kNumExpectedAlignments, sas->

Get

().size());

358

CSeq_align_set::Tdata::const_iterator alignment_itr

359

= sas->

Get

().begin();

360

x_ValidatePssmVsGi7450545(*alignment_itr, 1);

362

x_ValidatePssmVsGi7450545(*alignment_itr, 2);

365

BOOST_REQUIRE(

results

[1].GetErrors().empty());

368

x_ValidatePssmVsGi129295(*(sas2->

Get

().begin()));

379  int

subj_gis[] = { 7450545, 40456275, 129295 };

380  for

(

size_t i

= 0;

i

<

sizeof

(subj_gis)/

sizeof

(*subj_gis);

i

++) {

382

subj_loc->SetWhole().SetGi(subj_gis[

i

]);

383

subjects.push_back(

SSeqLoc

(subj_loc, scope));

390  CPsiBl2Seq

blaster(m_Pssm, subj_factory, m_OptHandle);

394

BOOST_REQUIRE_EQUAL(subjects.size(),

results

.GetNumResults());

397

CSeq_align_set::Tdata::const_iterator alignment_itr

398

= sas->

Get

().begin();

399

x_ValidatePssmVsGi7450545(*alignment_itr, 1);

401

x_ValidatePssmVsGi7450545(*alignment_itr, 2);

406

BOOST_REQUIRE_EQUAL(0, (

int

) sas2->

Size

());

408

x_ValidatePssmVsGi129295(*(

results

[2].GetSeqAlign()->

Get

().begin()));

419

query_loc->SetWhole().SetGi(7662354);

427  int

subj_gis[] = { 34535770, 46125411 };

428  for

(

size_t i

= 0;

i

<

sizeof

(subj_gis)/

sizeof

(*subj_gis);

i

++) {

430

subj_loc->SetWhole().SetGi(subj_gis[

i

]);

431

subjects.push_back(

SSeqLoc

(subj_loc, scope));

450  CPsiBl2Seq

psibl2seq(query_factory, subj_factory, psi_opts);

459

qa::CSeqAlignCmpOpts opts;

460

qa::CSeqAlignCmp

cmp

(results_ref, results_test, opts);

462  bool

identical_results =

cmp

.Run(&errors);

464

BOOST_REQUIRE_MESSAGE(identical_results, errors);

static CRef< CScope > m_Scope

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

Declares the CBl2Seq (BLAST 2 Sequences) class.

vector< CRef< objects::CSeq_align_set > > TSeqAlignVector

Vector of Seq-align-sets.

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

Runs the BLAST algorithm between 2 sequences.

Defines BLAST error codes (user errors included)

Encapsulates ALL the BLAST algorithm's options.

Handle to the protein-protein options to the BLAST algorithm.

CRange< TSeqPos > GetSeqRange(TDim row) const

NCBI C++ Object Manager dependant implementation of IQueryFactory.

Handle to the protein-protein options to the BLAST algorithm.

void x_SetupSubject(CConstRef< CBioseq_set > bioseq_set)

CRef< IQueryFactory > m_Subject

must be initialized with one of the two data members below

void x_ValidatePssmVsGi7450545(CConstRef< CSeq_align > sa, int hsp_num)

void x_ReadPssmFromFile()

void x_ReadSeqEntriesFromFile()

void x_ValidatePssmVsGi129295(CConstRef< CSeq_align > sa)

void x_SetupSubject(CConstRef< CBioseq > bioseq)

CRef< CSeq_entry > m_SeqSet

Contains a Bioseq-set with two Bioseqs, gi 7450545 and gi 129295.

void x_ValidatePssmVsGi40456275(CConstRef< CSeq_align > sa)

CRef< CSeq_entry > m_SeqEntry

Contains a single Bioseq.

CRef< CPSIBlastOptionsHandle > m_OptHandle

CRef< CPssmWithParameters > m_Pssm

Runs a single iteration of the PSI-BLAST algorithm between 2 sequences.

Search Results for All Queries.

Tdata::size_type Size() const

static CRef< CScope > NewScope(bool with_defaults=true)

Return a new scope, possibly (by default) with default loaders, which will include the Genbank loader...

static CTestObjMgr & Instance()

Template class for iteration on objects of class C (non-medifiable version)

@ eNoCompositionBasedStats

Don't use composition based statistics.

CRef< CSearchResultSet > Run()

Run the PSI-BLAST 2 Sequences engine.

const CBlastOptions & GetOptions() const

Return the object which this object is a handle for.

void PsiBlastComputePssmScores(CRef< objects::CPssmWithParameters > pssm, const CBlastOptions &opts)

Given a PSSM with frequency ratios and options, invoke the PSSM engine to compute the scores.

void SetId(CSeq_id &id)

set the 'id' field in all parts of this location

CConstBeginInfo ConstBegin(const C &obj)

Get starting point of non-modifiable object hierarchy.

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

Add bioseq, return bioseq handle.

static CRef< CObjectManager > GetInstance(void)

Return the existing object manager or create one.

void Reset(void)

Reset reference object.

CRange< TSeqPos > TSeqRange

typedefs for sequence ranges

TTo GetTo(void) const

Get the To member data.

TFrom GetFrom(void) const

Get the From member data.

bool CanGetIntermediateData(void) const

Check if it is safe to call GetIntermediateData method.

const TFinalData & GetFinalData(void) const

Get the FinalData member data.

bool CanGetFinalData(void) const

Check if it is safe to call GetFinalData method.

void SetPssm(TPssm &value)

Assign a value to Pssm data member.

bool CanGetQuery(void) const

Check if it is safe to call GetQuery method.

bool CanGetScores(void) const

Check if it is safe to call GetScores method.

bool CanGetPssm(void) const

Check if it is safe to call GetPssm method.

const TPssm & GetPssm(void) const

Get the Pssm member data.

const TDenseg & GetDenseg(void) const

Get the variant data.

bool IsSetSegs(void) const

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

const Tdata & Get(void) const

Get the member data.

const TSegs & GetSegs(void) const

Get the Segs member data.

bool IsDenseg(void) const

Check if variant Denseg is selected.

@ e_Gi

GenInfo Integrated Database.

const TSeq & GetSeq(void) const

Get the variant data.

TSet & SetSet(void)

Select the variant.

TSeq_set & SetSeq_set(void)

Assign a value to Seq_set data member.

const TYPE & Get(const CNamedParameterList *param)

constexpr bool empty(list< Ts... >) noexcept

const struct ncbi::grid::netcache::search::fields::SIZE size

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

std::vector< SeqAlign > TSeqAlignSet

Vector of neutral sequence alignments.

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

Declares CPsiBl2Seq, the C++ API for the PSI-BLAST 2 Sequences engine.

BOOST_AUTO_TEST_CASE(TestComparePssmWithMultipleSequences)

Declarations of auxiliary functions/classes for PSI-BLAST.

static bool GetSeqId(const T &d, set< string > &labels, const string name="", bool detect=false, bool found=false)

API to compare CSeq-aligns produced by BLAST.

void SeqAlignSetConvert(const objects::CSeq_align_set &ss, std::vector< SeqAlign > &retval)

Converts a Seq-align-set into a neutral seqalign for use with the CSeqAlignCmp class.

vector< SSeqLoc > TSeqLocVector

Vector of sequence locations.

Structure to represent a single sequence to be fed to BLAST.

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