47 #define NCBI_BOOST_NO_AUTO_TEST_MAIN
53 using namespace ncbi::align_format;
62 size_t line_length = 65,
64 bool translated_nuc_alignment =
false,
67 deflines_to_show, translated_nuc_alignment,
82 seqalign->
Set() = align;
84 const string kDbName(
"nr");
99 unique_ptr<CShowBlastDefline::SScoreInfo>
101 unique_ptr<CShowBlastDefline::SDeflineInfo>
116 string defline[] = {
"adenosine deaminase [Rattus norvegicus]",
117 "adenosine deaminase isoform 1 [Mus musculus]"};
118 string evalue_string[] = {
"0.0",
"0.0"};
119 string bit_string[] = {
"734",
"677"};
120 int sum_n[] = {1, 1};
122 string id_url[] = {
"<a title=\"Show report for NP_569083.1\" href=\"https://www.ncbi.nlm.nih.gov/nucleotide/NP_569083.1?report=genbank&log$=nucltop&blast_rank=1&RID=\" >",
123 "<a title=\"Show report for NP_001258981.1\" href=\"https://www.ncbi.nlm.nih.gov/nucleotide/NP_001258981.1?report=genbank&log$=nucltop&blast_rank=1&RID=\" >" };
124 string score_url[] = {
"<a href=#NP_569083.1>",
"<a href=#NP_001258981.1>"};
125 bool is_new[] = {
false,
false};
126 bool was_checked[] = {
false,
false};
127 BOOST_REQUIRE(dl->
defline.find(defline[index])!=
NPOS);
128 BOOST_REQUIRE_EQUAL(dl->
id_url, id_url[index]);
129 BOOST_REQUIRE_EQUAL(dl->
score_url, score_url[index]);
130 BOOST_REQUIRE_EQUAL(dl->
is_new, is_new[index]);
131 BOOST_REQUIRE_EQUAL(dl->
was_checked, was_checked[index]);
133 BOOST_REQUIRE_EQUAL(
si->evalue_string, evalue_string[index]);
134 BOOST_REQUIRE_EQUAL(
si->bit_string, bit_string[index]);
135 BOOST_REQUIRE_EQUAL(
si->sum_n, sum_n[index]);
EDbType
Describes the type of blast database to use.
@ eProtein
protein database
This class displays the defline for BLAST result.
SScoreInfo * x_GetScoreInfo(const objects::CSeq_align &aln, int blast_rank)
Internal function to return score info.
SDeflineInfo * x_GetDeflineInfo(CConstRef< objects::CSeq_id > id, list< string > &use_this_seqid, int blast_rank)
Internal function to return defline info.
void SetOption(int option)
options per DisplayOption
Class which registers the BLAST database and Genbank data loaders as a non-default data loaders with ...
ncbi::CRef< ncbi::objects::CScope > NewScope()
Create a new scope with the default set to the BLAST database data loader for the BLAST database spec...
static const char si[8][64]
static const char location[]
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
@ eSerial_AsnText
ASN.1 text.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
void RevokeAllDataLoaders(void)
Revoke all registered data loaders, even if they were still used.
CObjectManager & GetObjectManager(void)
Get object manager controlling this scope.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
Tdata & Set(void)
Assign a value to data member.
list< CRef< CSeq_align > > Tdata
const Tdata & Get(void) const
Get the member data.
list< CRef< CSeq_align > > TAlign
const TData & GetData(void) const
Get the Data member data.
Magic spell ;-) needed for some weird compilers... very empiric.
Defines NCBI C++ exception handling.
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
Useful/utility classes and methods.
std::istream & in(std::istream &in_, double &x_)
BOOST_AUTO_TEST_SUITE(psiblast_iteration)
BOOST_AUTO_TEST_CASE(LocalDeflineInfo)
static void GetDeflineInfo(CBlastOM::ELocation location)
static void TestData(CShowBlastDefline::SDeflineInfo *dl, CShowBlastDefline::SScoreInfo *si, int index)
CShowBlastDeflineTest(const CSeq_align_set &seqalign, CScope &scope, size_t line_length=65, size_t deflines_to_show=align_format::kDfltArgNumDescriptions, bool translated_nuc_alignment=false, CRange< TSeqPos > *master_range=NULL)
Data Representing each defline.
Utility stuff for more convenient using of Boost.Test library.