1 #ifndef OBJTOOLS_FORMAT_ITEMS___FLAT_FEATURE__HPP
2 #define OBJTOOLS_FORMAT_ITEMS___FLAT_FEATURE__HPP
88 : m_Key(
key), m_Loc(&loc), m_Feat(feat) { }
90 typedef vector<CRef<CFormatQual> >
TQuals;
92 const string&
GetKey (
void)
const {
return m_Key; }
120 return m_Feat < f2.
m_Feat;
136 bool suppressAccession =
false);
167 EMapped mapped = eMapped_not_mapped,
168 bool suppressAccession =
false,
174 string GetKey(
void)
const override;
179 bool IsMapped (
void)
const {
return m_Mapped != eMapped_not_mapped; }
194 void x_AddQualDbXref(
196 void x_AddQualCitation();
224 void x_AddQualProtDesc(
const CProt_ref* );
225 void x_AddQualProtActivity(
const CProt_ref* );
261 void x_AddRptUnitQual(
const string& rpt_unit);
262 void x_AddRptTypeQual(
const string& rpt_type,
bool check_qual_syntax);
263 void x_AddRegulatoryClassQual(
const string& regulatory_class,
bool check_qual_syntax);
264 void x_AddRecombinationClassQual(
const string& recombination_class,
bool check_qual_syntax);
275 static string x_SeqIdWriteForTable(
const CBioseq& seq,
bool suppress_local,
bool giOK);
278 void x_AddFTableProtQuals(
const CProt_ref& prot_ref);
285 void x_AddFTableBiosrcQuals(
const CBioSource& src);
288 const string kProteinId =
"protein_id";
289 const string kTranscriptId =
"transcript_id";
294 }
else if (
NStr::Equal(name,
"orig_transcript_id")) {
295 return kTranscriptId;
314 m_Quals.AddQual(slot,
value);
317 m_Quals.RemoveQuals(slot);
320 return m_Quals.HasQual(slot);
326 return const_cast<const TQuals&
>(m_Quals).LowerBound(slot);
328 void x_DropIllegalQuals(
void)
const;
333 bool x_HasMethodtRNAscanSE(
void)
const;
362 if ( ! gene_ref || ! gene_ref->
CanGetDb() ) {
412 bool WasDesc(
void)
const {
return m_WasDesc; }
414 return m_Feat.GetData().GetBiosrc();
416 string GetKey(
void)
const override {
return "source"; }
418 bool IsFocus (
void)
const {
return m_IsFocus; }
440 m_Quals.AddQual(slot,
value);
CRef< feature::CFeatTree > m_Feat_Tree
bool operator<(const CFeatureItemBase &f2) const
virtual void x_AddQuals(CBioseqContext &ctx)=0
virtual string GetKey(void) const
const CMappedFeat & GetFeat(void) const
const CSeq_loc & GetLoc(void) const
bool IsSuppressAccession(void) const
virtual void x_FormatQuals(CFlatFeature &ff) const =0
CConstRef< CSeq_loc > m_Loc
void Format(IFormatter &formatter, IFlatTextOStream &text_os) const
void x_AddQual(EFeatureQualifier slot, const IFlatQVal *value)
bool IsMappedFromProt(void) const
void x_AddQualDb(const CGene_ref *)
void x_AddQualsExt(const CUser_field &field, const CSeq_feat::TExt &ext)
vector< CRef< CFormatQual > > TQualVec
void x_AddFTableQual(const string &name, const string &val=kEmptyStr, CFormatQual::ETrim trim=CFormatQual::eTrim_Normal)
CConstRef< CGene_ref > m_GeneRef
bool IsMappedFromGenomic(void) const
void x_RemoveQuals(EFeatureQualifier slot) const
TQuals::const_iterator TQCI
IFlatQVal::TFlags TQualFlags
void x_AddQualsGb(CBioseqContext &)
CQualContainer< EFeatureQualifier > TQuals
void x_AddQuals(CBioseqContext &ctx) override
void x_AddQualsIdx(CBioseqContext &ctx)
const string & x_GetFtableNameAlias(const string &name)
void x_AddQuals(const CProt_ref &prot)
CSeqFeatData::ESubtype m_Type
void x_ImportQuals(CBioseqContext &ctx)
bool IsMappedFromCDNA(void) const
void x_AddQualsRecombinationClass(CBioseqContext &ctx, CSeqFeatData::ESubtype subtype)
TQCI x_GetQual(EFeatureQualifier slot) const
bool IsMapped(void) const
bool x_HasQual(EFeatureQualifier slot) const
const CFlatSeqLoc & GetLoc(void) const
const TQuals & GetQuals(void) const
vector< CRef< CFormatQual > > TQuals
const CMappedFeat & GetFeat(void) const
CFlatFeature(const string &key, const CFlatSeqLoc &loc, const CMappedFeat &feat)
const string & GetKey(void) const
CConstRef< CFlatSeqLoc > m_Loc
void x_SetObject(const CSerialObject &obj)
virtual void Format(IFormatter &formatter, IFlatTextOStream &text_os) const =0
virtual void x_GatherInfo(CBioseqContext &)
TQualMMap::iterator iterator
TQualMMap::const_iterator const_iterator
EQualifier
List of available qualifiers for feature keys.
namespace ncbi::objects::
Base class for all serializable objects.
const CBioSource & GetSource(void) const
TQuals::const_iterator TQCI
void x_AddQual(ESourceQualifier slot, const IFlatQVal *value) const
bool IsSynthetic(void) const
CQualContainer< ESourceQualifier > TQuals
void SetObject(const CSerialObject &obj)
IFlatQVal::TFlags TQualFlags
string GetKey(void) const override
void x_FormatNoteQual(ESourceQualifier slot, const char *name, CFlatFeature::TQuals &qvec, TQualFlags flags=0) const
CRef< feature::CFeatTree > m_Feat_Tree
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
virtual EItem GetItemType(void) const =0
Include a standard set of the NCBI C++ Toolkit most basic headers.
const CPub_set & GetCit(void) const
const CUser_object & GetExt(void) const
bool IsSetQual(void) const
bool IsSetExt(void) const
bool IsSetCit(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#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 Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
#define NCBI_FORMAT_EXPORT
bool CanGetDb(void) const
Check if it is safe to call GetDb method.
const TDb & GetDb(void) const
Get the Db member data.
vector< CRef< CDbtag > > TDbxref
EPsec_str
protein secondary structure
range(_Ty, _Ty) -> range< _Ty >
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.