NCBI C++ ToolKit
Classes | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends
Sequence utilities
+ Collaboration diagram for Sequence utilities:

Classes

class  CDeflineGenerator
 Class for computing sequences' titles ("definitions"). More...
 
class  CDeflineGenerator::CLowQualityTextFsm
 exception fields More...
 
class  CGetOverlappingFeaturesPlugin
 
class  CSeqIdFromHandleException
 
class  CFastaOstream
 FASTA-format output; see also ReadFasta in <objtools/readers/fasta.hpp> More...
 
struct  CFastaOstream::SGapModText
 This indicates the text of the modifiers of a gap. More...
 
class  CCdregion_translate
 Public interface for coding region translation function Uses CTrans_table in <objects/seqfeat/Genetic_code_table.hpp> for rapid translation from a given genetic code, allowing all of the iupac nucleotide ambiguity characters. More...
 
class  CSeqTranslator
 
struct  SRelLoc
 Location relative to a base Seq-loc: one (usually) or more ranges of offsets. More...
 
class  CSeqSearch
 ============================================================================// Sequence Search // ============================================================================// More...
 
class  CSeqSearch::CPatternInfo
 Holds information associated with a pattern, such as the name of the restriction enzyme, location of cut site etc. More...
 
class  CSeqSearch::IClient
 Client interface: ================== A class that uses the SeqSearch facility should implement the Client interface and register itself with the search utility to be notified of matches detection. More...
 
class  CSequenceAmbigTrimmer
 This trims ambiguous bases from the start and/or end of sequences, using customizable rules. More...
 
struct  CSequenceAmbigTrimmer::STrimRule
 For example, if bases_to_check is 10 and max_bases_allowed_to_be_ambig is 5, then on each iteration we check the 10 terminal bases and trim off those 10 if there are more than 5 ambiguous bases there. More...
 
struct  CSequenceAmbigTrimmer::SAmbigCount
 This holds the output of x_CountAmbigInRange. More...
 
class  CBioseqGaps_CI
 This iterates over the runs of Ns of each sequence. More...
 
struct  CBioseqGaps_CI::Params
 The params that control the behavior of CBioseqGaps_CI. More...
 
struct  CBioseqGaps_CI::SCurrentGapInfo
 This indicates the state of the iterator right now. More...
 

Typedefs

typedef int CDeflineGenerator::TUserFlags
 Binary "OR" of EUserFlags. More...
 
typedef long CFastaOstream::TFlags
 binary OR of EFlags More...
 
typedef AutoPtr< char, ArrayDeleter< char > > CFastaOstream::TCharBuf
 
typedef map< TSeqPos, intCFastaOstream::TMSMap
 
typedef int CSeqTranslator::TTranslationFlags
 
typedef int SRelLoc::TFlags
 binary OR of EFlags More...
 
typedef CSeq_interval SRelLoc::TRange
 For relative ranges (ONLY), id is irrelevant and normally unset. More...
 
typedef vector< CRef< TRange > > SRelLoc::TRanges
 
typedef CPatternInfo CSeqSearch::TPatternInfo
 
typedef CSeqSearch::TPatternInfo CSeqSearch::IClient::TPatternInfo
 
typedef unsigned int CSeqSearch::TSearchFlags
 binary OR of ESearchFlag More...
 
typedef int CSequenceAmbigTrimmer::TFlags
 
typedef vector< STrimRuleCSequenceAmbigTrimmer::TTrimRuleVec
 Multiple STrimRules are allowed, which are applied from smallest bases_to_check to largest bases_to_check, and redundant rules are automatically removed. More...
 
typedef bool CSequenceAmbigTrimmer::TAmbigLookupTable[26]
 

Enumerations

enum  CDeflineGenerator::EUserFlags {
  CDeflineGenerator::fIgnoreExisting = 1 << 0 , CDeflineGenerator::fAllProteinNames = 1 << 1 , CDeflineGenerator::fLocalAnnotsOnly = 1 << 2 , CDeflineGenerator::fNoExpensiveOps = fLocalAnnotsOnly ,
  CDeflineGenerator::fGpipeMode = 1 << 3 , CDeflineGenerator::fOmitTaxonomicName = 1 << 4 , CDeflineGenerator::fDevMode = 1 << 5 , CDeflineGenerator::fShowModifiers = 1 << 6 ,
  CDeflineGenerator::fUseAutoDef = 1 << 7 , CDeflineGenerator::fFastaFormat = 1 << 8 , CDeflineGenerator::fDoNotUseAutoDef = 1 << 9
}
 User-settable flags for tuning behavior. More...
 
enum  CSeqIdFromHandleException::EErrCode { CSeqIdFromHandleException::eNoSynonyms , CSeqIdFromHandleException::eRequestedIdNotFound }
 
enum  CFastaOstream::EFlags : long {
  CFastaOstream::fAssembleParts = 1 << 0 , CFastaOstream::fInstantiateGaps = 1 << 1 , CFastaOstream::fSuppressRange = 1 << 2 , CFastaOstream::fReverseStrand = 1 << 3 ,
  CFastaOstream::fKeepGTSigns = 1 << 4 , CFastaOstream::fMapMasksUp = 1 << 5 , CFastaOstream::fMapMasksDown = 1 << 6 , CFastaOstream::fNoExpensiveOps = 1 << 7 ,
  CFastaOstream::fShowModifiers = 1 << 8 , CFastaOstream::fNoDupCheck = 1 << 9 , CFastaOstream::fShowGapModifiers = 1 << 10 , CFastaOstream::fKeepUnknGapNomLen = 1 << 11 ,
  CFastaOstream::fShowGapsOfSizeZero = 1 << 12 , CFastaOstream::fEnableGI = 1 << 13 , CFastaOstream::fHideGenBankPrefix = 1 << 14 , CFastaOstream::fHTMLEncode = 1 << 15 ,
  CFastaOstream::fIgnoreOriginalID = 1 << 16 , CFastaOstream::eAssembleParts = fAssembleParts , CFastaOstream::eInstantiateGaps = fInstantiateGaps , CFastaOstream::fUseAutoDef = 1 << 17 ,
  CFastaOstream::fBaseFirstUnused = 1 << 18 , CFastaOstream::fDoNotUseAutoDef = 1 << 19 , CFastaOstream::fShowGnlAndAcc = 1 << 20
}
 
enum  CFastaOstream::EGapMode { CFastaOstream::eGM_one_dash , CFastaOstream::eGM_dashes , CFastaOstream::eGM_letters , CFastaOstream::eGM_count }
 How to represent gaps with fInstantiateGaps enabled, as it is by default. More...
 
enum  CFastaOstream::EMaskType { CFastaOstream::eSoftMask = 1 , CFastaOstream::eHardMask = 2 }
 Which residues to mask out in subsequent output. More...
 
enum  CCdregion_translate::ETranslationLengthProblemOptions { CCdregion_translate::eThrowException = 0 , CCdregion_translate::eTruncate , CCdregion_translate::ePad }
 
enum  CSeqTranslator::ETranslationFlags {
  CSeqTranslator::fDefault = 0 , CSeqTranslator::fNoStop = (1<<0) , CSeqTranslator::fRemoveTrailingX = (1<<1) , CSeqTranslator::fIs5PrimePartial = (1<<2) ,
  CSeqTranslator::fIs3PrimePartial = (1<<3)
}
 
enum  SRelLoc::EFlags { SRelLoc::fNoMerge = 0x1 }
 
enum  CSeqSearch::ESearchFlag { CSeqSearch::fNoFlags = 0 , CSeqSearch::fJustTopStrand = 1 , CSeqSearch::fExpandPattern = 2 , CSeqSearch::fAllowMismatch = 4 }
 
enum  CSequenceAmbigTrimmer::EMeaningOfAmbig { CSequenceAmbigTrimmer::eMeaningOfAmbig_OnlyCompletelyUnknown , CSequenceAmbigTrimmer::eMeaningOfAmbig_AnyAmbig }
 This enum is used to set what is meant by "ambiguous". More...
 
enum  CSequenceAmbigTrimmer::EFlags { CSequenceAmbigTrimmer::fFlags_DoNotTrimBeginning = (1 << 0) , CSequenceAmbigTrimmer::fFlags_DoNotTrimEnd = (1 << 1) , CSequenceAmbigTrimmer::fFlags_DoNotTrimSeqGap = (1 << 2) }
 
enum  CSequenceAmbigTrimmer::EResult { CSequenceAmbigTrimmer::eResult_SuccessfullyTrimmed , CSequenceAmbigTrimmer::eResult_NoTrimNeeded }
 This indicates what happened with the trim. More...
 
enum  CBioseqGaps_CI::EFindNext { CBioseqGaps_CI::eFindNext_NotFound , CBioseqGaps_CI::eFindNext_Found }
 This indicates what happened when we tried to run x_FindNextGapOnBioseq. More...
 

Functions

 CDeflineGenerator::CDeflineGenerator (void)
 Constructor. More...
 
 CDeflineGenerator::CDeflineGenerator (const CSeq_entry_Handle &tseh)
 Constructor. More...
 
 CDeflineGenerator::~CDeflineGenerator (void)
 Destructor. More...
 
string CDeflineGenerator::GenerateDefline (const CBioseq_Handle &bsh, TUserFlags flags=0)
 Main method. More...
 
string CDeflineGenerator::GenerateDefline (const CBioseq_Handle &bsh, CSeqEntryIndex &idx, TUserFlags flags=0)
 Main method. More...
 
string CDeflineGenerator::GenerateDefline (const CBioseq &bioseq, CScope &scope, CSeqEntryIndex &idx, TUserFlags flags=0)
 Main method. More...
 
string CDeflineGenerator::GenerateDefline (const CBioseq_Handle &bsh, feature::CFeatTree &ftree, TUserFlags flags=0)
 Main method. More...
 
string CDeflineGenerator::GenerateDefline (const CBioseq &bioseq, CScope &scope, TUserFlags flags=0)
 Main method. More...
 
string CDeflineGenerator::GenerateDefline (const CBioseq &bioseq, CScope &scope, feature::CFeatTree &ftree, TUserFlags flags=0)
 Main method. More...
 
string CDeflineGenerator::x_GetModifiers (const CBioseq_Handle &handle)
 
bool CDeflineGenerator::UsePDBCompoundForDefline (void) const
 
 CDeflineGenerator::CDeflineGenerator (const CDeflineGenerator &)
 
CDeflineGeneratorCDeflineGenerator::operator= (const CDeflineGenerator &)
 
void CDeflineGenerator::x_Init (void)
 internal methods More...
 
void CDeflineGenerator::x_SetFlags (const CBioseq_Handle &bsh, TUserFlags flags)
 
void CDeflineGenerator::x_SetFlagsIdx (const CBioseq_Handle &bsh, TUserFlags flags)
 
void CDeflineGenerator::x_SetBioSrc (const CBioseq_Handle &bsh)
 
void CDeflineGenerator::x_SetBioSrcIdx (const CBioseq_Handle &bsh)
 
const char * CDeflineGenerator::x_OrganelleName (CBioSource::TGenome genome) const
 
bool CDeflineGenerator::x_CDShasLowQualityException (const CSeq_feat &sft)
 
void CDeflineGenerator::x_DescribeClones (vector< CTempString > &desc, string &buf)
 
CConstRef< CSeq_featCDeflineGenerator::x_GetLongestProtein (const CBioseq_Handle &bsh)
 
CConstRef< CGene_refCDeflineGenerator::x_GetGeneRefViaCDS (const CMappedFeat &mapped_cds)
 
void CDeflineGenerator::x_SetTitleFromBioSrc (void)
 
void CDeflineGenerator::x_SetTitleFromNC (void)
 
void CDeflineGenerator::x_SetTitleFromNM (const CBioseq_Handle &bsh)
 
void CDeflineGenerator::x_SetTitleFromNR (const CBioseq_Handle &bsh)
 
void CDeflineGenerator::x_SetTitleFromPatent (void)
 
void CDeflineGenerator::x_SetTitleFromPDB (void)
 
void CDeflineGenerator::x_SetTitleFromGPipe (void)
 
void CDeflineGenerator::x_SetTitleFromProtein (const CBioseq_Handle &bsh)
 
void CDeflineGenerator::x_SetTitleFromProteinIdx (const CBioseq_Handle &bsh)
 
void CDeflineGenerator::x_SetTitleFromSegSeq (const CBioseq_Handle &bsh)
 
void CDeflineGenerator::x_SetTitleFromWGS (void)
 
void CDeflineGenerator::x_SetTitleFromMap (void)
 
void CDeflineGenerator::x_SetPrefix (string &prefix, const CBioseq_Handle &bsh)
 
void CDeflineGenerator::x_SetSuffix (string &suffix, const CBioseq_Handle &bsh, bool appendComplete)
 
void CDeflineGenerator::x_AdjustProteinTitleSuffix (const CBioseq_Handle &bsh)
 
void CDeflineGenerator::x_AdjustProteinTitleSuffixIdx (const CBioseq_Handle &bsh)
 
bool CDeflineGenerator::x_IsComplete () const
 
 CDeflineGenerator::CLowQualityTextFsm::CLowQualityTextFsm (void)
 
virtual CGetOverlappingFeaturesPlugin::~CGetOverlappingFeaturesPlugin ()
 
virtual void CGetOverlappingFeaturesPlugin::processSAnnotSelector (SAnnotSelector &sel)=0
 
virtual void CGetOverlappingFeaturesPlugin::setUpFeatureIterator (CBioseq_Handle &bioseq_handle, unique_ptr< CFeat_CI > &feat_ci, TSeqPos circular_length, CRange< TSeqPos > &range, const CSeq_loc &loc, SAnnotSelector &sel, CScope &scope, ENa_strand &strand)=0
 
virtual void CGetOverlappingFeaturesPlugin::processLoc (CBioseq_Handle &bioseq_handle, CRef< CSeq_loc > &loc, TSeqPos circular_length)=0
 
virtual void CGetOverlappingFeaturesPlugin::processMainLoop (bool &shouldContinueToNextIteration, CRef< CSeq_loc > &cleaned_loc_this_iteration, CRef< CSeq_loc > &candidate_feat_loc, EOverlapType &overlap_type_this_iteration, bool &revert_locations_this_iteration, CBioseq_Handle &bioseq_handle, const CMappedFeat &feat, TSeqPos circular_length, SAnnotSelector::EOverlapType annot_overlap_type)=0
 
virtual void CGetOverlappingFeaturesPlugin::postProcessDiffAmount (Int8 &cur_diff, CRef< CSeq_loc > &cleaned_loc_this_iteration, CRef< CSeq_loc > &candidate_feat_loc, CScope &scope, SAnnotSelector &sel, TSeqPos circular_length)=0
 
virtual const char * CSeqIdFromHandleException::GetErrCodeString (void) const override
 
 CSeqIdFromHandleException::NCBI_EXCEPTION_DEFAULT (CSeqIdFromHandleException, CException)
 
 CFastaOstream::CFastaOstream (CNcbiOstream &out)
 
virtual CFastaOstream::~CFastaOstream ()
 
virtual void CFastaOstream::Write (const CSeq_entry_Handle &handle, const CSeq_loc *location=0)
 Unspecified locations designate complete sequences; non-empty custom titles override the usual title determination logic. More...
 
virtual void CFastaOstream::Write (const CBioseq_Handle &handle, const CSeq_loc *location=0, const string &custom_title=kEmptyStr)
 
virtual void CFastaOstream::WriteTitle (const CBioseq_Handle &handle, const CSeq_loc *location=0, const string &custom_title=kEmptyStr)
 
virtual void CFastaOstream::WriteSequence (const CBioseq_Handle &handle, const CSeq_loc *location=0, CSeq_loc::EOpFlags merge_flags=CSeq_loc::fMerge_AbuttingOnly)
 
void CFastaOstream::Write (const CSeq_entry &entry, const CSeq_loc *location=0, bool no_scope=false)
 These versions may set up a temporary object manager scope In the common case of a raw bioseq, no scope is needed. More...
 
void CFastaOstream::Write (const CBioseq &seq, const CSeq_loc *location=0, bool no_scope=false, const string &custom_title=kEmptyStr)
 
void CFastaOstream::WriteTitle (const CBioseq &seq, const CSeq_loc *location=0, bool no_scope=false, const string &custom_title=kEmptyStr)
 
virtual bool CFastaOstream::SkipBioseq (const CBioseq &)
 Used only by Write(CSeq_entry[_Handle], ...); permissive by default. More...
 
virtual bool CFastaOstream::SkipBioseq (const CBioseq_Handle &handle)
 Delegates to the non-handle version by default for compatibility with older code; newer code should override this version. More...
 
CConstRef< CSeq_locCFastaOstream::GetMask (EMaskType type) const
 
void CFastaOstream::SetMask (EMaskType type, CConstRef< CSeq_loc > location)
 
TSeqPos CFastaOstream::GetWidth (void) const
 Other parameters... More...
 
void CFastaOstream::SetWidth (TSeqPos width)
 
TFlags CFastaOstream::GetAllFlags (void) const
 
void CFastaOstream::SetAllFlags (TFlags flags)
 
void CFastaOstream::SetFlag (EFlags flag)
 
void CFastaOstream::ResetFlag (EFlags flag)
 
void CFastaOstream::SetGapMode (EGapMode mode)
 
EGapMode CFastaOstream::GetGapMode (void) const
 
void CFastaOstream::SGapModText::WriteAllModsAsFasta (CNcbiOstream &out) const
 This will write the modifiers in FASTA format. More...
 
static void CFastaOstream::GetGapModText (const CSeq_gap &seq_gap, SGapModText &out_gap_mod_text)
 Given a CSeq_gap object, this outputs the Gap information. More...
 
virtual void CFastaOstream::x_WriteSeqIds (const CBioseq &bioseq, const CSeq_loc *location)
 
virtual void CFastaOstream::x_WriteAsFasta (const CBioseq &bioseq)
 
virtual void CFastaOstream::x_GetBestId (CConstRef< CSeq_id > &gi_id, CConstRef< CSeq_id > &best_id, bool &hide_prefix, const CBioseq &bioseq)
 
virtual void CFastaOstream::x_WriteSeqTitle (const CBioseq_Handle &handle, const string &custom_title)
 
virtual void CFastaOstream::x_WriteBuffer (const char *buf, unsigned int count)
 
sequence::CDeflineGenerator::TUserFlags CFastaOstream::x_GetTitleFlags (void) const
 
CConstRef< CSeq_locCFastaOstream::x_MapMask (CSeq_loc_Mapper &mapper, const CSeq_loc &mask, const CSeq_id *base_seq_id, CScope *scope)
 
void CFastaOstream::x_GetMaskingStates (TMSMap &masking_states, const CSeq_id *base_seq_id, const CSeq_loc *location, CScope *scope)
 
void CFastaOstream::x_WriteSequence (const CSeqVector &vec, const TMSMap &masking_state)
 
static void CCdregion_translate::TranslateCdregion (string &prot, const CBioseq_Handle &bsh, const CSeq_loc &loc, const CCdregion &cdr, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=0, ETranslationLengthProblemOptions options=eThrowException)
 translation coding region into ncbieaa protein sequence More...
 
static void CCdregion_translate::TranslateCdregion (string &prot, const CSeq_feat &cds, CScope &scope, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=0, ETranslationLengthProblemOptions options=eThrowException)
 
static void CSeqTranslator::Translate (const string &seq, string &prot, const CGenetic_code *code, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=NULL, bool is_5prime_complete=true, bool is_3prime_complete=true)
 Translate a string using a specified genetic code. More...
 
static void CSeqTranslator::Translate (const string &seq, string &prot, TTranslationFlags flags=fDefault, const CGenetic_code *code=NULL, bool *alt_start=NULL)
 Translate a string using a specified genetic code. More...
 
static void CSeqTranslator::Translate (const CSeqVector &seq, string &prot, const CGenetic_code *code, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=NULL, bool is_5prime_complete=true, bool is_3prime_complete=true)
 Translate a seq-vector using a specified genetic code if the code is NULL, then the default genetic code is used. More...
 
static void CSeqTranslator::Translate (const CSeqVector &seq, string &prot, TTranslationFlags flags=fDefault, const CGenetic_code *code=NULL, bool *alt_start=NULL)
 Translate a seq-vector using a specified genetic code if the code is NULL, then the default genetic code is used. More...
 
static void CSeqTranslator::Translate (const CSeq_loc &loc, const CBioseq_Handle &handle, string &prot, const CGenetic_code *code=NULL, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=0)
 utility function: translate a given location on a sequence More...
 
static void CSeqTranslator::Translate (const CSeq_loc &loc, CScope &scope, string &prot, const CGenetic_code *code=NULL, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=0)
 utility function: translate a given location on a sequence More...
 
static void CSeqTranslator::Translate (const CSeq_feat &cds, CScope &scope, string &prot, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=0)
 Translate a CDRegion into a protein. More...
 
static CRef< CBioseqCSeqTranslator::TranslateToProtein (const CSeq_feat &cds, CScope &scope)
 
static bool CSeqTranslator::ChangeDeltaProteinToRawProtein (CRef< CBioseq > protein)
 
static CCdregion::EFrame CSeqTranslator::FindBestFrame (const CSeq_feat &cds, CScope &scope)
 Find "best" frame for a coding region. More...
 
static CCdregion::EFrame CSeqTranslator::FindBestFrame (const CSeq_feat &cds, CScope &scope, bool &ambiguous)
 
 SRelLoc::SRelLoc (const CSeq_loc &parent, const CSeq_loc &child, CScope *scope=0, TFlags flags=0)
 Beware: treats locations corresponding to different sequences as disjoint, even if one is actually a segment of the other. More...
 
 SRelLoc::SRelLoc (const CSeq_loc &parent, const TRanges &ranges)
 For manual work. As noted above, ranges need not contain any IDs. More...
 
CRef< CSeq_locSRelLoc::Resolve (CScope *scope=0, TFlags flags=0) const
 
CRef< CSeq_locSRelLoc::Resolve (const CSeq_loc &new_parent, CScope *scope=0, TFlags flags=0) const
 
 CSeqSearch::CPatternInfo::CPatternInfo (const string &name, const string &sequence, Int2 cut_site)
 constructor More...
 
const stringCSeqSearch::CPatternInfo::GetName (void) const
 
const stringCSeqSearch::CPatternInfo::GetSequence (void) const
 
Int2 CSeqSearch::CPatternInfo::GetCutSite (void) const
 
ENa_strand CSeqSearch::CPatternInfo::GetStrand (void) const
 
virtual CSeqSearch::IClient::~IClient ()
 
virtual bool CSeqSearch::IClient::OnPatternFound (const TPatternInfo &pat_info, TSeqPos pos)=0
 
 CSeqSearch::CSeqSearch (IClient *client=0, TSearchFlags flags=fNoFlags)
 constructors More...
 
 CSeqSearch::~CSeqSearch (void)
 destructor More...
 
void CSeqSearch::AddNucleotidePattern (const string &name, const string &sequence, Int2 cut_site, TSearchFlags flags=fNoFlags)
 Add nucleotide pattern or restriction site to sequence search. More...
 
void CSeqSearch::Search (const CBioseq_Handle &seq)
 Search the sequence for patterns. More...
 
int CSeqSearch::Search (int current_state, char ch, int position, int length=kMax_Int)
 Low level search method. More...
 
const IClientCSeqSearch::GetClient () const
 Get / Set client. More...
 
void CSeqSearch::SetClient (IClient *client)
 
void CSeqSearch::x_AddNucleotidePattern (const string &name, string &pattern, Int2 cut_site, ENa_strand strand, TSearchFlags flags)
 
void CSeqSearch::x_ExpandPattern (string &sequence, string &buffer, size_t pos, TPatternInfo &pat_info, TSearchFlags flags)
 
