71 bool assigned =
false;
72 if (threeFeatType ==
"chrom") {
77 if (threeFeatType ==
"thick") {
82 if (threeFeatType ==
"block") {
96 if (!pXref->IsSetId() || !pXref->GetId().IsLocal() ||
97 !pXref->GetId().GetLocal().IsId()) {
100 int featId = pXref->GetId().GetLocal().GetId();
123 if (!bedRecord.SetLocation(mpChrom->GetLocation())) {
126 if (!bedRecord.SetName(mpChrom->GetData())) {
133 if (!bedRecord.SetScore(score)) {
137 if (!bedRecord.SetThick(mpThick->GetLocation())) {
142 if (!bedRecord.SetNoThick(mpChrom->GetLocation())) {
148 if (!bedRecord.SetRgb(
color)) {
153 if (!bedRecord.SetBlocks(
154 mpChrom->GetLocation(), mpBlocks->GetLocation())) {
169 vector<int>::iterator it = std::find(
184 vector<int>::iterator it = std::find(
203 return it->AddFeature(feature);
216 return (it->IsRecordComplete());
230 if (!it->GetBedFeature(bedRecord)) {
247 if (!it->GetBedFeature(bedRecord)) {
266 vector<int>::iterator iit = std::find(
267 it->mFeatsAll.begin(), it->mFeatsAll.end(), featId);
268 if (iit != it->mFeatsAll.end()) {
285 mRecords.push_back(threeFeatRecord);
293 unsigned int colCount,
294 unsigned int uFlags ) :
337 if ( ! track.
Assign(annot) ) {
351 const string& strAssemblyName,
352 const string& strAssemblyAccession )
358 for (
CAnnot_CI aci(seh, sel); aci; ++aci) {
360 if (track.
Assign(*sah.GetCompleteSeq_annot()) ) {
381 feature::CFeatTree featTree(pMf);
382 vector<CMappedFeat> vRoots = featTree.GetRootFeatures();
384 for (
auto pit = vRoots.begin(); pit != vRoots.end(); ++pit) {
386 if (isThreeFeatData) {
403 feature::CFeatTree& featTree,
413 "Processing terminated by user");
434 feature::CFeatTree& featTree,
438 vector<CMappedFeat> vChildren;
439 featTree.GetChildrenTo(mf, vChildren);
440 for (
auto cit = vChildren.begin(); cit != vChildren.end(); ++cit) {
455 feature::CFeatTree& featTree,
478 const list<CRef<CSeq_interval> >& sublocs = pPackedInt->
GetPacked_int().
Get();
479 list<CRef<CSeq_interval> >::const_iterator it;
480 for (it = sublocs.begin(); it != sublocs.end(); ++it) {
491 feature::CFeatTree& featTree,
495 vector<CMappedFeat> vChildren;
496 featTree.GetChildrenTo(mf, vChildren);
497 for (
auto cit = vChildren.begin(); cit != vChildren.end(); ++cit) {
static CRef< CScope > m_Scope
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Encapsulation of the BED feature record.
bool AssignName(const CMappedFeat &)
bool Write(CNcbiOstream &, unsigned int)
bool AssignLocation(CScope &, const CSeq_interval &)
bool AssignDisplayData(const CMappedFeat &, bool)
Encapsulation of a track line in the BED file format.
bool Assign(const CSeq_annot &)
bool Write(CNcbiOstream &)
CBedWriter(CScope &scope, CNcbiOstream &ostr, unsigned int colCount=12, unsigned int flags=fNormal)
Constructor.
bool xWriteChildrenThreeFeatData(CThreeFeatManager &, feature::CFeatTree &, const CMappedFeat &)
bool xWriteFeaturesThreeFeatData(CThreeFeatManager &, feature::CFeatTree &, const CMappedFeat &)
bool xWriteFeaturesTracked(const CBedTrackRecord &, feature::CFeatTree &, const CMappedFeat &)
bool WriteAnnot(const CSeq_annot &, const string &="", const string &="") override
Write a raw Seq-annot to the internal output stream.
bool xWriteTrackedAnnot(const CBedTrackRecord &, const CSeq_annot_Handle &)
bool xWriteChildrenTracked(const CBedTrackRecord &, feature::CFeatTree &, const CMappedFeat &)
bool WriteSeqEntryHandle(CSeq_entry_Handle seh, const string &asmblyName="", const string &asmblyAccession="") override
Write a Seq-entry handle to the internal output stream.
namespace ncbi::objects::
bool ProcessRecord(const CSeq_feat &, CBedFeatureRecord &)
RECORD_IT xAddRecord(const CSeq_feat &)
RECORD_IT xFindExistingRecord(const CSeq_feat &)
RECORDS::iterator RECORD_IT
bool AddFeature(const CSeq_feat &)
bool GetAnyRecord(CBedFeatureRecord &)
bool IsRecordComplete(const CSeq_feat &)
bool AddFeature(const CSeq_feat &)
bool GetBedFeature(CBedFeatureRecord &) const
bool IsRecordComplete() const
CRef< CSeq_feat > mpChrom
CRef< CSeq_feat > mpThick
CRef< CSeq_feat > mpBlocks
vector< int > mFeatsFound
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
bool HasField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Verify that a named field exists.
static void ChangeToPackedInt(CSeq_loc &loc)
static bool CompareFeatures(const CMappedFeat &lhs, const CMappedFeat &rhs)
static bool GetThreeFeatType(const CSeq_feat &, string &)
static bool GetThreeFeatRgb(const CSeq_feat &, string &)
static bool IsThreeFeatFormat(const CSeq_annot &)
static bool GetThreeFeatScore(const CSeq_feat &, int &)
Defines and provides stubs for a general interface to a variety of file formatters.
virtual SAnnotSelector & SetAnnotSelector(void)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void Add(const CSeq_loc &other)
Simple adding of seq-locs.
void RemoveSeq_annot(const CSeq_annot_Handle &annot)
Revoke Seq-annot previously added using AddSeq_annot().
CSeq_annot_Handle AddSeq_annot(CSeq_annot &annot, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add Seq-annot, return its CSeq_annot_Handle.
CConstRef< CSeq_annot > GetSeq_annotCore(void) const
const CSeq_loc & GetLocation(void) const
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
bool IsId(void) const
Check if variant Id is selected.
const TData & GetData(void) const
Get the Data member data.
bool CanGetData(void) const
Check if it is safe to call GetData method.
bool IsInt(void) const
Check if variant Int is selected.
TInt GetInt(void) const
Get the variant data.
TId GetId(void) const
Get the variant data.
const TId & GetId(void) const
Get the Id member data.
const TLocal & GetLocal(void) const
Get the variant data.
bool IsSetXref(void) const
cite other relevant features Check if a value has been assigned to Xref data member.
bool IsLocal(void) const
Check if variant Local is selected.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
const TXref & GetXref(void) const
Get the Xref member data.
const Tdata & Get(void) const
Get the member data.
bool IsPacked_int(void) const
Check if variant Packed_int is selected.
bool CanGet(void) const
Check if it is safe to call Get method.
const TPacked_int & GetPacked_int(void) const
Get the variant data.
const Tdata & Get(void) const
Get the member data.
const TUser & GetUser(void) const
Get the variant data.
const TDesc & GetDesc(void) const
Get the Desc member data.
bool CanGetDesc(void) const
Check if it is safe to call GetDesc method.
bool IsUser(void) const
Check if variant User is selected.
list< CRef< CAnnotdesc > > Tdata
constexpr auto sort(_Init &&init)