76 arg_desc->AddKey(
"seq-entry",
82 arg_desc->AddKey(
"aligns",
84 "Concatenated Seq-aligns used to generate gene models",
88 arg_desc->AddFlag(
"input-binary",
89 "Input data is ASN.1 Binary.");
101 bool ibinary = args[
"input-binary"];
109 list<CRef<CSeq_align> > coll;
123 coll.splice(coll.end(),
tmp.Set());
126 aligns->
Set() = coll;
129 BOOST_CHECK( 120 == aligns->
Get().size());
134 vector<CScoreValue> qcovs = score->Get(
"seq_percent_coverage", *aligns);
137 const double coverage = 99.8013;
139 BOOST_CHECK( 120 == qcovs.size() );
140 BOOST_CHECK( qcovs.front().GetQueryId().AsString() ==
"lcl|Sequence_1" );
141 BOOST_CHECK( qcovs.front().GetSubjectId().AsString() ==
"gi|219857159" );
142 BOOST_CHECK( qcovs.front().GetName() ==
"seq_percent_coverage" );
143 BOOST_CHECK(
abs(qcovs.front().GetValue() - coverage) <
epsilon );
146 vector<CScoreValue> qcovus = score->Get(
"uniq_seq_percent_coverage", *aligns);
148 BOOST_CHECK( 120 == qcovus.size() );
149 BOOST_CHECK( qcovus.front().GetQueryId().AsString() ==
"lcl|Sequence_1" );
150 BOOST_CHECK( qcovus.front().GetSubjectId().AsString() ==
"gi|219857159" );
151 BOOST_CHECK( qcovus.front().GetName() ==
"uniq_seq_percent_coverage" );
152 BOOST_CHECK(
abs(qcovus.front().GetValue() - coverage) <
epsilon );
155 char const*
names[] = {
"seq_percent_coverage",
"uniq_seq_percent_coverage"};
156 vector<string> score_names(
names,
names +
sizeof(
names) /
sizeof(
char*));
159 vector<CScoreValue>
all = score->Get(
"subjects-sequence-coverage-group", score_names, *aligns);
160 BOOST_CHECK( 240 ==
all.size() );
163 for ( vector<CScoreValue>::const_iterator
i = qcovs.begin();
i != qcovs.end(); ++
i ) {
168 for ( vector<CScoreValue>::const_iterator
i = qcovus.begin();
i != qcovus.end(); ++
i ) {
173 for ( vector<CScoreValue>::const_iterator
i =
all.begin();
i !=
all.end(); ++
i ) {
175 BOOST_CHECK ( score_table.count(
key) > 0 );
176 BOOST_CHECK (
abs(score_table.at(
key) -
i->GetValue()) <
epsilon );
180 score->Set(
"subjects-sequence-coverage-group", score_names, *aligns);
186 BOOST_CHECK ( score_table.count(
key) > 0 );
188 (*i)->GetNamedScore(
"seq_percent_coverage",
value);
193 string key =
MakeKey(**
i,
"uniq_seq_percent_coverage");
195 BOOST_CHECK ( score_table.count(
key) > 0 );
197 (*i)->GetNamedScore(
"uniq_seq_percent_coverage",
value);
206 oss <<
value.GetQueryId().AsString()
208 <<
value.GetSubjectId().AsString()
static CNcbiApplication * Instance(void)
Singleton method.
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
static CRef< IAlignmentCollectionScore > GetInstance()
iterator_bool insert(const value_type &val)
NCBITEST_INIT_CMDLINE(arg_desc)
BOOST_AUTO_TEST_CASE(Test_AlignmentColl)
static string MakeKey(CScoreValue const &)
static const struct name_t names[]
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
@ fBinary
Open as binary file; for eInputFile, eOutputFile, eIOFile.
@ eInputFile
Name of file (must exist and be readable)
#define MSerial_AsnBinary
#define MSerial_AsnText
I/O stream manipulators –.
const string AsFastaString(void) const
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
Tdata & Set(void)
Assign a value to data member.
const Tdata & Get(void) const
Get the member data.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is smart and slim</td> n<td> orig</td> n</tr> n<tr> n<td> last_modified</td> n<td> optional</td> n<td> Integer</td> n<td class=\"description\"> The blob last modification If provided then the exact match will be requested with n the Cassandra storage corresponding field value</td> n<td> Positive integer Not provided means that the most recent match will be selected</td> n<td></td> n</tr> n<tr> n<td> use_cache</td> n<td> optional</td> n<td> String</td> n<td class=\"description\"> The option controls if the Cassandra LMDB cache and or database should be used It n affects the seq id resolution step and the blob properties lookup step The following n options are BIOSEQ_INFO and BLOB_PROP at all
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
CRef< objects::CObjectManager > om
Utility stuff for more convenient using of Boost.Test library.