void CSeqSearch::x_AddPattern (TPatternInfo &pat_info, string &sequence, TSearchFlags flags)
 
void CSeqSearch::x_StorePattern (TPatternInfo &pat_info, string &sequence)
 
bool CSeqSearch::x_IsJustTopStrand (TSearchFlags flags) const
 
bool CSeqSearch::x_IsExpandPattern (TSearchFlags flags) const
 
bool CSeqSearch::x_IsAllowMismatch (TSearchFlags flags) const
 
static const TTrimRuleVecCSequenceAmbigTrimmer::GetDefaultTrimRules (void)
 This returns a reasonable default for trimming rules. More...
 
 CSequenceAmbigTrimmer::CSequenceAmbigTrimmer (EMeaningOfAmbig eMeaningOfAmbig, TFlags fFlags=0, const TTrimRuleVec &vecTrimRules=GetDefaultTrimRules(), TSignedSeqPos uMinSeqLen=50)
 This sets up the parameters for how this trimmer will act. More...
 
virtual CSequenceAmbigTrimmer::~CSequenceAmbigTrimmer ()
 Do-nothing destructor just to allow inheritance. More...
 
virtual EResult CSequenceAmbigTrimmer::DoTrim (CBioseq_Handle &bioseq_handle, CRangeCollection< TSeqPos > *trimmed_ranges=nullptr)
 This trims the given bioseq, using params set in the CSequenceAmbigTrimmer constructor. More...
 
bool CSequenceAmbigTrimmer::x_TestFlag (TFlags fFlag)
 Test if a given flag is set. More...
 
virtual void CSequenceAmbigTrimmer::x_NormalizeVecTrimRules (TTrimRuleVec &vecTrimRules)
 This prepares the vector of trimming rules to be used by the trimming algorithm. More...
 
virtual EResult CSequenceAmbigTrimmer::x_TrimToNothing (CBioseq_Handle &bioseq_handle)
 The bioseq is trimmed to size 0. More...
 
virtual TSignedSeqPos CSequenceAmbigTrimmer::x_FindWhereToTrim (const CSeqVector &seqvec, const TSignedSeqPos iStartPosInclusive_arg, const TSignedSeqPos iEndPosInclusive_arg, TSignedSeqPos iTrimDirection)
 This returns the last good base that won't be trimmed (note: last really means "first" when we're starting from the end) More...
 
virtual void CSequenceAmbigTrimmer::x_EdgeSeqMapGapAdjust (const CSeqVector &seqvec, TSignedSeqPos &in_out_uStartOfGoodBasesSoFar, const TSignedSeqPos uEndOfGoodBasesSoFar, const TSignedSeqPos iTrimDirection, const TSignedSeqPos uChunkSize)
 This adjusts in_out_uStartOfGoodBasesSoFar if we're at a CSeqMap gap. More...
 
 CSequenceAmbigTrimmer::SAmbigCount::SAmbigCount (const TSignedSeqPos iTrimDirection)
 
virtual void CSequenceAmbigTrimmer::x_CountAmbigInRange (SAmbigCount &out_result, const CSeqVector &seqvec, const TSignedSeqPos iStartPosInclusive_arg, const TSignedSeqPos iEndPosInclusive_arg, const TSignedSeqPos iTrimDirection)
 This counts the number of ambiguous bases in the range [leftmost_pos_to_check, rightmost_pos_to_check]. More...
 
TSignedSeqPos CSequenceAmbigTrimmer::x_SegmentGetBeginningInclusive (const CSeqMap_CI &segment, const TSignedSeqPos iTrimDirection)
 This returns the (inclusive) position at the beginning of the segment. More...
 
TSignedSeqPos CSequenceAmbigTrimmer::x_SegmentGetEndInclusive (const CSeqMap_CI &segment, const TSignedSeqPos iTrimDirection)
 This returns the (inclusive) position at the end of the segment currently at iStartPosInclusive_arg. More...
 
CSeqMap_CICSequenceAmbigTrimmer::x_SeqMapIterDoNext (CSeqMap_CI &in_out_segment_it, const TSignedSeqPos iTrimDirection)
 Returns the "next" segment. More...
 
void CSequenceAmbigTrimmer::x_SliceBioseq (TSignedSeqPos leftmost_good_base, TSignedSeqPos rightmost_good_base, CBioseq_Handle &bioseq_handle)
 
 CBioseqGaps_CI::Params::Params (void)
 Default ctor gives params which are usually reasonable. More...
 
 CBioseqGaps_CI::CBioseqGaps_CI (const CSeq_entry_Handle &entry_h, const Params &params=Params())
 This constructor initializes the iterator. More...
 
CBioseqGaps_CICBioseqGaps_CI::operator++ (void)
 Move the iterator forward to next gap (or the end, if there are no more to return) More...
 
 CBioseqGaps_CI::DECLARE_OPERATOR_BOOL (m_bioseq_CI)
 
 CBioseqGaps_CI::SCurrentGapInfo::SCurrentGapInfo (void)
 Constructor initializes to state that it should be when the iterator first starts. More...
 
const SCurrentGapInfoCBioseqGaps_CI::operator* (void) const
 Get information about the gap we're currently on. More...
 
const SCurrentGapInfoCBioseqGaps_CI::operator-> (void) const
 Get information about the gap we're currently on. More...
 
virtual const SCurrentGapInfoCBioseqGaps_CI::x_GetCurrent (void) const
 This gives info on the gap we're currently on. More...
 
virtual void CBioseqGaps_CI::x_Next (void)
 This moves this iterator to the next relevant gap. More...
 
virtual void CBioseqGaps_CI::x_NextBioseq (void)
 This advances m_bioseq_CI although it has extra logic to terminate m_bioseq_CI if we've exceeded the number of bioseqs we can look for. More...
 
virtual EFindNext CBioseqGaps_CI::x_FindNextGapOnBioseq (const CBioseq_Handle &bioseq_h, const TSeqPos pos_to_start_looking, TSeqPos &out_pos_of_gap, TSeqPos &out_len_of_gap) const
 This finds the next gap on the bioseq, starting at given pos. More...
 

Variables

CRef< CSeqEntryIndexCDeflineGenerator::m_Idx
 index with feature tree for each Bioseq More...
 
CSeq_entry_Handle CDeflineGenerator::m_TopSEH
 internal feature tree for parent mapping More...
 
CRef< feature::CFeatTree > CDeflineGenerator::m_Feat_Tree
 
bool CDeflineGenerator::m_ConstructedFeatTree
 
bool CDeflineGenerator::m_InitializedFeatTree
 
bool CDeflineGenerator::m_Reconstruct
 ignore existing title is forced for certain types More...
 
bool CDeflineGenerator::m_AllProtNames
 
bool CDeflineGenerator::m_LocalAnnotsOnly
 
bool CDeflineGenerator::m_GpipeMode
 
bool CDeflineGenerator::m_OmitTaxonomicName
 
bool CDeflineGenerator::m_DevMode
 
bool CDeflineGenerator::m_IsNA
 seq-inst fields More...
 
bool CDeflineGenerator::m_IsAA
 
CSeq_inst::TTopology CDeflineGenerator::m_Topology
 
CSeq_inst::TLength CDeflineGenerator::m_Length
 
bool CDeflineGenerator::m_IsSeg
 
bool CDeflineGenerator::m_IsDelta
 
bool CDeflineGenerator::m_IsVirtual
 
bool CDeflineGenerator::m_IsMap
 
bool CDeflineGenerator::m_IsNC
 seq-id fields More...
 
bool CDeflineGenerator::m_IsNM
 
bool CDeflineGenerator::m_IsNR
 
bool CDeflineGenerator::m_IsNZ
 
bool CDeflineGenerator::m_IsPatent
 
bool CDeflineGenerator::m_IsPDB
 
bool CDeflineGenerator::m_IsWP
 
bool CDeflineGenerator::m_ThirdParty
 
bool CDeflineGenerator::m_WGSMaster
 
bool CDeflineGenerator::m_TSAMaster
 
bool CDeflineGenerator::m_TLSMaster
 
string CDeflineGenerator::m_MainTitle
 
string CDeflineGenerator::m_GeneralStr
 
int CDeflineGenerator::m_GeneralId
 
string CDeflineGenerator::m_PatentCountry
 
string CDeflineGenerator::m_PatentNumber
 
int CDeflineGenerator::m_PatentSequence
 
int CDeflineGenerator::m_PDBChain
 
string CDeflineGenerator::m_PDBChainID
 
CMolInfo::TBiomol CDeflineGenerator::m_MIBiomol
 molinfo fields More...
 
CMolInfo::TTech CDeflineGenerator::m_MITech
 
CMolInfo::TCompleteness CDeflineGenerator::m_MICompleteness
 
bool CDeflineGenerator::m_HTGTech
 
bool CDeflineGenerator::m_HTGSUnfinished
 
bool CDeflineGenerator::m_IsTLS
 
bool CDeflineGenerator::m_IsTSA
 
bool CDeflineGenerator::m_IsWGS
 
bool CDeflineGenerator::m_IsEST_STS_GSS
 
bool CDeflineGenerator::m_UseBiosrc
 
bool CDeflineGenerator::m_HTGSCancelled
 genbank or embl block keyword fields More...
 
bool CDeflineGenerator::m_HTGSDraft
 
bool CDeflineGenerator::m_HTGSPooled
 
bool CDeflineGenerator::m_TPAExp
 
bool CDeflineGenerator::m_TPAInf
 
bool CDeflineGenerator::m_TPAReasm
 
bool CDeflineGenerator::m_Unordered
 
CTempString CDeflineGenerator::m_PDBCompound
 pdb block fields More...
 
CConstRef< CBioSourceCDeflineGenerator::m_Source
 biosource fields More...
 
CTempString CDeflineGenerator::m_Taxname
 
CTempString CDeflineGenerator::m_Genus
 
CTempString CDeflineGenerator::m_Species
 
bool CDeflineGenerator::m_Multispecies
 
CBioSource::TGenome CDeflineGenerator::m_Genome
 
bool CDeflineGenerator::m_IsPlasmid
 
bool CDeflineGenerator::m_IsChromosome
 
CTempString CDeflineGenerator::m_Organelle
 
string CDeflineGenerator::m_FirstSuperKingdom
 
string CDeflineGenerator::m_SecondSuperKingdom
 
bool CDeflineGenerator::m_IsCrossKingdom
 
CTempString CDeflineGenerator::m_Chromosome
 subsource fields More...
 
CTempString CDeflineGenerator::m_LinkageGroup
 
CTempString CDeflineGenerator::m_Clone
 
bool CDeflineGenerator::m_has_clone
 
CTempString CDeflineGenerator::m_Map
 
CTempString CDeflineGenerator::m_Plasmid
 
CTempString CDeflineGenerator::m_Segment
 
CTempString CDeflineGenerator::m_Breed
 orgmod fields More...
 
CTempString CDeflineGenerator::m_Cultivar
 
CTempString CDeflineGenerator::m_SpecimenVoucher
 
CTempString CDeflineGenerator::m_Isolate
 
CTempString CDeflineGenerator::m_Strain
 
CTempString CDeflineGenerator::m_Substrain
 
CTempString CDeflineGenerator::m_MetaGenomeSource
 
bool CDeflineGenerator::m_IsUnverified
 user object fields More...
 
CTempString CDeflineGenerator::m_UnverifiedPrefix
 
bool CDeflineGenerator::m_IsUnreviewed
 
CTempString CDeflineGenerator::m_UnreviewedPrefix
 
CTempString CDeflineGenerator::m_TargetedLocus
 
CTempString CDeflineGenerator::m_Comment
 comment fields More...
 
bool CDeflineGenerator::m_IsPseudogene
 
string CDeflineGenerator::m_rEnzyme
 map fields More...
 
bool CDeflineGenerator::m_UsePDBCompoundForDefline
 
bool CDeflineGenerator::m_FastaFormat
 
static CSafeStatic< CLowQualityTextFsmCDeflineGenerator::ms_p_Low_Quality_Fsa
 
string CFastaOstream::SGapModText::gap_type
 String representing the gap type. More...
 
vector< stringCFastaOstream::SGapModText::gap_linkage_evidences
 A vector representing the linkage-evidences of the gap. More...
 
CNcbiOstreamCFastaOstream::m_Out
 
unique_ptr< sequence::CDeflineGenerator > CFastaOstream::m_Gen
 
TFlags CFastaOstream::m_Flags
 
CConstRef< CSeq_locCFastaOstream::m_SoftMask
 
CConstRef< CSeq_locCFastaOstream::m_HardMask
 
TSeqPos CFastaOstream::m_Width
 
EGapMode CFastaOstream::m_GapMode
 
TSeq_id_HandleSet CFastaOstream::m_PreviousWholeIds
 
TCharBuf CFastaOstream::m_Dashes
 
TCharBuf CFastaOstream::m_LC_Ns
 
TCharBuf CFastaOstream::m_LC_Xs
 
TCharBuf CFastaOstream::m_UC_Ns
 
TCharBuf CFastaOstream::m_UC_Xs
 
CConstRef< CSeq_locSRelLoc::m_ParentLoc
 
TRanges SRelLoc::m_Ranges
 
string CSeqSearch::CPatternInfo::m_Name
 data More...
 
string CSeqSearch::CPatternInfo::m_Sequence
 user defined name More...
 
Int2 CSeqSearch::CPatternInfo::m_CutSite
 nucleotide sequence More...
 
ENa_strand CSeqSearch::CPatternInfo::m_Strand
 
IClientCSeqSearch::m_Client
 
TSearchFlags CSeqSearch::m_Flags
 
size_t CSeqSearch::m_LongestPattern
 
CTextFsm< TPatternInfoCSeqSearch::m_Fsa
 
TSignedSeqPos CSequenceAmbigTrimmer::STrimRule::bases_to_check
 
TSignedSeqPos CSequenceAmbigTrimmer::STrimRule::max_bases_allowed_to_be_ambig
 
EMeaningOfAmbig CSequenceAmbigTrimmer::m_eMeaningOfAmbig
 This holds the current interpretation for "ambiguous". More...
 
TFlags CSequenceAmbigTrimmer::m_fFlags
 This holds the flags that affect the behavior of this class. More...
 
TTrimRuleVec CSequenceAmbigTrimmer::m_vecTrimRules
 This holds the trimming rules that will be applied. More...
 
TSignedSeqPos CSequenceAmbigTrimmer::m_uMinSeqLen
 When the bioseq gets trimmed down to less than this size, we halt the trimming. More...
 
TSignedSeqPos CSequenceAmbigTrimmer::SAmbigCount::num_ambig_bases
 the number of ambiguous bases found in the range supplied to x_CountAmbigInRange More...
 
TSignedSeqPos CSequenceAmbigTrimmer::SAmbigCount::pos_after_last_gap
 Inclusive. More...
 
TAmbigLookupTable CSequenceAmbigTrimmer::m_arrNucAmbigLookupTable
 
TAmbigLookupTable CSequenceAmbigTrimmer::m_arrProtAmbigLookupTable
 
TSeqPos CBioseqGaps_CI::Params::max_gap_len_to_ignore
 We completely ignore any gaps we find that have this number of bases or fewer. More...
 
TSeqPos CBioseqGaps_CI::Params::max_num_gaps_per_seq
 We only return up to this many gaps for each sequence. More...
 
TSeqPos CBioseqGaps_CI::Params::max_num_seqs
 We only return gaps on up to this many sequences. More...
 
CSeq_inst::EMol CBioseqGaps_CI::Params::mol_filter
 CSeq_inst::eMol_na to only look at gaps on nucleotide sequences. More...
 
CBioseq_CI::EBioseqLevelFlag CBioseqGaps_CI::Params::level_filter
 Works like the level filter in CBioseq_CI. More...
 
CSeq_id_Handle CBioseqGaps_CI::SCurrentGapInfo::seq_id
 The seq-id that this gap is on. More...
 
size_t CBioseqGaps_CI::SCurrentGapInfo::num_seqs_seen_so_far
 This indicates how many sequences we've seen so far, including the one we're currently on. More...
 
TSeqPos CBioseqGaps_CI::SCurrentGapInfo::start_pos
 the 0-based position at which the current gap starts on the current sequence. More...
 
TSeqPos CBioseqGaps_CI::SCurrentGapInfo::length
 the length of the current gap More...
 
size_t CBioseqGaps_CI::SCurrentGapInfo::num_gaps_seen_so_far_on_this_seq
 how many gaps we've seen so far on this sequence. More...
 
CBioseq_CI CBioseqGaps_CI::m_bioseq_CI
 This points to the bioseq we're currently on. More...
 
SCurrentGapInfo CBioseqGaps_CI::m_infoOnCurrentGap
 This indicates information about the gap we're currently on. More...
 
Params CBioseqGaps_CI::m_Params
 This holds the params the caller gave when this object was initially created. More...
 

Friends

class CSeqSearch::CPatternInfo::CSeqSearch
 

SeqIdConv

Conversions between seq-id types

enum  EAccessionVersion { eWithAccessionVersion , eWithoutAccessionVersion }
 
enum  EGetIdFlags {
  eGetId_ForceGi = 0x0000 , eGetId_ForceAcc = 0x0001 , eGetId_Best = 0x0002 , eGetId_HandleDefault = 0x0003 ,
  eGetId_Seq_id_Score = 0x0004 , eGetId_Seq_id_BestRank = 0x0005 , eGetId_Seq_id_WorstRank = 0x0006 , eGetId_Seq_id_FastaAARank = 0x0007 ,
  eGetId_Seq_id_FastaNARank = 0x0008 , eGetId_Canonical = eGetId_Seq_id_BestRank , eGetId_TypeMask = 0x00FF , eGetId_VerifyId = 0x0100 ,
  eGetId_ThrowOnError = 0x0200 , eGetId_Default = eGetId_Best | eGetId_ThrowOnError
}
 Retrieve a particular seq-id from a given bioseq handle. More...
 
typedef int EGetIdType
 
TGi GetGiForAccession (const string &acc, CScope &scope, EGetIdType flags=0)
 Given an accession string retrieve the GI id. More...
 
string GetAccessionForGi (TGi gi, CScope &scope, EAccessionVersion use_version=eWithAccessionVersion, EGetIdType flags=0)
 Retrieve the accession for a given GI. More...
 
TGi GetGiForId (const objects::CSeq_id &id, CScope &scope, EGetIdType flags=0)
 Given a Seq-id retrieve the corresponding GI. More...
 
string GetAccessionForId (const objects::CSeq_id &id, CScope &scope, EAccessionVersion use_version=eWithAccessionVersion, EGetIdType flags=0)
 Retrieve the accession string for a Seq-id. More...
 
CSeq_id_Handle GetId (const CBioseq_Handle &handle, EGetIdType type=eGetId_Default)
 Return a selected ID type for a given bioseq handle. More...
 
CSeq_id_Handle GetId (const CSeq_id &id, CScope &scope, EGetIdType type=eGetId_Default)
 Return a selected ID type for a seq-id. More...
 
CSeq_id_Handle GetId (const CSeq_id_Handle &id, CScope &scope, EGetIdType type=eGetId_Default)
 Return a selected ID type for a seq-id handle. More...
 
CSeq_id_Handle GetId (const CBioseq::TId &id, EGetIdType type=eGetId_Default)
 Return a selected ID type from a set of Seq-ids Arguments (except 'id') and behavior is the same as of GetId(const CSeq_id& id, ...). More...
 
CSeq_id_Handle GetId (const CBioseq &seq, EGetIdType type=eGetId_Default)
 Return a selected ID type from a Bioseq Arguments (except 'seq') and behavior is the same as of GetId(const CBioseq_Handle& seq, ...). More...
 

FindLatestSequence

Walk the replace history to find the latest revision of a sequence

CConstRef< CSeq_idFindLatestSequence (const CSeq_id &id, CScope &scope)
 Given a seq-id check its replace history and try to find the latest revision. More...
 
CSeq_id_Handle FindLatestSequence (const CSeq_id_Handle &idh, CScope &scope)
 
CConstRef< CSeq_idFindLatestSequence (const CSeq_id &id, CScope &scope, const CTime &tlim)
 Check replace history up to the specified date. More...
 
CSeq_id_Handle FindLatestSequence (const CSeq_id_Handle &idh, CScope &scope, const CTime &tlim)
 

GetTitle

Get sequence's title (used in various flat-file formats.) Deprecated in favor of CDeflineGenerator.

enum  EGetTitleFlags { fGetTitle_Reconstruct = 0x1 , fGetTitle_Organism = 0x2 , fGetTitle_AllProteins = 0x4 , fGetTitle_NoExpensive = 0x8 }
 This function is here rather than in CBioseq because it may need to inspect other sequences. More...
 
typedef int TGetTitleFlags
 
NCBI_XOBJUTIL_EXPORT string GetTitle (const CBioseq_Handle &hnd, TGetTitleFlags flags=0)
 
NCBI_XOBJUTIL_EXPORT bool GetTitle (const CBioseq &seq, string *title_ptr, TGetTitleFlags flags=0)
 

Source and Product

Mapping locations through features

enum  ES2PFlags { fS2P_NoMerge = 0x1 , fS2P_AllowTer = 0x2 }
 
enum  EP2SFlags { fP2S_Extend = 0x1 }
 
typedef int TS2PFlags
 
typedef int TP2SFlags
 
CRef< CSeq_locSourceToProduct (const CSeq_feat &feat, const CSeq_loc &source_loc, TS2PFlags flags=0, CScope *scope=0, int *frame=0)
 
CRef< CSeq_locProductToSource (const CSeq_feat &feat, const CSeq_loc &prod_loc, TP2SFlags flags=0, CScope *scope=0)
 

Overlapping

Searching for features

enum  EBestFeatOpts {
  fBestFeat_StrictMatch = 0x01 , fBestFeat_NoExpensive = 0x02 , fBestFeat_FavorLonger = 0x04 , fBestFeat_IgnoreStrand = 0x08 ,
  fBestFeat_Defaults = 0
}
 
enum  ETransSplicing { eTransSplicing_No = 0 , eTransSplicing_Yes , eTransSplicing_Auto }
 Convenience functions for popular overlapping types. More...
 
typedef int TBestFeatOpts
 
typedef pair< Int8, CConstRef< CSeq_feat > > TFeatScore
 Storage for features and scores. More...
 
typedef vector< TFeatScoreTFeatScores
 
void GetOverlappingFeatures (const CSeq_loc &loc, CSeqFeatData::E_Choice feat_type, CSeqFeatData::ESubtype feat_subtype, EOverlapType overlap_type, TFeatScores &feats, CScope &scope, const TBestFeatOpts opts=0, CGetOverlappingFeaturesPlugin *plugin=NULL)
 Find all features overlapping the location. More...
 
