;
64: m_Obj(obj), m_Name(name)
87 const boolis_prot =
false;
101BOOST_REQUIRE(defline.
Empty());
108 const stringkDbName(
"nr");
116scope =
new CScope(*obj);
136 constlist< CRef< CBlast_def_line > >& bdl = bdls->
Get();
142BOOST_WARN_MESSAGE((*iter)->IsSetLinks(),
"Links are not set, test is inactive");
143 if((*iter)->IsSetLinks()){
145 ITERATE(list< int >, iter2, (*iter)->GetLinks()){
152 if((*iter2) &
eGeo){
155 if((*iter2) &
eGene){
159BOOST_REQUIRE (linkout &
eGene);
176list<TGi> use_this_gi;
179CBlastFormatUtil::GetAlnScores(*(align.front()), score, bits, evalue,
180sum_n, num_ident, use_this_gi);
181BOOST_REQUIRE(score == 1296);
182BOOST_REQUIRE(sum_n == -1);
183BOOST_REQUIRE(use_this_gi.front() ==
GI_CONST(18426812));
185BOOST_REQUIRE_CLOSE(bits, 503.263, 0.0001);
186BOOST_REQUIRE(num_ident == 331);
188 stringevalue_str, bit_score_str, raw_score_str, total_bit_score_str;
189CBlastFormatUtil::GetScoreString(evalue, bits, 0, 0,
190evalue_str, bit_score_str,
193BOOST_REQUIRE(evalue_str ==
string(
"2e-141"));
194BOOST_REQUIRE(bit_score_str ==
string(
"503"));
204 constlist<CRef<CSeq_align> > & align = align_set.
Get();
208 const stringkDbName(
"nr");
215scope =
new CScope(*obj);
223 const unsigned intlist_size = 31;
224 intref_score[list_size]={100, 47, -1, -1, -1, -1, -1, -1, -1, -1,
225-1, -1, -1, -1, -1, -1, 45, -1, -1, -1,
226-1, -1, -1, -1, -1, -1, -1, -1, -1, 40, 40 };
229BOOST_REQUIRE(align.size() == list_size);
233(*iter)->GetNamedScore(
"seq_percent_coverage", score);
234BOOST_REQUIRE(score == ref_score[
i]);
BLAST formatter utilities.
Declares CBlastScopeSource class to create properly configured CScope objects to invoke the BLAST dat...
BOOST_AUTO_TEST_CASE(GetBlastDeflineFromGenbank)
double const kMaxDoubleDiff
BOOST_AUTO_TEST_SUITE_END() static int s_GetSegmentFlags(const CBioseq &bioseq)
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const string &dbname="nr", const EDbType dbtype=eUnknown, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
EDbType
Describes the type of blast database to use.
@ eNucleotide
nucleotide database
static string GetLoaderNameFromArgs(CConstRef< CSeqDB > db_handle)
Class whose purpose is to create CScope objects which have data loaders added with different prioriti...
CRef< objects::CScope > NewScope()
Create a new, properly configured CScope.
static string GetLoaderNameFromArgs(CReader *reader=0)
static CRef< CBlast_def_line_set > ExtractBlastDefline(const CBioseq &bioseq)
Extract a Blast-def-line-set object from a Bioseq retrieved by CSeqDB.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
static void InsertSubjectScores(objects::CSeq_align_set &org_align_set, const objects::CBioseq_Handle &query_handle, TSeqRange query_range=TSeqRange(), ESubjectScores score_type=eQueryCovPerSubj)
@ eSerial_AsnText
ASN.1 text.
TGi FindGi(const container &ids)
Return gi from id list if exists, return 0 otherwise.
static bool AvoidGi(void)
Check if the option to avoid GI ids is enabled (SeqId/AvoidGi or SEQ_ID_AVOID_GI).
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
TGi GetGiForAccession(const string &acc, CScope &scope, EGetIdType flags=0)
Given an accession string retrieve the GI id.
void AddDataLoader(const string &loader_name, TPriority pri=kPriority_Default)
Add data loader by name.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
bool Empty(void) const THROWS_NONE
Check if CRef is empty â not pointing to any object, which means having a null value.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
const Tdata & Get(void) const
Get the member data.
const Tdata & Get(void) const
Get the member data.
TGi & SetGi(void)
Select the variant.
list< CRef< CSeq_align > > TAlign
list< CRef< CSeq_id > > TId
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)
Defines BLAST database access classes.
CRef< CObjectManager > m_Obj
DataLoaderRevoker(CRef< CObjectManager > obj, string name)
DataLoaderRevoker(const string &name)
Configuration structure for the CBlastScopeSource.
@ eUseGenbankDataLoader
Use the Genbank data loader.
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