NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <objects/taxon3/taxon3.hpp>
#include <misc/discrepancy/discrepancy.hpp>
#include <objmgr/seq_feat_handle.hpp>
#include <objmgr/scope.hpp>
#include <objmgr/object_manager.hpp>
#include <objmgr/bioseq_ci.hpp>
#include <objmgr/seqdesc_ci.hpp>
#include <objmgr/util/sequence.hpp>
#include <objtools/edit/cds_fix.hpp>
#include <objtools/cleanup/cleanup.hpp>
#include <objtools/validator/validatorp.hpp>
#include <objtools/validator/go_term_validation_and_cleanup.hpp>
#include <gui/objutils/registry.hpp>
#include <gui/objutils/cmd_factory.hpp>
#include <gui/objutils/cmd_del_bioseq.hpp>
#include <gui/objutils/cmd_del_bioseq_set.hpp>
#include <gui/objutils/cmd_del_seq_feat.hpp>
#include <gui/objutils/cmd_change_seq_feat.hpp>
#include <gui/objutils/cmd_add_seqentry.hpp>
#include <gui/objutils/cmd_change_seq_entry.hpp>
#include <gui/objutils/descriptor_change.hpp>
#include <gui/objutils/cmd_create_feat.hpp>
#include <gui/objutils/cmd_create_desc.hpp>
#include <gui/objutils/cmd_change_bioseq_inst.hpp>
#include <gui/objutils/util_cmds.hpp>
#include <chrono>
Go to the source code of this file.
Go to the SVN repository for this file.
Variables | |
static const char * | kDiscrepancyEdit = "Dialogs.Edit.Discrepancy" |
CRef<CCmdChangeSeq_feat> AdjustGene | ( | const CSeq_feat & | orig_feat, |
const CSeq_feat & | new_feat, | ||
CScope & | scope | ||
) |
Definition at line 1650 of file util_cmds.cpp.
References CSerialObject::Assign(), eExtreme_Biological, CSeq_feat_Base::GetLocation(), GetOverlappingGene(), CScope::GetSeq_featHandle(), CSeq_loc::GetStart(), CSeq_loc::GetStop(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), Ref(), SeqLocExtend(), CSeq_feat_Base::SetLocation(), and CSeq_feat_Base::SetPartial().
Referenced by GetEditLocationCommand().
void AdjustProteinFeature | ( | CSeq_feat & | prot, |
CBioseq_Handle | product, | ||
CSeq_feat & | cds, | ||
bool & | cds_change | ||
) |
Definition at line 1013 of file util_cmds.cpp.
References CSeq_feat_Base::GetXref(), CSeq_feat_Base::IsSetXref(), NON_CONST_ITERATE, prot, CSeq_feat_Base::ResetXref(), SetProteinFeature(), and CSeq_feat_Base::SetXref().
Referenced by CreateOrAdjustProteinFeature().
CRef<CCmdComposite> AutofixCommand | ( | CSeq_entry_Handle | orig_seh, |
const string & | test_name, | ||
string * | output, | ||
const string & | suspect_rules | ||
) |
Definition at line 1504 of file util_cmds.cpp.
References CScope::AddDefaults(), CScope::AddTopLevelSeqEntry(), cmd, copy(), CSeq_entry_Handle::GetCompleteSeq_entry(), CObjectManager::GetInstance(), J, output, result, s_GetProductRules(), test_name, and tests.
CRef<CCmdComposite> AutofixCommandHugeMode | ( | CSeq_entry_Handle | orig_seh, |
const string & | str_test_name, | ||
map< string, size_t > & | report, | ||
const string & | suspect_rules | ||
) |
Definition at line 1561 of file util_cmds.cpp.
References CScope::AddDefaults(), CScope::AddTopLevelSeqEntry(), cmd, copy(), CSeq_entry_Handle::GetCompleteSeq_entry(), GetDiscrepancyCaseName(), CObjectManager::GetInstance(), s_GetProductRules(), and test_name.
CRef<CCmdComposite> CachedTaxonomyLookupCommand | ( | CSeq_entry_Handle | seh, |
objects::taxupdate_func_t & | updater | ||
) |
Definition at line 555 of file util_cmds.cpp.
References CSerialObject::Assign(), chunk_size, cmd, variation::Equals(), Error(), CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_entry_Handle::GetScope(), CScope::GetSeq_entryHandle(), CScope::GetSeq_featHandle(), i, NStr::IsBlank(), ITERATE, len, LOG_POST, min(), n, NULL, CSeq_feat_Base::SetData(), CBioSource_Base::SetOrg(), and CSeqdesc_Base::SetSource().
Referenced by CleanupHugeFileCommand().
CRef<CCmdComposite> CleanupCommand | ( | CSeq_entry_Handle | orig_seh, |
bool | extended, | ||
bool | do_tax | ||
) |
Definition at line 354 of file util_cmds.cpp.
References CScope::AddDefaults(), CScope::AddTopLevelSeqEntry(), cleanup(), cmd, copy(), CCleanup::eClean_KeepTopSet, CCleanup::eClean_SyncGenCodes, Error(), CCmdComposite::Execute(), CSeq_entry_Handle::GetCompleteSeq_entry(), CObjectManager::GetInstance(), CException::GetMsg(), LOG_POST, and TaxonomyLookupCommand().
CRef<CCmdComposite> CleanupHugeFileCommand | ( | CSeq_entry_Handle | orig_seh, |
bool | extended, | ||
bool | do_tax, | ||
objects::taxupdate_func_t & | updater, | ||
bool | rmv_user_object | ||
) |
Definition at line 395 of file util_cmds.cpp.
References CScope::AddDefaults(), CScope::AddTopLevelSeqEntry(), CachedTaxonomyLookupCommand(), cleanup(), cmd, copy(), CCleanup::eClean_KeepTopSet, CCleanup::eClean_NoNcbiUserObjects, CCleanup::eClean_SyncGenCodes, Error(), CCmdComposite::Execute(), CSeq_entry_Handle::GetCompleteSeq_entry(), CObjectManager::GetInstance(), CException::GetMsg(), and LOG_POST.
CRef<CCmdComposite> CreateOrAdjustProteinFeature | ( | CBioseq_Handle | product, |
CSeq_feat & | cds, | ||
bool & | cds_change | ||
) |
Definition at line 1034 of file util_cmds.cpp.
References AdjustProteinFeature(), cleanup(), cmd, CSeqFeatData::eSubtype_prot, CBioseq_Handle::GetSeq_entry_Handle(), and prot.
CRef<CCmdComposite> GetChangeStrainForwardingCommand | ( | CSeq_entry_Handle | seh, |
bool | disable | ||
) |
Definition at line 770 of file util_cmds.cpp.
References CSerialObject::Assign(), cmd, CSeqFeatData_Base::e_Biosrc, CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_entry_Handle::GetScope(), CScope::GetSeq_entryHandle(), CMappedFeat::GetSeq_feat(), CScope::GetSeq_featHandle(), s_GetSourceDescriptors(), CSeq_feat_Base::SetData(), CBioSource::SetDisableStrainForwarding(), and CSeqdesc_Base::SetSource().
Referenced by GetDisableStrainForwardingCommand(), and GetEnableStrainForwardingCommand().
CRef<CCmdComposite> GetDeleteAllFeaturesCommand | ( | CSeq_entry_Handle | seh, |
size_t & | count, | ||
bool | remove_proteins | ||
) |
Definition at line 241 of file util_cmds.cpp.
References CCmdComposite::AddCommand(), cmd, count, GetDeleteFeatureCommand(), GetProductToCDSMap(), CSeq_entry_Handle::GetScope(), and s_IsNucLocation().
CRef<CCmdComposite> GetDeleteAllFeaturesCommand_Ex | ( | CSeq_entry_Handle | seh, |
size_t & | count, | ||
bool | remove_proteins | ||
) |
Definition at line 265 of file util_cmds.cpp.
References CScope::AddDefaults(), CScope::AddTopLevelSeqEntry(), cmd, copy(), count, data, CSeq_inst_Base::eMol_aa, set< Key, Compare >::end(), CCmdDelBioseqInst::Execute(), set< Key, Compare >::find(), CSeq_feat_Handle::GetAnnot(), CScope::GetBioseqHandle(), CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_feat_Handle::GetData(), CSeq_annot_Handle::GetEditHandle(), CObjectManager::GetInstance(), CSeq_feat_Handle::GetLocationId(), CSeq_entry_Handle::GetParentBioseq_set(), CBioseq_set_Handle::GetParentEntry(), CSeq_feat_Handle::GetProduct(), CSeq_feat_Handle::GetProductId(), CSeq_feat_Handle::GetScope(), CBioseq_Handle::GetSeq_entry_Handle(), set< Key, Compare >::insert(), CBioseq_Handle::IsProtein(), CSeq_feat_Handle::IsSetProduct(), CSeq_feat_EditHandle::Remove(), CCmdFactory::RemoveCitations(), s_IsFarLocation(), s_IsNucLocation(), and SerialClone().
CRef<CCmdComposite> GetDeleteFeatureCommand | ( | const CSeq_feat_Handle & | fh, |
bool | remove_proteins | ||
) |
Definition at line 108 of file util_cmds.cpp.
References cmd, data, CScope::GetBioseqHandle(), CSeq_feat_Handle::GetData(), CSeq_feat_Handle::GetLocationId(), CSeq_entry_Handle::GetParentBioseq_set(), CBioseq_set_Handle::GetParentEntry(), CSeq_feat_Handle::GetProductId(), CSeq_feat_Handle::GetScope(), CBioseq_Handle::GetSeq_entry_Handle(), CSeq_id_Handle::GetSeqId(), CBioseq_Handle::IsProtein(), CSeq_feat_Handle::IsSetProduct(), CCmdFactory::RemoveCitations(), s_AreThereOtherCDSForThisProduct(), and s_IsFarLocation().
Referenced by GetDeleteAllFeaturesCommand().
CRef<CCmdComposite> GetDeleteFeatureCommand | ( | const CSeq_feat_Handle & | fh, |
bool | remove_proteins, | ||
map< CBioseq_Handle, set< CSeq_feat_Handle > > & | product_to_cds | ||
) |
Definition at line 165 of file util_cmds.cpp.
References cmd, data, CScope::GetBioseqHandle(), CSeq_feat_Handle::GetData(), CSeq_feat_Handle::GetLocationId(), CSeq_entry_Handle::GetParentBioseq_set(), CBioseq_set_Handle::GetParentEntry(), CSeq_feat_Handle::GetProductId(), CSeq_feat_Handle::GetScope(), CBioseq_Handle::GetSeq_entry_Handle(), CSeq_id_Handle::GetSeqId(), CBioseq_Handle::IsProtein(), CSeq_feat_Handle::IsSetProduct(), CCmdFactory::RemoveCitations(), and s_IsFarLocation().
CRef<CCmdComposite> GetDeleteSequenceCommand | ( | CBioseq_Handle | bsh | ) |
Definition at line 205 of file util_cmds.cpp.
References cmd, CBioseq_set_Base::eClass_nuc_prot, eUnknown, CBioseq_set_Handle::GetClass(), CBioseq_Handle::GetParentBioseq_set(), CBioseq_set_Handle::GetParentEntry(), CBioseq_Handle::GetSeq_entry_Handle(), CBioseq_Handle::GetTopLevelEntry(), CBioseq_set_Handle::GetTopLevelEntry(), CBioseq_Handle::IsNa(), CBioseq_set_Handle::IsSetClass(), and NCBI_THROW.
CRef<CCmdComposite> GetDisableStrainForwardingCommand | ( | CSeq_entry_Handle | seh | ) |
Definition at line 803 of file util_cmds.cpp.
References GetChangeStrainForwardingCommand().
CRef<CCmdComposite> GetEditLocationCommand | ( | const edit::CLocationEditPolicy & | policy, |
bool | retranslate, | ||
bool | adjust_gene, | ||
const CSeq_feat & | orig_feat, | ||
CScope & | scope, | ||
int & | offset, | ||
bool | create_general_only | ||
) |
GetEditLocationCommand Changes the location properties of a feature according to a location policy.
Definition at line 1602 of file util_cmds.cpp.
References AdjustGene(), CSerialObject::Assign(), cmd, eExtreme_Biological, CSeq_feat_Base::GetData(), CSeq_feat_Base::GetLocation(), GetRetranslateCDSCommand(), CScope::GetSeq_featHandle(), GetSynchronizeProteinPartialsCommand(), CSeqFeatData_Base::IsCdregion(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), CSeq_feat_Base::IsSetProduct(), NULL, offset, and CSeq_feat_Base::SetPartial().
CRef<CCmdComposite> GetEnableStrainForwardingCommand | ( | CSeq_entry_Handle | seh | ) |
Definition at line 808 of file util_cmds.cpp.
References GetChangeStrainForwardingCommand().
bool GetNormalizeGeneQualsCommand | ( | CBioseq_Handle | bsh, |
CRef< CCmdComposite > | cmd | ||
) |
Definition at line 1691 of file util_cmds.cpp.
References CSerialObject::Assign(), cmd, CCleanup::GetNormalizableGeneQualPairs(), and CCleanup::NormalizeGeneQuals().
Referenced by GetNormalizeGeneQualsCommand().
CRef<CCmdComposite> GetNormalizeGeneQualsCommand | ( | CSeq_entry_Handle | seh | ) |
Definition at line 1713 of file util_cmds.cpp.
References cmd, CSeq_inst_Base::eMol_na, GetNormalizeGeneQualsCommand(), and NULL.
void GetProductToCDSMap | ( | CScope & | scope, |
map< CBioseq_Handle, set< CSeq_feat_Handle > > & | product_to_cds | ||
) |
Definition at line 146 of file util_cmds.cpp.
References CScope::eAllTSEs, CSeqFeatData::eSubtype_cdregion, CScope::GetAllTSEs(), CScope::GetBioseqHandle(), CSeq_feat_Handle::GetProductId(), and CSeq_id_Handle::GetSeqId().
Referenced by GetDeleteAllFeaturesCommand().
bool GetRemoveDuplicateGOTermsCommand | ( | CBioseq_Handle | bsh, |
CRef< CCmdComposite > | cmd | ||
) |
Definition at line 1730 of file util_cmds.cpp.
References CSerialObject::Assign(), cmd, f, and RemoveDuplicateGoTerms().
Referenced by GetRemoveDuplicateGOTermsCommand().
CRef<CCmdComposite> GetRemoveDuplicateGOTermsCommand | ( | CSeq_entry_Handle | seh | ) |
Definition at line 1750 of file util_cmds.cpp.
References cmd, CSeq_inst_Base::eMol_na, GetRemoveDuplicateGOTermsCommand(), and NULL.
CRef<CCmdComposite> GetRetranslateCDSCommand | ( | CScope & | scope, |
const CSeq_feat & | cds, | ||
bool | create_general_only | ||
) |
Definition at line 1239 of file util_cmds.cpp.
References GetRetranslateCDSCommand(), and offset.
CRef<CCmdComposite> GetRetranslateCDSCommand | ( | CScope & | scope, |
const CSeq_feat & | cds, | ||
int & | offset, | ||
bool | create_general_only | ||
) |
Definition at line 1246 of file util_cmds.cpp.
References CSerialObject::Assign(), cmd, ctll::empty(), CSeq_feat_Base::GetData(), GetRetranslateCDSCommand(), CScope::GetSeq_featHandle(), CSeqFeatData_Base::IsCdregion(), CSeq_feat_Base::IsSetData(), NULL, and offset.
CRef<CCmdComposite> GetRetranslateCDSCommand | ( | CScope & | scope, |
CSeq_feat & | cds, | ||
bool & | cds_change, | ||
bool | create_general_only | ||
) |
Definition at line 1110 of file util_cmds.cpp.
References offset.
Referenced by GetEditLocationCommand(), and GetRetranslateCDSCommand().
CRef<CCmdComposite> GetRetranslateCDSCommand | ( | CScope & | scope, |
CSeq_feat & | cds, | ||
bool & | cds_change, | ||
int & | offset, | ||
bool | create_general_only | ||
) |
Definition at line 1117 of file util_cmds.cpp.
References AdjustProteinFeaturePartialsToMatchCDS(), CSerialObject::Assign(), CSeq_feat_Base::CanGetLocation(), CSeq_interval_Base::CanGetTo(), cmd, CSeqFeatData_Base::e_Prot, eExtreme_Positional, CSeq_inst_Base::eMol_aa, ctll::empty(), NStr::EndsWith(), CSeq_inst_Base::eRepr_raw, CSeqFeatData::eSubtype_prot, CScope::GetBioseqHandle(), CBioseq_Handle::GetCompleteBioseq(), CSeq_feat_Base::GetData(), CBioseq_Base::GetInst(), CBioseq_Handle::GetInst(), CSeq_loc_Base::GetInt(), CBioseq::GetLength(), CSeq_inst_Base::GetLength(), CSeq_feat_Base::GetLocation(), CSeq_feat_Base::GetProduct(), CBioseq_Handle::GetSeqId(), CSeq_loc::GetStop(), GetSynchronizeProductMolInfoCommand(), CSeqFeatData_Base::IsCdregion(), CSeq_loc_Base::IsInt(), CBioseq_Handle::IsProtein(), CSeq_feat_Base::IsSetData(), CBioseq_Base::IsSetInst(), CSeq_feat_Base::IsSetLocation(), CSeq_feat_Base::IsSetProduct(), CSeq_inst_Base::IsSetSeq_data(), NULL, offset, CRef< C, Locker >::Reset(), CBioseq_Base::ResetInst(), CSeq_loc::SetId(), CBioseq_Base::SetInst(), CSeq_loc::SetInt(), CSeq_feat_Base::SetLocation(), CSeqTranslator::Translate(), TranslateCDSCommand(), and CSeqTranslator::TranslateToProtein().
CRef<CCmdComposite> GetReverseComplimentSequenceCommand | ( | CBioseq_Handle | bsh | ) |
Definition at line 1339 of file util_cmds.cpp.
References CSerialObject::Assign(), cmd, f, CBioseq_Handle::GetInst(), CBioseq_Handle::GetScope(), CMappedFeat::GetSeq_feat(), CScope::GetSeq_featHandle(), NULL, ReverseComplement(), and ReverseComplementFeature().
CRef<CCmdComposite> GetRmCultureNotesCommand | ( | CSeq_entry_Handle | seh | ) |
Definition at line 843 of file util_cmds.cpp.
References CSerialObject::Assign(), cmd, CSeqFeatData_Base::e_Biosrc, CSeqFeatData_Base::GetBiosrc(), CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_feat_Handle::GetData(), CBioSource_Base::GetOrg(), CSeq_entry_Handle::GetScope(), CScope::GetSeq_entryHandle(), CMappedFeat::GetSeq_feat(), CScope::GetSeq_featHandle(), CSeqdesc_Base::GetSource(), CTaxon3::Init(), CBioSource::RemoveCultureNotes(), CFeat_CI::Rewind(), s_GetSourceDescriptors(), CTaxon3::SendRequest(), CSeq_feat_Base::SetData(), CTaxon3_request_Base::SetRequest(), and CSeqdesc_Base::SetSource().
CRef<CCmdComposite> GetSynchronizeProductMolInfoCommand | ( | CScope & | scope, |
const CSeq_feat & | cds | ||
) |
Definition at line 919 of file util_cmds.cpp.
References AdjustProteinMolInfoToMatchCDS(), CSerialObject::Assign(), cmd, CSeqdesc_Base::e_Molinfo, CMolInfo_Base::eBiomol_peptide, CScope::GetBioseqHandle(), CSeq_feat_Base::GetData(), CSeqdesc_Base::GetMolinfo(), CBioseq_Handle::GetParentEntry(), CSeq_feat_Base::GetProduct(), CSeqdesc_CI::GetSeq_entry_Handle(), CSeqFeatData_Base::IsCdregion(), CBioseq_Handle::IsNa(), CSeq_feat_Base::IsSetData(), CSeq_feat_Base::IsSetProduct(), NULL, CMolInfo_Base::SetBiomol(), and CSeqdesc_Base::SetMolinfo().
Referenced by GetRetranslateCDSCommand(), and GetSynchronizeProteinPartialsCommand().
CRef<CCmdComposite> GetSynchronizeProteinPartialsCommand | ( | CScope & | scope, |
const CSeq_feat & | cds | ||
) |
Definition at line 959 of file util_cmds.cpp.
References AdjustProteinFeaturePartialsToMatchCDS(), CSerialObject::Assign(), cmd, CSeqFeatData::eSubtype_prot, f, CScope::GetBioseqHandle(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetProduct(), GetSynchronizeProductMolInfoCommand(), CSeqFeatData_Base::IsCdregion(), CSeq_feat_Base::IsSetData(), CSeq_feat_Base::IsSetProduct(), and NULL.
Referenced by GetEditLocationCommand().
|
static |
Definition at line 66 of file util_cmds.cpp.
References CScope::eAllTSEs, CSeq_inst_Base::eMol_na, CSeqFeatData::eSubtype_cdregion, CScope::GetAllTSEs(), CSeq_feat_Handle::GetOriginalSeq_feat(), CConstRef< C, Locker >::GetPointer(), CSeq_feat_Handle::GetProduct(), CSeq_feat_Handle::GetScope(), and ITERATE.
Referenced by GetDeleteFeatureCommand().
Definition at line 1454 of file util_cmds.cpp.
References file, CGuiRegistry::GetInstance(), CGuiRegistry::GetReadView(), CRegistryReadView::GetString(), kDiscrepancyEdit, and kEmptyStr.
Referenced by AutofixCommand(), and AutofixCommandHugeMode().
|
static |
Definition at line 337 of file util_cmds.cpp.
References CSeq_descr_Base::Get(), CSeq_entry::GetDescr(), CBioseq_set_Base::GetSeq_set(), CSeq_entry_Base::GetSet(), CSeq_entry_Base::IsSet(), CSeq_entry::IsSetDescr(), CBioseq_set_Base::IsSetSeq_set(), and ITERATE.
Referenced by GetChangeStrainForwardingCommand(), and GetRmCultureNotesCommand().
|
static |
Definition at line 87 of file util_cmds.cpp.
References CSeq_loc_CI::eEmpty_Skip, CScope::GetBioseqHandle(), CSeq_feat_Handle::GetLocation(), CSeq_feat_Handle::GetProduct(), CSeq_feat_Handle::GetScope(), CBioseq_Handle::GetSeq_entry_Handle(), and IsFarLocation().
Referenced by GetDeleteAllFeaturesCommand_Ex(), and GetDeleteFeatureCommand().
|
static |
Definition at line 227 of file util_cmds.cpp.
References CSeq_loc_CI::eEmpty_Skip, CScope::GetBioseqHandle(), CSeq_feat_Handle::GetLocation(), CSeq_feat_Handle::GetScope(), and CBioseq_Handle::IsNa().
Referenced by GetDeleteAllFeaturesCommand(), and GetDeleteAllFeaturesCommand_Ex().
Definition at line 814 of file util_cmds.cpp.
References CTaxon3::Init(), CTaxon3::SendRequest(), and CTaxon3_request_Base::SetRequest().
void SetProteinFeature | ( | CSeq_feat & | prot, |
CBioseq_Handle | product, | ||
const CSeq_feat & | cds | ||
) |
Definition at line 997 of file util_cmds.cpp.
References eExtreme_Biological, CBioseq_Handle::GetId(), CBioseq_Handle::GetInst_Length(), CSeq_feat_Base::GetLocation(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), and prot.
Referenced by AdjustProteinFeature().
CRef<CCmdComposite> SetTranslExcept | ( | CSeq_entry_Handle | seh, |
const string & | comment, | ||
bool | strict, | ||
bool | extend, | ||
bool | adjust_gene | ||
) |
SetTranslExcept A function to set a code break at the 3' end of coding regions in a Seq-entry to indicate that the stop codon is formed by the addition of a poly-A tail.
seh | The Seq-entry to search for coding regions to adjust |
comment | The string to place in the note on cds if a code break is added |
strict | Only add code break if last partial codon consists of "TA" or just "T". If strict is false, add code break if first NT of last partial codon is T or N. |
extend | If true, extend coding region to cover partial stop codon |
adjust_gene | If true, adjust gene location to match coding region after adjustment |
Definition at line 1285 of file util_cmds.cpp.
References CSerialObject::Assign(), cmd, CSeqFeatData_Base::e_Cdregion, eExtreme_Biological, eNa_strand_minus, ExtendStop(), CSeq_feat_Base::GetLocation(), CMappedFeat::GetLocation(), CMappedFeat::GetOriginalFeature(), GetOverlappingGene(), CSeq_entry_Handle::GetScope(), CScope::GetSeq_featHandle(), CSeq_loc::GetStop(), CSeq_loc::GetStrand(), NULL, and CSeq_feat_Base::SetLocation().
CRef<CCmdComposite> SpecificHostCleanupCommand | ( | CSeq_entry_Handle | seh | ) |
Definition at line 667 of file util_cmds.cpp.
References CSerialObject::Assign(), chunk_size, cmd, variation::Equals(), Error(), CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_entry_Handle::GetScope(), CScope::GetSeq_entryHandle(), CScope::GetSeq_featHandle(), i, CTaxon3::Init(), NStr::IsBlank(), ITERATE, len, LOG_POST, min(), n, NULL, CTaxon3::SendOrgRefList(), CSeq_feat_Base::SetData(), CBioSource_Base::SetOrg(), and CSeqdesc_Base::SetSource().
CRef<CCmdComposite> TaxonomyLookupCommand | ( | CSeq_entry_Handle | seh | ) |
Definition at line 446 of file util_cmds.cpp.
References CSerialObject::Assign(), chunk_size, cmd, variation::Equals(), Error(), CSeq_entry_Handle::GetCompleteSeq_entry(), CSeq_entry_Handle::GetScope(), CScope::GetSeq_entryHandle(), CScope::GetSeq_featHandle(), i, CTaxon3::Init(), NStr::IsBlank(), ITERATE, len, LOG_POST, min(), n, NULL, CTaxon3::SendOrgRefList(), CSeq_feat_Base::SetData(), CBioSource_Base::SetOrg(), and CSeqdesc_Base::SetSource().
Referenced by CleanupCommand().
CRef<CCmdComposite> TranslateCDSCommand | ( | CScope & | scope, |
CSeq_feat & | cds, | ||
bool & | cds_change, | ||
int & | offset, | ||
bool | create_general_only | ||
) |
Definition at line 1055 of file util_cmds.cpp.
References AddEmptyProteinFeatureToProtein(), CSeq_id::Assign(), cmd, eExtreme_Biological, CScope::GetBioseqHandle(), CSeq_loc::GetId(), CSeq_feat_Base::GetLocation(), GetNewProtId(), CBioseq_Handle::GetParentEntry(), CSeq_feat_Base::GetProduct(), CBioseq_Handle::GetTopLevelEntry(), CSeq_feat_Base::GetXref(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), CBioseq_Base::IsSetId(), CSeq_feat_Base::IsSetProduct(), CSeq_feat_Base::IsSetXref(), NON_CONST_ITERATE, NULL, offset, prot, CRef< C, Locker >::Reset(), CSeq_feat_Base::ResetXref(), CBioseq_Base::SetId(), SetMolinfoForProtein(), CSeq_feat_Base::SetProduct(), CSeq_entry_Base::SetSeq(), CSeq_feat_Base::SetXref(), and CSeqTranslator::TranslateToProtein().
Referenced by GetRetranslateCDSCommand().
CRef<CCmdComposite> TrimStopsFromCompleteCDS | ( | const CSeq_feat & | cds, |
CScope & | scope | ||
) |
TrimStopsFromCompleteCDS If the CDS is 3' complete and the protein sequence ends with a stop codon, the function removes the stop codon, shortens the protein length and adjusts the features on the protein sequence so that they do not extend past the "new" end of the sequence.
The function does not modify either the CDS location or the nucleotide sequence.
cds | Coding region feature which product will be examined |
scope | The scope in which adjustments are to be made (if necessary) |
Definition at line 1381 of file util_cmds.cpp.
References CSerialObject::Assign(), CSeq_feat_Base::CanGetLocation(), cmd, CSeq_data_Base::e_Ncbieaa, CSeqFeatData_Base::e_Prot, CBioseq_Handle::eCoding_Ncbi, eExtreme_Biological, ctll::empty(), NStr::EndsWith(), CScope::GetBioseqHandle(), CSeq_feat_Base::GetData(), CBioseq_Handle::GetInst(), CBioseq_Handle::GetInst_Seq_data(), CSeq_loc_Base::GetInt(), CSeq_inst_Base::GetLength(), CSeq_feat_Base::GetLocation(), CMappedFeat::GetOriginalFeature(), CSeq_feat_Base::GetProduct(), CSeqVector::GetSeqData(), CBioseq_Handle::GetSeqVector(), CSeq_loc::GetStop(), CSeq_interval_Base::GetTo(), CSeqFeatData_Base::IsCdregion(), CSeq_loc_Base::IsInt(), CSeq_data_Base::IsIupacaa(), CSeq_data_Base::IsNcbieaa(), CSeq_loc::IsPartialStop(), CBioseq_Handle::IsProtein(), CSeq_feat_Base::IsSetProduct(), CSeq_inst_Base::IsSetSeq_data(), NULL, CSeqVector::SetCoding(), CSeq_inst_Base::SetLength(), CSeq_feat_Base::SetLocation(), CSeq_inst_Base::SetSeq_data(), and CSeqVector::size().
CRef<CCmdComposite> UpdatemRNAProduct | ( | const CSeq_feat & | protein, |
CScope & | scope, | ||
string & | message | ||
) |
Definition at line 1767 of file util_cmds.cpp.
References CSerialObject::Assign(), cmd, NStr::Equal(), CSeqFeatData::eSubtype_prot, CRNA_ref_Base::eType_mRNA, CScope::GetBioseqHandle(), GetCDSForProduct(), CBioseq_Handle::GetCompleteBioseq(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetLocation(), GetmRNAforCDS(), CProt_ref_Base::GetName(), CSeqFeatData_Base::GetProt(), CSeqFeatData_Base::GetRna(), CScope::GetSeq_featHandle(), CSeqFeatData::GetSubtype(), CRNA_ref_Base::GetType(), CSeqFeatData_Base::IsRna(), CSeq_feat_Base::IsSetData(), CProt_ref_Base::IsSetName(), kEmptyStr, rna, and CSeq_feat_Base::SetData().
CRef<CCmdComposite> UpdatemRNAProduct | ( | const string & | prot_product, |
CConstRef< CObject > | object, | ||
CScope & | scope | ||
) |
Definition at line 1810 of file util_cmds.cpp.
References CSerialObject::Assign(), cmd, ctll::empty(), CSeqFeatData::eSubtype_prot, CScope::GetBioseqHandle(), GetCDSForProduct(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetLocation(), GetmRNAforCDS(), CScope::GetSeq_featHandle(), CSeqFeatData::GetSubtype(), CSeqFeatData_Base::IsRna(), NULL, CConstRef< C, Locker >::Reset(), and CSeq_feat_Base::SetData().
USING_SCOPE | ( | objects | ) |
|
static |
Definition at line 1452 of file util_cmds.cpp.
Referenced by s_GetProductRules().