void CMacroFunction_TaxLookup::TheFunction()
80 if(m_DataIter->IsHugeDataMode()) {
81 boolrmv_ncbicleanup_userobj = !(m_DataIter->TopLevelObject());
82 auto& remote_updater = m_DataIter->RemoteUpdater();
84 autoupdate_fnc = remote_updater->GetUpdateFunc();
85cleanup_tax_cmd =
CleanupHugeFileCommand(m_DataIter->GetSEH(),
true,
true, update_fnc, rmv_ncbicleanup_userobj);
89cleanup_tax_cmd =
CleanupCommand(m_DataIter->GetSEH(),
true,
true);
91 if(cleanup_tax_cmd) {
92m_DataIter->RunCommand(cleanup_tax_cmd, m_CmdComposite);
94 log<<
"Performed TaxLookup and corrected genetic codes";
99 boolCMacroFunction_TaxLookup::x_ValidArguments()
const 101 return(m_Args.empty());
119s_SpellingFixes(*entry,
log);
122 if(m_DataIter->IsSetSeqSubmit() && m_DataIter->GetSeqSubmit().IsSetSub()){
123 const CSubmit_block& submit_block = m_DataIter->GetSeqSubmit().GetSub();
125edited_subblock->
Assign(submit_block);
128s_SpellingFixes(*edited_subblock, log_sblock);
135 cmd->AddCommand(*chg_subblock);
136m_DataIter->RunCommand(
cmd, m_CmdComposite);
137 log<< log_sblock.str();
142m_DataIter->SetModified();
143x_LogFunction(
log);
149 return(
m_Args.empty());
153{
"\\bAgricultrual\\b",
"Agricultural"},
154{
"\\bAgricultureal\\b",
"Agricultural"},
155{
"\\bAgricultrure\\b",
"Agriculture"},
156{
"\\bbioremidiation\\b",
"bioremediation"},
157{
"\\bColledge\\b",
"College"},
158{
"\\bInsitiute\\b",
"Institute"},
159{
"\\bInstutite\\b",
"Institute"},
160{
"\\binstute\\b",
"Institute"},
161{
"\\binstitue\\b",
"Institute"},
162{
"\\binsitute\\b",
"Institute"},
163{
"\\binsititute\\b",
"Institute"},
164{
"\\bInstiute\\b",
"Institute"},
165{
"\\bhpothetical\\b",
"hypothetical"},
166{
"\\bhyphotetical\\b",
"hypothetical"},
167{
"\\bhyphotheical\\b",
"hypothetical"},
168{
"\\bhypotehtical\\b",
"hypothetical"},
169{
"\\bhypotethical\\b",
"hypothetical"},
170{
"\\bhypotetical\\b",
"hypothetical"},
171{
"\\bhypotheical\\b",
"hypothetical"},
172{
"\\bhypotheitcal\\b",
"hypothetical"},
173{
"\\bhypothetcial\\b",
"hypothetical"},
174{
"\\bhypothetica\\b",
"hypothetical"},
175{
"\\bhypothteical\\b",
"hypothetical"},
176{
"\\bhypothtical\\b",
"hypothetical"},
177{
"\\bhypthetical\\b",
"hypothetical"},
178{
"\\bhyptothetical\\b",
"hypothetical"},
179{
"\\bidendification\\b",
"identification"},
180{
"\\bprotien\\b",
"protein"},
181{
"\\bpuatative\\b",
"putative"},
182{
"\\bpuative\\b",
"putative"},
183{
"\\bpuative\\b",
"putative"},
184{
"\\bputaitive\\b",
"putative"},
185{
"\\bputaitve\\b",
"putative"},
186{
"\\bputaive\\b",
"putative"},
187{
"\\bputataive\\b",
"putative"},
188{
"\\bputatitve\\b",
"putative"},
189{
"\\bputitive\\b",
"putative"},
190{
"\\breseach\\b",
"research"},
191{
"\\bsequene\\b",
"sequence"},
192{
"\\buniveristy\\b",
"University"},
193{
"\\buniverisity\\b",
"University"},
194{
"\\bunivercity\\b",
"University"},
195{
"\\buiniversity\\b",
"University"},
196{
"\\buinversity\\b",
"University"},
197{
"\\bunivesity\\b",
"University"},
198{
"\\buviversity\\b",
"University"},
199{
"\\buniverstiy\\b",
"University"},
200{
"\\bunvierstity\\b",
"University"},
201{
"\\buniviersity\\b",
"University"},
202{
"\\buniverstity\\b",
"University"},
203{
"\\bUnversity\\b",
"University"},
204{
"\\bUnivresity\\b",
"University"},
219oss <<
"Replaced "<< search.substr(2, search.length() - 4) <<
" with "<<
macro_spell_fixes[pat].second << endl;
242m_QualsChangedCount = s_RemoveSingleItemSet(seh);
243 if(m_QualsChangedCount) {
244m_DataIter->SetModified();
246 log<<
"Removed "<< m_QualsChangedCount <<
" wrapper set";
247x_LogFunction(
log);
289 if(!direct_child_ci) {
294 if(direct_child_ci) {
301 for(; annot_ci; ++annot_ci) {
313 return(
m_Args.empty());
334m_QualsChangedCount = 0;
335s_RenormalizeNucProtSets(seh, m_QualsChangedCount);
337 if(m_QualsChangedCount) {
338m_DataIter->SetModified();
340 log<<
"Renormalized "<< m_QualsChangedCount <<
" sets";
341x_LogFunction(
log);
380 return(
m_Args.empty());
390void CMacroFunction_DiscrepancyAutofix::TheFunction()
399 if(m_DataIter->IsHugeDataMode()) {
404m_DataIter->RunCommand(autofix_cmd, m_CmdComposite);
406x_LogChangedQuals(fnc_log);
413m_DataIter->RunCommand(autofix_cmd, m_CmdComposite);
421 boolCMacroFunction_DiscrepancyAutofix::x_ValidArguments()
const 438 if(!entry && !(bseq && bseq->
IsNa())) {
447 stringfeat_list = m_Args[0]->GetString();
449m_Descr.append(feat_list +
", ");
453 stringmisc_feat = m_Args[1]->GetString();
455m_Descr.append(
"use misc_feat with comments "+ misc_feat);
457x_AddModifiersToOptions(options);
459autodef_cmd = s_AutodefSeqEntryNoTitle(m_DataIter->GetSEH(), options);
468 if(!m_DataIter->HasBeenCompleted()) {
471 stringfeat_list = m_Args[0]->GetString();
473m_Descr.append(feat_list +
", ");
477 stringmisc_feat = m_Args[1]->GetString();
479m_Descr.append(
"use misc_feat with comments "+ misc_feat);
481x_AddModifiersToOptions(options);
483seq_iter->SetAutodefOptions() = options;
484m_DataIter->SetCompleted();
487options = seq_iter->GetAutodefOptions();
490autodef_cmd = s_AutodefSequenceNoTitle(m_DataIter->GetSEH(), m_DataIter->GetBioseqHandle(), options);
494m_DataIter->RunCommand(autodef_cmd, m_CmdComposite);
496 log<< x_GetDescription();
497x_LogFunction(
log);
506mod_combo->InitFromOptions(options);
507mod_combo->SetUseModifierLabels(
true);
508mod_combo->SetKeepParen(
true);
509mod_combo->SetMaxModifiers(0);
522 for(
CBioseq_CIb_iter(seh); b_iter; ++b_iter) {
539 if(
si->IsSet() &&
si->GetSet().GetCompleteBioseq_set()->NeedsDocsumTitle()) {
554mod_combo->InitFromOptions(options);
555mod_combo->SetUseModifierLabels(
true);
556mod_combo->SetKeepParen(
true);
557mod_combo->SetMaxModifiers(0);
569 cmd->AddCommand(*delcmd);
585opts_desc->
SetUser(*autodef_opts);
586 boolhas_autodef_opts =
false;
589has_autodef_opts =
true;
596 if(!has_autodef_opts) {
607 for(
const auto& it :
m_Args) {
608 if(!it->IsString()) {
617 for(
size_tindex = 2; index <
m_Args.size(); ++index) {
618 const string& mod_name =
m_Args[index]->GetString();
622 m_Descr.append(
", with "+ mod_name);
629 m_Descr.append(
", with "+ mod_name);
639 if(
m_Args.size() < 3) {
648src_combo->GetAvailableModifiers(modifiers);
650 for(
size_t n= 0;
n< modifiers.size();
n++) {
652 if(modifiers[
n].IsOrgMod()) {
653opts.
AddOrgMod(modifiers[
n].GetOrgModType());
664 return "Performed Autodef "+
m_Descr;
683s_ConfigureAutodefOptionsForID(modifiers, m_DataIter->GetSEH());
689 for(
size_t n= 0;
n< modifiers.size();
n++) {
690 if(modifiers[
n].IsRequested()) {
691 if(modifiers[
n].IsOrgMod()) {
692opts.
AddOrgMod(modifiers[
n].GetOrgModType());
702m_DataIter->RunCommand(autodef_cmd, m_CmdComposite);
704 log<<
"Autodef_id sequences";
705x_LogFunction(
log);
711 return(
m_Args.empty());
717 for(
size_t n= 0;
n< modifiers.size();
n++) {
718 if(modifiers[
n].IsOrgMod() && is_org_mod) {
719 if(modifiers[
n].GetOrgModType() == subtype) {
720 if(modifiers[
n].AllPresent()) {
723 else if(modifiers[
n].AnyPresent() && !require_all) {
727modifiers[
n].SetRequested(
true);
732 else if(!modifiers[
n].IsOrgMod() && !is_org_mod) {
733 if(modifiers[
n].GetSubSourceType() == subtype) {
734 if(modifiers[
n].AllPresent()) {
737 else if(modifiers[
n].AnyPresent() && !require_all) {
741modifiers[
n].SetRequested(
true);
752vector<string> clause_list;
755clause_list.push_back(clause);
757 if(clause_list.size() < 2) {
760 sort(clause_list.begin(), clause_list.end());
762vector<string>::iterator it = clause_list.begin();
765 while(it != clause_list.end()) {
786src_combo->GetAvailableModifiers(modifiers);
798 static boolis_orgmod[] = {
true,
false,
true,
false,
true,
true,
true,
true,
true,
true};
799 static intnum_subtypes =
sizeof(subtypes) /
sizeof(
int);
803 for(
int i= 0;
i< num_subtypes && !found;
i++) {
808 for(
int i= 0;
i< num_subtypes && !found;
i++) {
814 for(
size_t n= 0;
n< modifiers.size();
n++) {
815 if(modifiers[
n].AnyPresent()) {
816 if(modifiers[
n].IsOrgMod()) {
817 if(src_combo->HasOrgMod(modifiers[
n].GetOrgModType())) {
818modifiers[
n].SetRequested(
true);
821 else if(src_combo->HasSubSource(modifiers[
n].GetSubSourceType())) {
822modifiers[
n].SetRequested(
true);
856m_DataIter->RunCommand(refresh_cmd, m_CmdComposite);
858 log<<
"Refreshed deflines";
859x_LogFunction(
log);
866 for(
CBioseq_CIb_iter(se, objects::CSeq_inst::eMol_na); b_iter; ++b_iter) {
878 stringdefline = autodef.
GetOneDefLine(&mod_combo, *b_iter);
880 boolfound_existing =
false;
882 if((*it)->IsTitle()) {
888 cmd->AddCommand(*ecmd);
890found_existing =
true;
894 if(!found_existing) {
910 while(
b&& !options) {
927 boolfound_existing =
false;
930 if((*it)->IsTitle()) {
936 cmd->AddCommand(*ecmd);
938found_existing =
true;
942 if(!found_existing) {
955 return(
m_Args.empty());
976 stringmisc_feat = m_Args[0]->GetString();
982m_Descr.append(
"use misc_feat with comments "+ misc_feat);
985x_AddModifiersToOptions(options);
988autodef_complete.
AddSources(m_DataIter->GetSEH());
990mod_combo->InitFromOptions(options);
991mod_combo->SetUseModifierLabels(
true);
992mod_combo->SetKeepParen(
true);
993mod_combo->SetMaxModifiers(0);
1005 for(
CBioseq_CIb_iter(seh); b_iter; ++b_iter) {
1007 boolis_complete = x_IsComplete(*b_iter);
1018 cmd->AddCommand(*delcmd);
1024m_QualsChangedCount++;
1028m_QualsChangedCount++;
1034 if(m_QualsChangedCount > 0) {
1035m_DataIter->RunCommand(
cmd, m_CmdComposite);
1037 log<<
"Performed Autodef Complete "+ m_Descr;
1038x_LogFunction(
log);
1045 if(
m_Args.size() < 2) {
1054src_combo->GetAvailableModifiers(modifiers);
1056 for(
size_t n= 0;
n< modifiers.size();
n++) {
1058 if(modifiers[
n].IsOrgMod()) {
1059opts.
AddOrgMod(modifiers[
n].GetOrgModType());
1070 for(
size_tindex = 1; index <
m_Args.size(); ++index) {
1071 const string& mod_name =
m_Args[index]->GetString();
1075 m_Descr.append(
", with "+ mod_name);
1082 m_Descr.append(
", with "+ mod_name);
1092 boolis_complete =
false;
1103 if(
m_Args.size() < 1) {
1107 for(
const auto& it :
m_Args) {
1108 if(!it->IsString()) {
1124 CRef<CScope>scope = m_DataIter->GetScopedObject().scope;
1125 if(!scope || !entry)
1128 if(!m_DataIter->HasBeenCompleted()) {
1129m_ProductToCds.clear();
1131m_DataIter->SetCompleted();
1135 for(
auto& it : m_ProductToCds) {
1140 if(cds_set.
size() == 1) {
1142new_cds->
Assign(*cds_set.
begin()->GetOriginalSeq_feat());
1143 boolcds_change =
false;
1151m_QualsChangedCount++;
1156 if(m_QualsChangedCount) {
1157m_DataIter->RunCommand(
cmd, m_CmdComposite);
1159 log<<
"Created "<< m_QualsChangedCount <<
" protein features";
1160x_LogFunction(
log);
1166 return(
m_Args.empty());
1177void CMacroFunction_ConvertRawToDeltabyNs::TheFunction()
1181 CRef<CScope>scope = m_DataIter->GetScopedObject().scope;
1182 if(!entry || !scope)
1185NRawToDeltaSeq::SGapRequestInfo request;
1188request.min_unknown = (long)m_Args[index]->GetInt();
1189request.max_unknown = (long)m_Args[++index]->GetInt();
1190request.min_known = (long)m_Args[++index]->GetInt();
1191request.max_known = (long)m_Args[++index]->GetInt();
1193request.adjust_cds = m_Args[++index]->GetBool();
1194request.keep_gap_length = m_Args[++index]->GetBool();
1198 intlinkage_evidence = -1;
1200 if(!m_Args[++index]->GetString().empty()) {
1203 if(!m_Args[++index]->GetString().empty()) {
1206request.linkage = linkage;
1207request.linkage_evidence = linkage_evidence;
1208request.is_assembly_gap =
true;
1210 boolremove_alignments =
false;
1214 if(m_DataIter->IsHugeDataMode()) {
1216request, m_DataIter->MaxFeatureId(), remove_alignments,
count);
1220request, remove_alignments,
count);
1225m_DataIter->RunCommand(convert_cmd, m_CmdComposite);
1226 log<<
"Added assembly gaps by Ns to "<<
count<<
" sequences";
1227 if(remove_alignments) {
1228 log<<
"and affected alignments were removed";
1234 boolCMacroFunction_ConvertRawToDeltabyNs::x_ValidArguments()
const 1236 if(m_Args.size() != 9)
1240 for(; index < 4; ++index) {
1241 if(!m_Args[index]->IsInt())
1244 if(!m_Args[index]->IsBool())
1246 if(!m_Args[++index]->IsBool())
1250 for(;index < m_Args.size(); ++index) {
1251 if(!m_Args[index]->IsString())
1264void CMacroFunction_AddGapFeaturesByNs::TheFunction()
1268 CRef<CScope>scope = m_DataIter->GetScopedObject().scope;
1269 if(!entry || !scope)
1272NRawToDeltaSeq::SGapRequestInfo request;
1275request.min_unknown = (long)m_Args[index]->GetInt();
1276request.max_unknown = (long)m_Args[++index]->GetInt();
1277request.min_known = (long)m_Args[++index]->GetInt();
1278request.max_known = (long)m_Args[++index]->GetInt();
1280request.adjust_cds = m_Args[++index]->GetBool();
1281request.keep_gap_length = m_Args[++index]->GetBool();
1283 boolremove_alignments =
false;
1287 if(m_DataIter->IsHugeDataMode()) {
1289request, m_DataIter->MaxFeatureId(), remove_alignments,
count);
1293request, remove_alignments,
count);
1298m_DataIter->RunCommand(convert_cmd, m_CmdComposite);
1299 log<<
"Added gap features "<<
count<<
" sequences";
1300 if(remove_alignments) {
1301 log<<
"and affected alignments were removed";
1307 boolCMacroFunction_AddGapFeaturesByNs::x_ValidArguments()
const 1309 if(m_Args.size() != 6)
1313 for(; index < 4; ++index) {
1314 if(!m_Args[index]->IsInt())
1317 return(m_Args[index]->IsBool() && m_Args[++index]->IsBool());
1329 CRef<CScope>scope = m_DataIter->GetScopedObject().scope;
1330 if(!entry || !scope)
1333 CRef<CCmdComposite>delta_to_raw = s_ConvertDeltaToRaw(m_DataIter->GetSEH(), m_QualsChangedCount);
1335 if(m_QualsChangedCount) {
1336m_DataIter->RunCommand(delta_to_raw, m_CmdComposite);
1338 log<<
"Converted "<< m_QualsChangedCount <<
" delta sequences to raw sequences";
1339x_LogFunction(
log);
1345 return(
m_Args.empty());
1355new_inst->
Assign(b_iter->GetInst());
1363composite.
Reset();
1376 CRef<CScope>scope = m_DataIter->GetScopedObject().scope;
1377 if(!entry || !scope)
1380 const string& filename = m_Args[0]->GetString();
1381 if(filename.empty()) {
1383 log<<
"Empty filename is specified";
1391 log<<
"Failed to open '"<< filename;
1405x_ReadUpdateSeqs(in_str);
1414 log<<
"File '"<< filename <<
"' is expected to have FASTA format";
1419 if(m_Proteins.empty()) {
1421 log<<
"File '"<< filename <<
"' does not contain any protein sequences";
1427 if(
match== eMatchId) {
1429 for(
size_tindex = 0; index < m_Proteins.size(); ++index) {
1430 auto& prot_ids = m_Proteins[index]->GetSeq().GetId();
1431 for(
const auto&
id: prot_ids) {
1435 autoinserted = id_to_index.emplace(idh, index);
1436 if(!inserted.second) {
1438 log<<
"Protein id '"<< idh.AsString() <<
"' appears multiple times in the update file";
1449 autoprot_ids = prot_iter->GetCompleteBioseq()->GetId();
1450 for(
const auto&
id: prot_ids) {
1455 autoinserted = orig_proteins.emplace(idh, *prot_iter);
1461m_QualsChangedCount = 0;
1463 for(
const auto& upd_it : id_to_index) {
1464 autoorig_it = orig_proteins.
find(upd_it.first);
1465 if(orig_it == orig_proteins.
end()) {
1468 const auto& prot_seq = m_Proteins[upd_it.second]->GetSeq();
1470new_inst->
Assign(prot_seq.GetInst());
1484m_QualsChangedCount++;
1487 if(m_QualsChangedCount) {
1488m_DataIter->RunCommand(composite, m_CmdComposite);
1490 log<<
"Updated "<< m_QualsChangedCount <<
" protein sequences";
1491x_LogFunction(
log);
1494 else if(
match== eMatchName) {
1508 while(!fasta_reader.
AtEOF()) {
1520 const string&
str=
m_Args[1]->GetString();
1533 return(
m_Args.size() == 2) ? (
m_Args[0]->IsString() &&
m_Args[1]->IsString()) :
false;
COrgMod::ESubtype GetOrgModType() const
CSubSource::ESubtype GetSubSourceType() const
void SetOptions(const CAutoDefOptions &options)
void AddOrgMod(COrgMod::TSubtype subtype)
unsigned int TMiscFeatRule
void InitFromUserObject(const CUser_object &obj)
void SetMiscFeatRule(TMiscFeatRule rule)
TFeatureListType GetFeatureListType() const
TMiscFeatRule GetMiscFeatRule() const
void SetFeatureListType(EFeatureListType list_type)
void SetUseLabels(bool val=true)
void AddSubSource(CSubSource::TSubtype subtype)
unsigned int TFeatureListType
vector< CAutoDefAvailableModifier > TAvailableModifierVector
string GetDocsumDefLine(CSeq_entry_Handle se)
void SetOptionsObject(const CUser_object &user)
void AddSources(CSeq_entry_Handle se)
CRef< CUser_object > GetOptionsObject() const
void SetOptions(const CAutoDefModifierCombo &mod_combo)
void SetFeatureListType(CAutoDefOptions::EFeatureListType feature_list_type)
string GetOneDefLine(CAutoDefModifierCombo *mod_combo, const CBioseq_Handle &bh, CRef< feature::CFeatTree > featTree=null)
CRef< CAutoDefModifierCombo > FindBestModifierCombo()
void SetMiscFeatRule(CAutoDefOptions::EMiscFeatRule misc_feat_rule)
CAutoDefModifierCombo * GetEmptyCombo()
string GetOneFeatureClauseList(CBioseq_Handle bh, unsigned int genome_val)
bool NeedsDocsumTitle() const
void Add(CObject *obj, const CObject *new_obj)
void AddCommand(IEditCommand &command)
Base class for reading FASTA sequences.
CFormatHints & AddPreferredFormat(TFormat fmt)
Mark the format as preferred.
CFormatHints & DisableAllNonpreferred(void)
Disable all formats not marked as preferred.
Class implements different ad-hoc unreliable file format identifications.
CFormatHints & GetFormatHints(void)
Get format hints.
EFormat
The formats are checked in the same order as declared here.
@ eFasta
FASTA format sequence record, CFastaReader.
@ eUnknown
unknown format
EFormat GuessFormat(EMode)
static bool IsValidSubtypeName(const string &str, EVocabulary vocabulary=eVocabulary_raw)
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
namespace ncbi::objects::
Base class for all serializable objects.
Simple implementation of ILineReader for i(o)streams.
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
static bool IsValidSubtypeName(const string &str, EVocabulary vocabulary=eVocabulary_raw)
Template class for iteration on objects of class C.
@ eObjectType_AutodefOptions
EObjectType GetObjectType() const
const_iterator end() const
const_iterator find(const key_type &key) const
const_iterator begin() const
CRef< CCmdComposite > ConvertRawToDeltaByNsCommand(const objects::CSeq_entry_Handle &seh, const SGapRequestInfo &request, bool &remove_alignments, int &count)
CRef< CCmdComposite > ConvertRawToDeltaByNsHugeFileCmd(const objects::CSeq_entry_Handle &seh, const SGapRequestInfo &request, objects::CObject_id::TId &max_feat_id, bool &remove_alignments, int &count)
static const char si[8][64]
CChangeUnindexedObjectCommand< objects::CSubmit_block > CChangeSubmitBlockCommand
Operators to edit gaps in sequences.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static SQLCHAR output[256]
static const char * str(char *buf, int n)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & GetMsg(void) const
Get message string.
void x_ReadUpdateSeqs(CNcbiIstream &istr)
bool x_ValidArguments() const
Tests the number and the type of function arguments.
bool x_ValidArguments() const
Tests the number and the type of function arguments.
static void s_ConfigureAutodefOptionsForID(TModifiers &modifiers, objects::CSeq_entry_Handle seh)
static void s_AutodefSetsNoTitle(const objects::CSeq_entry_Handle &seh, objects::CAutoDefWithTaxonomy &autodef, CRef< CCmdComposite > composite_cmd)
static const SStaticPair< const char *, const char * > macro_spell_fixes[]
static void s_AddAutodefOptions(const objects::CAutoDef &autodef, const objects::CBioseq_Handle &bsh, CRef< CCmdComposite > composite_cmd)
bool x_ValidArguments() const
Tests the number and the type of function arguments.
virtual bool x_ValidArguments() const
Tests the number and the type of function arguments.
string x_GetDescription()
static CRef< CCmdComposite > s_RefreshDeflineCommand(const objects::CSeq_entry_Handle &seh)
static CRef< CCmdComposite > s_AutodefSequenceNoTitle(const objects::CSeq_entry_Handle &seh, const objects::CBioseq_Handle &target, const objects::CAutoDefOptions &options)
bool x_ValidArguments() const
Tests the number and the type of function arguments.
bool x_IsComplete(const objects::CBioseq_Handle bsh)
void x_AddModifiersToOptions(objects::CAutoDefOptions &opts)
static void s_SelectModifiersforAutodefID(objects::CAutoDef &autodef, TModifiers &modifiers, objects::CSeq_entry_Handle seh)
bool x_IsRequested(const objects::CAutoDefAvailableModifier &modifier)
static bool s_ChooseModInModList(bool is_org_mod, int subtype, bool require_all, CAutoDefSourceDescription::TAvailableModifierVector &modifiers)
bool x_ValidArguments() const
Tests the number and the type of function arguments.
static CRef< CCmdComposite > s_ConvertDeltaToRaw(objects::CSeq_entry_Handle seh, Int4 &count)
static short s_RemoveSingleItemSet(objects::CSeq_entry_Handle &seh)
bool x_ValidArguments() const
Tests the number and the type of function arguments.
bool x_ValidArguments() const
Tests the number and the type of function arguments.
const string & GetSuspectRules() const
static bool s_AreFeatureClausesUnique(CSeq_entry_Handle seh, CAutoDef &autodef)
void x_AddModifiersToOptions(objects::CAutoDefOptions &opts)
#define DEFINE_MACRO_FUNCNAME(CL_NAME, FN_NAME)
virtual bool x_ValidArguments() const
Tests the number and the type of function arguments.
vector< CRef< objects::CSeq_entry > > m_Proteins
bool x_IsRequested(const objects::CAutoDefAvailableModifier &modifier)
static CMacroLib & GetInstance()
virtual bool x_ValidArguments() const
Tests the number and the type of function arguments.
static CRef< CCmdComposite > s_AutodefSeqEntryNoTitle(const objects::CSeq_entry_Handle &seh, const objects::CAutoDefOptions &options)
static void s_SpellingFixes(CSerialObject &object, CNcbiOstrstream &oss)
static bool s_IsSingletonSet(const objects::CBioseq_set_Handle &bioseq_set)
static void s_AutodefBioseqsNoTitle(const objects::CSeq_entry_Handle &seh, objects::CAutoDefWithTaxonomy &autodef, objects::CAutoDefModifierCombo *mod_combo, CRef< CCmdComposite > composite_cmd)
CIRef< IMacroBioDataIter > m_DataIter
void s_RenormalizeNucProtSets(objects::CSeq_entry_Handle seh, Int4 &count)
objects::CAutoDefSourceDescription::TAvailableModifierVector TModifiers
@ eMatchId
match protein by protein_id
@ eMatchName
match protein by protein name
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define ENUM_METHOD_NAME(EnumName)
static const TObjectType * SafeCast(TTypeInfo type)
virtual CRef< CSeq_entry > ReadOneSeq(ILineErrorListener *pMessageListener=nullptr)
Read a single effective sequence, which may turn out to be a segmented set.
long TFlags
binary OR of EFlags
bool AtEOF(void) const
Indicates (negatively) whether there is any more input.
@ fForceType
Force specified type regardless of accession.
@ fAssumeProt
Assume prots unless accns indicate otherwise.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
TObjectPtr GetObjectPtr(void) const
Get pointer to object.
const CSeq_feat * GetCDSForProduct(const CBioseq &product, CScope *scope)
Get the encoding CDS feature of a given protein sequence.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
CSeq_entry_Handle GetSeq_entryHandle(CDataLoader *loader, const TBlobId &blob_id, EMissing action=eMissing_Default)
Get Seq-entry handle by its blob-id, with possible loading.
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
CSeq_feat_Handle GetSeq_featHandle(const CSeq_feat &feat, EMissing action=eMissing_Default)
TSeq ConvertSetToSeq(void) const
Do the same as CollapseSet() when sub-entry is of type bioseq.
TClass GetClass(void) const
CRef< CSeqdesc > RemoveSeqdesc(const CSeqdesc &v) const
bool IsEmptySeq_set(void) const
Check if the bioseq set is empty.
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
CSeq_entry_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
CSeq_entry_Handle GetParentEntry(void) const
Return a handle for the parent seq-entry of the bioseq.
bool IsSetClass(void) const
const TDescr & GetDescr(void) const
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
CScope & GetScope(void) const
Get scope this handle belongs to.
void CollapseSet(void) const
Collapse one level of Bioseq-set.
CSeq_entry_Handle GetSeq_entry_Handle(void) const
@ eNonRecursive
Deprecated.
@ fIncludeGivenEntry
Include the top (given) entry.
@ fRecursive
Iterate recursively.
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
int32_t Int4
4-byte (32-bit) signed integer
size_t Replace(CTempStringEx search, CTempString replace, CRegexp::TCompile compile_flags=CRegexp::fCompile_default, CRegexp::TMatch match_flags=CRegexp::fMatch_default, size_t max_replace=0)
Replace occurrences of a substring within a string by pattern.
string GetResult(void)
Get result string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define USING_SCOPE(ns)
Use the specified namespace.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
bool IsOssEmpty(CNcbiOstrstream &oss)
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
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.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ eSubtype_specimen_voucher
@ eSubtype_culture_collection
void SetExcept(TExcept value)
Assign a value to Except data member.
void SetExcept_text(const TExcept_text &value)
Assign a value to Except_text data member.
const TSeq & GetSeq(void) const
Get the variant data.
const TSet & GetSet(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
list< CRef< CSeq_entry > > TSeq_set
@ eClass_pop_set
population study
@ eClass_phy_set
phylogenetic study
@ eClass_wgs_set
whole genome shotgun project
@ eClass_mut_set
set of mutations
@ eClass_eco_set
ecological sample study
@ eClass_nuc_prot
nuc acid and coded proteins
@ eClass_gen_prod_set
genomic products, chrom+mRNA+protein
@ eClass_genbank
converted genbank
@ eClass_small_genome_set
viral segments or mitochondrial minicircles
bool IsSetCompleteness(void) const
Check if a value has been assigned to Completeness data member.
list< CRef< CSeqdesc > > Tdata
const TUser & GetUser(void) const
Get the variant data.
TTitle & SetTitle(void)
Select the variant.
const Tdata & Get(void) const
Get the member data.
TUser & SetUser(void)
Select the variant.
TCompleteness GetCompleteness(void) const
Get the Completeness member data.
const TMolinfo & GetMolinfo(void) const
Get the variant data.
@ eCompleteness_complete
complete biological entity
@ e_User
user defined object
@ e_Molinfo
info on the molecule and techniques
@ e_Title
a title for this sequence
@ eMol_na
just a nucleic acid
The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format
Functions used in the DO/DONE section affecting the top seq-entry.
Macro library for storing parsed macros.
constexpr auto sort(_Init &&init)
static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)
static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...
C++ wrappers for the Perl-compatible regular expression (PCRE) library.
CRef< CCmdComposite > AutofixCommand(objects::CSeq_entry_Handle seh, const string &test_name, string *output, const string &suspect_rules=kEmptyStr)
CRef< CCmdComposite > CleanupCommand(objects::CSeq_entry_Handle orig_seh, bool extended, bool do_tax)
void GetProductToCDSMap(objects::CScope &scope, map< objects::CBioseq_Handle, set< objects::CSeq_feat_Handle > > &product_to_cds)
void AdjustProteinFeature(objects::CSeq_feat &prot, objects::CBioseq_Handle product, objects::CSeq_feat &cds, bool &cds_change)
CRef< CCmdComposite > AutofixCommandHugeMode(objects::CSeq_entry_Handle seh, const string &test_name, map< string, size_t > &report, const string &suspect_rules=kEmptyStr)
CRef< CCmdComposite > CleanupHugeFileCommand(objects::CSeq_entry_Handle orig_seh, bool extended, bool do_tax, objects::taxupdate_func_t &updater, bool rmv_user_object)
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