* BadWords[] = {
"putative",
"fragment",
"gene",
"orf",
"like"};
58 for(
size_t i= 0;
i< s.size() &&
n< 4;
i++) {
68 if(feat.IsSetData() && feat.GetData().IsGene() && feat.GetData().GetGene().CanGetLocus()) {
69 stringlocus = feat.GetData().GetGene().GetLocus();
72m_Objs[word.empty() ?
"[n] gene[s] contain[S] suspect phrase or characters":
"[n] gene[s] contain[S] [(]"+ word].Add(*
context.SeqFeatObjRef(feat, &feat));
87new_feat->
SetData().SetGene().ResetLocus();
88 context.ReplaceSeq_feat(*obj, *sf, *new_feat);
103 if(feat.IsSetData() && feat.GetData().IsGene() && feat.GetData().GetGene().CanGetLocus()) {
104 stringlocus = feat.GetData().GetGene().GetLocus();
106m_Objs[
"[n] bacterial gene[s] [does] not start with lowercase letter"].Add(*
context.SeqFeatObjRef(feat, &feat));
121new_feat->
SetData().SetGene().ResetLocus();
122 context.ReplaceSeq_feat(*obj, *sf, *new_feat);
133 if(feat.IsSetData() && feat.GetData().IsProt() && feat.GetData().GetProt().CanGetName() && feat.GetData().GetProt().CanGetEc() && !feat.GetData().GetProt().GetEc().empty()) {
134 constlist <string>&
names= feat.GetData().GetProt().GetName();
135 if(!
names.empty()) {
139 if(
str==
"hypothetical protein"||
str==
"unknown protein") {
140m_Objs[
"[n] protein feature[s] [has] an EC number and a protein name of 'unknown protein' or 'hypothetical protein'"].Add(*
context.SeqFeatObjRef(feat, &feat)).Fatal();
153new_feat->
SetData().SetProt().ResetEc();
154 context.ReplaceSeq_feat(*obj, *sf, *new_feat);
165 if(feat.IsSetData() && feat.GetData().IsCdregion() && feat.CanGetProduct()) {
173 if(
prot.CanGetName()) {
176m_Objs[
"[n] hypothetical coding region[s] [has] a gene name"].Fatal().Add(*
context.SeqFeatObjRef(feat, gene));
193new_feat->
SetData().SetGene().ResetLocus();
194 context.ReplaceSeq_feat(*obj, *sf, *new_feat,
true);
203 const string kDuplicateAdjacent=
"[n] gene[s] [is] adjacent to another gene with the same locus tag.";
208 const auto& genes =
context.FeatGenes();
209 stringlast_locus_tag;
212 if(gene->GetData().GetGene().IsSetLocus_tag()) {
214 const string& this_locus_tag = gene->GetData().GetGene().GetLocus_tag();
215m_Objs[
kEmptyStr][this_locus_tag].Add(*this_disc_obj).Fatal();
216 if(last_disc_obj && last_locus_tag == this_locus_tag) {
220last_locus_tag = this_locus_tag;
221last_disc_obj = this_disc_obj;
232 for(
auto& it : m_Objs[
kEmptyStr].GetMap()) {
233 if(it.second->GetObjects().size() > 1) {
235 for(
auto& obj : it.second->GetObjects()) {
bool IsSetLineage(void) const
namespace ncbi::objects::
#define DISCREPANCY_AUTOFIX(name)
#define DISCREPANCY_CASE(name, type, group, descr)
#define DISCREPANCY_SUMMARIZE(name)
static const struct name_t names[]
static const char * str(char *buf, int n)
static bool HasBadWord(const string &s, string &word)
const string kDuplicateAdjacent
const string kDuplicateLocusTagsTop
static bool Has4Numbers(const string &s)
const string kDuplicateLocusTagsStart
constexpr size_t ArraySize(const Element(&)[Size])
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
CBioseq_Handle GetBioseqFromSeqLoc(const CSeq_loc &loc, CScope &scope, CScope::EGetBioseqFlag flag=CScope::eGetBioseq_Loaded)
Retrieve the Bioseq Handle from a location.
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
#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 SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static string & ToLower(string &str)
Convert string to lower case â string& version.
static const char label[]
bool CanGetLocus(void) const
Check if it is safe to call GetLocus method.
bool IsSetLocus(void) const
Official gene symbol Check if a value has been assigned to Locus data member.
const TLocus & GetLocus(void) const
Get the Locus member data.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
bool IsGene(void) const
Check if variant Gene is selected.
const TData & GetData(void) const
Get the Data member data.
void SetData(TData &value)
Assign a value to Data data member.
const TGene & GetGene(void) const
Get the variant data.
const TProt & GetProt(void) const
Get the variant data.
const TSource & GetSource(void) const
Get the variant data.
void AddComment(CSeq_feat &feat, const string &comment)
static CS_CONTEXT * context
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