57 CRef<CScope> scope = m_DataIter->GetScopedObject().scope;
63 m_Result->SetBool(
match);
91 unsigned num_minus = 0, num_plus = 0;
93 for ( ; feat; ++feat) {
113 switch (strandedness) {
115 if (num_minus > 0 && num_plus == 0)
return true;
117 if (num_plus > 0 && num_minus == 0)
return true;
119 if (num_minus > 0)
return true;
121 if (num_plus > 0)
return true;
123 if (num_minus == 0)
return true;
125 if (num_plus == 0)
return true;
126 default:
return false;
133 return (
m_Args.size() == 1
135 && !
m_Args[0]->GetString().empty());
174 if (feat_it->IsSetProduct()) {
static E_Choice GetTypeFromSubtype(ESubtype subtype)
@ eSubtype_bad
These no longer need to match the FEATDEF values in the C toolkit's objfdef.h.
objects::CSeqFeatData::ESubtype GetFeatSubtype(const string &feat_type)
objects::EFeature_strandedness_constraint x_GetStrandednessFromName(const string &strand_name)
static int s_GetFeatTypeCount(const objects::CBioseq_Handle &bsh, const string &feat_type)
returns the number of features of type feat_type present on the bioseq
virtual void TheFunction()
Function implementation.
CRef< CMQueryNodeValue > m_Result
bool x_Match(const objects::CBioseq_Handle &bsh, objects::EFeature_strandedness_constraint strandedness)
CIRef< IMacroBioDataIter > m_DataIter
virtual bool x_ValidArguments() const
Tests the number and the type of function arguments.
DEFINE_MACRO_FUNCNAME(CMacroFunction_NumberOfFeatures, "FEATS_ON_SEQ")
class CMacroFunction_NumberOfFeatures FEATS_ON_SEQ(feature_type | "all") - returns the number of feat...
virtual bool x_ValidArguments() const
Tests the number and the type of function arguments.
static const TObjectType * SafeCast(TTypeInfo type)
ENa_strand GetStrand(void) const
Get the location's strand.
TObjectPtr GetObjectPtr(void) const
Get pointer to object.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CScope & GetScope(void) const
Get scope this handle belongs to.
const CSeq_loc & GetLocation(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define USING_SCOPE(ns)
Use the specified namespace.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
EFeature_strandedness_constraint
Access to EFeature_strandedness_constraint's attributes (values, names) as defined in spec.
@ eFeature_strandedness_constraint_no_plus
@ eFeature_strandedness_constraint_at_least_one_minus
@ eFeature_strandedness_constraint_at_least_one_plus
@ eFeature_strandedness_constraint_minus_only
@ eFeature_strandedness_constraint_any
@ eFeature_strandedness_constraint_no_minus
@ eFeature_strandedness_constraint_plus_only
static int match(register const pcre_uchar *eptr, register const pcre_uchar *ecode, const pcre_uchar *mstart, int offset_top, match_data *md, eptrblock *eptrb, unsigned int rdepth)