74 arg_desc->AddKey(
"in",
"input",
78 arg_desc->AddOptionalKey(
"out",
"output",
79 "Output seq-annot of ORFs",
104 string comment = desc.
Get().front()->GetComment();
106 vector<string> allowable_starts;
107 bool longest_orfs =
false;
109 auto longest = find(allowable_starts.begin(), allowable_starts.end(),
"longest");
110 if (longest != allowable_starts.end()) {
112 allowable_starts.erase(longest);
125 size_t min_length = 300;
126 size_t max_seq_gap = 30;
127 COrf::FindOrfs(sv, loc_vec, min_length, gcode, allowable_starts, longest_orfs, max_seq_gap);
132 my_annot->
SetDesc().Assign(desc);
138 BOOST_CHECK(my_annot->
Equals(*ref_annot));
146 "ANNNNNNNNNNNNANNNNNNNNNNNNAANNNNNNNNNNNNAA"
147 "ANNNNNNNNNNNNATGTGANNNNNNNNNNNNATGTGAANNNNNNNNNNNNAA";
148 vector<string> allowable_starts = {{
"ATG"}};
150 BOOST_CHECK_NO_THROW(
153 BOOST_CHECK_EQUAL(loc_vec.size(), 2);
163 "NTCACCTTTTCGCCCCTCGGCGACTTACTTTGAGAGGCCAAAGTAAGCAAAGCCTTTTGCTCCGGTTCC";
164 vector<string> allowable_starts;
166 BOOST_CHECK_NO_THROW(
COrf::FindOrfs(seq, loc_vec, 60, 11, allowable_starts,
169 for (
auto& loc: loc_vec) {
173 BOOST_CHECK(loc_vec.size() > 0);
182 vector<string> allowable_starts = {
"ATG"};
184 BOOST_CHECK_NO_THROW(
COrf::FindOrfs(seq, loc_vec, 3, 11, allowable_starts,
187 for (
auto& loc: loc_vec) {
191 BOOST_CHECK_EQUAL(count_if(loc_vec.begin(),loc_vec.end(),
193 return !a->IsPartialStop(eExtreme_Biological);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eExtreme_Positional
numerical value
@ eExtreme_Biological
5' and 3'
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
static CNcbiApplication * Instance(void)
Singleton method.
vector< CRef< objects::CSeq_loc > > TLocVec
static CRef< objects::CSeq_annot > MakeCDSAnnot(const TLocVec &orfs, int genetic_code=1, objects::CSeq_id *id=NULL)
/ This version returns an annot full of CDS features.
static void FindOrfs(const string &seq, TLocVec &results, unsigned int min_length_bp=3, int genetic_code=1, const vector< string > &allowable_starts=vector< string >(), bool longest_orfs=true, size_t max_seq_gap=k_default_max_seq_gap)
Find ORFs in both orientations.
bool IsSetGcode(void) const
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
@ eInputFile
Name of file (must exist and be readable)
@ eOutputFile
Name of file (must be writable)
#define MSerial_AsnText
I/O stream manipulators –.
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
const COrg_ref & GetOrg_ref(const CBioseq_Handle &handle)
Return the org-ref associated with a given sequence.
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.
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
const Tdata & Get(void) const
Get the member data.
void SetDesc(TDesc &value)
Assign a value to Desc data member.
const TDesc & GetDesc(void) const
Get the Desc member data.
const TFtable & GetFtable(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
Defines unified interface to application:
CRef< objects::CObjectManager > om
Utility stuff for more convenient using of Boost.Test library.
BOOST_AUTO_TEST_CASE(TestUsingArg)
NCBITEST_INIT_CMDLINE(arg_desc)