;
64 returnseh.GetCompleteSeq_entry();
71 if(feat_tree.Empty())
73feat_tree.
Reset(
newfeature::CFeatTree());
74feat_tree->AddFeatures(
CFeat_CI(scope->GetBioseqHandle(*bioseq)));
82map_locus_to_gene.clear();
83map_protein_to_mrna.clear();
84map_transcript_to_mrna.clear();
85feat_tree.ReleaseOrNull();
92 for(
autopXref : cds.
GetXref()) {
93 if(pXref->IsSetId()) {
94 autopLinkedFeat = FindFeature(pXref->GetId());
96pLinkedFeat->IsSetData() &&
97pLinkedFeat->GetData().IsGene()) {
102 if(pXref->IsSetData() &&
103pXref->GetData().IsGene() &&
104pXref->GetData().GetGene().IsSetLocus_tag()) {
105 autopGene = FeatFromMap(pXref->GetData().GetGene().GetLocus_tag(), map_locus_to_gene);
113 autopGene = FindGeneByLocusTag(cds);
115 CMappedFeatmappedCds(scope->GetSeq_featHandle(cds));
118pGene.Reset(
const_cast<CSeq_feat*
>(&mappedGene.GetOriginalFeature()));
127 if(bioseq->IsSetAnnot()) {
128 for(
autoannot : bioseq->GetAnnot())
130 if(!annot->IsFtable())
continue;
134 if((**feat_it).IsSetIds())
138 if((**id_it).Equals(
id))
144 if((**feat_it).IsSetId() && (**feat_it).GetId().Equals(
id))
155 if(!
key.empty()) {
156 autoit = feat_map.
find(
key);
157 if(it != feat_map.
end()) {
170 const auto& locus_tag = cds.
GetNamedQual(
"locus_tag");
171 returnFeatFromMap(locus_tag, map_locus_to_gene);
178 for(
autopXref : cds.
GetXref()) {
179 if(pXref->IsSetId()) {
180 autopLinkedFeat = FindFeature(pXref->GetId());
182pLinkedFeat->IsSetData() &&
183pLinkedFeat->GetData().IsRna() &&
190 autopMrna = FindMrnaByQual(cds);
192 CMappedFeatmappedCds(scope->GetSeq_featHandle(cds));
195pMrna.Reset(
const_cast<CSeq_feat*
>(&mappedMrna.GetOriginalFeature()));
207 const auto& transcript_id = cds.
GetNamedQual(
"transcript_id");
208 autopMrna = FeatFromMap(transcript_id, map_transcript_to_mrna);
210 const auto& protein_id = cds.
GetNamedQual(
"protein_id");
211pMrna = FeatFromMap(protein_id, map_protein_to_mrna);
220 if(!bioseq->IsSetAnnot()) {
223 for(
autoannot: bioseq->GetAnnot()) {
224 if(!annot->IsFtable()) {
228 for(
autofeat: annot->GetData().GetFtable()) {
229 if(!feat->CanGetData()) {
232 const auto&
data= feat->GetData();
234 boolisgene =
data.IsGene();
236 if(feat->IsSetQual()) {
237 for(
autoqual: feat->GetQual()) {
238 if(!qual->CanGetQual() || !qual->CanGetVal()) {
241 const string& name = qual->GetQual();
242 const string&
value= qual->GetVal();
244 if(name ==
"transcript_id") {
250 if(name ==
"protein_id") {
256 if(name ==
"locus_tag") {
266 if(feat->GetData().GetGene().IsSetLocus_tag()) {
267map_locus_to_gene.insert(
User-defined methods of the data storage class.
User-defined methods of the data storage class.
namespace ncbi::objects::
const string & GetNamedQual(const CTempString &qual_name) const
Return a named qualifier.
const_iterator end() const
container_type::value_type value_type
const_iterator find(const key_type &key) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
CMappedFeat GetBestMrnaForCds(const CMappedFeat &cds_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0)
CMappedFeat GetBestGeneForCds(const CMappedFeat &cds_feat, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0, CFeatTree::EBestGeneType lookup_type=CFeatTree::eBestGene_TreeOnly)
void Reset(void)
Reset reference object.
bool IsSetQual(void) const
qualifiers Check if a value has been assigned to Qual data member.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
bool IsSetXref(void) const
cite other relevant features Check if a value has been assigned to Xref data member.
const TData & GetData(void) const
Get the Data member data.
list< CRef< CFeat_id > > TIds
const TXref & GetXref(void) const
Get the Xref member data.
list< CRef< CSeq_feat > > TFtable
const struct ncbi::grid::netcache::search::fields::KEY key
Magic spell ;-) needed for some weird compilers... very empiric.
const GenericPointer< typename T::ValueType > T2 value
CRef< CSeq_feat > FindGeneByLocusTag(const CSeq_feat &cds) const
CRef< objects::CSeq_feat > ParentGene(const objects::CSeq_feat &cds)
CRef< objects::CSeq_feat > ParentMrna(const objects::CSeq_feat &cds)
CRef< objects::CSeq_feat > FindMrnaByQual(const objects::CSeq_feat &cds) const
CRef< objects::CSeq_feat > FeatFromMap(const string &key, const TFeatMap &) const
CRef< feature::CFeatTree > FeatTree()
CRef< objects::CSeq_feat > FindFeature(const objects::CFeat_id &id)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4