52 #define BUMP( x, y ) if ( x < (y) ) x = (y)
59 m_strChromStart(
"." ),
64 m_strThickStart(
"." ),
67 m_strBlockCount(
"." ),
68 m_strBlockSizes(
"." ),
69 m_strBlockStarts(
"." )
90 const auto& xrefs = mf.
GetXref();
91 for (
auto it = xrefs.begin(); it != xrefs.end(); ++it) {
92 const auto& xref = **it;
93 if (xref.CanGetData() && xref.GetData().IsGene()) {
94 return xref.GetData().GetGene();
118 [](
char c) ->
char { return std::isspace(c) ?
'_' : c; });
122 if (geneRef.IsSetLocus()) {
126 if (geneRef.IsSetLocus_tag()) {
135 if (geneRef.IsSetDesc()) {
138 if (geneRef.IsSetSyn()) {
159 const vector< CRef< CUser_field > >& fields = uo.
GetData();
160 vector< CRef< CUser_field > >::const_iterator it = fields.begin();
161 for ( ; it != fields.end(); ++it ) {
162 if ( ! (*it)->CanGetLabel() || ! (*it)->GetLabel().IsStr() ) {
165 string strLabel = (*it)->GetLabel().GetStr();
166 if ( strLabel ==
"name" ) {
168 if ( (*it)->IsSetData() && (*it)->GetData().IsStr() ) {
173 if ( strLabel ==
"score" && ! bUseScore ) {
175 if ( (*it)->IsSetData() && (*it)->GetData().IsInt() ) {
180 if ( strLabel ==
"greylevel" && bUseScore ) {
182 if ( (*it)->IsSetData() && (*it)->GetData().IsInt() ) {
187 if ( strLabel ==
"thickStart" ) {
189 if ( (*it)->IsSetData() && (*it)->GetData().IsInt() ) {
194 if ( strLabel ==
"thickEnd" ) {
196 if ( (*it)->IsSetData() && (*it)->GetData().IsInt() ) {
201 if ( strLabel ==
"itemRGB" ) {
203 if ( (*it)->IsSetData() && (*it)->GetData().IsInt() ) {
207 if ( (*it)->IsSetData() && (*it)->GetData().IsStr() ) {
213 if ( strLabel ==
"blockCount" ) {
215 if ( (*it)->IsSetData() && (*it)->GetData().IsInt() ) {
220 if ( strLabel ==
"blockSizes" ) {
222 if ( (*it)->IsSetData() && (*it)->GetData().IsStr() ) {
227 if ( strLabel ==
"blockStarts" ) {
229 if ( (*it)->IsSetData() && (*it)->GetData().IsStr() ) {
275 unsigned int columnCount)
281 if ( columnCount >= 4 ) {
282 ostr <<
"\t" <<
Name();
284 if ( columnCount >= 5 ) {
285 ostr <<
"\t" <<
Score();
287 if ( columnCount >= 6 ) {
290 if ( columnCount >= 7 ) {
293 if ( columnCount >= 8 ) {
296 if ( columnCount >= 9 ) {
299 if ( columnCount >= 10 ) {
302 if ( columnCount >= 11 ) {
305 if ( columnCount >= 12 ) {
359 if (
data.IsRegion()) {
406 if (
blocks.IsPacked_int()) {
407 const list<CRef<CSeq_interval> >& intervals =
blocks.GetPacked_int().Get();
410 list<string> blockStarts;
411 list<string> blockSizes;
413 for (
auto pInterval: intervals) {
458 if (
color ==
"0 0 0") {
@ eExtreme_Positional
numerical value
const CGene_ref & sGetClosestGeneRef(const CMappedFeat &mf)
void transform(Container &c, UnaryFunction *op)
bool AssignName(const CMappedFeat &)
bool SetThick(const CSeq_loc &)
const string & BlockCount() const
bool SetLocation(const CSeq_loc &)
const string & Chrom() const
bool SetBlocks(const CSeq_loc &, const CSeq_loc &)
const string & ChromEnd() const
bool SetName(const CSeqFeatData &)
const string & ItemRgb() const
const string & ChromStart() const
bool Write(CNcbiOstream &, unsigned int)
const string & Strand() const
bool AssignLocation(CScope &, const CSeq_interval &)
bool AssignDisplayData(const CMappedFeat &, bool)
const string & BlockStarts() const
const string & BlockSizes() const
bool SetRgb(const string &)
const string & ThickEnd() const
const string & Name() const
const string & Score() const
const string & ThickStart() const
bool SetNoThick(const CSeq_loc &)
static CGenbankIdResolve & Get()
bool GetBestId(CSeq_id_Handle, CScope &, string &)
TSeqPos GetLength(void) const
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
CMappedFeat GetBestGeneForFeat(const CMappedFeat &feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0, CFeatTree::EBestGeneType lookup_type=CFeatTree::eBestGene_TreeOnly)
const CSeq_feat::TXref & GetXref(void) const
const CSeqFeatData & GetData(void) const
bool IsSetXref(void) const
bool IsSetData(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
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.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)
Convert UInt to string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetType(void) const
type of object within class Check if a value has been assigned to Type data member.
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TType & GetType(void) const
Get the Type member data.
bool IsUser(void) const
Check if variant User is selected.
const TRegion & GetRegion(void) const
Get the variant data.
bool IsGene(void) const
Check if variant Gene is selected.
const TUser & GetUser(void) const
Get the variant data.
const TGene & GetGene(void) const
Get the variant data.
bool IsRegion(void) const
Check if variant Region is selected.
ENa_strand
strand of nucleic acid
const TId & GetId(void) const
Get the Id member data.
const TPnt & GetPnt(void) const
Get the variant data.
TPoint GetPoint(void) const
Get the Point member data.
TFrom GetFrom(void) const
Get the From member data.
TStrand GetStrand(void) const
Get the Strand member data.
bool IsSetTo(void) const
Check if a value has been assigned to To data member.
bool CanGetId(void) const
Check if it is safe to call GetId method.
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
TStrand GetStrand(void) const
Get the Strand member data.
TTo GetTo(void) const
Get the To member data.
bool IsSetFrom(void) const
Check if a value has been assigned to From data member.
bool IsInt(void) const
Check if variant Int is selected.
const TInt & GetInt(void) const
Get the variant data.
bool IsPnt(void) const
Check if variant Pnt is selected.
CConstRef< CSeq_id > GetBestId(const CBioseq &bioseq)
static DP_BlockInfo * blocks