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>
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 1576 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 939 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 1430 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 1487 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 481 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 280 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 321 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 960 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 696 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 240 of file util_cmds.cpp.
References CCmdComposite::AddCommand(), cmd, count, GetDeleteFeatureCommand(), GetProductToCDSMap(), CSeq_entry_Handle::GetScope(), and s_IsNucLocation().
CRef<CCmdComposite> GetDeleteFeatureCommand | ( | const CSeq_feat_Handle & | fh, |
bool | remove_proteins | ||
) |
Definition at line 107 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 164 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 204 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 729 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 1528 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 734 of file util_cmds.cpp.
References GetChangeStrainForwardingCommand().
bool GetNormalizeGeneQualsCommand | ( | CBioseq_Handle | bsh, |
CRef< CCmdComposite > | cmd | ||
) |
Definition at line 1617 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 1639 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 145 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 1656 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 1676 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 1165 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 1172 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 1036 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 1043 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 1265 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 769 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 845 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 885 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 65 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 1380 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 263 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 86 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 GetDeleteFeatureCommand().
|
static |
Definition at line 226 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().
Definition at line 740 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 923 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 1211 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 593 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 372 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 981 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 1307 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 1693 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 1736 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 1378 of file util_cmds.cpp.
Referenced by s_GetProductRules().