CConstRef< CSeq_featGetBestOverlappingFeat (const CSeq_loc &loc, CSeqFeatData::E_Choice feat_type, EOverlapType overlap_type, CScope &scope, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 See the note above on 'overlap_type' meaning. More...
 
CConstRef< CSeq_featGetBestOverlappingFeat (const CSeq_loc &loc, CSeqFeatData::ESubtype feat_type, EOverlapType overlap_type, CScope &scope, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 See the note above on 'overlap_type' meaning. More...
 
CConstRef< CSeq_featGetBestGeneForMrna (const CSeq_feat &mrna_feat, CScope &scope, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetBestGeneForCds (const CSeq_feat &cds_feat, CScope &scope, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetBestMrnaForCds (const CSeq_feat &cds_feat, CScope &scope, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetBestCdsForMrna (const CSeq_feat &mrna_feat, CScope &scope, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
void GetMrnasForGene (const CSeq_feat &gene_feat, CScope &scope, list< CConstRef< CSeq_feat > > &mrna_feats, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
void GetCdssForGene (const CSeq_feat &gene_feat, CScope &scope, list< CConstRef< CSeq_feat > > &cds_feats, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetBestGeneForMrna (const CSeq_feat &mrna_feat, const CTSE_Handle &tse, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetBestGeneForCds (const CSeq_feat &cds_feat, const CTSE_Handle &tse, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetBestMrnaForCds (const CSeq_feat &cds_feat, const CTSE_Handle &tse, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetBestCdsForMrna (const CSeq_feat &mrna_feat, const CTSE_Handle &tse, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
void GetMrnasForGene (const CSeq_feat &gene_feat, const CTSE_Handle &tse, list< CConstRef< CSeq_feat > > &mrna_feats, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
void GetCdssForGene (const CSeq_feat &gene_feat, const CTSE_Handle &tse, list< CConstRef< CSeq_feat > > &cds_feats, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetBestOverlappingFeat (const CSeq_feat &feat, CSeqFeatData::E_Choice feat_type, sequence::EOverlapType overlap_type, CScope &scope, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetBestOverlappingFeat (const CSeq_feat &feat, CSeqFeatData::ESubtype feat_type, sequence::EOverlapType overlap_type, CScope &scope, TBestFeatOpts opts=fBestFeat_Defaults, CGetOverlappingFeaturesPlugin *plugin=NULL)
 
CConstRef< CSeq_featGetmRNAforCDS (const CSeq_feat &cds, CScope &scope)
 GetmRNAforCDS A function to find a CSeq_feat representing the appropriate mRNA for a given CDS. More...
 
CConstRef< CSeq_featGetBestOverlapForSNP (const CSeq_feat &snp_feat, CSeqFeatData::E_Choice type, CScope &scope, bool search_both_strands=true)
 Get the best overlapping feature for a SNP (variation) feature. More...
 
CConstRef< CSeq_featGetBestOverlapForSNP (const CSeq_feat &snp_feat, CSeqFeatData::ESubtype subtype, CScope &scope, bool search_both_strands=true)
 Get the best overlapping feature for a SNP (variation) More...
 
CConstRef< CSeq_featGetOverlappingGene (const CSeq_loc &loc, CScope &scope, ETransSplicing eTransSplicing=eTransSplicing_Auto)
 
CConstRef< CSeq_featGetGeneForFeature (const CSeq_feat &feat, CScope &scope)
 Finds gene for feature, but obeys SeqFeatXref directives. More...
 
bool IsPseudo (const CSeq_feat &feat, CScope &scope)
 Determines whether given feature is pseudo, using gene associated with feature if necessary Checks to see if a feature is pseudo. More...
 
CConstRef< CSeq_featGetOverlappingmRNA (const CSeq_loc &loc, CScope &scope)
 
CConstRef< CSeq_featGetOverlappingCDS (const CSeq_loc &loc, CScope &scope)
 
CConstRef< CSeq_featGetOverlappingPub (const CSeq_loc &loc, CScope &scope)
 
CConstRef< CSeq_featGetOverlappingSource (const CSeq_loc &loc, CScope &scope)
 
CConstRef< CSeq_featGetOverlappingOperon (const CSeq_loc &loc, CScope &scope)
 
const CSeq_featGetCDSForProduct (const CBioseq &product, CScope *scope)
 Get the encoding CDS feature of a given protein sequence. More...
 
const CSeq_featGetCDSForProduct (const CBioseq_Handle &product)
 
CMappedFeat GetMappedCDSForProduct (const CBioseq_Handle &product)
 
const CSeq_featGetPROTForProduct (const CBioseq &product, CScope *scope)
 Get the mature peptide feature of a protein. More...
 
const CSeq_featGetPROTForProduct (const CBioseq_Handle &product)
 
const CSeq_featGetmRNAForProduct (const CBioseq &product, CScope *scope)
 Get the encoding mRNA feature of a given mRNA (cDNA) bioseq. More...
 
const CSeq_featGetmRNAForProduct (const CBioseq_Handle &product)
 
CMappedFeat GetMappedmRNAForProduct (const CBioseq_Handle &product)
 

Sequences

Searching for bioseqs etc.

const CBioseqGetNucleotideParent (const CBioseq &product, CScope *scope)
 Get the encoding nucleotide sequnce of a protein. More...
 
CBioseq_Handle GetNucleotideParent (const CBioseq_Handle &product)
 
CBioseq_Handle GetParentForPart (const CBioseq_Handle &part)
 Get the parent bioseq for a part of a segmented bioseq. More...
 
const COrg_refGetOrg_ref (const CBioseq_Handle &handle)
 Return the org-ref associated with a given sequence. More...
 
const COrg_refGetOrg_refOrNull (const CBioseq_Handle &handle)
 Return the pointer to org-ref associated with a given sequence or null if there is no org-ref associated with the sequence. More...
 
TTaxId GetTaxId (const CBioseq_Handle &handle)
 return the tax-id associated with a given sequence. More...
 
const CMolInfoGetMolInfo (const CBioseq &bioseq)
 Retrieve the MolInfo object for a given bioseq handle. More...
 
const CMolInfoGetMolInfo (const CBioseq_Handle &handle)
 
const CBioSourceGetBioSource (const CBioseq &bioseq)
 Retrieve the BioSource object for a given bioseq handle. More...
 
const CBioSourceGetBioSource (const CBioseq_Handle &handle)
 
CBioseq_Handle GetBioseqFromSeqLoc (const CSeq_loc &loc, CScope &scope, CScope::EGetBioseqFlag flag=CScope::eGetBioseq_Loaded)
 Retrieve the Bioseq Handle from a location. More...
 
string GetProteinName (const CBioseq_Handle &seq)
 Return protein name from corresponding Prot-ref feature. More...
 
CConstRef< CSeq_featGetSourceFeatForProduct (const CBioseq_Handle &bsh)
 
TTaxId GetTaxIdForProduct (const CBioseq_Handle &bsh)
 
void GetOrg_refForProduct (const CBioseq_Handle &bsh, const COrg_ref *)
 
const COrg_refGetOrg_refForBioseq (const CBioseq_Handle &bsh)
 Find an Org-ref for the given Bioseq: If it's a protein then look on the source feature of the product. More...
 
const CBioSourceGetBioSourceForBioseq (const CBioseq_Handle &bsh)
 Find a BioSource for the given Bioseq: If it's a protein then look for the source feature of the product. More...
 
void ReverseComplement (CSeq_inst &seq, CScope *scope)
 Reverse complement a Bioseq in place. More...
 

Detailed Description

Typedef Documentation

◆ EGetIdType

typedef int EGetIdType

Definition at line 126 of file sequence.hpp.

◆ TAmbigLookupTable

typedef bool CSequenceAmbigTrimmer::TAmbigLookupTable[26]
protected

Definition at line 1566 of file sequence.hpp.

◆ TBestFeatOpts

typedef int TBestFeatOpts

Definition at line 348 of file sequence.hpp.

◆ TCharBuf

typedef AutoPtr<char, ArrayDeleter<char> > CFastaOstream::TCharBuf
private

Definition at line 915 of file sequence.hpp.

◆ TFeatScore

typedef pair<Int8, CConstRef<CSeq_feat> > TFeatScore

Storage for features and scores.

Definition at line 352 of file sequence.hpp.

◆ TFeatScores

typedef vector<TFeatScore> TFeatScores

Definition at line 353 of file sequence.hpp.

◆ TFlags [1/3]

typedef long CFastaOstream::TFlags

binary OR of EFlags

Definition at line 798 of file sequence.hpp.

◆ TFlags [2/3]

binary OR of EFlags

Definition at line 1128 of file sequence.hpp.

◆ TFlags [3/3]

Definition at line 1309 of file sequence.hpp.

◆ TGetTitleFlags

Definition at line 287 of file sequence.hpp.

◆ TMSMap

typedef map<TSeqPos, int> CFastaOstream::TMSMap
private

Definition at line 928 of file sequence.hpp.

◆ TP2SFlags

typedef int TP2SFlags

Definition at line 316 of file sequence.hpp.

◆ TPatternInfo [1/2]

Definition at line 1195 of file sequence.hpp.

◆ TPatternInfo [2/2]

Definition at line 1207 of file sequence.hpp.

◆ TRange

For relative ranges (ONLY), id is irrelevant and normally unset.

Definition at line 1131 of file sequence.hpp.

◆ TRanges

typedef vector<CRef<TRange> > SRelLoc::TRanges

Definition at line 1132 of file sequence.hpp.

◆ TS2PFlags

typedef int TS2PFlags

Definition at line 306 of file sequence.hpp.

◆ TSearchFlags

typedef unsigned int CSeqSearch::TSearchFlags

binary OR of ESearchFlag

Definition at line 1220 of file sequence.hpp.

◆ TTranslationFlags

Definition at line 988 of file sequence.hpp.

◆ TTrimRuleVec

Multiple STrimRules are allowed, which are applied from smallest bases_to_check to largest bases_to_check, and redundant rules are automatically removed.

When a rule is applied, we start over at the first sorted rule again.

Definition at line 1322 of file sequence.hpp.

◆ TUserFlags

Binary "OR" of EUserFlags.

Definition at line 97 of file create_defline.hpp.

Enumeration Type Documentation

◆ EAccessionVersion

Enumerator
eWithAccessionVersion 

accession.version (when possible)

eWithoutAccessionVersion 

accession only, even if version is available

Definition at line 90 of file sequence.hpp.

◆ EBestFeatOpts

Enumerator
fBestFeat_StrictMatch 

requires explicit association, rather than analysis based on overlaps

fBestFeat_NoExpensive 

don't perform any expensive tests, such as ones that require fetching additional sequences

fBestFeat_FavorLonger 

favor longer features over shorter features

fBestFeat_IgnoreStrand 

Pay no attention to strands when finding the best feat.

This may be useful for, e.g., trans-spliced genes.

fBestFeat_Defaults 

default options: do everything

Definition at line 330 of file sequence.hpp.

◆ EErrCode

Enumerator
eNoSynonyms 
eRequestedIdNotFound 

Definition at line 752 of file sequence.hpp.

◆ EFindNext

enum CBioseqGaps_CI::EFindNext
protected

This indicates what happened when we tried to run x_FindNextGapOnBioseq.

Enumerator
eFindNext_NotFound 

No more relevant gaps were found on this bioseq.

The other output parameters will be in an undefined state.

eFindNext_Found 

Another relevant gap was found, and the output parameters are filled in to represent information about it.

Definition at line 1689 of file sequence.hpp.

◆ EFlags [1/3]

enum CFastaOstream::EFlags : long
Enumerator
fAssembleParts 

assemble FAR delta sequences; on by dflt

fInstantiateGaps 

honor specifed gap mode; on by default

fSuppressRange 

never include location details in defline

fReverseStrand 

flip the (implicit) location

fKeepGTSigns 

don't convert '>' to '_' in title

fMapMasksUp 

honor masks specified at a lower level

fMapMasksDown 

honor masks specified at a higher level

fNoExpensiveOps 

don't try too hard to find titles

fShowModifiers 

show key-value pair modifiers (e.g. "[organism=Homo sapiens]")

fNoDupCheck 

skip check for duplicate sequence IDs

fShowGapModifiers 

show gap key-value pair modifiers (e.g. "[linkage-evidence=map;strobe]"). Only works if gap mode is eGM_count.

fKeepUnknGapNomLen 

Keep unknown gap's nominal length. That is, when a gap has an unknown length but nominal length, use that instead of just making it 100.

fShowGapsOfSizeZero 

Use this to show gaps of size zero as a lone hyphen at the end of a line.

fEnableGI 

Use this flag to enable GI output in the defline.

fHideGenBankPrefix 

Hide gb| prefix for genbank only seq_id's.

fHTMLEncode 

Encode the title string for HTML display.

fIgnoreOriginalID 

Disregard original ID when constructing defline.

eAssembleParts 
eInstantiateGaps 
fUseAutoDef 

Disregard original ID when constructing defline.

fBaseFirstUnused 

first avalailabe for derived classes

fDoNotUseAutoDef 
fShowGnlAndAcc 

Show general id and accession in the defline.

Definition at line 772 of file sequence.hpp.

◆ EFlags [2/3]

Enumerator
fNoMerge 

don't merge adjacent intervals

Definition at line 1125 of file sequence.hpp.

◆ EFlags [3/3]

Enumerator
fFlags_DoNotTrimBeginning 

0x01 ("Beginning" as defined by CSeqVector)

fFlags_DoNotTrimEnd 

0x02 ("End" as defined by CSeqVector)

fFlags_DoNotTrimSeqGap 

0x04 (Seq-gaps are not considered trimmable if this flag is set, only letter gaps (e.g. N's for nucs))

Definition at line 1300 of file sequence.hpp.

◆ EGapMode

How to represent gaps with fInstantiateGaps enabled, as it is by default.

(Disabling fInstantiateGaps is equivalent to requesting eGM_one_dash.)

Enumerator
eGM_one_dash 

A single dash, followed by a line break.

eGM_dashes 

Multiple inline dashes.

eGM_letters 

Multiple inline Ns or Xs as appropriate (default).

eGM_count 

>?N or >?unk100, as appropriate.

Definition at line 803 of file sequence.hpp.

◆ EGetIdFlags

Retrieve a particular seq-id from a given bioseq handle.

This uses CSynonymsSet internally to decide which seq-id should be used.

Enumerator
eGetId_ForceGi 

return only a gi-based seq-id

eGetId_ForceAcc 

return only an accession based seq-id

eGetId_Best 

return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function

eGetId_HandleDefault 

returns the ID associated with a bioseq-handle

eGetId_Seq_id_Score 

use CSeq_id::Score() as the scoring function

eGetId_Seq_id_BestRank 

use CSeq_id::BestRank() as the scoring function

eGetId_Seq_id_WorstRank 

use CSeq_id::WorstRank() as the scoring function

eGetId_Seq_id_FastaAARank 

use CSeq_id::FastaAARank() as the scoring function

eGetId_Seq_id_FastaNARank 

use CSeq_id::FastaNARank() as the scoring function

"canonical" here means "most specific"; this differs from "best" in that "best" is intended for display purposes

eGetId_Canonical 
eGetId_TypeMask 

Mask for requested id type.

eGetId_VerifyId 

Check if the seq-id is present in the scope.

eGetId_ThrowOnError 

Throw exception on errors. If not set, an empty value is returned.

eGetId_Default 

Definition at line 98 of file sequence.hpp.

◆ EGetTitleFlags

This function is here rather than in CBioseq because it may need to inspect other sequences.

The reconstruct flag indicates that it should ignore any existing title Seqdesc.

Enumerator
fGetTitle_Reconstruct 

ignore existing title Seqdesc.

fGetTitle_Organism 

append [organism]

fGetTitle_AllProteins 

normally just names the first

fGetTitle_NoExpensive 

skip potential expensive operations

Definition at line 281 of file sequence.hpp.

◆ EMaskType

Which residues to mask out in subsequent output.

These do NOT automatically reset between calls to Write; you must do so yourself by setting them to null.

Enumerator
eSoftMask 

write as lowercase rather than uppercase

eHardMask 

write as N for nucleotides, X for peptides

Definition at line 847 of file sequence.hpp.

◆ EMeaningOfAmbig

This enum is used to set what is meant by "ambiguous".

Enumerator
eMeaningOfAmbig_OnlyCompletelyUnknown 

Here, only N for nucleotides and X for amino acids is considered ambiguous.

eMeaningOfAmbig_AnyAmbig 

Here, anything that's not certain is considered ambiguous.

That is, anything but A, C, G, T for nucleotides, and most amino acids except, for example, B (which can be aspartic acid or asparagine), X (completely ambiguous), etc.

Definition at line 1289 of file sequence.hpp.

◆ EP2SFlags

enum EP2SFlags
Enumerator
fP2S_Extend 

if hitting ends, extend to include partial codons

Definition at line 313 of file sequence.hpp.

◆ EResult

This indicates what happened with the trim.

Error states are indicated by an exception, not EResult.

Enumerator
eResult_SuccessfullyTrimmed 

Bioseq is now trimmed.

eResult_NoTrimNeeded 

Bioseq is left unchanged because it did not need to be trimmed at all.

This is NOT an error.

Definition at line 1352 of file sequence.hpp.

◆ ES2PFlags

enum ES2PFlags
Enumerator
fS2P_NoMerge 

don't merge adjacent intervals on the product

fS2P_AllowTer 

map the termination codon as a legal location

Definition at line 302 of file sequence.hpp.

◆ ESearchFlag

Enumerator
fNoFlags 
fJustTopStrand 
fExpandPattern 
fAllowMismatch 

Definition at line 1214 of file sequence.hpp.

◆ ETranslationFlags

See also
TTranslationFlags
Enumerator
fDefault 
fNoStop 

= 0x1 Do not include stop in translation

fRemoveTrailingX 

= 0x2 Remove trailing Xs from protein

fIs5PrimePartial 

= 0x4 Translate first codon even if not start codon (because sequence is 5' partial)

fIs3PrimePartial 

= 0x8 May not end in stop codon (because sequence is 3' partial)

Definition at line 980 of file sequence.hpp.

◆ ETranslationLengthProblemOptions

Enumerator
eThrowException 
eTruncate 
ePad 

Definition at line 948 of file sequence.hpp.

◆ ETransSplicing

Convenience functions for popular overlapping types.

Enumerator
eTransSplicing_No 
eTransSplicing_Yes 
eTransSplicing_Auto 

Ignore overlap strand if the source location has mixed/both strand.

Definition at line 579 of file sequence.hpp.

◆ EUserFlags

User-settable flags for tuning behavior.

Enumerator
fIgnoreExisting 

Generate fresh titles unconditionally.

fAllProteinNames 

List all relevant proteins, not just one.

fLocalAnnotsOnly 

Never use related sequences' annotations.

fNoExpensiveOps 

Refrain from anything that could add substantial overhead.

fGpipeMode 

Use GPipe defaults.

fOmitTaxonomicName 

Do not add organism suffix to proteins.

fDevMode 

Development mode for testing new features.

fShowModifiers 

Show key-value pair modifiers (e.g. "[organism=Homo sapiens]")

fUseAutoDef 

Run auto-def for nucleotides if user object is present.

fFastaFormat 

Generate FASTA defline.

fDoNotUseAutoDef 

Disable internal call to auto-def.

Definition at line 83 of file create_defline.hpp.

Function Documentation

◆ AddNucleotidePattern()

void CSeqSearch::AddNucleotidePattern ( const string name,
const string sequence,
Int2  cut_site,
TSearchFlags  flags = fNoFlags 
)

Add nucleotide pattern or restriction site to sequence search.

Uses ambiguity codes, e.g., R = A and G, H = A, C and T

Parameters
sequencepattern's name
cut_sitepattern's sequence

Definition at line 4871 of file sequence.cpp.

References eNa_strand_both, eNa_strand_minus, eNa_strand_plus, flags, NStr::IsBlank(), NCBI_THROW, revcomp(), s_GetReverseComplement(), NStr::ToUpper(), NStr::TruncateSpaces(), CSeqSearch::x_AddNucleotidePattern(), and CSeqSearch::x_IsJustTopStrand().

◆ CBioseqGaps_CI()

CBioseqGaps_CI::CBioseqGaps_CI ( const CSeq_entry_Handle entry_h,
const Params params = Params() 
)

This constructor initializes the iterator.

Parameters
entry_hThis will iterate over all descendents of this entry.
paramsControls the behavior of the iterator. If not specified, a reasonable default will be used.

Definition at line 50 of file bioseqgaps_ci.cpp.

References CSeq_inst_Base::eMol_aa, CSeq_inst_Base::eMol_na, CSeq_inst_Base::eMol_not_set, and NCBI_USER_THROW_FMT.

◆ CDeflineGenerator() [1/3]

CDeflineGenerator::CDeflineGenerator ( const CDeflineGenerator )
private

◆ CDeflineGenerator() [2/3]

CDeflineGenerator::CDeflineGenerator ( const CSeq_entry_Handle tseh)

◆ CDeflineGenerator() [3/3]

CDeflineGenerator::CDeflineGenerator ( void  )

◆ CFastaOstream()

CFastaOstream::CFastaOstream ( CNcbiOstream out)

Definition at line 2713 of file sequence.cpp.

◆ ChangeDeltaProteinToRawProtein()

bool CSeqTranslator::ChangeDeltaProteinToRawProtein ( CRef< CBioseq protein)
static

◆ CLowQualityTextFsm()

CDeflineGenerator::CLowQualityTextFsm::CLowQualityTextFsm ( void  )

Definition at line 4153 of file create_defline.cpp.

References CTextFsm< int >::AddWord(), and CTextFsm< int >::Prime().

◆ CPatternInfo()

CSeqSearch::CPatternInfo::CPatternInfo ( const string name,
const string sequence,
Int2  cut_site 
)
inline

constructor

Definition at line 1174 of file sequence.hpp.

◆ CSeqSearch()

CSeqSearch::CSeqSearch ( IClient client = 0,
TSearchFlags  flags = fNoFlags 
)

constructors

Parameters
clientpointer to a client object (receives pattern match notifications)
flagsspecify search flags

Definition at line 4797 of file sequence.cpp.

◆ CSequenceAmbigTrimmer()

CSequenceAmbigTrimmer::CSequenceAmbigTrimmer ( EMeaningOfAmbig  eMeaningOfAmbig,
TFlags  fFlags = 0,
const TTrimRuleVec vecTrimRules = GetDefaultTrimRules(),
TSignedSeqPos  uMinSeqLen = 50 
)

This sets up the parameters for how this trimmer will act.

Parameters
eMeaningOfAmbigThis indicates exactly what ambiguous means (e.g. just "N" or do all ambiguous symbols count? )
fFlagsmiscellaneous parameters to control this. See TFlags.
vecTrimRulesThis indicates how trimming will occur. See TTrimRuleVec.
uMinSeqLenTrimming tries to halt if the sequence becomes smaller than this size. It is possible for the resulting sequence to be below the uMinSeqLen size (or even trimmed to nothing), but the trimmer will at least try not to do that.

Definition at line 163 of file seq_trimmer.cpp.

References _ASSERT, ArraySize(), CSequenceAmbigTrimmer::eMeaningOfAmbig_AnyAmbig, CSequenceAmbigTrimmer::eMeaningOfAmbig_OnlyCompletelyUnknown, CSequenceAmbigTrimmer::m_arrNucAmbigLookupTable, CSequenceAmbigTrimmer::m_arrProtAmbigLookupTable, CSequenceAmbigTrimmer::m_eMeaningOfAmbig, CSequenceAmbigTrimmer::m_vecTrimRules, NCBI_USER_THROW_FMT, and CSequenceAmbigTrimmer::x_NormalizeVecTrimRules().

◆ DECLARE_OPERATOR_BOOL()

CBioseqGaps_CI::DECLARE_OPERATOR_BOOL ( m_bioseq_CI  )

◆ DoTrim()

CSequenceAmbigTrimmer::EResult CSequenceAmbigTrimmer::DoTrim ( CBioseq_Handle bioseq_handle,
CRangeCollection< TSeqPos > *  trimmed_ranges = nullptr 
)
virtual

This trims the given bioseq, using params set in the CSequenceAmbigTrimmer constructor.

It will properly handle the annots and descs inside the bioseq, too, if requested.

Parameters
bioseq_handleThe bioseq to trim.
trimmed_rangesThe ranges trimmed by DoTrim will be added to this.
Returns
This returns how the trimming went. On error, an exception is thrown and the bioseq may be in an undefined state.

Definition at line 213 of file seq_trimmer.cpp.

References _ASSERT, CBioseq_Handle::eCoding_Iupac, CSequenceAmbigTrimmer::eResult_NoTrimNeeded, CSequenceAmbigTrimmer::eResult_SuccessfullyTrimmed, CSequenceAmbigTrimmer::fFlags_DoNotTrimBeginning, CSequenceAmbigTrimmer::fFlags_DoNotTrimEnd, CBioseq_Handle::GetBioseqLength(), CRangeCollection< Position >::GetCoveredLength(), CSequenceAmbigTrimmer::x_FindWhereToTrim(), CSequenceAmbigTrimmer::x_SliceBioseq(), CSequenceAmbigTrimmer::x_TestFlag(), and CSequenceAmbigTrimmer::x_TrimToNothing().

◆ FindBestFrame() [1/2]

CCdregion::EFrame CSeqTranslator::FindBestFrame ( const CSeq_feat cds,
CScope scope 
)
static

◆ FindBestFrame() [2/2]

CCdregion::EFrame CSeqTranslator::FindBestFrame ( const CSeq_feat cds,
CScope scope,
bool ambiguous 
)
static

◆ FindLatestSequence() [1/4]

CConstRef<CSeq_id> FindLatestSequence ( const CSeq_id id,
CScope scope 
)

Given a seq-id check its replace history and try to find the latest revision.

The function stops and returns NULL if it detects some strange conditions like an infinite recursion. If the bioseq contains no history information, the original id is returned.

Definition at line 763 of file sequence.cpp.

References CSeq_id_Handle::GetHandle(), CSeq_id_Handle::GetSeqId(), NULL, and x_FindLatestSequence().

Referenced by s_FindLatest().

◆ FindLatestSequence() [2/4]

CConstRef<CSeq_id> FindLatestSequence ( const CSeq_id id,
CScope scope,
const CTime tlim 
)

Check replace history up to the specified date.

Returns the latest bioseq up to the date or the original id if the bioseq contains no history or is already newer than the specified date.

Definition at line 774 of file sequence.cpp.

References CSeq_id_Handle::GetHandle(), CSeq_id_Handle::GetSeqId(), and x_FindLatestSequence().

◆ FindLatestSequence() [3/4]

CSeq_id_Handle FindLatestSequence ( const CSeq_id_Handle idh,
CScope scope 
)

Definition at line 769 of file sequence.cpp.

References NULL, and x_FindLatestSequence().

◆ FindLatestSequence() [4/4]

CSeq_id_Handle FindLatestSequence ( const CSeq_id_Handle idh,
CScope scope,
const CTime tlim 
)

Definition at line 782 of file sequence.cpp.

References x_FindLatestSequence().

◆ GenerateDefline() [1/6]

string CDeflineGenerator::GenerateDefline ( const CBioseq bioseq,
CScope scope,
CSeqEntryIndex idx,
TUserFlags  flags = 0 
)

Main method.

Definition at line 4098 of file create_defline.cpp.

References flags, CDeflineGenerator::GenerateDefline(), and CDeflineGenerator::m_Idx.

◆ GenerateDefline() [2/6]

string CDeflineGenerator::GenerateDefline ( const CBioseq bioseq,
CScope scope,
feature::CFeatTree &  ftree,
TUserFlags  flags = 0 
)

◆ GenerateDefline() [3/6]

string CDeflineGenerator::GenerateDefline ( const CBioseq bioseq,
CScope scope,
TUserFlags  flags = 0 
)

◆ GenerateDefline() [4/6]

string CDeflineGenerator::GenerateDefline ( const CBioseq_Handle bsh,
CSeqEntryIndex idx,
TUserFlags  flags = 0 
)

Main method.

Definition at line 4086 of file create_defline.cpp.

References flags, CDeflineGenerator::GenerateDefline(), and CDeflineGenerator::m_Idx.

◆ GenerateDefline() [5/6]

string CDeflineGenerator::GenerateDefline ( const CBioseq_Handle bsh,
feature::CFeatTree &  ftree,
TUserFlags  flags = 0 
)

◆ GenerateDefline() [6/6]

string CDeflineGenerator::GenerateDefline ( const CBioseq_Handle bsh,
TUserFlags  flags = 0 
)

Main method.

Definition at line 3909 of file create_defline.cpp.

References CSeqdesc_Base::e_User, ctll::empty(), CTempString::empty(), NStr::eNocase, CUser_object::eObjectType_AutodefOptions, CDeflineGenerator::fDoNotUseAutoDef, flags, CDeflineGenerator::fShowModifiers, CUser_object::GetObjectType(), CAutoDef::GetOneDefLine(), CSeqdesc_Base::GetUser(), NStr::HtmlDecode(), i, CAutoDefOptions::InitFromUserObject(), islower(), CDeflineGenerator::m_Feat_Tree, CDeflineGenerator::m_GpipeMode, CDeflineGenerator::m_Idx, CDeflineGenerator::m_IsAA, CDeflineGenerator::m_IsEST_STS_GSS, CDeflineGenerator::m_IsMap, CDeflineGenerator::m_IsNA, CDeflineGenerator::m_IsNC, CDeflineGenerator::m_IsNM, CDeflineGenerator::m_IsNR, CDeflineGenerator::m_IsNZ, CDeflineGenerator::m_IsPatent, CDeflineGenerator::m_IsPDB, CDeflineGenerator::m_IsSeg, CDeflineGenerator::m_IsTLS, CDeflineGenerator::m_IsTSA, CDeflineGenerator::m_IsWGS, CDeflineGenerator::m_LocalAnnotsOnly, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_MetaGenomeSource, CDeflineGenerator::m_MICompleteness, CDeflineGenerator::m_Reconstruct, CDeflineGenerator::m_TLSMaster, CDeflineGenerator::m_WGSMaster, NCBI_COMPLETENESS, NPOS, NULL, prefix, CRef< C, Locker >::Reset(), s_tpaPrefixList, s_TrimMainTitle(), CAutoDefModifierCombo::SetOptions(), CAutoDef::SetOptionsObject(), NStr::StartsWith(), str(), suffix, toupper(), CDeflineGenerator::x_AdjustProteinTitleSuffix(), CDeflineGenerator::x_AdjustProteinTitleSuffixIdx(), x_CleanAndCompress(), CDeflineGenerator::x_GetModifiers(), CDeflineGenerator::x_SetBioSrc(), CDeflineGenerator::x_SetBioSrcIdx(), CDeflineGenerator::x_SetFlags(), CDeflineGenerator::x_SetFlagsIdx(), CDeflineGenerator::x_SetPrefix(), CDeflineGenerator::x_SetSuffix(), CDeflineGenerator::x_SetTitleFromBioSrc(), CDeflineGenerator::x_SetTitleFromGPipe(), CDeflineGenerator::x_SetTitleFromMap(), CDeflineGenerator::x_SetTitleFromNC(), CDeflineGenerator::x_SetTitleFromNM(), CDeflineGenerator::x_SetTitleFromNR(), CDeflineGenerator::x_SetTitleFromPatent(), CDeflineGenerator::x_SetTitleFromPDB(), CDeflineGenerator::x_SetTitleFromProtein(), CDeflineGenerator::x_SetTitleFromProteinIdx(), CDeflineGenerator::x_SetTitleFromSegSeq(), and CDeflineGenerator::x_SetTitleFromWGS().

Referenced by CDeflineGenerator::GenerateDefline(), s_GetCdsSequence(), s_SetCloneInfo(), s_SetIdList(), CShowBlastDefline::x_FillDeflineAndId(), and CAlnGraphic::x_GetAlnInfo().

◆ GetAccessionForGi()

string GetAccessionForGi ( TGi  gi,
CScope scope,
EAccessionVersion  use_version = eWithAccessionVersion,
EGetIdType  flags = 0 
)

Retrieve the accession for a given GI.

If no accession was found returns an empty string or throws CSeqIdFromHandleException depending on the flags. Id type in the flags is ignored, only VerifyId and ThrowOnError flags are checked.

Definition at line 686 of file sequence.cpp.

References CSeq_id_Base::e_Gi, eGetId_ForceAcc, eGetId_ThrowOnError, eGetId_VerifyId, eWithAccessionVersion, flags, GetId(), CSeq_id_Handle::GetSeqId(), CSeq_id::GetSeqIdString(), kEmptyStr, and NCBI_THROW.

Referenced by CDemoApp::GetIds(), ReplaceWellknownSeqs(), s_CheckQuals_cdregion(), s_ChrName(), s_CreateHistCommentString(), variation::CHgvsParser::s_SeqIdToHgvsStr(), CFeatureItem::x_AddQualProteinId(), and CAppHitFilter::x_LoadConstraints().

◆ GetAccessionForId()

string GetAccessionForId ( const objects::CSeq_id &  id,
CScope scope,
EAccessionVersion  use_version = eWithAccessionVersion,
EGetIdType  flags = 0 
)

◆ GetAllFlags()

TFlags CFastaOstream::GetAllFlags ( void  ) const
inline

Definition at line 857 of file sequence.hpp.

◆ GetBestCdsForMrna() [1/2]

CConstRef<CSeq_feat> GetBestCdsForMrna ( const CSeq_feat mrna_feat,
const CTSE_Handle tse,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestCdsForMrna() [2/2]

CConstRef<CSeq_feat> GetBestCdsForMrna ( const CSeq_feat mrna_feat,
CScope scope,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestGeneForCds() [1/2]

CConstRef<CSeq_feat> GetBestGeneForCds ( const CSeq_feat cds_feat,
const CTSE_Handle tse,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestGeneForCds() [2/2]

CConstRef<CSeq_feat> GetBestGeneForCds ( const CSeq_feat cds_feat,
CScope scope,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestGeneForMrna() [1/2]

CConstRef<CSeq_feat> GetBestGeneForMrna ( const CSeq_feat mrna_feat,
const CTSE_Handle tse,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestGeneForMrna() [2/2]

CConstRef<CSeq_feat> GetBestGeneForMrna ( const CSeq_feat mrna_feat,
CScope scope,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestMrnaForCds() [1/2]

CConstRef<CSeq_feat> GetBestMrnaForCds ( const CSeq_feat cds_feat,
const CTSE_Handle tse,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestMrnaForCds() [2/2]

CConstRef<CSeq_feat> GetBestMrnaForCds ( const CSeq_feat cds_feat,
CScope scope,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestOverlapForSNP() [1/2]

CConstRef<CSeq_feat> GetBestOverlapForSNP ( const CSeq_feat snp_feat,
CSeqFeatData::E_Choice  type,
CScope scope,
bool  search_both_strands = true 
)

Get the best overlapping feature for a SNP (variation) feature.

Parameters
snp_featSNP feature object
typetype of overlapping feature
scope
search_both_strandssearch is performed on both strands, starting with the one specified by the feature's location.
Returns
the overlapping fetaure or NULL if not found

Definition at line 1345 of file sequence.cpp.

References CSeqFeatData::eSubtype_any, and x_GetBestOverlapForSNP().

Referenced by GetBestOverlappingFeat(), and CTestBMApp::Run().

◆ GetBestOverlapForSNP() [2/2]

CConstRef<CSeq_feat> GetBestOverlapForSNP ( const CSeq_feat snp_feat,
CSeqFeatData::ESubtype  subtype,
CScope scope,
bool  search_both_strands = true 
)

Get the best overlapping feature for a SNP (variation)

Parameters
snp_featSNP feature object
subtypesubtype of overlapping feature
scope
search_both_strandssearch is performed on both strands, starting with the one specified by the feature's location.
Returns
the overlapping fetaure or NULL if not found

Definition at line 1355 of file sequence.cpp.

References CSeqFeatData::GetTypeFromSubtype(), and x_GetBestOverlapForSNP().

◆ GetBestOverlappingFeat() [1/4]

CConstRef<CSeq_feat> GetBestOverlappingFeat ( const CSeq_feat feat,
CSeqFeatData::E_Choice  feat_type,
sequence::EOverlapType  overlap_type,
CScope scope,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestOverlappingFeat() [2/4]

CConstRef<CSeq_feat> GetBestOverlappingFeat ( const CSeq_feat feat,
CSeqFeatData::ESubtype  feat_type,
sequence::EOverlapType  overlap_type,
CScope scope,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestOverlappingFeat() [3/4]

CConstRef<CSeq_feat> GetBestOverlappingFeat ( const CSeq_loc loc,
CSeqFeatData::E_Choice  feat_type,
EOverlapType  overlap_type,
CScope scope,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetBestOverlappingFeat() [4/4]

CConstRef<CSeq_feat> GetBestOverlappingFeat ( const CSeq_loc loc,
CSeqFeatData::ESubtype  feat_type,
EOverlapType  overlap_type,
CScope scope,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

See the note above on 'overlap_type' meaning.

Definition at line 1230 of file sequence.cpp.

References fBestFeat_FavorLonger, GetOverlappingFeatures(), and CSeqFeatData::GetTypeFromSubtype().

◆ GetBioseqFromSeqLoc()

CBioseq_Handle GetBioseqFromSeqLoc ( const CSeq_loc loc,
CScope scope,
CScope::EGetBioseqFlag  flag = CScope::eGetBioseq_Loaded 
)

Retrieve the Bioseq Handle from a location.

location refers to a single bioseq: return the bioseq location referes to multiple bioseqs: if parts of a segmentd bioseq, returns the segmentd bioseq. otherwise, return the first bioseq that could be found (first localy then, if flag is eGetBioseq_All, remote)

Definition at line 307 of file sequence.cpp.

References CScope::eGetBioseq_All, CScope::eGetBioseq_Loaded, CScope::GetBioseqHandle(), GetId(), GetParentForPart(), IsOneBioseq(), and CBioseq_Handle::Reset().

Referenced by CFlatFileGenerator::Generate(), GetGeneForFeature(), GetProductName(), CFlatFileGenerator::GetSeqFeatText(), GetStop(), GetTextObjectDescription(), CDiscrepancyObject::GetTextObjectDescription(), s_GetProductName(), sGetCdsProductName(), CFlatGatherer::x_GatherCDSReferences(), CFlatGatherer::x_GatherReferences(), CFlatGatherer::x_GatherReferencesIdx(), CFlatFeatureRetrieveJob::x_Run(), and CBioseqContext::x_SetMapper().

◆ GetBioSource() [1/2]

const CBioSource* GetBioSource ( const CBioseq bioseq)

Retrieve the BioSource object for a given bioseq handle.

If the supplied sequence does not have a MolInfo associated with it, this will return NULL

Definition at line 104 of file sequence.cpp.

References ITERATE, and NULL.

Referenced by CopyOrg(), fg::GetGeneticCode(), IAlignRowHandle::GetOrgLabel(), IAlignRowHandle::GetTaxonomy(), variation::IsMitochondrion(), CMakeBadSpecificHostTable::MakeTable(), CTreeBuilderJob::x_CreateProjectItems(), CSparseAln::x_GetGenCode(), CDeflineGenerator::x_GetModifiers(), and CNewCleanup_imp::x_RemoveSingleStrand().

◆ GetBioSource() [2/2]

const CBioSource* GetBioSource ( const CBioseq_Handle handle)

◆ GetBioSourceForBioseq()

const CBioSource* GetBioSourceForBioseq ( const CBioseq_Handle bsh)

Find a BioSource for the given Bioseq: If it's a protein then look for the source feature of the product.

Otherwise find a source descriptor for the sequence. Otherwise, try to find a source feature for the sequence. Return nullptr if we still turn up empty.

Definition at line 220 of file sequence.cpp.

References CSeqFeatData_Base::e_Biosrc, CSeqdesc_Base::e_Source, CSeqFeatData_Base::GetBiosrc(), CSeq_feat_Base::GetData(), CMappedFeat::GetOriginalFeature(), CSeqdesc_Base::GetSource(), GetSourceFeatForProduct(), and CBioseq_Handle::IsAa().

Referenced by GetOrg_refForBioseq(), and CGff3Writer::xAssignSourceAttributesBioSource().

◆ GetCDSForProduct() [1/2]

const CSeq_feat* GetCDSForProduct ( const CBioseq product,
CScope scope 
)

◆ GetCDSForProduct() [2/2]

const CSeq_feat* GetCDSForProduct ( const CBioseq_Handle product)

Definition at line 2558 of file sequence.cpp.

References f(), and GetMappedCDSForProduct().

◆ GetCdssForGene() [1/2]

void GetCdssForGene ( const CSeq_feat gene_feat,
const CTSE_Handle tse,
list< CConstRef< CSeq_feat > > &  cds_feats,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetCdssForGene() [2/2]

void GetCdssForGene ( const CSeq_feat gene_feat,
CScope scope,
list< CConstRef< CSeq_feat > > &  cds_feats,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetClient()

const IClient* CSeqSearch::GetClient ( void  ) const
inline

Get / Set client.

Definition at line 1250 of file sequence.hpp.

References CSeqSearch::m_Client.

◆ GetCutSite()

Int2 CSeqSearch::CPatternInfo::GetCutSite ( void  ) const
inline

Definition at line 1183 of file sequence.hpp.

References CSeqSearch::CPatternInfo::m_CutSite.

◆ GetDefaultTrimRules()

const CSequenceAmbigTrimmer::TTrimRuleVec & CSequenceAmbigTrimmer::GetDefaultTrimRules ( void  )
static

This returns a reasonable default for trimming rules.

Definition at line 156 of file seq_trimmer.cpp.

References CSafeStatic< T, Callbacks >::Get(), and NULL.

◆ GetErrCodeString()

const char * CSeqIdFromHandleException::GetErrCodeString ( void  ) const
overridevirtual

◆ GetGapMode()

EGapMode CFastaOstream::GetGapMode ( void  ) const
inline

Definition at line 862 of file sequence.hpp.

◆ GetGapModText()

void CFastaOstream::GetGapModText ( const CSeq_gap seq_gap,
SGapModText out_gap_mod_text 
)
static

Given a CSeq_gap object, this outputs the Gap information.

Parameters
seq_gapThis is the seq_gap information we're using to figure out the gap mod text
out_gap_mod_textThis holds the result.

Definition at line 3483 of file sequence.cpp.

References CSeq_gap_Base::CanGetLinkage(), CSeq_gap_Base::CanGetLinkage_evidence(), CLinkage_evidence_Base::CanGetType(), CSeq_gap_Base::CanGetType(), CSeq_gap_Base::eLinkage_linked, CLinkage_evidence_Base::eType_align_genus, CLinkage_evidence_Base::eType_align_trnscpt, CLinkage_evidence_Base::eType_align_xgenus, CSeq_gap_Base::eType_centromere, CSeq_gap_Base::eType_clone, CLinkage_evidence_Base::eType_clone_contig, CSeq_gap_Base::eType_contamination, CSeq_gap_Base::eType_contig, CSeq_gap_Base::eType_fragment, CSeq_gap_Base::eType_heterochromatin, CLinkage_evidence_Base::eType_map, CLinkage_evidence_Base::eType_other, CSeq_gap_Base::eType_other, CLinkage_evidence_Base::eType_paired_ends, CLinkage_evidence_Base::eType_pcr, CLinkage_evidence_Base::eType_proximity_ligation, CSeq_gap_Base::eType_repeat, CSeq_gap_Base::eType_scaffold, CSeq_gap_Base::eType_short_arm, CLinkage_evidence_Base::eType_strobe, CSeq_gap_Base::eType_telomere, CSeq_gap_Base::eType_unknown, CLinkage_evidence_Base::eType_unspecified, CLinkage_evidence_Base::eType_within_clone, CFastaOstream::SGapModText::gap_linkage_evidences, CFastaOstream::SGapModText::gap_type, CSeq_gap_Base::GetLinkage(), CSeq_gap_Base::GetLinkage_evidence(), CLinkage_evidence_Base::GetType(), CSeq_gap_Base::GetType(), NStr::IntToString(), CSeq_gap_Base::IsSetLinkage_evidence(), and ITERATE.

Referenced by s_NewGapItem(), CBioseqIndex::x_InitGaps(), and CFastaOstream::x_WriteSequence().

◆ GetGeneForFeature()

CConstRef<CSeq_feat> GetGeneForFeature ( const CSeq_feat feat,
CScope scope 
)

◆ GetGiForAccession()

TGi GetGiForAccession ( const string acc,
CScope scope,
EGetIdType  flags = 0 
)

Given an accession string retrieve the GI id.

If no GI was found returns 0 or throws CSeqIdFromHandleException depending on the flags. Id type in the flags is ignored, only VerifyId and ThrowOnError flags are checked.

Definition at line 638 of file sequence.cpp.

References CSeq_id::AvoidGi(), eGetId_ForceGi, eGetId_ThrowOnError, eGetId_VerifyId, flags, CSeq_id_Handle::GetGi(), GetId(), CSeq_id::GetTextseq_Id(), CSeq_id_Handle::IsGi(), NCBI_THROW, and ZERO_GI.

Referenced by BOOST_AUTO_TEST_CASE(), CSequenceDataTester::x_Init(), and CAppHitFilter::x_LoadConstraints().

◆ GetGiForId()

TGi GetGiForId ( const objects::CSeq_id &  id,
CScope scope,
EGetIdType  flags = 0 
)

◆ GetId() [1/5]

CSeq_id_Handle GetId ( const CBioseq seq,
EGetIdType  type = eGetId_Default 
)

Return a selected ID type from a Bioseq Arguments (except 'seq') and behavior is the same as of GetId(const CBioseq_Handle& seq, ...).

Definition at line 535 of file sequence.cpp.

References CBioseq_Base::GetId().

Referenced by GetAccessionForGi(), GetAccessionForId(), GetBestCdsForMrna(), GetBestMrnaForCds(), GetBioseqFromSeqLoc(), GetGiForAccession(), GetGiForId(), GetId(), and GetProteinName().

◆ GetId() [2/5]

Return a selected ID type from a set of Seq-ids Arguments (except 'id') and behavior is the same as of GetId(const CSeq_id& id, ...).

Definition at line 541 of file sequence.cpp.

References CSeq_id_Handle::GetHandle(), ITERATE, and x_GetId().

◆ GetId() [3/5]

CSeq_id_Handle GetId ( const CBioseq_Handle handle,
EGetIdType  type = eGetId_Default 
)

Return a selected ID type for a given bioseq handle.

This function will try to use the most efficient method possible to determine which ID fulfills the requested parameter. This version will call sequence::GetId() with the bioseq handle's seq-id.

Parameters
idSource id to evaluate
scopeScope for seq-id resolution.
typeType of ID to return
Returns
A requested seq-id. Depending on the flags set in 'type' this function can verify if the requested ID exists in the scope and throw CSeqIdFromHandleException if the request cannot be satisfied.

Definition at line 621 of file sequence.cpp.

References _ASSERT, eGetId_ThrowOnError, CBioseq_Handle::GetId(), NCBI_THROW, and x_GetId().

◆ GetId() [4/5]

CSeq_id_Handle GetId ( const CSeq_id id,
CScope scope,
EGetIdType  type = eGetId_Default 
)

Return a selected ID type for a seq-id.

This function will try to use the most efficient method possible to determine which ID fulfills the requested parameter. The following logic is used:

  • For seq-id type eGetId_HandleDefault, the original seq-id is returned. This satisfies the condition of returning a bioseq-handle's seq-id if sequence::GetId() is applied to a CBioseq_Handle.
  • For seq-id type eGetId_ForceAcc, the returned set of seq-ids will first be evaluated for a "best" id (which, given seq-id scoring, will be a textseq-id if one exists). If the returned best ID is a textseq-id, this id will be returned. Otherwise, an exception is thrown or an empty handle returned.
  • For seq-id type eGetId_ForceGi, the returned set of IDs is scanned for an ID of type gi. If this is found, it is returned; otherwise, an exception is thrown or an empty handle returned. If the supplied ID is already a gi and eGetId_VerifyId flag is not set, no work is done.
Parameters
idSource id to evaluate
scopeScope for seq-id resolution.
typeType of ID to return
Returns
A requested seq-id. Depending on the flags set in 'type' this function can verify if the requested ID exists in the scope and throw CSeqIdFromHandleException if the request cannot be satisfied.

Definition at line 552 of file sequence.cpp.

References CSeq_id_Handle::GetHandle(), and GetId().

◆ GetId() [5/5]

CSeq_id_Handle GetId ( const CSeq_id_Handle id,
CScope scope,
EGetIdType  type = eGetId_Default 
)

◆ GetMappedCDSForProduct()

CMappedFeat GetMappedCDSForProduct ( const CBioseq_Handle product)

◆ GetMappedmRNAForProduct()

CMappedFeat GetMappedmRNAForProduct ( const CBioseq_Handle product)

◆ GetMask()

CConstRef< CSeq_loc > CFastaOstream::GetMask ( EMaskType  type) const

◆ GetMolInfo() [1/2]

const CMolInfo* GetMolInfo ( const CBioseq bioseq)

◆ GetMolInfo() [2/2]

const CMolInfo* GetMolInfo ( const CBioseq_Handle handle)

Definition at line 295 of file sequence.cpp.

References CSeqdesc_Base::e_Molinfo, CSeqdesc_Base::GetMolinfo(), and NULL.

◆ GetmRNAforCDS()

CConstRef<CSeq_feat> GetmRNAforCDS ( const CSeq_feat cds,
CScope scope 
)

◆ GetmRNAForProduct() [1/2]

const CSeq_feat* GetmRNAForProduct ( const CBioseq product,
CScope scope 
)

Get the encoding mRNA feature of a given mRNA (cDNA) bioseq.

Definition at line 2617 of file sequence.cpp.

References CScope::GetBioseqHandle().

Referenced by CNewCleanup_imp::CreateMissingMolInfo(), and GetNucleotideParent().

◆ GetmRNAForProduct() [2/2]

const CSeq_feat* GetmRNAForProduct ( const CBioseq_Handle product)

Definition at line 2626 of file sequence.cpp.

References CSeqFeatData::eSubtype_mRNA, fi, and SAnnotSelector::SetByProduct().

◆ GetMrnasForGene() [1/2]

void GetMrnasForGene ( const CSeq_feat gene_feat,
const CTSE_Handle tse,
list< CConstRef< CSeq_feat > > &  mrna_feats,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetMrnasForGene() [2/2]

void GetMrnasForGene ( const CSeq_feat gene_feat,
CScope scope,
list< CConstRef< CSeq_feat > > &  mrna_feats,
TBestFeatOpts  opts = fBestFeat_Defaults,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

◆ GetName()

const string& CSeqSearch::CPatternInfo::GetName ( void  ) const
inline

Definition at line 1181 of file sequence.hpp.

References CSeqSearch::CPatternInfo::m_Name.

◆ GetNucleotideParent() [1/2]

const CBioseq* GetNucleotideParent ( const CBioseq product,
CScope scope 
)

◆ GetNucleotideParent() [2/2]

CBioseq_Handle GetNucleotideParent ( const CBioseq_Handle product)

◆ GetOrg_ref()

const COrg_ref& GetOrg_ref ( const CBioseq_Handle handle)

◆ GetOrg_refForBioseq()

const COrg_ref* GetOrg_refForBioseq ( const CBioseq_Handle bsh)

Find an Org-ref for the given Bioseq: If it's a protein then look on the source feature of the product.

Otherwise find a source descriptor for the sequence. Otherwise, try to find a source feature for the sequence. Return nullptr if we still turn up empty.

Definition at line 211 of file sequence.cpp.

References GetBioSourceForBioseq().

◆ GetOrg_refForProduct()

void GetOrg_refForProduct ( const CBioseq_Handle bsh,
const COrg_ref pOrgRef 
)

Definition at line 194 of file sequence.cpp.

References GetSourceFeatForProduct(), and CBioseq_Handle::IsAa().

◆ GetOrg_refOrNull()

const COrg_ref* GetOrg_refOrNull ( const CBioseq_Handle handle)

◆ GetOverlappingCDS()

CConstRef<CSeq_feat> GetOverlappingCDS ( const CSeq_loc loc,
CScope scope 
)

◆ GetOverlappingFeatures()

void GetOverlappingFeatures ( const CSeq_loc loc,
CSeqFeatData::E_Choice  feat_type,
CSeqFeatData::ESubtype  feat_subtype,
EOverlapType  overlap_type,
TFeatScores feats,
CScope scope,
const TBestFeatOpts  opts = 0,
CGetOverlappingFeaturesPlugin plugin = NULL 
)

Find all features overlapping the location.

Features and corresponding scores are stored in the 'feats' vector. The scores are calculated as difference between the input location and each feature's location. NOTE: 'overlap_type' defines how the location must be related to the feature. For eOverlap_Subset, eOverlap_SubsetRev, eOverlap_CheckIntervals, eOverlap_CheckIntRev and eOverlap_Interval the relationship is reversed. E.g. with eOverlap_Contains, the location will contain the feature, but with eOverlap_Subset the feature will be defined on a subset of the location.

Definition at line 945 of file sequence.cpp.

References _DEBUG_ARG, _TRACE, CSeq_loc::Assign(), CSeq_loc::CheckId(), Compare(), ConstRef(), eContains, eExtreme_Positional, eNa_strand_plus, eNa_strand_unknown, eOverlap_CheckIntervals, eOverlap_CheckIntRev, eOverlap_Contained, eOverlap_Contains, eOverlap_Interval, SAnnotSelector::eOverlap_Intervals, eOverlap_Simple, eOverlap_Subset, eOverlap_SubsetRev, SAnnotSelector::eOverlap_TotalRange, eSame, CSeq_inst_Base::eTopology_circular, fBestFeat_IgnoreStrand, fCompareOverlapping, fOverlap_Default, fOverlap_IgnoreTopology, CScope::GetBioseqHandle(), CBioseq_Handle::GetBioseqLength(), CSeq_loc::GetId(), CBioseq_Handle::GetInst_Topology(), CSeq_feat_Base::GetLocation(), CMappedFeat::GetLocation(), CMappedFeat::GetMappedFeature(), CMappedFeat::GetOriginalFeature(), CBioseq_Handle::GetSeqId(), CSeq_loc::GetStart(), CSeq_loc::GetStop(), CSeq_loc::GetStrand(), CSeq_loc_Base::GetWhole(), CSeq_loc_Base::IsInt(), CSeq_loc_Base::IsMix(), CSeq_loc_Base::IsPacked_int(), CSeq_loc_Base::IsPacked_pnt(), CSeq_loc_Base::IsPnt(), IsReverse(), CBioseq_Handle::IsSetInst_Topology(), CSeq_loc::IsSetStrand(), CSeq_loc_Base::IsWhole(), kInvalidSeqPos, NULL, CGetOverlappingFeaturesPlugin::postProcessDiffAmount(), CGetOverlappingFeaturesPlugin::processLoc(), CGetOverlappingFeaturesPlugin::processMainLoop(), CGetOverlappingFeaturesPlugin::processSAnnotSelector(), compile_time_bits::range(), CRef< C, Locker >::Reset(), CConstRef< C, Locker >::Reset(), SAnnotSelector::SetFeatSubtype(), SAnnotSelector::SetFeatType(), CSeq_interval_Base::SetFrom(), CSeq_interval_Base::SetId(), SAnnotSelector::SetIgnoreStrand(), SAnnotSelector::SetOverlapType(), CSeq_loc::SetPacked_int(), SAnnotSelector::SetResolveTSE(), SAnnotSelector::SetSearchUnresolved(), CSeq_loc::SetStrand(), CSeq_interval_Base::SetStrand(), CSeq_interval_Base::SetTo(), CGetOverlappingFeaturesPlugin::setUpFeatureIterator(), TestForOverlap64(), and TestForOverlapEx().

Referenced by CCdsMatchInfo::AssignOverlapMatch(), BOOST_AUTO_TEST_CASE(), CCdsToMatPeptide::ConvertInner(), GetBestCdsForMrna(), GetBestGeneForCds(), GetBestGeneForMrna(), GetBestMrnaForCds(), GetBestOverlappingFeat(), GetRelatedFeatureApplyObjects(), GetRelatedFeatures(), CCleanup::IsGeneXrefUnnecessary(), CMrnaMatchInfo::OkWithoutCds(), s_GetCdsByLocation(), s_HasMobileElementForInterval(), CIntronValidator::Validate(), x_GetBestOverlapForSNP(), CValidError_bioseq::x_MatchesOverlappingFeaturePartial(), CCdregionValidator::x_ValidateParentPartialness(), and CRNAValidator::x_ValidateTrnaOverlap().

◆ GetOverlappingGene()

CConstRef<CSeq_feat> GetOverlappingGene ( const CSeq_loc loc,
CScope scope,
ETransSplicing  eTransSplicing = eTransSplicing_Auto 
)

◆ GetOverlappingmRNA()

CConstRef<CSeq_feat> GetOverlappingmRNA ( const CSeq_loc loc,
CScope scope 
)

◆ GetOverlappingOperon()

CConstRef<CSeq_feat> GetOverlappingOperon ( const CSeq_loc loc,
CScope scope 
)

◆ GetOverlappingPub()

CConstRef<CSeq_feat> GetOverlappingPub ( const CSeq_loc loc,
CScope scope 
)

◆ GetOverlappingSource()

CConstRef<CSeq_feat> GetOverlappingSource ( const CSeq_loc loc,
CScope scope 
)

◆ GetParentForPart()

CBioseq_Handle GetParentForPart ( const CBioseq_Handle part)

Get the parent bioseq for a part of a segmented bioseq.

Definition at line 2688 of file sequence.cpp.

References CBioseq_set_Base::eClass_segset, and CBioseq_Handle::GetExactComplexityLevel().

Referenced by GetBioseqFromSeqLoc().

◆ GetProteinName()

string GetProteinName ( const CBioseq_Handle seq)

Return protein name from corresponding Prot-ref feature.

Throws exception if the sequence is not a protein, or if there is no unambiguously best Prot-ref feature, or if the feature doesn't return non-empty label.

Definition at line 356 of file sequence.cpp.

References CSeqFeatData_Base::e_Prot, eGetId_Best, CBioseq_Handle::GetBioseqLength(), GetId(), CBioseq_Handle::IsProtein(), NCBI_THROW, NCBI_THROW_FMT, and compile_time_bits::range().

Referenced by CAlnVecRow::x_GetAlignmentTooltip_General().

◆ GetPROTForProduct() [1/2]

const CSeq_feat* GetPROTForProduct ( const CBioseq product,
CScope scope 
)

Get the mature peptide feature of a protein.

Definition at line 2593 of file sequence.cpp.

References CScope::GetBioseqHandle().

Referenced by CValidError_bioseq::CdError(), and CDBSourceItem::x_GatherInfo().

◆ GetPROTForProduct() [2/2]

const CSeq_feat* GetPROTForProduct ( const CBioseq_Handle product)

Definition at line 2602 of file sequence.cpp.

References CSeqFeatData_Base::e_Prot, and fi.

◆ GetSequence()

const string& CSeqSearch::CPatternInfo::GetSequence ( void  ) const
inline

Definition at line 1182 of file sequence.hpp.

References CSeqSearch::CPatternInfo::m_Sequence.

◆ GetSourceFeatForProduct()

CConstRef<CSeq_feat> GetSourceFeatForProduct ( const CBioseq_Handle bsh)

◆ GetStrand()

ENa_strand CSeqSearch::CPatternInfo::GetStrand ( void  ) const
inline

Definition at line 1184 of file sequence.hpp.

References CSeqSearch::CPatternInfo::m_Strand.

◆ GetTaxId()

TTaxId GetTaxId ( const CBioseq_Handle handle)

◆ GetTaxIdForProduct()

TTaxId GetTaxIdForProduct ( const CBioseq_Handle bsh)

◆ GetTitle() [1/2]

NCBI_XOBJUTIL_EXPORT bool GetTitle ( const CBioseq seq,
string title_ptr,
TGetTitleFlags  flags = 0 
)

Definition at line 551 of file seqtitle.cpp.

References CSeq_id_Base::e_Ddbj, CSeq_id_Base::e_Embl, CSeq_id_Base::e_Genbank, CSeq_id_Base::e_General, CSeqdesc_Base::e_Molinfo, CSeqdesc_Base::e_Org, CSeq_id_Base::e_Other, CSeq_id_Base::e_Patent, CSeq_id_Base::e_Pdb, CSeqdesc_Base::e_Source, CSeqdesc_Base::e_Title, CSeq_id_Base::e_Tpd, CSeq_id_Base::e_Tpe, CSeq_id_Base::e_Tpg, CSeq_id::eAcc_division_mask, CSeq_id::eAcc_refseq_chromosome, CSeq_id::eAcc_refseq_mrna, CSeq_id::eAcc_refseq_ncrna, CSeq_id::eAcc_tsa, CSeq_id::eAcc_wgs, CMolInfo_Base::eBiomol_genomic, CMolInfo_Base::eBiomol_other_genetic, NStr::EndsWith(), NStr::eNocase, CSeq_inst_Base::eRepr_delta, CSeq_inst_Base::eRepr_seg, CMolInfo_Base::eTech_est, CMolInfo_Base::eTech_htgs_0, CMolInfo_Base::eTech_htgs_1, CMolInfo_Base::eTech_htgs_2, CMolInfo_Base::eTech_htgs_3, CMolInfo_Base::eTech_sts, CMolInfo_Base::eTech_survey, CMolInfo_Base::eTech_tsa, CMolInfo_Base::eTech_unknown, CMolInfo_Base::eTech_wgs, fGetTitle_Organism, fGetTitle_Reconstruct, flags, fON_wgs, CMolInfo_Base::GetBiomol(), CBioseq::GetClosestDescriptor(), CSeq_id_Base::GetGeneral(), CBioseq_Base::GetId(), CBioseq_Base::GetInst(), CSeq_inst_Base::GetRepr(), CObject_id_Base::GetStr(), CDbtag_Base::GetTag(), CMolInfo_Base::GetTech(), CSeq_id::IdentifyAccession(), NStr::IntToString(), CBioseq::IsAa(), CConstRef< C, Locker >::IsNull(), CBioseq_Base::IsSetInst(), CDbtag::IsSkippable(), CObject_id_Base::IsStr(), ITERATE, kEmptyStr, kMax_Int, CConstRef< C, Locker >::NotEmpty(), NPOS, NULL, prefix, s_OrganelleName(), s_TitleFromBioSource(), s_TitleFromChromosome(), rapidjson::source, NStr::StartsWith(), string, suffix, t, and CSeq_id_Base::Which().

◆ GetTitle() [2/2]

NCBI_XOBJUTIL_EXPORT string GetTitle ( const CBioseq_Handle hnd,
TGetTitleFlags  flags = 0 
)

Definition at line 106 of file seqtitle.cpp.

References BREAK, CSeqFeatData_Base::e_Cdregion, CSeq_id_Base::e_Ddbj, CSeqdesc_Base::e_Embl, CSeq_id_Base::e_Embl, CSeqdesc_Base::e_Genbank, CSeq_id_Base::e_Genbank, CSeqFeatData_Base::e_Gene, CSeq_id_Base::e_General, CSeqdesc_Base::e_Molinfo, CSeqdesc_Base::e_Org, CSeq_id_Base::e_Other, CSeq_id_Base::e_Patent, CSeqdesc_Base::e_Pdb, CSeq_id_Base::e_Pdb, CSeqFeatData_Base::e_Prot, CSeqdesc_Base::e_Source, CSeqdesc_Base::e_Title, CSeq_id_Base::e_Tpd, CSeq_id_Base::e_Tpe, CSeq_id_Base::e_Tpg, CSeq_id::eAcc_division_mask, CSeq_id::eAcc_refseq_chromosome, CSeq_id::eAcc_refseq_mrna, CSeq_id::eAcc_refseq_ncrna, CSeq_id::eAcc_tsa, CSeq_id::eAcc_wgs, CMolInfo_Base::eBiomol_cRNA, CMolInfo_Base::eBiomol_genomic, CMolInfo_Base::eBiomol_mRNA, CMolInfo_Base::eBiomol_ncRNA, CMolInfo_Base::eBiomol_other_genetic, CMolInfo_Base::eBiomol_pre_RNA, CMolInfo_Base::eBiomol_rRNA, CMolInfo_Base::eBiomol_scRNA, CMolInfo_Base::eBiomol_snoRNA, CMolInfo_Base::eBiomol_snRNA, CMolInfo_Base::eBiomol_tmRNA, CMolInfo_Base::eBiomol_transcribed_RNA, CMolInfo_Base::eBiomol_tRNA, CSeq_inst_Base::eMol_aa, NStr::EndsWith(), NStr::eNocase, NStr::EqualNocase(), CSeq_inst_Base::eRepr_delta, CSeq_inst_Base::eRepr_seg, CMolInfo_Base::eTech_est, CMolInfo_Base::eTech_htgs_0, CMolInfo_Base::eTech_htgs_1, CMolInfo_Base::eTech_htgs_2, CMolInfo_Base::eTech_htgs_3, CMolInfo_Base::eTech_sts, CMolInfo_Base::eTech_survey, CMolInfo_Base::eTech_tsa, CMolInfo_Base::eTech_unknown, CMolInfo_Base::eTech_wgs, fFGL_Content, CSeqMap::fFindGap, fGetTitle_NoExpensive, fGetTitle_Organism, fGetTitle_Reconstruct, flags, fON_wgs, CMolInfo_Base::GetBiomol(), CBioseq_Handle::GetBioseqMolType(), CSeq_entry_Handle::GetCompleteSeq_entry(), CPDB_block_Base::GetCompound(), CSeq_id_Base::GetGeneral(), CBioseq_Handle::GetId(), CBioseq_Handle::GetInst_Repr(), GetLabel(), CSeqdesc_Base::GetOrg(), CSeqdesc_Base::GetPdb(), CBioseq_Handle::GetScope(), CObject_id_Base::GetStr(), CDbtag_Base::GetTag(), CMolInfo_Base::GetTech(), CSeqdesc_Base::GetTitle(), CBioseq_Handle::GetTopLevelEntry(), CSeq_id::IdentifyAccession(), NStr::IntToString(), CConstRef< C, Locker >::IsNull(), isprint(), CDbtag::IsSkippable(), CObject_id_Base::IsStr(), ITERATE, kEmptyStr, CConstRef< C, Locker >::NotEmpty(), NPOS, NULL, prefix, NStr::Replace(), CConstRef< C, Locker >::Reset(), s_FlyCG_PtoR(), s_OrganelleName(), s_TitleFromBioSource(), s_TitleFromChromosome(), s_TitleFromProtein(), s_TitleFromSegment(), rapidjson::source, NStr::StartsWith(), string, suffix, t, and CSeq_id_Base::Which().

Referenced by PT::CWorkspace::BeginLabelEdit(), CEditingBtnsPanel::CEditingBtnsPanel(), CFeedbackWizard::Create(), CSubjectMap_Factory_Base::extractSeqVector(), ExtractSeqVector(), CWinMaskUtil::CIdSet_TextMatch::find(), CPub::GetTitles(), and CTitleProcess::SeqEntryProcess().

◆ GetWidth()

TSeqPos CFastaOstream::GetWidth ( void  ) const
inline

Other parameters...

Definition at line 855 of file sequence.hpp.

◆ IsPseudo()

bool IsPseudo ( const CSeq_feat feat,
CScope scope 
)

Determines whether given feature is pseudo, using gene associated with feature if necessary Checks to see if a feature is pseudo.

Looks for pseudo flag set on feature, looks for pseudogene qualifier on feature, performs same checks for gene associated with feature

Parameters
featSeq-feat to check
scopeCScope to use when looking for associated gene
Returns
Boolean return value indicates whether any of the "pseudo" markers are found

Definition at line 1428 of file sequence.cpp.

References NStr::EqualNocase(), CSeq_feat_Base::GetData(), CSeqFeatData_Base::GetGene(), GetGeneForFeature(), CGene_ref_Base::GetPseudo(), CSeq_feat_Base::GetPseudo(), CSeq_feat_Base::GetQual(), CSeq_feat_Base::GetXref(), CSeqFeatData_Base::IsGene(), CGene_ref_Base::IsSetPseudo(), CSeq_feat_Base::IsSetPseudo(), CSeq_feat_Base::IsSetQual(), CSeq_feat_Base::IsSetXref(), and ITERATE.

Referenced by CGenericPropsPanel::CreateControls(), DoesFeatureHaveUnnecessaryException(), CCleanup::ExtendToStopIfShortAndNotPartial(), g_InstantiateMissingProteins(), CRetranslateCDS::GetCommand(), CCDSTranslationProblems::GetNonsenseIntrons(), CCleanup::RemovePseudoProduct(), s_HasUnprocessedCdregions(), CMacroFunction_ReplaceStopWithSelenocysteine::TheFunction(), CImpFeatValidator::Validate(), CValidError_bioseqset::ValidateGenProdSet(), CValidError_imp::ValidateSeqLoc(), CCleanup::WGSCleanup(), CCleanup::x_AddLowQualityException(), CCleanupApp::x_BatchExtendCDS(), CCDSTranslationProblems::x_CountNonsenseIntrons(), CImportFeatTable::x_DoImportCDS(), CCDSTranslationPanel::x_IsPseudo(), CMacroFunction_EditFeatLocation::x_RetranslateCDS(), CValidError_bioseq::x_TranscriptIDsMatch(), CFeatTableEdit::xGenerate_mRNA_Product(), and CFeatureTableReader::xMoveCdRegions().

◆ NCBI_EXCEPTION_DEFAULT()

CSeqIdFromHandleException::NCBI_EXCEPTION_DEFAULT ( CSeqIdFromHandleException  ,
CException   
)

◆ OnPatternFound()

virtual bool CSeqSearch::IClient::OnPatternFound ( const TPatternInfo pat_info,
TSeqPos  pos 
)
pure virtual

Referenced by CSeqSearch::Search().

◆ operator*()

const SCurrentGapInfo& CBioseqGaps_CI::operator* ( void  ) const
inline

Get information about the gap we're currently on.

Definition at line 1654 of file sequence.hpp.

References CBioseqGaps_CI::x_GetCurrent().

◆ operator++()

CBioseqGaps_CI& CBioseqGaps_CI::operator++ ( void  )
inline

Move the iterator forward to next gap (or the end, if there are no more to return)

Definition at line 1617 of file sequence.hpp.

References CBioseqGaps_CI::x_Next().

◆ operator->()

const SCurrentGapInfo* CBioseqGaps_CI::operator-> ( void  ) const
inline

Get information about the gap we're currently on.

Definition at line 1659 of file sequence.hpp.

References CBioseqGaps_CI::x_GetCurrent().

◆ operator=()

CDeflineGenerator& CDeflineGenerator::operator= ( const CDeflineGenerator )
private

◆ Params()

CBioseqGaps_CI::Params::Params ( void  )
inline

Default ctor gives params which are usually reasonable.

Definition at line 1579 of file sequence.hpp.

◆ postProcessDiffAmount()

virtual void CGetOverlappingFeaturesPlugin::postProcessDiffAmount ( Int8 cur_diff,
CRef< CSeq_loc > &  cleaned_loc_this_iteration,
CRef< CSeq_loc > &  candidate_feat_loc,
CScope scope,
SAnnotSelector sel,
TSeqPos  circular_length 
)
pure virtual

◆ processLoc()

virtual void CGetOverlappingFeaturesPlugin::processLoc ( CBioseq_Handle bioseq_handle,
CRef< CSeq_loc > &  loc,
TSeqPos  circular_length 
)
pure virtual

◆ processMainLoop()

virtual void CGetOverlappingFeaturesPlugin::processMainLoop ( bool shouldContinueToNextIteration,
CRef< CSeq_loc > &  cleaned_loc_this_iteration,
CRef< CSeq_loc > &  candidate_feat_loc,
EOverlapType overlap_type_this_iteration,
bool revert_locations_this_iteration,
CBioseq_Handle bioseq_handle,
const CMappedFeat feat,
TSeqPos  circular_length,
SAnnotSelector::EOverlapType  annot_overlap_type 
)
pure virtual

◆ processSAnnotSelector()

virtual void CGetOverlappingFeaturesPlugin::processSAnnotSelector ( SAnnotSelector sel)
pure virtual

◆ ProductToSource()

CRef<CSeq_loc> ProductToSource ( const CSeq_feat feat,
const CSeq_loc prod_loc,
TP2SFlags  flags = 0,
CScope scope = 0 
)

◆ ResetFlag()

void CFastaOstream::ResetFlag ( EFlags  flag)
inline

◆ Resolve() [1/2]

CRef< CSeq_loc > SRelLoc::Resolve ( const CSeq_loc new_parent,
CScope scope = 0,
SRelLoc::TFlags  flags = 0 
) const

◆ Resolve() [2/2]

CRef<CSeq_loc> SRelLoc::Resolve ( CScope scope = 0,
TFlags  flags = 0 
) const
inline

◆ ReverseComplement()

void ReverseComplement ( CSeq_inst seq,
CScope scope 
)

◆ SAmbigCount()

CSequenceAmbigTrimmer::SAmbigCount::SAmbigCount ( const TSignedSeqPos  iTrimDirection)
inline

Definition at line 1470 of file sequence.hpp.

◆ SCurrentGapInfo()

CBioseqGaps_CI::SCurrentGapInfo::SCurrentGapInfo ( void  )
inline

Constructor initializes to state that it should be when the iterator first starts.

Definition at line 1629 of file sequence.hpp.

◆ Search() [1/2]

void CSeqSearch::Search ( const CBioseq_Handle seq)

◆ Search() [2/2]

int CSeqSearch::Search ( int  current_state,
char  ch,
int  position,
int  length = kMax_Int 
)

Low level search method.

The user is responsible for feeding each character in turn, keep track of the position in the text and provide the length in case of a circular topoloy.

Definition at line 4903 of file sequence.cpp.

References int, ITERATE, CSeqSearch::m_Client, CSeqSearch::m_Fsa, NULL, and CSeqSearch::IClient::OnPatternFound().

◆ SetAllFlags()

void CFastaOstream::SetAllFlags ( TFlags  flags)
inline

◆ SetClient()

void CSeqSearch::SetClient ( IClient client)
inline

Definition at line 1251 of file sequence.hpp.

References client, and CSeqSearch::m_Client.

◆ SetFlag()

void CFastaOstream::SetFlag ( EFlags  flag)
inline

◆ SetGapMode()

void CFastaOstream::SetGapMode ( EGapMode  mode)
inline

Definition at line 861 of file sequence.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), and CFastaProcess::SeqEntryProcess().

◆ SetMask()

void CFastaOstream::SetMask ( EMaskType  type,
CConstRef< CSeq_loc location 
)

◆ setUpFeatureIterator()

virtual void CGetOverlappingFeaturesPlugin::setUpFeatureIterator ( CBioseq_Handle bioseq_handle,
unique_ptr< CFeat_CI > &  feat_ci,
TSeqPos  circular_length,
CRange< TSeqPos > &  range,
const CSeq_loc loc,
SAnnotSelector sel,
CScope scope,
ENa_strand strand 
)
pure virtual

◆ SetWidth()

void CFastaOstream::SetWidth ( TSeqPos  width)

◆ SkipBioseq() [1/2]

virtual bool CFastaOstream::SkipBioseq ( const CBioseq )
inlinevirtual

Used only by Write(CSeq_entry[_Handle], ...); permissive by default.

Definition at line 837 of file sequence.hpp.

Referenced by CFastaOstream::Write().

◆ SkipBioseq() [2/2]

virtual bool CFastaOstream::SkipBioseq ( const CBioseq_Handle handle)
inlinevirtual

Delegates to the non-handle version by default for compatibility with older code; newer code should override this version.

Definition at line 841 of file sequence.hpp.

References CBioseq_Handle::GetCompleteBioseq().

◆ SourceToProduct()

CRef<CSeq_loc> SourceToProduct ( const CSeq_feat feat,
const CSeq_loc source_loc,
TS2PFlags  flags = 0,
CScope scope = 0,
int frame = 0 
)

◆ SRelLoc() [1/2]

SRelLoc::SRelLoc ( const CSeq_loc parent,
const CSeq_loc child,
CScope scope = 0,
SRelLoc::TFlags  flags = 0 
)

Beware: treats locations corresponding to different sequences as disjoint, even if one is actually a segment of the other.

:-/

Definition at line 4421 of file sequence.cpp.

References delta(), CInt_fuzz_Base::eLim_gt, CInt_fuzz_Base::eLim_lt, eNa_strand_unknown, f(), flags, SRelLoc::fNoMerge, GetLength(), IsReverse(), IsSameBioseq(), SRelLoc::m_Ranges, CInt_fuzz::Negative(), CConstRef< C, Locker >::Reset(), Reverse(), and SameOrientation().

◆ SRelLoc() [2/2]

SRelLoc::SRelLoc ( const CSeq_loc parent,
const TRanges ranges 
)
inline

For manual work. As noted above, ranges need not contain any IDs.

Definition at line 1140 of file sequence.hpp.

◆ Translate() [1/7]

void CSeqTranslator::Translate ( const CSeq_feat cds,
CScope scope,
string prot,
bool  include_stop = true,
bool  remove_trailing_X = false,
bool alt_start = 0 
)
static

◆ Translate() [2/7]

void CSeqTranslator::Translate ( const CSeq_loc loc,
const CBioseq_Handle handle,
string prot,
const CGenetic_code code = NULL,
bool  include_stop = true,
bool  remove_trailing_X = false,
bool alt_start = 0 
)
static

utility function: translate a given location on a sequence

Definition at line 4150 of file sequence.cpp.

References CBioseq_Handle::eCoding_Iupac, eExtreme_Biological, CBioseq_Handle::GetScope(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), prot, and x_Translate().

◆ Translate() [3/7]

void CSeqTranslator::Translate ( const CSeq_loc loc,
CScope scope,
string prot,
const CGenetic_code code = NULL,
bool  include_stop = true,
bool  remove_trailing_X = false,
bool alt_start = 0 
)
static

utility function: translate a given location on a sequence

Definition at line 4167 of file sequence.cpp.

References CBioseq_Handle::eCoding_Iupac, eExtreme_Biological, CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), prot, and x_Translate().

◆ Translate() [4/7]

void CSeqTranslator::Translate ( const CSeqVector seq,
string prot,
const CGenetic_code code,
bool  include_stop = true,
bool  remove_trailing_X = false,
bool alt_start = NULL,
bool  is_5prime_complete = true,
bool  is_3prime_complete = true 
)
static

Translate a seq-vector using a specified genetic code if the code is NULL, then the default genetic code is used.

Parameters
seqCSeqVector of sequence to be translated
codeGenetic code to use for translation (NULL to use default)
include_stopIf true, translate through stop codons and include trailing stop (true by default)
remove_trailing_XIf true, remove trailing Xs from protein translation (false by default)
alt_startPointer to bool to indicate whether an alternative start codon was used
is_5prime_completeIf true, only translate first codon if start codon, otherwise translate as dash (-) to indicate problem with sequence

Definition at line 4123 of file sequence.cpp.

References prot, and x_Translate().

◆ Translate() [5/7]

void CSeqTranslator::Translate ( const CSeqVector seq,
string prot,
TTranslationFlags  flags = fDefault,
const CGenetic_code code = NULL,
bool alt_start = NULL 
)
static

Translate a seq-vector using a specified genetic code if the code is NULL, then the default genetic code is used.

Parameters
seqCSeqVector of sequence to be translated
codeGenetic code to use for translation (NULL to use default)
flagsBinary OR of "ETranslationFlags"
alt_startPointer to bool to indicate whether an alternative start codon was used

Definition at line 4136 of file sequence.cpp.

References flags, prot, and x_Translate().

◆ Translate() [6/7]

void CSeqTranslator::Translate ( const string seq,
string prot,
const CGenetic_code code,
bool  include_stop = true,
bool  remove_trailing_X = false,
bool alt_start = NULL,
bool  is_5prime_complete = true,
bool  is_3prime_complete = true 
)
static

Translate a string using a specified genetic code.

Parameters
seqString containing IUPAC representation of sequence to be translated
codeGenetic code to use for translation (NULL to use default)
include_stopIf true, translate through stop codons and include trailing stop (true by default)
remove_trailing_XIf true, remove trailing Xs from protein translation (false by default)
alt_startPointer to bool to indicate whether an alternative start codon was used
is_5prime_completeIf true, only translate first codon if start codon, otherwise translate as dash (-) to indicate problem with sequence

Definition at line 4095 of file sequence.cpp.

References prot, and x_Translate().

Referenced by CCDSTranslationPanel::AdjustForStopCodonHyperlinkClicked(), CFeatGapInfo::AdjustProteinSeq(), AdjustSingleFeature(), BOOST_AUTO_TEST_CASE(), CNewCleanup_imp::CdRegionEC(), CConvertCdsToMiscFeat::DetectStartStopCodons(), DoesCodingRegionEndWithStopCodon(), CCleanup::ExtendToStopIfShortAndNotPartial(), CSeqTranslator::FindBestFrame(), CScore_CdsInternalStops::Get(), GetRetranslateCDSCommand(), CLocationEditPolicy::Interpret3Policy(), CLocationEditPolicy::Interpret5Policy(), CMakeCdrProds::MakeCdrProds(), variation_ref::CVariationUtil::PrecursorToProt(), CTabularFormatter_StopCodonChanges::Print(), CGlimmerReader::Read(), CRetranslateCDS::RetranslateCDSCommand(), CAddGlobalCodeBreak::RetranslateCDSCommand(), CExtendCDSToStop::RetranslateCDSCommand(), CTestSingleAln_All::RunTest(), s_CompareProtProdToTrans(), ApplyCDSFrame::s_FindMatchingFrame(), CMacroFunction_ApplyCDSFrame::s_FindMatchingFrame(), s_GetCdsSequence(), s_GetGermlineTranslation(), CCmdCreateCDS::s_GetProductSequence(), variation_ref::CVariationUtil::s_UntranslateProt(), variation::CVariationUtil::s_UntranslateProt(), CIgBlastTabularInfo::SetAirrFormatData(), SetCdrFwrSeq(), CCleanup::SetCDSPartialsByFrameAndTranslation(), CIgBlastTabularInfo::SetIgAnnotation(), CIgBlastTabularInfo::SetIgCDR3FWR4Annotation(), CValidError_bioseq::SuppressTrailingXMsg(), TestTrimForFrame(), variation::Translate(), Translate(), CCdregion_translate::TranslateCdregion(), CPaintSequence::TranslateCDS(), TranslateCodingRegionForValidation(), TruncateCDSAtStop(), CTruncateCDS::TruncateProteinFeat(), CPaintSequence::UpdateData(), CFeatureItem::x_AddQualTranslation(), CDisplaySeqalign::x_AddTranslationForLocalSeq(), CCleanupApp::x_BatchExtendCDS(), CFeaturePropagator::x_CdsCleanupPartials(), CFeatureGenerator::SImplementation::x_CreateCdsFeature(), CFeatureGenerator::SImplementation::x_CreateProteinBioseq(), CImportFeatTable::x_DoImportCDS(), CAdjustFeaturesForGaps::x_DoOne(), COrfSearchJob::x_DoSearch(), CCdsGlyph::x_Draw(), CAlignGlyph::x_DrawAlignRowSequence(), CCdsGlyph::x_DrawProjectedProtSeq(), CCdsGlyph::x_DrawProtSeqWithMapping(), CAlignGlyph::x_DrawUnalignedRowSequence(), CGuiObjectInfoSeq_feat::x_GetProductSequence(), CCDSTranslationProblems::x_GetTranslExceptProblems(), CFeatureGenerator::SImplementation::x_HandleCdsExceptions(), CReportTrim::x_RetranslateCDS(), variation::CHgvsParser::x_SeqLiteralToStr(), CCDSTranslationPanel::x_Translate(), and CCdregionValidator::x_ValidateConflict().

◆ Translate() [7/7]

void CSeqTranslator::Translate ( const string seq,
string prot,
TTranslationFlags  flags = fDefault,
const CGenetic_code code = NULL,
bool alt_start = NULL 
)
static

Translate a string using a specified genetic code.

Parameters
seqString containing IUPAC representation of sequence to be translated
codeGenetic code to use for translation (NULL to use default)
flagsBinary OR of "ETranslationFlags"
alt_startPointer to bool to indicate whether an alternative start codon was used

Definition at line 4108 of file sequence.cpp.

References flags, prot, and x_Translate().

◆ TranslateCdregion() [1/2]

void CCdregion_translate::TranslateCdregion ( string prot,
const CBioseq_Handle bsh,
const CSeq_loc loc,
const CCdregion cdr,
bool  include_stop = true,
bool  remove_trailing_X = false,
bool alt_start = 0,
ETranslationLengthProblemOptions  options = eThrowException 
)
static

translation coding region into ncbieaa protein sequence

Definition at line 4384 of file sequence.cpp.

References CBioseq_Handle::GetScope(), prot, CSeq_feat_Base::SetData(), CSeq_feat_Base::SetLocation(), and CSeqTranslator::Translate().

Referenced by CPromote::x_PromoteCdregion().

◆ TranslateCdregion() [2/2]

void CCdregion_translate::TranslateCdregion ( string prot,
const CSeq_feat cds,
CScope scope,
bool  include_stop = true,
bool  remove_trailing_X = false,
bool alt_start = 0,
ETranslationLengthProblemOptions  options = eThrowException 
)
static

◆ TranslateToProtein()

CRef< CBioseq > CSeqTranslator::TranslateToProtein ( const CSeq_feat cds,
CScope scope 
)
static

Definition at line 3839 of file sequence.cpp.

References AddAAToDeltaSeq(), AddGapToDeltaSeq(), CSeqVector::begin(), CBioseq_Handle::eCoding_Iupac, eExtreme_Biological, CCdregion_Base::eFrame_three, CCdregion_Base::eFrame_two, CSeq_inst_Base::eMol_aa, NStr::EndsWith(), eOffset_FromStart, CSeq_inst_Base::eRepr_delta, CSeq_inst_Base::eRepr_raw, CSeqMap::eSeqGap, NStr::Find(), CCode_break_Base::GetAa(), CSeqFeatData_Base::GetCdregion(), CCdregion_Base::GetCode(), CCdregion_Base::GetCode_break(), CTrans_table::GetCodonResidue(), CSeq_feat_Base::GetData(), CCdregion_Base::GetFrame(), CCode_break_Base::GetLoc(), CSeq_feat_Base::GetLocation(), CCode_break_Base::C_Aa::GetNcbieaa(), CSeqVector::GetSeqMap(), CTrans_table::GetStartResidue(), CGen_code_table::GetTransTable(), CSeqMap_CI::GetType(), CSeqVector_CI::HasZeroGapBefore(), i, CSeqFeatData_Base::IsCdregion(), CSeqVector::IsInGap(), CCode_break_Base::C_Aa::IsNcbieaa(), CSeq_loc::IsPartialStart(), CCdregion_Base::IsSetCode(), CCdregion_Base::IsSetCode_break(), CCdregion_Base::IsSetFrame(), CSeqMap_CI::IsUnknownLength(), ITERATE, LocationOffset(), mod(), CTrans_table::NextCodonState(), NON_CONST_ITERATE, NULL, offset, prot, and CSeqVector::size().

Referenced by CCleanup::AddProtein(), BOOST_AUTO_TEST_CASE(), CCmdAddCDS::Execute(), GetRetranslateCDSCommand(), CCdsToMatPeptide::MergeConvert(), RetranslateCDS(), RetranslateCdsForNucProtSet(), SetNewProteinSequence(), TestOneGapSeq(), TranslateCDSCommand(), TruncateCDSAtStop(), CFeaturePropagator::x_CdsStopAtStopCodon(), CVectorTrimPanel::x_RetranslateCDS(), CFastaOstreamEx::x_WriteTranslatedCds(), CFeatTableEdit::xGenerate_mRNA_Product(), and CFeatureTableReader::xTranslateProtein().

◆ UsePDBCompoundForDefline()

bool CDeflineGenerator::UsePDBCompoundForDefline ( void  ) const
inline

Definition at line 145 of file create_defline.hpp.

◆ Write() [1/4]

void CFastaOstream::Write ( const CBioseq seq,
const CSeq_loc location = 0,
bool  no_scope = false,
const string custom_title = kEmptyStr 
)

◆ Write() [2/4]

void CFastaOstream::Write ( const CBioseq_Handle handle,
const CSeq_loc location = 0,
const string custom_title = kEmptyStr 
)
virtual

◆ Write() [3/4]

void CFastaOstream::Write ( const CSeq_entry entry,
const CSeq_loc location = 0,
bool  no_scope = false 
)

These versions may set up a temporary object manager scope In the common case of a raw bioseq, no scope is needed.

Definition at line 3365 of file sequence.cpp.

References CScope::AddTopLevelSeqEntry(), CSeq_entry_Base::e_Seq, CSeq_entry_Base::e_Set, CObjectManager::GetInstance(), CSeq_entry_Base::GetSeq(), CBioseq_set_Base::GetSeq_set(), CSeq_entry_Base::GetSet(), ITERATE, location, CSeq_entry_Base::Which(), and CFastaOstream::Write().

◆ Write() [4/4]

void CFastaOstream::Write ( const CSeq_entry_Handle handle,
const CSeq_loc location = 0 
)
virtual

◆ WriteAllModsAsFasta()

void CFastaOstream::SGapModText::WriteAllModsAsFasta ( CNcbiOstream out) const

This will write the modifiers in FASTA format.

(example: "[gap-type=short_arm]")

Definition at line 3467 of file sequence.cpp.

References CFastaOstream::SGapModText::gap_linkage_evidences, CFastaOstream::SGapModText::gap_type, NStr::Join(), and out().

Referenced by CFastaOstream::x_WriteSequence().

◆ WriteSequence()

void CFastaOstream::WriteSequence ( const CBioseq_Handle handle,
const CSeq_loc location = 0,
CSeq_loc::EOpFlags  merge_flags = CSeq_loc::fMerge_AbuttingOnly 
)
virtual

◆ WriteTitle() [1/2]

void CFastaOstream::WriteTitle ( const CBioseq seq,
const CSeq_loc location = 0,
bool  no_scope = false,
const string custom_title = kEmptyStr 
)

Definition at line 3022 of file sequence.cpp.

◆ WriteTitle() [2/2]

void CFastaOstream::WriteTitle ( const CBioseq_Handle handle,
const CSeq_loc location = 0,
const string custom_title = kEmptyStr 
)
virtual

◆ x_AddNucleotidePattern()

void CSeqSearch::x_AddNucleotidePattern ( const string name,
string pattern,
Int2  cut_site,
ENa_strand  strand,
TSearchFlags  flags 
)
private

◆ x_AddPattern()

void CSeqSearch::x_AddPattern ( TPatternInfo pat_info,
string sequence,
TSearchFlags  flags 
)
private

◆ x_AdjustProteinTitleSuffix()

void CDeflineGenerator::x_AdjustProteinTitleSuffix ( const CBioseq_Handle bsh)
private

◆ x_AdjustProteinTitleSuffixIdx()

void CDeflineGenerator::x_AdjustProteinTitleSuffixIdx ( const CBioseq_Handle bsh)
private

◆ x_CDShasLowQualityException()

bool CDeflineGenerator::x_CDShasLowQualityException ( const CSeq_feat sft)
private

◆ x_CountAmbigInRange()

void CSequenceAmbigTrimmer::x_CountAmbigInRange ( SAmbigCount out_result,
const CSeqVector seqvec,
const TSignedSeqPos  iStartPosInclusive_arg,
const TSignedSeqPos  iEndPosInclusive_arg,
const TSignedSeqPos  iTrimDirection 
)
protectedvirtual

This counts the number of ambiguous bases in the range [leftmost_pos_to_check, rightmost_pos_to_check].

Note that rightmost_pos_to_check is inclusive.

Parameters
out_resultThis will store the result. Pass in a struct initialized by the default constructor.
seqvecThis is used to get the bases.
iStartPosInclusiveThis is where we start our count.
iEndPosInclusiveThis is where we end our count. Note that it can be < or > iStartPosInclusive, depending on trim direction.
iTrimDirection1 to trim from left to right, -1 to trim from right to left.

Definition at line 571 of file seq_trimmer.cpp.

References abs, CSeqMap::eSeqData, CSeqMap::eSeqGap, CSequenceAmbigTrimmer::fFlags_DoNotTrimSeqGap, CSeqMap::FindSegment(), CSeqVector::GetScope(), CSeqVector::GetSeqMap(), CSeqVector::GetSequenceType(), CSeqMap_CI::GetType(), CSeqVector::IsNucleotide(), CSeqVector::IsProtein(), CSequenceAmbigTrimmer::m_arrNucAmbigLookupTable, CSequenceAmbigTrimmer::m_arrProtAmbigLookupTable, CSequenceAmbigTrimmer::m_fFlags, max(), min(), NCBI_USER_THROW_FMT, NULL, CSequenceAmbigTrimmer::SAmbigCount::num_ambig_bases, CSequenceAmbigTrimmer::SAmbigCount::pos_after_last_gap, CSequenceAmbigTrimmer::x_SegmentGetBeginningInclusive(), CSequenceAmbigTrimmer::x_SegmentGetEndInclusive(), and CSequenceAmbigTrimmer::x_SeqMapIterDoNext().

Referenced by CSequenceAmbigTrimmer::x_FindWhereToTrim().

◆ x_DescribeClones()

void CDeflineGenerator::x_DescribeClones ( vector< CTempString > &  desc,
string buf 
)
private

◆ x_EdgeSeqMapGapAdjust()

void CSequenceAmbigTrimmer::x_EdgeSeqMapGapAdjust ( const CSeqVector seqvec,
TSignedSeqPos in_out_uStartOfGoodBasesSoFar,
const TSignedSeqPos  uEndOfGoodBasesSoFar,
const TSignedSeqPos  iTrimDirection,
const TSignedSeqPos  uChunkSize 
)
protectedvirtual

This adjusts in_out_uStartOfGoodBasesSoFar if we're at a CSeqMap gap.

It does not notice ambiguous bases that are inside a normal sequence.

Parameters
seqvecThis is used to access information about the sequence.
in_out_uStartOfGoodBasesSoFarThis is the start of where we check for a gap. It will be updated to be past the gap, if a gap is found.
in_out_uRightmostGoodBaseSoFarAnalogous to in_out_uLeftmostGoodBaseSoFar. It's inclusive.
uEndOfGoodBasesSoFarThis limits how far this function may search (inclusive) when looking for the end of a gap segment.
iTrimDirection1 to trim from left to right, -1 to trim from right to left.
uChunkSizeThe gap size that we chop off must be a multiple of uChunkSize. We will chop off less if we would go more than 1 past the uEndOfGoodBasesSoFar. A uChunkSize of 1 means no chunking for obvious math reasons.

Definition at line 497 of file seq_trimmer.cpp.

References abs, CSeqMap::eSeqData, CSeqMap::eSeqGap, CSequenceAmbigTrimmer::fFlags_DoNotTrimSeqGap, CSeqMap::FindSegment(), CSeqVector::GetScope(), CSeqVector::GetSeqMap(), CSeqMap_CI::GetType(), CSeqVector::IsNucleotide(), CSeqVector::IsProtein(), CSequenceAmbigTrimmer::m_arrNucAmbigLookupTable, CSequenceAmbigTrimmer::m_arrProtAmbigLookupTable, CSequenceAmbigTrimmer::m_fFlags, NCBI_USER_THROW, NULL, and CSequenceAmbigTrimmer::x_SegmentGetEndInclusive().

Referenced by CSequenceAmbigTrimmer::x_FindWhereToTrim().

◆ x_ExpandPattern()

void CSeqSearch::x_ExpandPattern ( string sequence,
string buffer,
size_t  pos,
TPatternInfo pat_info,
TSearchFlags  flags 
)
private

◆ x_FindNextGapOnBioseq()

CBioseqGaps_CI::EFindNext CBioseqGaps_CI::x_FindNextGapOnBioseq ( const CBioseq_Handle bioseq_h,
const TSeqPos  pos_to_start_looking,
TSeqPos out_pos_of_gap,
TSeqPos out_len_of_gap 
) const
protectedvirtual

This finds the next gap on the bioseq, starting at given pos.

Parameters
bioseq_hthe bioseq on which we're seeking the next relevant gap.
pos_to_start_lookingThis is the position on bioseq_h to start looking for a relevant gap.
out_pos_of_gapIf a gap is found, this holds the 0-based position of the start of that gap. This is undefined if no gap was found.
out_len_of_gapIf a gap is found, this holds the length of the gap. This is undefined if no gap was found.
Returns
This indicates whether or not a relevant gap was found.

Definition at line 191 of file bioseqgaps_ci.cpp.

References CBioseq_Handle::eCoding_Iupac, CBioseqGaps_CI::eFindNext_Found, CBioseqGaps_CI::eFindNext_NotFound, CSeqMap::eSeqData, CSeqMap::eSeqGap, CSeqMap::FindSegment(), CSeqMap_CI::GetEndPosition(), CSeqVector::GetGapChar(), CBioseq_Handle::GetScope(), CSeqVector::GetSeqMap(), CSeqMap_CI::GetType(), NCBI_USER_THROW_FMT, and CSeqVector::size().

Referenced by CBioseqGaps_CI::x_Next().

◆ x_FindWhereToTrim()

TSignedSeqPos CSequenceAmbigTrimmer::x_FindWhereToTrim ( const CSeqVector seqvec,
const TSignedSeqPos  iStartPosInclusive_arg,
const TSignedSeqPos  iEndPosInclusive_arg,
TSignedSeqPos  iTrimDirection 
)
protectedvirtual

This returns the last good base that won't be trimmed (note: last really means "first" when we're starting from the end)

Parameters
seqvecThis lets us explore the Bioseq to find out where to trim.
iStartPosInclusive_argThis is the where we start our trimming. Depending on direction, this could be < or > iEndPosInclusive_arg.
iEndPosInclusive_argThis is where the trimming ends (inclusive). Analogous to iStartPosInclusive_arg.
iTrimDirection1 to trim from left to right, -1 to trim from right to left.
Returns
The last good base (remember: last means "lower number" when we're checking from the end). If trimming would trim off the entire sequence, it returns a position past the end of the sequence.

Definition at line 362 of file seq_trimmer.cpp.

References _ASSERT, abs, CSequenceAmbigTrimmer::STrimRule::bases_to_check, ITERATE, CSequenceAmbigTrimmer::m_uMinSeqLen, CSequenceAmbigTrimmer::m_vecTrimRules, max(), CSequenceAmbigTrimmer::STrimRule::max_bases_allowed_to_be_ambig, min(), CSequenceAmbigTrimmer::SAmbigCount::num_ambig_bases, CSequenceAmbigTrimmer::SAmbigCount::pos_after_last_gap, s_IsValidDirection(), CSequenceAmbigTrimmer::x_CountAmbigInRange(), and CSequenceAmbigTrimmer::x_EdgeSeqMapGapAdjust().

Referenced by CSequenceAmbigTrimmer::DoTrim().

◆ x_GetBestId()

void CFastaOstream::x_GetBestId ( CConstRef< CSeq_id > &  gi_id,
CConstRef< CSeq_id > &  best_id,
bool hide_prefix,
const CBioseq bioseq 
)
protectedvirtual

◆ x_GetCurrent()

const CBioseqGaps_CI::SCurrentGapInfo & CBioseqGaps_CI::x_GetCurrent ( void  ) const
protectedvirtual

This gives info on the gap we're currently on.

Throws if this iterator has finished.

Definition at line 84 of file bioseqgaps_ci.cpp.

References CBioseqGaps_CI::m_infoOnCurrentGap, and NCBI_USER_THROW.

Referenced by CBioseqGaps_CI::operator*(), and CBioseqGaps_CI::operator->().

◆ x_GetGeneRefViaCDS()

CConstRef< CGene_ref > CDeflineGenerator::x_GetGeneRefViaCDS ( const CMappedFeat mapped_cds)
private

◆ x_GetLongestProtein()

CConstRef< CSeq_feat > CDeflineGenerator::x_GetLongestProtein ( const CBioseq_Handle bsh)
private

◆ x_GetMaskingStates()

void CFastaOstream::x_GetMaskingStates ( TMSMap masking_states,
const CSeq_id base_seq_id,
const CSeq_loc location,
CScope scope 
)
private

Definition at line 3074 of file sequence.cpp.

Referenced by CFastaOstream::Write(), and CFastaOstream::WriteSequence().

◆ x_GetModifiers()

string CDeflineGenerator::x_GetModifiers ( const CBioseq_Handle handle)

Definition at line 3432 of file create_defline.cpp.

References CDefLineJoiner::Add(), CPCRPrimerSet_Base::CanGet(), CPCRReactionSet_Base::CanGet(), CBioSource_Base::CanGetGenome(), CBioseq_Handle::CanGetInst_Topology(), DEFINE_STATIC_ARRAY_MAP, CBioSource_Base::eGenome_apicoplast, CBioSource_Base::eGenome_chloroplast, CBioSource_Base::eGenome_chromatophore, CBioSource_Base::eGenome_chromoplast, CBioSource_Base::eGenome_cyanelle, CBioSource_Base::eGenome_hydrogenosome, CBioSource_Base::eGenome_kinetoplast, CBioSource_Base::eGenome_leucoplast, CBioSource_Base::eGenome_mitochondrion, CBioSource_Base::eGenome_plasmid_in_mitochondrion, CBioSource_Base::eGenome_plasmid_in_plastid, CBioSource_Base::eGenome_plastid, CBioSource_Base::eGenome_proplastid, CBioSource_Base::eGenome_unknown, CTempString::empty(), ERR_POST_X, COrgMod_Base::eSubtype_acronym, CSubSource_Base::eSubtype_altitude, COrgMod_Base::eSubtype_anamorph, COrgMod_Base::eSubtype_authority, COrgMod_Base::eSubtype_bio_material, COrgMod_Base::eSubtype_biotype, COrgMod_Base::eSubtype_biovar, COrgMod_Base::eSubtype_breed, CSubSource_Base::eSubtype_cell_line, CSubSource_Base::eSubtype_cell_type, COrgMod_Base::eSubtype_chemovar, CSubSource_Base::eSubtype_chromosome, CSubSource_Base::eSubtype_clone, CSubSource_Base::eSubtype_clone_lib, CSubSource_Base::eSubtype_collected_by, CSubSource_Base::eSubtype_collection_date, COrgMod_Base::eSubtype_common, CSubSource_Base::eSubtype_country, COrgMod_Base::eSubtype_cultivar, COrgMod_Base::eSubtype_culture_collection, CSubSource_Base::eSubtype_dev_stage, COrgMod_Base::eSubtype_dosage, COrgMod_Base::eSubtype_ecotype, CSubSource_Base::eSubtype_endogenous_virus_name, CSubSource_Base::eSubtype_environmental_sample, COrgMod_Base::eSubtype_forma, COrgMod_Base::eSubtype_forma_specialis, CSubSource_Base::eSubtype_frequency, COrgMod_Base::eSubtype_gb_acronym, COrgMod_Base::eSubtype_gb_anamorph, COrgMod_Base::eSubtype_gb_synonym, CSubSource_Base::eSubtype_genotype, CSubSource_Base::eSubtype_germline, COrgMod_Base::eSubtype_group, CSubSource_Base::eSubtype_haplogroup, CSubSource_Base::eSubtype_haplotype, CSubSource_Base::eSubtype_identified_by, CSubSource_Base::eSubtype_insertion_seq_name, COrgMod_Base::eSubtype_isolate, CSubSource_Base::eSubtype_isolation_source, CSubSource_Base::eSubtype_lab_host, CSubSource_Base::eSubtype_lat_lon, CSubSource_Base::eSubtype_linkage_group, CSubSource_Base::eSubtype_map, CSubSource_Base::eSubtype_mating_type, COrgMod_Base::eSubtype_metagenome_source, CSubSource_Base::eSubtype_metagenomic, COrgMod_Base::eSubtype_nat_host, COrgMod_Base::eSubtype_nomenclature, COrgMod_Base::eSubtype_other, CSubSource_Base::eSubtype_other, COrgMod_Base::eSubtype_pathovar, CSubSource_Base::eSubtype_phenotype, CSubSource_Base::eSubtype_plasmid_name, CSubSource_Base::eSubtype_plastid_name, CSubSource_Base::eSubtype_pop_variant, CSubSource_Base::eSubtype_rearranged, CSubSource_Base::eSubtype_segment, COrgMod_Base::eSubtype_serogroup, COrgMod_Base::eSubtype_serotype, COrgMod_Base::eSubtype_serovar, CSubSource_Base::eSubtype_sex, COrgMod_Base::eSubtype_specimen_voucher, COrgMod_Base::eSubtype_strain, COrgMod_Base::eSubtype_sub_species, CSubSource_Base::eSubtype_subclone, COrgMod_Base::eSubtype_subgroup, COrgMod_Base::eSubtype_substrain, COrgMod_Base::eSubtype_subtype, COrgMod_Base::eSubtype_synonym, COrgMod_Base::eSubtype_teleomorph, CSubSource_Base::eSubtype_tissue_lib, CSubSource_Base::eSubtype_tissue_type, CSubSource_Base::eSubtype_transgenic, CSubSource_Base::eSubtype_transposon_name, COrgMod_Base::eSubtype_type, COrgMod_Base::eSubtype_type_material, COrgMod_Base::eSubtype_variety, CSubSource_Base::eSubtype_whole_replicon, CMolInfo_Base::eTech_barcode, CMolInfo_Base::eTech_both, CMolInfo_Base::eTech_composite_wgs_htgs, CMolInfo_Base::eTech_concept_trans, CMolInfo_Base::eTech_concept_trans_a, CMolInfo_Base::eTech_derived, CMolInfo_Base::eTech_est, CMolInfo_Base::eTech_fli_cdna, CMolInfo_Base::eTech_genemap, CMolInfo_Base::eTech_htc, CMolInfo_Base::eTech_htgs_0, CMolInfo_Base::eTech_htgs_1, CMolInfo_Base::eTech_htgs_2, CMolInfo_Base::eTech_htgs_3, CMolInfo_Base::eTech_physmap, CMolInfo_Base::eTech_seq_pept, CMolInfo_Base::eTech_seq_pept_homol, CMolInfo_Base::eTech_seq_pept_overlap, CMolInfo_Base::eTech_standard, CMolInfo_Base::eTech_sts, CMolInfo_Base::eTech_survey, CMolInfo_Base::eTech_tsa, CMolInfo_Base::eTech_unknown, CMolInfo_Base::eTech_wgs, CSeq_inst_Base::eTopology_circular, CPCRPrimerSet_Base::Get(), CPCRReactionSet_Base::Get(), GetBioSource(), COrgName_Base::GetGcode(), CBioSource_Base::GetGenome(), CBioseq_Handle::GetInst_Topology(), COrgName_Base::GetMgcode(), COrgName_Base::GetMod(), GetMolInfo(), CSubSource_Base::GetName(), CBioSource_Base::GetOrg(), COrg_ref_Base::GetOrgname(), CBioSource_Base::GetPcr_primers(), COrgName_Base::GetPgcode(), CBioSource_Base::GetSubtype(), CSubSource_Base::GetSubtype(), COrg_ref_Base::GetTaxname(), CMolInfo_Base::GetTech(), COrgName_Base::IsSetGcode(), COrgName_Base::IsSetMgcode(), COrgName_Base::IsSetMod(), CSubSource_Base::IsSetName(), CBioSource_Base::IsSetOrg(), COrg_ref_Base::IsSetOrgname(), CBioSource_Base::IsSetPcr_primers(), COrgName_Base::IsSetPgcode(), CBioSource_Base::IsSetSubtype(), CSubSource_Base::IsSetSubtype(), COrg_ref_Base::IsSetTaxname(), CMolInfo_Base::IsSetTech(), ITERATE, CDefLineJoiner::Join(), kEmptyStr, CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_IsChromosome, CDeflineGenerator::m_IsPlasmid, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_MICompleteness, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_Plasmid, mod(), NCBI_COMPLETENESS, NULL, sc_TechArray, subname, Warning(), and CDeflineGenerator::x_SetBioSrc().

Referenced by CDeflineGenerator::GenerateDefline().

◆ x_GetTitleFlags()

sequence::CDeflineGenerator::TUserFlags CFastaOstream::x_GetTitleFlags ( void  ) const
inlineprivate

Definition at line 2978 of file sequence.cpp.

◆ x_Init()

void CDeflineGenerator::x_Init ( void  )
private

internal methods

Definition at line 148 of file create_defline.cpp.

Referenced by CDeflineGenerator::CDeflineGenerator().

◆ x_IsAllowMismatch()

bool CSeqSearch::x_IsAllowMismatch ( TSearchFlags  flags) const
inlineprivate

Definition at line 1270 of file sequence.hpp.

References CSeqSearch::fAllowMismatch, flags, and CSeqSearch::m_Flags.

Referenced by CSeqSearch::x_AddPattern().

◆ x_IsComplete()

bool CDeflineGenerator::x_IsComplete ( ) const
private

◆ x_IsExpandPattern()

bool CSeqSearch::x_IsExpandPattern ( TSearchFlags  flags) const
inlineprivate

Definition at line 1267 of file sequence.hpp.

References CSeqSearch::fExpandPattern, flags, and CSeqSearch::m_Flags.

Referenced by CSeqSearch::x_AddNucleotidePattern().

◆ x_IsJustTopStrand()

bool CSeqSearch::x_IsJustTopStrand ( TSearchFlags  flags) const
inlineprivate

Definition at line 1264 of file sequence.hpp.

References CSeqSearch::fJustTopStrand, flags, and CSeqSearch::m_Flags.

Referenced by CSeqSearch::AddNucleotidePattern().

◆ x_MapMask()

CConstRef< CSeq_loc > CFastaOstream::x_MapMask ( CSeq_loc_Mapper mapper,
const CSeq_loc mask,
const CSeq_id base_seq_id,
CScope scope 
)
private

Definition at line 3043 of file sequence.cpp.

◆ x_Next()

void CBioseqGaps_CI::x_Next ( void  )
protectedvirtual

◆ x_NextBioseq()

void CBioseqGaps_CI::x_NextBioseq ( void  )
protectedvirtual

This advances m_bioseq_CI although it has extra logic to terminate m_bioseq_CI if we've exceeded the number of bioseqs we can look for.

Definition at line 175 of file bioseqgaps_ci.cpp.

References CBioseqGaps_CI::m_bioseq_CI, CBioseqGaps_CI::m_infoOnCurrentGap, CBioseqGaps_CI::m_Params, CBioseqGaps_CI::Params::max_num_seqs, and CBioseqGaps_CI::SCurrentGapInfo::num_seqs_seen_so_far.

Referenced by CBioseqGaps_CI::x_Next().

◆ x_NormalizeVecTrimRules()

void CSequenceAmbigTrimmer::x_NormalizeVecTrimRules ( TTrimRuleVec vecTrimRules)
protectedvirtual

This prepares the vector of trimming rules to be used by the trimming algorithm.

For example, it eliminate duplicates and puts the rules in the correct order.

Parameters
vecTrimRulesInput and output.

Definition at line 284 of file seq_trimmer.cpp.

References CSequenceAmbigTrimmer::STrimRule::bases_to_check, ITERATE, CSequenceAmbigTrimmer::STrimRule::max_bases_allowed_to_be_ambig, NCBI_USER_THROW_FMT, remove_if(), and ct::sort().

Referenced by CSequenceAmbigTrimmer::CSequenceAmbigTrimmer().

◆ x_OrganelleName()

const char * CDeflineGenerator::x_OrganelleName ( CBioSource::TGenome  genome) const
private

◆ x_SegmentGetBeginningInclusive()

TSignedSeqPos CSequenceAmbigTrimmer::x_SegmentGetBeginningInclusive ( const CSeqMap_CI segment,
const TSignedSeqPos  iTrimDirection 
)
inlineprotected

This returns the (inclusive) position at the beginning of the segment.

Parameters
segmentThis is the segment we're trying to find the beginning of.
iTrimDirectionThis is which direction in which we're trimming. The beginning will be in the opposite direction.
Returns
This returns the (inclusive) position at the beginning of the given segment. As always, the definition of "beginning" depends on iTrimDirection.

Definition at line 1521 of file sequence.hpp.

References CSequenceAmbigTrimmer::x_SegmentGetEndInclusive().

Referenced by CSequenceAmbigTrimmer::x_CountAmbigInRange().

◆ x_SegmentGetEndInclusive()

TSignedSeqPos CSequenceAmbigTrimmer::x_SegmentGetEndInclusive ( const CSeqMap_CI segment,
const TSignedSeqPos  iTrimDirection 
)
protected

This returns the (inclusive) position at the end of the segment currently at iStartPosInclusive_arg.

Parameters
segmentThis is the segment we're trying to find the end of.
iTrimDirectionThis is which direction in which we're trimming. The end of the segment will be found by looking in that direction.
Returns
This returns the (inclusive) position at the end of the given segment. The definition of "end" depends on iTrimDirection.

As always, the definition of "end" depends on iTrimDirection.

Definition at line 674 of file seq_trimmer.cpp.

References _ASSERT, CSeqMap_CI::GetEndPosition(), CSeqMap_CI::GetPosition(), and s_IsValidDirection().

Referenced by CSequenceAmbigTrimmer::x_CountAmbigInRange(), CSequenceAmbigTrimmer::x_EdgeSeqMapGapAdjust(), and CSequenceAmbigTrimmer::x_SegmentGetBeginningInclusive().

◆ x_SeqMapIterDoNext()

CSeqMap_CI & CSequenceAmbigTrimmer::x_SeqMapIterDoNext ( CSeqMap_CI in_out_segment_it,
const TSignedSeqPos  iTrimDirection 
)
protected

Returns the "next" segment.

The definition of "next" depends on iTrimDirection

Parameters
in_out_segmentCaller gives the current CSeqMap_CI, which will be returned adjusted in the trim direction.
iTrimDirectionThe direction in which to increment. 1 means normal incrementing and -1 really means decrementing.
Returns
Reference to in_out_segment_it.

Definition at line 692 of file seq_trimmer.cpp.

References _ASSERT, and s_IsValidDirection().

Referenced by CSequenceAmbigTrimmer::x_CountAmbigInRange().

◆ x_SetBioSrc()

void CDeflineGenerator::x_SetBioSrc ( const CBioseq_Handle bsh)
private

Definition at line 1264 of file create_defline.cpp.

References CSeqFeatData_Base::e_Biosrc, CTempString::empty(), NStr::EqualNocase(), FOR_EACH_ORGMOD_ON_BIOSOURCE, FOR_EACH_SUBSOURCE_ON_BIOSOURCE, CPartialOrgName_Base::Get(), COrgName_Base::C_Name::GetBinomial(), CSeqFeatData_Base::GetBiosrc(), CSeq_feat_Base::GetData(), CTaxElement_Base::GetFixed_level(), CBioSource_Base::GetGenome(), CBinomialOrgName_Base::GetGenus(), CTaxElement_Base::GetLevel(), COrgName_Base::GetName(), CSubSource_Base::GetName(), CBioSource::GetOrgname(), CMappedFeat::GetOriginalFeature(), COrgName_Base::C_Name::GetPartial(), CBinomialOrgName_Base::GetSpecies(), COrgMod_Base::GetSubname(), CBioSource::GetTaxname(), COrgName_Base::C_Name::IsBinomial(), COrgName_Base::C_Name::IsPartial(), CPartialOrgName_Base::IsSet(), CSeq_feat_Base::IsSetData(), CTaxElement_Base::IsSetFixed_level(), CBioSource_Base::IsSetGenome(), CBinomialOrgName_Base::IsSetGenus(), CTaxElement_Base::IsSetLevel(), COrgName_Base::IsSetName(), CSubSource_Base::IsSetName(), CBioSource::IsSetOrgname(), CBinomialOrgName_Base::IsSetSpecies(), COrgMod_Base::IsSetSubname(), CBioSource::IsSetTaxname(), ITERATE, CDeflineGenerator::m_Breed, CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_Clone, CDeflineGenerator::m_Cultivar, CDeflineGenerator::m_Genome, CDeflineGenerator::m_Genus, CDeflineGenerator::m_has_clone, CDeflineGenerator::m_IsChromosome, CDeflineGenerator::m_Isolate, CDeflineGenerator::m_IsPlasmid, CDeflineGenerator::m_LinkageGroup, CDeflineGenerator::m_Map, CDeflineGenerator::m_MetaGenomeSource, CDeflineGenerator::m_Multispecies, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_Segment, CDeflineGenerator::m_Source, CDeflineGenerator::m_Species, CDeflineGenerator::m_SpecimenVoucher, CDeflineGenerator::m_Strain, CDeflineGenerator::m_Substrain, CDeflineGenerator::m_Taxname, NCBI_GENOME, NCBI_ORGMOD, NCBI_SUBSOURCE, CConstRef< C, Locker >::NotEmpty(), rapidjson::source, str(), SWITCH_ON_ORGMOD_CHOICE, SWITCH_ON_SUBSOURCE_CHOICE, and CDeflineGenerator::x_OrganelleName().

Referenced by CDeflineGenerator::GenerateDefline(), and CDeflineGenerator::x_GetModifiers().

◆ x_SetBioSrcIdx()

void CDeflineGenerator::x_SetBioSrcIdx ( const CBioseq_Handle bsh)
private

Definition at line 1195 of file create_defline.cpp.

References CSeqFeatData_Base::e_Biosrc, FOR_EACH_SUBSOURCE_ON_BIOSOURCE, CSeqEntryIndex::GetBioseqIndex(), CBioseqIndex::GetBioSource(), CSeqFeatData_Base::GetBiosrc(), CBioseqIndex::GetBreed(), CBioseqIndex::GetChromosome(), CBioseqIndex::GetClone(), CBioseqIndex::GetCultivar(), CSeq_feat_Base::GetData(), CBioseqIndex::GetGenome(), CBioseqIndex::GetGenus(), CBioseqIndex::GetIsolate(), CBioseqIndex::GetLinkageGroup(), CBioseqIndex::GetMap(), CBioseqIndex::GetMetaGenomeSource(), CBioseqIndex::GetOrganelle(), CMappedFeat::GetOriginalFeature(), CBioseqIndex::GetPlasmid(), CBioseqIndex::GetSegment(), CBioseqIndex::GetSpecies(), CBioseqIndex::GetSpecimenVoucher(), CBioseqIndex::GetStrain(), CBioseqIndex::GetSubstrain(), CBioseqIndex::GetTaxname(), CBioseqIndex::HasClone(), CBioseqIndex::IsChromosome(), CBioseqIndex::IsMultispecies(), CBioseqIndex::IsPlasmid(), CSeq_feat_Base::IsSetData(), CSubSource_Base::IsSetName(), CDeflineGenerator::m_Breed, CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_Clone, CDeflineGenerator::m_Cultivar, CDeflineGenerator::m_Genome, CDeflineGenerator::m_Genus, CDeflineGenerator::m_has_clone, CDeflineGenerator::m_Idx, CDeflineGenerator::m_IsChromosome, CDeflineGenerator::m_Isolate, CDeflineGenerator::m_IsPlasmid, CDeflineGenerator::m_LinkageGroup, CDeflineGenerator::m_Map, CDeflineGenerator::m_MetaGenomeSource, CDeflineGenerator::m_Multispecies, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_Segment, CDeflineGenerator::m_Source, CDeflineGenerator::m_Species, CDeflineGenerator::m_SpecimenVoucher, CDeflineGenerator::m_Strain, CDeflineGenerator::m_Substrain, CDeflineGenerator::m_Taxname, NCBI_SUBSOURCE, rapidjson::source, and SWITCH_ON_SUBSOURCE_CHOICE.

Referenced by CDeflineGenerator::GenerateDefline().

◆ x_SetFlags()

void CDeflineGenerator::x_SetFlags ( const CBioseq_Handle bsh,
TUserFlags  flags 
)
private

Definition at line 612 of file create_defline.cpp.

References _ASSERT, _TROUBLE, CTempString::clear(), CSeqdesc_Base::e_Comment, CSeqdesc_Base::e_Embl, CSeqdesc_Base::e_Genbank, CSeqdesc_Base::e_Molinfo, CSeqdesc_Base::e_Pdb, CSeqdesc_Base::e_Source, CSeqdesc_Base::e_Title, CSeqdesc_Base::e_User, CTempString::empty(), NStr::EqualNocase(), CSeq_inst_Base::eRepr_delta, CSeq_inst_Base::eRepr_map, CSeq_inst_Base::eRepr_seg, CSeq_inst_Base::eRepr_virtual, COrgMod_Base::eSubtype_metagenome_source, CSeq_id::fAcc_master, CDeflineGenerator::fAllProteinNames, CDeflineGenerator::fDevMode, CDeflineGenerator::fFastaFormat, CDeflineGenerator::fGpipeMode, FIELD_IS_SET_AND_IS, CDeflineGenerator::fIgnoreExisting, NStr::Find(), flags, CDeflineGenerator::fLocalAnnotsOnly, CDeflineGenerator::fOmitTaxonomicName, FOR_EACH_COMPOUND_ON_PDBBLOCK, FOR_EACH_SEQID_ON_BIOSEQ_HANDLE, FOR_EACH_STRING_IN_LIST, FOR_EACH_USERFIELD_ON_USEROBJECT, NStr::fSplit_Tokenize, CMap_ext_Base::Get(), CPartialOrgName_Base::Get(), GET_FIELD, CTextseq_id_Base::GetAccession(), CMolInfo_Base::GetBiomol(), CPDB_seq_id_Base::GetChain(), CPDB_seq_id_Base::GetChain_id(), CPatent_seq_id_Base::GetCit(), CMolInfo_Base::GetCompleteness(), CId_pat_Base::GetCountry(), CUser_field_Base::GetData(), CSeq_feat_Base::GetData(), CTaxElement_Base::GetFixed_level(), CObject_id_Base::GetId(), CBioseq_Handle::GetInst_Ext(), CBioseq_Handle::GetInst_Length(), CBioseq_Handle::GetInst_Repr(), CBioseq_Handle::GetInst_Topology(), CEMBL_block_Base::GetKeywords(), CGB_block_Base::GetKeywords(), CUser_field_Base::GetLabel(), CTaxElement_Base::GetLevel(), CSeq_ext_Base::GetMap(), COrgName_Base::GetMod(), COrgName_Base::GetName(), CTaxElement_Base::GetName(), CBioSource::GetOrgname(), COrgName_Base::C_Name::GetPartial(), CSeqFeatData_Base::GetRsite(), CSeq_id_Handle::GetSeqId(), CPatent_seq_id_Base::GetSeqid(), CId_pat::GetSomeNumber(), CObject_id_Base::GetStr(), CUser_field_Base::C_Data::GetStr(), CRsite_ref_Base::GetStr(), CDbtag_Base::GetTag(), CMolInfo_Base::GetTech(), CUser_object_Base::GetType(), CSeq_id::IdentifyAccession(), CBioseq_Handle::IsAa(), CObject_id_Base::IsId(), CSeq_ext_Base::IsMap(), CBioseq_Handle::IsNa(), COrgName_Base::C_Name::IsPartial(), CSeqFeatData_Base::IsRsite(), CMap_ext_Base::IsSet(), CPartialOrgName_Base::IsSet(), CTextseq_id_Base::IsSetAccession(), CPDB_seq_id_Base::IsSetChain(), CPDB_seq_id_Base::IsSetChain_id(), CPatent_seq_id_Base::IsSetCit(), CUser_field_Base::IsSetData(), CTaxElement_Base::IsSetFixed_level(), CBioseq_Handle::IsSetInst(), CBioseq_Handle::IsSetInst_Ext(), CBioseq_Handle::IsSetInst_Repr(), CEMBL_block_Base::IsSetKeywords(), CGB_block_Base::IsSetKeywords(), CTaxElement_Base::IsSetLevel(), COrgName_Base::IsSetMod(), CTaxElement_Base::IsSetName(), CBioSource::IsSetOrgname(), CPatent_seq_id_Base::IsSetSeqid(), CDbtag_Base::IsSetTag(), CDbtag::IsSkippable(), CObject_id_Base::IsStr(), CUser_field_Base::C_Data::IsStr(), CRsite_ref_Base::IsStr(), CUser_object::IsUnreviewed(), CUser_object::IsUnreviewedUnannotated(), CUser_object::IsUnverified(), CUser_object::IsUnverifiedContaminant(), CUser_object::IsUnverifiedFeature(), CUser_object::IsUnverifiedMisassembled(), CUser_object::IsUnverifiedOrganism(), ITERATE, CDeflineGenerator::m_AllProtNames, CDeflineGenerator::m_Breed, CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_Clone, CDeflineGenerator::m_Comment, CDeflineGenerator::m_Cultivar, CDeflineGenerator::m_DevMode, CDeflineGenerator::m_FastaFormat, CDeflineGenerator::m_FirstSuperKingdom, CDeflineGenerator::m_GeneralId, CDeflineGenerator::m_GeneralStr, CDeflineGenerator::m_Genome, CDeflineGenerator::m_Genus, CDeflineGenerator::m_GpipeMode, CDeflineGenerator::m_has_clone, CDeflineGenerator::m_HTGSCancelled, CDeflineGenerator::m_HTGSDraft, CDeflineGenerator::m_HTGSPooled, CDeflineGenerator::m_HTGSUnfinished, CDeflineGenerator::m_HTGTech, CDeflineGenerator::m_IsAA, CDeflineGenerator::m_IsChromosome, CDeflineGenerator::m_IsCrossKingdom, CDeflineGenerator::m_IsDelta, CDeflineGenerator::m_IsEST_STS_GSS, CDeflineGenerator::m_IsMap, CDeflineGenerator::m_IsNA, CDeflineGenerator::m_IsNC, CDeflineGenerator::m_IsNM, CDeflineGenerator::m_IsNR, CDeflineGenerator::m_IsNZ, CDeflineGenerator::m_Isolate, CDeflineGenerator::m_IsPatent, CDeflineGenerator::m_IsPDB, CDeflineGenerator::m_IsPlasmid, CDeflineGenerator::m_IsPseudogene, CDeflineGenerator::m_IsSeg, CDeflineGenerator::m_IsTLS, CDeflineGenerator::m_IsTSA, CDeflineGenerator::m_IsUnreviewed, CDeflineGenerator::m_IsUnverified, CDeflineGenerator::m_IsVirtual, CDeflineGenerator::m_IsWGS, CDeflineGenerator::m_IsWP, CDeflineGenerator::m_Length, CDeflineGenerator::m_LinkageGroup, CDeflineGenerator::m_LocalAnnotsOnly, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_Map, CDeflineGenerator::m_MetaGenomeSource, CDeflineGenerator::m_MIBiomol, CDeflineGenerator::m_MICompleteness, CDeflineGenerator::m_MITech, CDeflineGenerator::m_Multispecies, CDeflineGenerator::m_OmitTaxonomicName, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_PatentCountry, CDeflineGenerator::m_PatentNumber, CDeflineGenerator::m_PatentSequence, CDeflineGenerator::m_PDBChain, CDeflineGenerator::m_PDBChainID, CDeflineGenerator::m_PDBCompound, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_Reconstruct, CDeflineGenerator::m_rEnzyme, CDeflineGenerator::m_SecondSuperKingdom, CDeflineGenerator::m_Segment, CDeflineGenerator::m_Source, CDeflineGenerator::m_Species, CDeflineGenerator::m_SpecimenVoucher, CDeflineGenerator::m_Strain, CDeflineGenerator::m_Substrain, CDeflineGenerator::m_TargetedLocus, CDeflineGenerator::m_Taxname, CDeflineGenerator::m_ThirdParty, CDeflineGenerator::m_TLSMaster, CDeflineGenerator::m_Topology, CDeflineGenerator::m_TPAExp, CDeflineGenerator::m_TPAInf, CDeflineGenerator::m_TPAReasm, CDeflineGenerator::m_TSAMaster, CDeflineGenerator::m_Unordered, CDeflineGenerator::m_UnreviewedPrefix, CDeflineGenerator::m_UnverifiedPrefix, CDeflineGenerator::m_UseBiosrc, CDeflineGenerator::m_UsePDBCompoundForDefline, CDeflineGenerator::m_WGSMaster, NCBI_ACCN, NCBI_BIOMOL, NCBI_COMPLETENESS, NCBI_GENOME, NCBI_SEQID, NCBI_SEQTOPOLOGY, NCBI_TECH, NPOS, NULL, CConstRef< C, Locker >::Reset(), NStr::Split(), str(), Type, and CSeq_id_Handle::Which().

Referenced by CDeflineGenerator::GenerateDefline().

◆ x_SetFlagsIdx()

void CDeflineGenerator::x_SetFlagsIdx ( const CBioseq_Handle bsh,
TUserFlags  flags 
)
private

Definition at line 430 of file create_defline.cpp.

References CTempString::clear(), CTempString::empty(), CDeflineGenerator::fAllProteinNames, CDeflineGenerator::fDevMode, CDeflineGenerator::fFastaFormat, CDeflineGenerator::fGpipeMode, CDeflineGenerator::fIgnoreExisting, NStr::Find(), flags, CDeflineGenerator::fLocalAnnotsOnly, CDeflineGenerator::fOmitTaxonomicName, CBioseqIndex::GetBiomol(), CSeqEntryIndex::GetBioseqIndex(), CBioseqIndex::GetBioSource(), CBioseqIndex::GetBreed(), CBioseqIndex::GetChromosome(), CBioseqIndex::GetClone(), CBioseqIndex::GetComment(), CBioseqIndex::GetCompleteness(), CBioseqIndex::GetCultivar(), CBioseqIndex::GetFirstSuperKingdom(), CBioseqIndex::GetGeneralId(), CBioseqIndex::GetGeneralStr(), CBioseqIndex::GetGenome(), CBioseqIndex::GetGenus(), CBioseqIndex::GetIsolate(), CBioseqIndex::GetLength(), CBioseqIndex::GetLinkageGroup(), CBioseqIndex::GetMap(), CBioseqIndex::GetMetaGenomeSource(), CBioseqIndex::GetOrganelle(), CBioseqIndex::GetPatentCountry(), CBioseqIndex::GetPatentNumber(), CBioseqIndex::GetPatentSequence(), CBioseqIndex::GetPDBChain(), CBioseqIndex::GetPDBChainID(), CBioseqIndex::GetPDBCompound(), CBioseqIndex::GetPlasmid(), CBioseqIndex::GetrEnzyme(), CBioseqIndex::GetSecondSuperKingdom(), CBioseqIndex::GetSegment(), CBioseqIndex::GetSpecies(), CBioseqIndex::GetSpecimenVoucher(), CBioseqIndex::GetStrain(), CBioseqIndex::GetSubstrain(), CBioseqIndex::GetTargetedLocus(), CBioseqIndex::GetTaxname(), CBioseqIndex::GetTech(), CBioseqIndex::GetTitle(), CBioseqIndex::GetTopology(), CBioseqIndex::HasClone(), CBioseqIndex::IsAA(), CBioseqIndex::IsChromosome(), CBioseqIndex::IsCrossKingdom(), CBioseqIndex::IsDelta(), CBioseqIndex::IsEST_STS_GSS(), CBioseqIndex::IsHTGSCancelled(), CBioseqIndex::IsHTGSDraft(), CBioseqIndex::IsHTGSPooled(), CBioseqIndex::IsHTGSUnfinished(), CBioseqIndex::IsHTGTech(), CBioseqIndex::IsMap(), CBioseqIndex::IsMultispecies(), CBioseqIndex::IsNA(), CBioseqIndex::IsNC(), CBioseqIndex::IsNM(), CBioseqIndex::IsNR(), CBioseqIndex::IsNZ(), CBioseqIndex::IsPatent(), CBioseqIndex::IsPDB(), CBioseqIndex::IsPlasmid(), CBioseqIndex::IsPseudogene(), CBioseqIndex::IsThirdParty(), CBioseqIndex::IsTLS(), CBioseqIndex::IsTLSMaster(), CBioseqIndex::IsTPAExp(), CBioseqIndex::IsTPAInf(), CBioseqIndex::IsTPAReasm(), CBioseqIndex::IsTSA(), CBioseqIndex::IsTSAMaster(), CBioseqIndex::IsUnordered(), CBioseqIndex::IsUnreviewed(), CBioseqIndex::IsUnreviewedUnannotated(), CBioseqIndex::IsUnverified(), CBioseqIndex::IsUnverifiedContaminant(), CBioseqIndex::IsUnverifiedFeature(), CBioseqIndex::IsUnverifiedMisassembled(), CBioseqIndex::IsUnverifiedOrganism(), CBioseqIndex::IsUseBiosrc(), CBioseqIndex::IsVirtual(), CBioseqIndex::IsWGS(), CBioseqIndex::IsWGSMaster(), CBioseqIndex::IsWP(), CDeflineGenerator::m_AllProtNames, CDeflineGenerator::m_Breed, CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_Clone, CDeflineGenerator::m_Comment, CDeflineGenerator::m_Cultivar, CDeflineGenerator::m_DevMode, CDeflineGenerator::m_FastaFormat, CDeflineGenerator::m_FirstSuperKingdom, CDeflineGenerator::m_GeneralId, CDeflineGenerator::m_GeneralStr, CDeflineGenerator::m_Genome, CDeflineGenerator::m_Genus, CDeflineGenerator::m_GpipeMode, CDeflineGenerator::m_has_clone, CDeflineGenerator::m_HTGSCancelled, CDeflineGenerator::m_HTGSDraft, CDeflineGenerator::m_HTGSPooled, CDeflineGenerator::m_HTGSUnfinished, CDeflineGenerator::m_HTGTech, CDeflineGenerator::m_Idx, CDeflineGenerator::m_IsAA, CDeflineGenerator::m_IsChromosome, CDeflineGenerator::m_IsCrossKingdom, CDeflineGenerator::m_IsDelta, CDeflineGenerator::m_IsEST_STS_GSS, CDeflineGenerator::m_IsMap, CDeflineGenerator::m_IsNA, CDeflineGenerator::m_IsNC, CDeflineGenerator::m_IsNM, CDeflineGenerator::m_IsNR, CDeflineGenerator::m_IsNZ, CDeflineGenerator::m_Isolate, CDeflineGenerator::m_IsPatent, CDeflineGenerator::m_IsPDB, CDeflineGenerator::m_IsPlasmid, CDeflineGenerator::m_IsPseudogene, CDeflineGenerator::m_IsSeg, CDeflineGenerator::m_IsTLS, CDeflineGenerator::m_IsTSA, CDeflineGenerator::m_IsUnreviewed, CDeflineGenerator::m_IsUnverified, CDeflineGenerator::m_IsVirtual, CDeflineGenerator::m_IsWGS, CDeflineGenerator::m_IsWP, CDeflineGenerator::m_Length, CDeflineGenerator::m_LinkageGroup, CDeflineGenerator::m_LocalAnnotsOnly, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_Map, CDeflineGenerator::m_MetaGenomeSource, CDeflineGenerator::m_MIBiomol, CDeflineGenerator::m_MICompleteness, CDeflineGenerator::m_MITech, CDeflineGenerator::m_Multispecies, CDeflineGenerator::m_OmitTaxonomicName, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_PatentCountry, CDeflineGenerator::m_PatentNumber, CDeflineGenerator::m_PatentSequence, CDeflineGenerator::m_PDBChain, CDeflineGenerator::m_PDBChainID, CDeflineGenerator::m_PDBCompound, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_Reconstruct, CDeflineGenerator::m_rEnzyme, CDeflineGenerator::m_SecondSuperKingdom, CDeflineGenerator::m_Segment, CDeflineGenerator::m_Source, CDeflineGenerator::m_Species, CDeflineGenerator::m_SpecimenVoucher, CDeflineGenerator::m_Strain, CDeflineGenerator::m_Substrain, CDeflineGenerator::m_TargetedLocus, CDeflineGenerator::m_Taxname, CDeflineGenerator::m_ThirdParty, CDeflineGenerator::m_TLSMaster, CDeflineGenerator::m_Topology, CDeflineGenerator::m_TPAExp, CDeflineGenerator::m_TPAInf, CDeflineGenerator::m_TPAReasm, CDeflineGenerator::m_TSAMaster, CDeflineGenerator::m_Unordered, CDeflineGenerator::m_UnreviewedPrefix, CDeflineGenerator::m_UnverifiedPrefix, CDeflineGenerator::m_UseBiosrc, CDeflineGenerator::m_UsePDBCompoundForDefline, CDeflineGenerator::m_WGSMaster, and NPOS.

Referenced by CDeflineGenerator::GenerateDefline().

◆ x_SetPrefix()

void CDeflineGenerator::x_SetPrefix ( string prefix,
const CBioseq_Handle bsh 
)
private

◆ x_SetSuffix()

void CDeflineGenerator::x_SetSuffix ( string suffix,
const CBioseq_Handle bsh,
bool  appendComplete 
)
private

◆ x_SetTitleFromBioSrc()

void CDeflineGenerator::x_SetTitleFromBioSrc ( void  )
private

◆ x_SetTitleFromGPipe()

void CDeflineGenerator::x_SetTitleFromGPipe ( void  )
private

◆ x_SetTitleFromMap()

void CDeflineGenerator::x_SetTitleFromMap ( void  )
private

◆ x_SetTitleFromNC()

void CDeflineGenerator::x_SetTitleFromNC ( void  )
private

◆ x_SetTitleFromNM()

void CDeflineGenerator::x_SetTitleFromNM ( const CBioseq_Handle bsh)
private

◆ x_SetTitleFromNR()

void CDeflineGenerator::x_SetTitleFromNR ( const CBioseq_Handle bsh)
private

◆ x_SetTitleFromPatent()

void CDeflineGenerator::x_SetTitleFromPatent ( void  )
private

◆ x_SetTitleFromPDB()

void CDeflineGenerator::x_SetTitleFromPDB ( void  )
private

◆ x_SetTitleFromProtein()

void CDeflineGenerator::x_SetTitleFromProtein ( const CBioseq_Handle bsh)
private

◆ x_SetTitleFromProteinIdx()

void CDeflineGenerator::x_SetTitleFromProteinIdx ( const CBioseq_Handle bsh)
private

Definition at line 2177 of file create_defline.cpp.

References delta(), CTempString::empty(), NStr::EqualNocase(), CTempString::find(), NStr::FindNoCase(), FOR_EACH_ACTIVITY_ON_PROT, FOR_EACH_NAME_ON_PROT, FOR_EACH_SYNONYM_ON_GENE, CFeatureIndex::GetBestGene(), CBioseqIndex::GetBestProteinFeature(), CSeqEntryIndex::GetBioseqIndex(), CSeq_feat_Handle::GetData(), CGene_ref_Base::GetDesc(), CProt_ref_Base::GetDesc(), CBioseqIndex::GetFeatureForProduct(), CSeqFeatData_Base::GetGene(), CGene_ref_Base::GetLocus(), CGene_ref_Base::GetLocus_tag(), CFeatureIndex::GetMappedFeat(), CMappedFeat::GetOriginalFeature(), CSeqFeatData_Base::GetProt(), CBioSource::GetTaxname(), CGene_ref_Base::IsSetDesc(), CProt_ref_Base::IsSetDesc(), CGene_ref_Base::IsSetLocus(), CGene_ref_Base::IsSetLocus_tag(), CBioSource::IsSetTaxname(), CDeflineGenerator::m_AllProtNames, CDeflineGenerator::m_FirstSuperKingdom, CDeflineGenerator::m_Genome, CDeflineGenerator::m_Idx, CDeflineGenerator::m_IsCrossKingdom, CDeflineGenerator::m_LocalAnnotsOnly, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_OmitTaxonomicName, CDeflineGenerator::m_SecondSuperKingdom, CDeflineGenerator::m_Taxname, NCBI_GENOME, CConstRef< C, Locker >::NotEmpty(), NPOS, offset, prefix, prot, s_proteinOrganellePrefix, s_RemoveBracketedOrgFromEnd(), NStr::StartsWith(), str(), string, tmp, CDeflineGenerator::x_CDShasLowQualityException(), x_GetSourceFeatViaCDS(), and CDeflineGenerator::x_IsComplete().

Referenced by CDeflineGenerator::GenerateDefline().

◆ x_SetTitleFromSegSeq()

void CDeflineGenerator::x_SetTitleFromSegSeq ( const CBioseq_Handle bsh)
private

◆ x_SetTitleFromWGS()

void CDeflineGenerator::x_SetTitleFromWGS ( void  )
private

◆ x_SliceBioseq()

void CSequenceAmbigTrimmer::x_SliceBioseq ( TSignedSeqPos  leftmost_good_base,
TSignedSeqPos  rightmost_good_base,
CBioseq_Handle bioseq_handle 
)
protected

◆ x_StorePattern()

void CSeqSearch::x_StorePattern ( TPatternInfo pat_info,
string sequence 
)
private

Definition at line 5135 of file sequence.cpp.

References CSeqSearch::m_Fsa, and CSeqSearch::CPatternInfo::m_Sequence.

Referenced by CSeqSearch::x_AddPattern().

◆ x_TestFlag()

bool CSequenceAmbigTrimmer::x_TestFlag ( TFlags  fFlag)
inlineprotected

Test if a given flag is set.

Definition at line 1392 of file sequence.hpp.

References CSequenceAmbigTrimmer::m_fFlags.

Referenced by CSequenceAmbigTrimmer::DoTrim().

◆ x_TrimToNothing()

CSequenceAmbigTrimmer::EResult CSequenceAmbigTrimmer::x_TrimToNothing ( CBioseq_Handle bioseq_handle)
protectedvirtual

◆ x_WriteAsFasta()

void CFastaOstream::x_WriteAsFasta ( const CBioseq bioseq)
protectedvirtual

◆ x_WriteBuffer()

virtual void CFastaOstream::x_WriteBuffer ( const char *  buf,
unsigned int  count 
)
inlineprotectedvirtual

Reimplemented in CFastaOstreamEx.

Definition at line 904 of file sequence.hpp.

References buf.

Referenced by CFastaOstreamEx::x_WriteBuffer(), and CFastaOstream::x_WriteSequence().

◆ x_WriteSeqIds()

void CFastaOstream::x_WriteSeqIds ( const CBioseq bioseq,
const CSeq_loc location 
)
protectedvirtual

◆ x_WriteSeqTitle()

void CFastaOstream::x_WriteSeqTitle ( const CBioseq_Handle handle,
const string custom_title 
)
protectedvirtual

Definition at line 3000 of file sequence.cpp.

Referenced by CFastaOstream::Write().

◆ x_WriteSequence()

void CFastaOstream::x_WriteSequence ( const CSeqVector vec,
const TMSMap masking_state 
)
private