NCBI C++ ToolKit
|
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, int > | CFastaOstream::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< STrimRule > | CSequenceAmbigTrimmer::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] |
Friends | |
class | CSeqSearch::CPatternInfo::CSeqSearch |
SeqIdConv | |
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_id > | FindLatestSequence (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_id > | FindLatestSequence (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 | |
enum | ES2PFlags { fS2P_NoMerge = 0x1 , fS2P_AllowTer = 0x2 } |
enum | EP2SFlags { fP2S_Extend = 0x1 } |
typedef int | TS2PFlags |
typedef int | TP2SFlags |
CRef< CSeq_loc > | SourceToProduct (const CSeq_feat &feat, const CSeq_loc &source_loc, TS2PFlags flags=0, CScope *scope=0, int *frame=0) |
CRef< CSeq_loc > | ProductToSource (const CSeq_feat &feat, const CSeq_loc &prod_loc, TP2SFlags flags=0, CScope *scope=0) |
Sequences | |
const CBioseq * | GetNucleotideParent (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_ref & | GetOrg_ref (const CBioseq_Handle &handle) |
Return the org-ref associated with a given sequence. More... | |
const COrg_ref * | GetOrg_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 CMolInfo * | GetMolInfo (const CBioseq &bioseq) |
Retrieve the MolInfo object for a given bioseq handle. More... | |
const CMolInfo * | GetMolInfo (const CBioseq_Handle &handle) |
const CBioSource * | GetBioSource (const CBioseq &bioseq) |
Retrieve the BioSource object for a given bioseq handle. More... | |
const CBioSource * | GetBioSource (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_feat > | GetSourceFeatForProduct (const CBioseq_Handle &bsh) |
TTaxId | GetTaxIdForProduct (const CBioseq_Handle &bsh) |
void | GetOrg_refForProduct (const CBioseq_Handle &bsh, const COrg_ref *) |
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. More... | |
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. More... | |
void | ReverseComplement (CSeq_inst &seq, CScope *scope) |
Reverse complement a Bioseq in place. More... | |
typedef int EGetIdType |
Definition at line 126 of file sequence.hpp.
|
protected |
Definition at line 1566 of file sequence.hpp.
typedef int TBestFeatOpts |
Definition at line 348 of file sequence.hpp.
|
private |
Definition at line 915 of file sequence.hpp.
typedef pair<Int8, CConstRef<CSeq_feat> > TFeatScore |
Storage for features and scores.
Definition at line 352 of file sequence.hpp.
typedef vector<TFeatScore> TFeatScores |
Definition at line 353 of file sequence.hpp.
typedef long CFastaOstream::TFlags |
binary OR of EFlags
Definition at line 798 of file sequence.hpp.
typedef int SRelLoc::TFlags |
binary OR of EFlags
Definition at line 1128 of file sequence.hpp.
typedef int CSequenceAmbigTrimmer::TFlags |
Definition at line 1309 of file sequence.hpp.
typedef int TGetTitleFlags |
Definition at line 287 of file sequence.hpp.
|
private |
Definition at line 928 of file sequence.hpp.
Definition at line 316 of file sequence.hpp.
typedef CPatternInfo CSeqSearch::TPatternInfo |
Definition at line 1195 of file sequence.hpp.
Definition at line 1207 of file sequence.hpp.
typedef CSeq_interval SRelLoc::TRange |
For relative ranges (ONLY), id is irrelevant and normally unset.
Definition at line 1131 of file sequence.hpp.
typedef vector<CRef<TRange> > SRelLoc::TRanges |
Definition at line 1132 of file sequence.hpp.
Definition at line 306 of file sequence.hpp.
typedef unsigned int CSeqSearch::TSearchFlags |
binary OR of ESearchFlag
Definition at line 1220 of file sequence.hpp.
typedef int CSeqTranslator::TTranslationFlags |
Definition at line 988 of file sequence.hpp.
typedef vector<STrimRule> CSequenceAmbigTrimmer::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.
typedef int CDeflineGenerator::TUserFlags |
Binary "OR" of EUserFlags.
Definition at line 97 of file create_defline.hpp.
enum EAccessionVersion |
Enumerator | |
---|---|
eWithAccessionVersion | accession.version (when possible) |
eWithoutAccessionVersion | accession only, even if version is available |
Definition at line 90 of file sequence.hpp.
enum EBestFeatOpts |
Definition at line 330 of file sequence.hpp.
Enumerator | |
---|---|
eNoSynonyms | |
eRequestedIdNotFound |
Definition at line 752 of file sequence.hpp.
|
protected |
This indicates what happened when we tried to run x_FindNextGapOnBioseq.
Definition at line 1689 of file sequence.hpp.
enum CFastaOstream::EFlags : long |
Definition at line 772 of file sequence.hpp.
enum SRelLoc::EFlags |
Enumerator | |
---|---|
fNoMerge | don't merge adjacent intervals |
Definition at line 1125 of file sequence.hpp.
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.
How to represent gaps with fInstantiateGaps enabled, as it is by default.
(Disabling fInstantiateGaps is equivalent to requesting eGM_one_dash.)
Definition at line 803 of file sequence.hpp.
enum 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.
enum 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.
Definition at line 281 of file sequence.hpp.
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.
This enum is used to set what is meant by "ambiguous".
Definition at line 1289 of file sequence.hpp.
enum EP2SFlags |
Enumerator | |
---|---|
fP2S_Extend | if hitting ends, extend to include partial codons |
Definition at line 313 of file sequence.hpp.
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.
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.
Enumerator | |
---|---|
fNoFlags | |
fJustTopStrand | |
fExpandPattern | |
fAllowMismatch |
Definition at line 1214 of file sequence.hpp.
Definition at line 980 of file sequence.hpp.
Enumerator | |
---|---|
eThrowException | |
eTruncate | |
ePad |
Definition at line 948 of file sequence.hpp.
enum 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.
User-settable flags for tuning behavior.
Definition at line 83 of file create_defline.hpp.
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
sequence | pattern's name |
cut_site | pattern'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 | ( | const CSeq_entry_Handle & | entry_h, |
const Params & | params = Params() |
||
) |
This constructor initializes the iterator.
entry_h | This will iterate over all descendents of this entry. |
params | Controls 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.
|
private |
CDeflineGenerator::CDeflineGenerator | ( | const CSeq_entry_Handle & | tseh | ) |
Constructor.
Definition at line 131 of file create_defline.cpp.
References CDeflineGenerator::m_ConstructedFeatTree, CDeflineGenerator::m_InitializedFeatTree, CDeflineGenerator::m_TopSEH, and CDeflineGenerator::x_Init().
CDeflineGenerator::CDeflineGenerator | ( | void | ) |
Constructor.
Definition at line 123 of file create_defline.cpp.
References CDeflineGenerator::m_ConstructedFeatTree, CDeflineGenerator::m_InitializedFeatTree, and CDeflineGenerator::x_Init().
CFastaOstream::CFastaOstream | ( | CNcbiOstream & | out | ) |
Definition at line 2713 of file sequence.cpp.
Definition at line 4086 of file sequence.cpp.
References CBioseq::IsAa(), CBioseq_Base::IsSetInst(), and CBioseq_Base::SetInst().
CDeflineGenerator::CLowQualityTextFsm::CLowQualityTextFsm | ( | void | ) |
Definition at line 4153 of file create_defline.cpp.
References CTextFsm< int >::AddWord(), and CTextFsm< int >::Prime().
|
inline |
constructor
Definition at line 1174 of file sequence.hpp.
CSeqSearch::CSeqSearch | ( | IClient * | client = 0 , |
TSearchFlags | flags = fNoFlags |
||
) |
constructors
client | pointer to a client object (receives pattern match notifications) |
flags | specify search flags |
Definition at line 4797 of file sequence.cpp.
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.
eMeaningOfAmbig | This indicates exactly what ambiguous means (e.g. just "N" or do all ambiguous symbols count? ) |
fFlags | miscellaneous parameters to control this. See TFlags. |
vecTrimRules | This indicates how trimming will occur. See TTrimRuleVec. |
uMinSeqLen | Trimming 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().
CBioseqGaps_CI::DECLARE_OPERATOR_BOOL | ( | m_bioseq_CI | ) |
|
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.
bioseq_handle | The bioseq to trim. |
trimmed_ranges | The ranges trimmed by DoTrim will be added to this. |
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().
|
static |
Find "best" frame for a coding region.
"Best" frame has no internal stop codons.
Definition at line 4376 of file sequence.cpp.
Referenced by CEditSequence::AdjustFeatureLocations(), BOOST_AUTO_TEST_CASE(), CRetranslateCDS::GetCommand(), CEditCdsFrame::GetCommand(), ApplyCDSFrame::s_SetCDSFrame(), CMacroFunction_ApplyCDSFrame::s_SetCDSFrame(), CCleanup::SetBestFrame(), CMacroFunction_ApplyCDS::TheFunction(), UpdateFeat(), CFeaturePropagator::x_PropagateCds(), and CFeatureTableReader::xMoveCdRegions().
|
static |
Definition at line 4272 of file sequence.cpp.
References CSerialObject::Assign(), map_checker< Container >::begin(), eExtreme_Biological, CCdregion_Base::eFrame_not_set, CCdregion_Base::eFrame_one, CCdregion_Base::eFrame_three, CCdregion_Base::eFrame_two, map_checker< Container >::end(), NStr::Find(), CSeqFeatData_Base::GetCdregion(), CSeq_feat_Base::GetData(), CCdregion_Base::GetFrame(), GetLength(), CSeq_feat_Base::GetLocation(), CSeqFeatData_Base::IsCdregion(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), CSeq_feat_Base::IsSetData(), CCdregion_Base::IsSetFrame(), CSeq_feat_Base::IsSetLocation(), NPOS, NULL, prot, CSeq_feat_Base::SetData(), NStr::StartsWith(), and CSeqTranslator::Translate().
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().
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().
CSeq_id_Handle FindLatestSequence | ( | const CSeq_id_Handle & | idh, |
CScope & | scope | ||
) |
Definition at line 769 of file sequence.cpp.
References NULL, and x_FindLatestSequence().
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().
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.
string CDeflineGenerator::GenerateDefline | ( | const CBioseq & | bioseq, |
CScope & | scope, | ||
feature::CFeatTree & | ftree, | ||
TUserFlags | flags = 0 |
||
) |
Main method.
Definition at line 4138 of file create_defline.cpp.
References flags, CDeflineGenerator::GenerateDefline(), CDeflineGenerator::m_ConstructedFeatTree, CDeflineGenerator::m_Feat_Tree, and CDeflineGenerator::m_InitializedFeatTree.
string CDeflineGenerator::GenerateDefline | ( | const CBioseq & | bioseq, |
CScope & | scope, | ||
TUserFlags | flags = 0 |
||
) |
Main method.
Definition at line 4125 of file create_defline.cpp.
References CScope::AddBioseq(), CScope::eExist_Get, flags, CDeflineGenerator::GenerateDefline(), and CScope::kPriority_Default.
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.
string CDeflineGenerator::GenerateDefline | ( | const CBioseq_Handle & | bsh, |
feature::CFeatTree & | ftree, | ||
TUserFlags | flags = 0 |
||
) |
Main method.
Definition at line 4111 of file create_defline.cpp.
References flags, CDeflineGenerator::GenerateDefline(), CDeflineGenerator::m_ConstructedFeatTree, CDeflineGenerator::m_Feat_Tree, and CDeflineGenerator::m_InitializedFeatTree.
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().
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().
string GetAccessionForId | ( | const objects::CSeq_id & | id, |
CScope & | scope, | ||
EAccessionVersion | use_version = eWithAccessionVersion , |
||
EGetIdType | flags = 0 |
||
) |
Retrieve the accession string for a Seq-id.
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 708 of file sequence.cpp.
References eGetId_ForceAcc, eGetId_ThrowOnError, eGetId_VerifyId, eWithAccessionVersion, flags, GetId(), CSeq_id_Handle::GetSeqId(), CSeq_id::GetSeqIdString(), kEmptyStr, and NCBI_THROW.
Referenced by CLocMapper_Default::CLocMapper_Default(), SCompareAlignments::operator()(), SFlybaseCompareAlignments::operator()(), CCreateGeneModelTask::x_AssignIDsAndUpdateGenes(), CGuiObjectInfoSeq_feat::x_GetAccession(), variation_ref::CHgvsParser::x_SeqIdToHgvsHeader(), CGff3Writer::x_WriteBioseqHandle(), and CSrcWriter::xGatherId().
|
inline |
Definition at line 857 of file sequence.hpp.
CConstRef<CSeq_feat> GetBestCdsForMrna | ( | const CSeq_feat & | mrna_feat, |
const CTSE_Handle & | tse, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2514 of file sequence.cpp.
References _ASSERT, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_mRNA, GetBestCdsForMrna(), CSeq_feat_Base::GetData(), CTSE_Handle::GetScope(), and CSeqFeatData::GetSubtype().
CConstRef<CSeq_feat> GetBestCdsForMrna | ( | const CSeq_feat & | mrna_feat, |
CScope & | scope, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 1874 of file sequence.cpp.
References _ASSERT, CSeqFeatData_Base::e_Cdregion, eOverlap_CheckIntervals, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_mRNA, SAnnotSelector::ExcludeNamedAnnots(), fBestFeat_FavorLonger, fBestFeat_NoExpensive, fBestFeat_StrictMatch, CScope::GetBioseqHandle(), CSeq_feat_Base::GetData(), CSeq_id_Handle::GetHandle(), GetId(), CScope::GetIds(), CSeq_feat_Base::GetLocation(), CSeq_feat::GetNamedQual(), GetOverlappingFeatures(), CSeq_feat_Base::GetProduct(), CMappedFeat::GetProduct(), CSeqFeatData::GetSubtype(), CSeq_feat_Base::IsSetExt(), CSeq_feat_Base::IsSetProduct(), CSeq_feat_Handle::IsSetProduct(), CBioseq_Handle::IsSynonym(), ITERATE, CConstRef< C, Locker >::Reset(), SAnnotSelector::SetFeatSubtype(), SAnnotSelector::SetOverlapIntervals(), and SAnnotSelector::SetResolveTSE().
Referenced by GetBestCdsForMrna(), GetBestOverlappingFeat(), and GetCdssForGene().
CConstRef<CSeq_feat> GetBestGeneForCds | ( | const CSeq_feat & | cds_feat, |
const CTSE_Handle & | tse, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2484 of file sequence.cpp.
References _ASSERT, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_gene, GetBestGeneForCds(), CSeq_feat_Base::GetData(), CTSE_Handle::GetScope(), and CSeqFeatData::GetSubtype().
CConstRef<CSeq_feat> GetBestGeneForCds | ( | const CSeq_feat & | cds_feat, |
CScope & | scope, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2128 of file sequence.cpp.
References _ASSERT, CSeqFeatData_Base::e_Gene, eOverlap_Contained, CSeqFeatData::eSubtype_any, CSeqFeatData::eSubtype_cdregion, fBestFeat_NoExpensive, fBestFeat_StrictMatch, GetBestGeneForMrna(), GetBestMrnaForCds(), CSeq_feat_Base::GetData(), CSeqFeatData_Base::GetGene(), CSeq_feat::GetGeneXref(), CGene_ref::GetLabel(), CSeq_feat_Base::GetLocation(), GetOverlappingFeatures(), CSeqFeatData::GetSubtype(), CGene_ref::IsSuppressed(), and ITERATE.
Referenced by GetBestGeneForCds(), and GetBestOverlappingFeat().
CConstRef<CSeq_feat> GetBestGeneForMrna | ( | const CSeq_feat & | mrna_feat, |
const CTSE_Handle & | tse, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2469 of file sequence.cpp.
References _ASSERT, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, GetBestGeneForMrna(), CSeq_feat_Base::GetData(), CTSE_Handle::GetScope(), and CSeqFeatData::GetSubtype().
CConstRef<CSeq_feat> GetBestGeneForMrna | ( | const CSeq_feat & | mrna_feat, |
CScope & | scope, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2040 of file sequence.cpp.
References _ASSERT, CSeqFeatData_Base::e_Gene, eOverlap_Contained, CSeqFeatData::eSubtype_any, CSeqFeatData::eSubtype_mRNA, fBestFeat_FavorLonger, fBestFeat_StrictMatch, CSeq_feat_Base::GetData(), CSeq_feat_Base::GetDbxref(), CSeqFeatData_Base::GetGene(), CSeq_feat::GetGeneXref(), CGene_ref::GetLabel(), CSeq_feat_Base::GetLocation(), GetOverlappingFeatures(), CSeqFeatData::GetSubtype(), CSeq_feat_Base::IsSetDbxref(), CGene_ref::IsSuppressed(), and ITERATE.
Referenced by GetBestGeneForCds(), GetBestGeneForMrna(), and GetBestOverlappingFeat().
CConstRef<CSeq_feat> GetBestMrnaForCds | ( | const CSeq_feat & | cds_feat, |
const CTSE_Handle & | tse, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2499 of file sequence.cpp.
References _ASSERT, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_mRNA, GetBestMrnaForCds(), CSeq_feat_Base::GetData(), CTSE_Handle::GetScope(), and CSeqFeatData::GetSubtype().
CConstRef<CSeq_feat> GetBestMrnaForCds | ( | const CSeq_feat & | cds_feat, |
CScope & | scope, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 1609 of file sequence.cpp.
References _ASSERT, CSeqFeatData_Base::e_Rna, eOverlap_CheckIntRev, eOverlap_SubsetRev, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_mRNA, SAnnotSelector::ExcludeNamedAnnots(), fBestFeat_FavorLonger, fBestFeat_NoExpensive, fBestFeat_StrictMatch, CScope::GetBioseqHandle(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetExcept(), CSeq_feat_Base::GetExcept_text(), CSeq_id_Handle::GetHandle(), GetId(), CScope::GetIds(), CSeq_feat_Base::GetLocation(), CSeq_feat::GetNamedQual(), CMappedFeat::GetOriginalFeature(), GetOverlappingFeatures(), CSeq_feat_Base::GetProduct(), CSeqFeatData::GetSubtype(), CSeq_feat_Base::IsSetExcept(), CSeq_feat_Base::IsSetExcept_text(), CSeq_feat_Base::IsSetExt(), CSeq_feat_Base::IsSetProduct(), CBioseq_Handle::IsSynonym(), ITERATE, kRibosomalSlippageText, CSeq_id::Match(), CConstRef< C, Locker >::Reset(), SAnnotSelector::SetFeatSubtype(), SAnnotSelector::SetOverlapIntervals(), and SAnnotSelector::SetResolveTSE().
Referenced by GetBestGeneForCds(), GetBestMrnaForCds(), and GetBestOverlappingFeat().
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.
snp_feat | SNP feature object |
type | type of overlapping feature |
scope | |
search_both_strands | search is performed on both strands, starting with the one specified by the feature's location. |
Definition at line 1345 of file sequence.cpp.
References CSeqFeatData::eSubtype_any, and x_GetBestOverlapForSNP().
Referenced by GetBestOverlappingFeat(), and CTestBMApp::Run().
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)
snp_feat | SNP feature object |
subtype | subtype of overlapping feature |
scope | |
search_both_strands | search is performed on both strands, starting with the one specified by the feature's location. |
Definition at line 1355 of file sequence.cpp.
References CSeqFeatData::GetTypeFromSubtype(), and x_GetBestOverlapForSNP().
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 |
||
) |
Definition at line 2347 of file sequence.cpp.
References CSeqFeatData_Base::e_Cdregion, CSeqFeatData_Base::e_Gene, CSeqFeatData_Base::e_Rna, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, GetBestOverlappingFeat(), and CSeq_feat_Base::GetLocation().
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 |
||
) |
Definition at line 2386 of file sequence.cpp.
References CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, CSeqFeatData::eSubtype_variation, GetBestCdsForMrna(), GetBestGeneForCds(), GetBestGeneForMrna(), GetBestMrnaForCds(), GetBestOverlapForSNP(), GetBestOverlappingFeat(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetLocation(), and CSeqFeatData::GetSubtype().
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 |
||
) |
See the note above on 'overlap_type' meaning.
Definition at line 1208 of file sequence.cpp.
References CSeqFeatData::eSubtype_any, fBestFeat_FavorLonger, and GetOverlappingFeatures().
Referenced by GetBestOverlappingFeat(), GetCdssForGene(), GetmRNAforCDS(), GetMrnasForGene(), GetOverlappingCDS(), GetOverlappingGene(), GetOverlappingmRNA(), GetOverlappingOperon(), GetOverlappingPub(), GetOverlappingSource(), and GetSourceFeatForProduct().
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().
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().
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.
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().
const CBioSource* GetBioSource | ( | const CBioseq_Handle & | handle | ) |
Definition at line 115 of file sequence.cpp.
References CSeqdesc_Base::e_Source, CSeqdesc_Base::GetSource(), CBioseq_Handle::GetTopLevelEntry(), and NULL.
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().
Get the encoding CDS feature of a given protein sequence.
Definition at line 2549 of file sequence.cpp.
References CScope::GetBioseqHandle().
Referenced by CValidError_bioseq::CdError(), CConvertProtToImp::Convert(), CNewCleanup_imp::CreateMissingMolInfo(), IEditingActionFeat::FindRelated(), CEditingActionFeatGeneLocus::FindRelated(), CProductColumn::GetApplyObjects(), CCodonStartColumn::GetApplyObjects(), NMacroUtil::GetLocusTagFromProtRef(), GetNucleotideParent(), GetRelatedFeatureApplyObjects(), GetRelatedFeatures(), GetSourceFeatForProduct(), GetTextObjectDescription(), CDiscrepancyObject::GetTextObjectDescription(), IEditingAction::GetUpdateMRNAProductNameCmd(), CLocationConstraintMatcher::Match(), CNewCleanup_imp::ResynchProteinPartials(), s_GetProtApplyObjectsFeatures(), s_GetProteinName(), CMacroFunction_UpdateProteinSeqs::TheFunction(), UpdatemRNAProduct(), CValidError_bioseq::ValidateRawConst(), CCmdFeatIdXrefsFromQualifiers::x_CreateActionCmd(), CCdsGlyph::x_DrawProjectedProtSeq(), CCdsGlyph::x_DrawProtSeqWithMapping(), CFlatGatherer::x_GatherCDSReferences(), CDBSourceItem::x_GatherInfo(), x_GetDivisionProc(), x_GetDivisionProcIdx(), x_GetSourceFeatViaCDS(), CMacroFunction_ParsedText::x_GetSpecialField(), CCdregionValidator::x_ValidateCommonProduct(), and CSingleFeatValidator::x_ValidateGeneXRef().
const CSeq_feat* GetCDSForProduct | ( | const CBioseq_Handle & | product | ) |
Definition at line 2558 of file sequence.cpp.
References f(), and GetMappedCDSForProduct().
void GetCdssForGene | ( | const CSeq_feat & | gene_feat, |
const CTSE_Handle & | tse, | ||
list< CConstRef< CSeq_feat > > & | cds_feats, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2538 of file sequence.cpp.
References _ASSERT, CSeqFeatData::eSubtype_gene, GetCdssForGene(), CSeq_feat_Base::GetData(), CTSE_Handle::GetScope(), and CSeqFeatData::GetSubtype().
void GetCdssForGene | ( | const CSeq_feat & | gene_feat, |
CScope & | scope, | ||
list< CConstRef< CSeq_feat > > & | cds_feats, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2318 of file sequence.cpp.
References _ASSERT, eOverlap_Subset, CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_gene, GetBestCdsForMrna(), GetBestOverlappingFeat(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetLocation(), GetMrnasForGene(), CSeqFeatData::GetSubtype(), and ITERATE.
Referenced by GetCdssForGene().
|
inline |
Definition at line 1183 of file sequence.hpp.
References CSeqSearch::CPatternInfo::m_CutSite.
|
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.
|
overridevirtual |
Definition at line 406 of file sequence.cpp.
References CSeqIdFromHandleException::eNoSynonyms, CSeqIdFromHandleException::eRequestedIdNotFound, and CException::GetErrCodeString().
|
inline |
Definition at line 862 of file sequence.hpp.
|
static |
Given a CSeq_gap object, this outputs the Gap information.
seq_gap | This is the seq_gap information we're using to figure out the gap mod text |
out_gap_mod_text | This 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().
Finds gene for feature, but obeys SeqFeatXref directives.
Definition at line 1529 of file sequence.cpp.
Referenced by AddExceptionsToShortIntron(), CAutoDefFeatureClause::AddGene(), CDiscrepancyVisitorImpl< _Name >::Autofix(), BOOST_AUTO_TEST_CASE(), CNewCleanup_imp::CdRegionEC(), CDiscrepancyContext::GeneForFeature(), CGeneCache::GetGeneFromCache(), GetLocusTagForFeature(), CFeatureSeqTableColumnBase::GetRelatedGeneApplyObjects(), GetTargetedLocusName(), CBioseqEditor::OnDeleteSelection(), CMacroFunction_ConvertLocStrand::TheFunction(), CMacroFunction_ConvertLocType::TheFunction(), CCleanupApp::x_FixCDS(), CValidErrorFormat::x_FormatECNumberForSubmitterReport(), and CValidErrorFormat::x_GetLocusTag().
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().
TGi GetGiForId | ( | const objects::CSeq_id & | id, |
CScope & | scope, | ||
EGetIdType | flags = 0 |
||
) |
Given a Seq-id retrieve the corresponding GI.
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 668 of file sequence.cpp.
References CSeq_id::AvoidGi(), eGetId_ForceGi, eGetId_ThrowOnError, eGetId_VerifyId, flags, CSeq_id_Handle::GetGi(), GetId(), CSeq_id_Handle::IsGi(), NCBI_THROW, and ZERO_GI.
Referenced by fta_get_gi_for_seq_id(), CSeqIdListSet::GetGiList(), CSeqLocListSet::GetGiList(), CLocationListCtrl::GetIdFromForm(), CBinsTrack::InitHTMLActiveArea(), CVarTrack::InitHTMLActiveArea(), CSeqUtils::isTopLevel(), CBinsGlyph::x_BuildNonEmptyBinList(), CGeneMarkerGlyph::x_BuildSignatures(), and CCreateGeneModelTask::x_GetCommand().
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().
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, ...).
Definition at line 541 of file sequence.cpp.
References CSeq_id_Handle::GetHandle(), ITERATE, and x_GetId().
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.
id | Source id to evaluate |
scope | Scope for seq-id resolution. |
type | Type of ID to return |
Definition at line 621 of file sequence.cpp.
References _ASSERT, eGetId_ThrowOnError, CBioseq_Handle::GetId(), NCBI_THROW, and x_GetId().
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:
id | Source id to evaluate |
scope | Scope for seq-id resolution. |
type | Type of ID to return |
Definition at line 552 of file sequence.cpp.
References CSeq_id_Handle::GetHandle(), and GetId().
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.
Arguments (except 'id') and behavior is the same as of GetId(const CSeq_id& id, ...).
Definition at line 558 of file sequence.cpp.
References _ASSERT, CSeq_id_Base::e_General, eGetId_Canonical, eGetId_ForceAcc, eGetId_ForceGi, eGetId_ThrowOnError, eGetId_TypeMask, eGetId_VerifyId, ERR_POST, CScope::GetAccVer(), CScope::GetGi(), CSeq_id_Handle::GetGiHandle(), CScope::GetIds(), CSeq_id_Handle::GetSeqId(), CSeq_id_Base::IsGeneral(), CSeq_id_Handle::IsGi(), NCBI_THROW, CSeq_id::PreferAccessionOverGi(), CSeq_id_Handle::Reset(), CSeq_id_Handle::Which(), x_GetId(), and ZERO_GI.
CMappedFeat GetMappedCDSForProduct | ( | const CBioseq_Handle & | product | ) |
Definition at line 2568 of file sequence.cpp.
References CSeqFeatData_Base::e_Cdregion, fi, and CBioseq_Handle::GetTSE_Handle().
Referenced by ChangeFeat(), CGeneFinder::GetAssociatedGeneInfo(), GetCDSForProduct(), CCreateGeneModelTask::x_GetUpdatedGeneCommand(), and CDeflineGenerator::x_SetTitleFromProtein().
CMappedFeat GetMappedmRNAForProduct | ( | const CBioseq_Handle & | product | ) |
Definition at line 2642 of file sequence.cpp.
References CSeqFeatData::eSubtype_mRNA, and fi.
Referenced by CFlatGatherer::x_GatherFeatures(), and CFlatGatherer::x_GatherFeaturesIdx().
Definition at line 3444 of file sequence.cpp.
References CFastaOstream::eSoftMask, CFastaOstream::m_HardMask, and CFastaOstream::m_SoftMask.
Retrieve the MolInfo 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 284 of file sequence.cpp.
References CSeq_descr_Base::Get(), CBioseq_Base::GetDescr(), ITERATE, and NULL.
Referenced by AddDefaultSentinelFeats(), CAlignCollapser::GetCollapsedAlgnments(), variation::CVariationUtil::GetMolType(), CAlignCollapser::GetOnlyOtherAlignments(), GetSequenceType(), CSGUtils::IsmRNA(), CGuiObjectInfoSeq_align::IsPolyA(), CDiscrepancyPanel::OnListClk(), CFeatureGenerator::SImplementation::SMapper::SMapper(), and CDeflineGenerator::x_GetModifiers().
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 A function to find a CSeq_feat representing the appropriate mRNA for a given CDS.
cds | The feature for which the mRNA to be found |
scope | The scope |
Definition at line 1261 of file sequence.cpp.
Referenced by CAdjustForConsensusSpliceSite::AdjustmRNAandExonEnds(), CAdjustForConsensusSpliceSite::AdjustmRNAandExonFeatures(), CDiscrepancyVisitorImpl< _Name >::Autofix(), BOOST_AUTO_TEST_CASE(), CNewCleanup_imp::CdRegionEC(), CCleanup::ExtendToStopIfShortAndNotPartial(), CTruncateCDS::GetCommand(), IEditingAction::GetUpdateMRNAProductNameCmd(), CBulkCDS::GetUpdateMRNAProductNameCmd(), UpdatemRNAProduct(), CCleanup::WGSCleanup(), CCleanupApp::x_FixCDS(), and CCdregionValidator::x_ValidateParentPartialness().
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().
const CSeq_feat* GetmRNAForProduct | ( | const CBioseq_Handle & | product | ) |
Definition at line 2626 of file sequence.cpp.
References CSeqFeatData::eSubtype_mRNA, fi, and SAnnotSelector::SetByProduct().
void GetMrnasForGene | ( | const CSeq_feat & | gene_feat, |
const CTSE_Handle & | tse, | ||
list< CConstRef< CSeq_feat > > & | mrna_feats, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2528 of file sequence.cpp.
References _ASSERT, CSeqFeatData::eSubtype_gene, CSeq_feat_Base::GetData(), GetMrnasForGene(), CTSE_Handle::GetScope(), and CSeqFeatData::GetSubtype().
void GetMrnasForGene | ( | const CSeq_feat & | gene_feat, |
CScope & | scope, | ||
list< CConstRef< CSeq_feat > > & | mrna_feats, | ||
TBestFeatOpts | opts = fBestFeat_Defaults , |
||
CGetOverlappingFeaturesPlugin * | plugin = NULL |
||
) |
Definition at line 2195 of file sequence.cpp.
References _ASSERT, Compare(), eContains, eOverlap_Contains, eSame, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, fCompareOverlapping, GetBestOverlappingFeat(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetDbxref(), CSeq_feat_Handle::GetDbxref(), CSeqFeatData_Base::GetGene(), CSeq_feat::GetGeneXref(), CGene_ref::GetLabel(), CSeq_feat_Base::GetLocation(), CMappedFeat::GetLocation(), CMappedFeat::GetOriginalFeature(), CAnnotTypes_CI::GetSize(), CSeqFeatData::GetSubtype(), SAnnotSelector::IncludeFeatSubtype(), CSeq_feat_Base::IsSetDbxref(), CSeq_feat_Handle::IsSetDbxref(), CGene_ref::IsSuppressed(), ITERATE, CFeat_CI::Rewind(), SAnnotSelector::SetAdaptiveDepth(), and SAnnotSelector::SetResolveTSE().
Referenced by GetCdssForGene(), and GetMrnasForGene().
Definition at line 1181 of file sequence.hpp.
References CSeqSearch::CPatternInfo::m_Name.
Get the encoding nucleotide sequnce of a protein.
Definition at line 2660 of file sequence.cpp.
References CScope::GetBioseqHandle(), and CBioseq_Handle::GetCompleteBioseq().
Referenced by GetModelEvidance(), variation::CVariationUtil::CVariantPropertiesIndex::s_GetGeneIdForProduct(), and CLocusItem::x_SetDate().
CBioseq_Handle GetNucleotideParent | ( | const CBioseq_Handle & | product | ) |
Definition at line 2669 of file sequence.cpp.
References CScope::GetBioseqHandle(), GetCDSForProduct(), CBioseq_Handle::GetInst(), CSeq_feat_Base::GetLocation(), GetmRNAForProduct(), CBioseq_Handle::GetScope(), and CSeq_inst::IsAa().
const COrg_ref& GetOrg_ref | ( | const CBioseq_Handle & | handle | ) |
Return the org-ref associated with a given sequence.
This will throw a CException if there is no org-ref associated with the sequence
Definition at line 264 of file sequence.cpp.
References eUnknown, GetOrg_refOrNull(), and NCBI_THROW.
Referenced by BOOST_AUTO_TEST_CASE(), CProteinAlignText::CProteinAlignText(), CProSplign::CImplementation::FindGlobalAlignment_stage1(), CScoreBuilder::GetBlastScoreProtToNucl(), CSequenceTrack::GetTooltip(), CGuiObjectInfoComponent::GetToolTip(), s_GetGeneticCode(), s_GetSplicedSegIdentityMismatch(), CFeatureGenerator::SImplementation::x_ConstructRnaName(), CTreeBuilderJob::x_CreateProjectItems(), CAlnVecRow::x_GetDescrTooltip(), CAlignSeqTableModel::x_GetOrganism(), CSFTranslationJob::x_InitGeneticCode(), and CPhyTreeFormatter::x_InitTreeFeatures().
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().
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().
const COrg_ref* GetOrg_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.
Definition at line 245 of file sequence.cpp.
References CSeqdesc_Base::e_Org, CSeqdesc_Base::e_Source, CSeqdesc_Base::GetOrg(), CBioSource_Base::GetOrg(), CSeqdesc_Base::GetSource(), CSeqdesc_Base::IsOrg(), CSeqdesc_Base::IsSource(), and types.
Referenced by CFeatureGenerator::ConvertLocToAnnot(), GetOrg_ref(), GetTaxId(), CFeatureGenerator::SImplementation::TransformProteinAlignToTranscript(), and CSparseAln::x_GetGenCode().
Definition at line 1579 of file sequence.cpp.
References eOverlap_Contained, CSeqFeatData::eSubtype_cdregion, and GetBestOverlappingFeat().
Referenced by CSequenceEditingEventHandler::CombineSelectedGenesIntoPseudogenes(), CPeptideValidator::CPeptideValidator(), CCleanup::GetProteinLocationFromNucleotideLocation(), s_MoveProteinSpecificFeats(), and CImpFeatValidator::Validate().
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().
CConstRef<CSeq_feat> GetOverlappingGene | ( | const CSeq_loc & | loc, |
CScope & | scope, | ||
ETransSplicing | eTransSplicing = eTransSplicing_Auto |
||
) |
Definition at line 1366 of file sequence.cpp.
References eNa_strand_both, eNa_strand_other, eOverlap_Contained, CSeqFeatData::eSubtype_gene, eTransSplicing_Auto, eTransSplicing_No, eTransSplicing_Yes, fBestFeat_IgnoreStrand, GetBestOverlappingFeat(), CSeq_feat_Base::GetLocation(), CSeq_loc::GetStrand(), and CConstRef< C, Locker >::Reset().
Referenced by AddColumnsToFeatureTable(), AdjustGene(), CRecomputeIntervals::apply(), CConvertBadCdsAndRnaToMiscFeat::apply(), ApplyFeatureSeqTableToSeqEntry(), ApplyPolicyToFeature(), CConvertCDSToPseudoGene::Convert(), CFeatureGenePanel::CreateControls(), CTruncateCDS::GetCommand(), GetGeneForFeature(), NMacroUtil::GetLocusTagFromProtRef(), GetRelatedFeatureApplyObjects(), GetRelatedFeatures(), CCleanup::IsGeneXrefUnnecessary(), CCdsToMatPeptide::MergeConvert(), CHugeFileDemoApp::ProcessHugeSeqEntry(), s_CheckQuals_cdregion(), s_GetProteinName(), s_TitleFromSegment(), SetTranslExcept(), CMytestApplication::TestFeatureGeneOverlap(), CGeneOverlapProcess::TestFeatureGeneOverlap(), CHugeFileDemoApp::x_ProcessFileTraditionally(), CConvertFeatureBase::x_SimpleConversion(), and CRNAValidator::x_ValidateTrnaType().
Definition at line 1572 of file sequence.cpp.
References eOverlap_Contained, CSeqFeatData::eSubtype_mRNA, and GetBestOverlappingFeat().
Referenced by AddColumnsToFeatureTable(), ApplyFeatureSeqTableToSeqEntry(), MakemRNAforCDS(), CCdsToMatPeptide::MergeConvert(), and CConvertFeatureBase::x_SimpleConversion().
Definition at line 1600 of file sequence.cpp.
References eOverlap_Contained, CSeqFeatData::eSubtype_operon, and GetBestOverlappingFeat().
Referenced by CFeatureItem::x_AddQualOperon(), CValidError_bioseq::x_ReportGeneOverlapError(), and CGeneValidator::x_ValidateOperon().
Definition at line 1586 of file sequence.cpp.
References eOverlap_Contained, CSeqFeatData::eSubtype_pub, and GetBestOverlappingFeat().
Definition at line 1593 of file sequence.cpp.
References eOverlap_Contained, CSeqFeatData::eSubtype_biosrc, and GetBestOverlappingFeat().
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().
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().
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().
const CSeq_feat* GetPROTForProduct | ( | const CBioseq_Handle & | product | ) |
Definition at line 2602 of file sequence.cpp.
References CSeqFeatData_Base::e_Prot, and fi.
Definition at line 1182 of file sequence.hpp.
References CSeqSearch::CPatternInfo::m_Sequence.
CConstRef<CSeq_feat> GetSourceFeatForProduct | ( | const CBioseq_Handle & | bsh | ) |
Definition at line 133 of file sequence.cpp.
References CSeq_loc::Assign(), eOverlap_SubsetRev, CSeqFeatData::eSubtype_biosrc, GetBestOverlappingFeat(), GetCDSForProduct(), CSeq_feat_Base::GetLocation(), CBioseq_Handle::GetScope(), CSeq_feat_Base::IsSetData(), and SeqLocRevCmpl().
Referenced by GetBioSourceForBioseq(), GetOrg_refForProduct(), GetTaxIdForProduct(), CFlatGatherer::x_CollectBioSourcesOnBioseq(), and CSourceItem::x_GatherInfo().
|
inline |
Definition at line 1184 of file sequence.hpp.
References CSeqSearch::CPatternInfo::m_Strand.
TTaxId GetTaxId | ( | const CBioseq_Handle & | handle | ) |
return the tax-id associated with a given sequence.
This will return 0 if no tax-id can be found.
Definition at line 274 of file sequence.cpp.
References GetOrg_refOrNull(), COrg_ref::GetTaxId(), and ZERO_TAX_ID.
Referenced by CLinkUtils::AddSequenceLinks(), IAlignRowHandle::GetTaxId(), CTaxTreeDS_ObjMgr::GetTaxMap(), CSeqDBTaxInfo::GetTaxNames(), CFeatGlyph::GetTooltip(), CBioSource::RemoveLineageSourceNotes(), CWindowMaskerPanel::TaxonsLoaded(), CAsn2FlatApp::x_AddSNPAnnots(), CTaxTreeToolJob::x_CreateProjectItems(), CAlignGroup::x_GetTaxId(), CWindowMaskerPanel::x_InitTaxons(), CAltValidator::x_QueryAccessions(), and CBlastTabularInfo::x_SetTaxInfo().
TTaxId GetTaxIdForProduct | ( | const CBioseq_Handle & | bsh | ) |
Definition at line 171 of file sequence.cpp.
References CBioseq_Handle::GetAccessSeq_id_Handle(), CBioseq_Handle::GetScope(), GetSourceFeatForProduct(), CBioseq_Handle::IsAa(), and ZERO_TAX_ID.
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().
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().
|
inline |
Other parameters...
Definition at line 855 of file sequence.hpp.
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
feat | Seq-feat to check |
scope | CScope to use when looking for associated gene |
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().
CSeqIdFromHandleException::NCBI_EXCEPTION_DEFAULT | ( | CSeqIdFromHandleException | , |
CException | |||
) |
|
pure virtual |
Referenced by CSeqSearch::Search().
|
inline |
Get information about the gap we're currently on.
Definition at line 1654 of file sequence.hpp.
References CBioseqGaps_CI::x_GetCurrent().
|
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().
|
inline |
Get information about the gap we're currently on.
Definition at line 1659 of file sequence.hpp.
References CBioseqGaps_CI::x_GetCurrent().
|
private |
|
inline |
Default ctor gives params which are usually reasonable.
Definition at line 1579 of file sequence.hpp.
|
pure virtual |
Implemented in CCdsForMrnaPlugin.
Referenced by GetOverlappingFeatures(), and CCdsForMrnaPlugin::postProcessDiffAmount().
|
pure virtual |
Implemented in CCdsForMrnaPlugin.
Referenced by GetOverlappingFeatures(), and CCdsForMrnaPlugin::processLoc().
|
pure virtual |
Implemented in CCdsForMrnaPlugin.
Referenced by GetOverlappingFeatures(), and CCdsForMrnaPlugin::processMainLoop().
|
pure virtual |
Implemented in CCdsForMrnaPlugin.
Referenced by GetOverlappingFeatures(), and CCdsForMrnaPlugin::processSAnnotSelector().
CRef<CSeq_loc> ProductToSource | ( | const CSeq_feat & | feat, |
const CSeq_loc & | prod_loc, | ||
TP2SFlags | flags = 0 , |
||
CScope * | scope = 0 |
||
) |
Definition at line 841 of file sequence.cpp.
References _ASSERT, flags, fP2S_Extend, CSeqFeatData_Base::GetCdregion(), CSeq_feat_Base::GetData(), CCdregion_Base::GetFrame(), GetLength(), CSeq_feat_Base::GetLocation(), CSeq_feat_Base::GetProduct(), CSeqFeatData_Base::IsCdregion(), IsReverse(), SRelLoc::m_ParentLoc, SRelLoc::m_Ranges, max(), NON_CONST_ITERATE, CConstRef< C, Locker >::Reset(), and SRelLoc::Resolve().
Referenced by CCdregionValidator::MapToNTCoords().
|
inline |
Definition at line 860 of file sequence.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), CBlastDBExtractor::ExtractFasta(), and CBlastDB_FastaFormatter::Write().
CRef< CSeq_loc > SRelLoc::Resolve | ( | const CSeq_loc & | new_parent, |
CScope * | scope = 0 , |
||
SRelLoc::TFlags | flags = 0 |
||
) | const |
Definition at line 4583 of file sequence.cpp.
References _ASSERT, delta(), CInt_fuzz::eAmplify, eNa_strand_unknown, CSerialObject::Equals(), ERR_POST_X, f(), first(), CSeq_loc_mix_Base::Get(), CSeq_loc::GetLabel(), GetLength(), CConstRef< C, Locker >::GetPointer(), IsReverse(), ITERATE, label, SRelLoc::m_Ranges, CConstRef< C, Locker >::Reset(), result, Reverse(), CSeq_loc_mix_Base::Set(), CSeq_interval_Base::SetFrom(), CSeq_point_Base::SetFuzz(), CSeq_interval_Base::SetFuzz_from(), CSeq_interval_Base::SetFuzz_to(), CSeq_interval_Base::SetId(), CSeq_point_Base::SetId(), CSeq_loc::SetInt(), CSeq_loc::SetPnt(), CSeq_point_Base::SetPoint(), CSeq_interval_Base::SetStrand(), CSeq_point_Base::SetStrand(), CSeq_interval_Base::SetTo(), and Warning().
Definition at line 1143 of file sequence.hpp.
References flags, and SRelLoc::m_ParentLoc.
Referenced by ProductToSource(), CSeqUtils::RemapChildToParent(), s_RemapChildToParent(), and SourceToProduct().
Reverse complement a Bioseq in place.
If delta sequence, will also need to reverse order of segments
Definition at line 5142 of file sequence.cpp.
References CDelta_seq_Base::e_Literal, CDelta_seq_Base::e_Loc, CSeq_inst_Base::eRepr_delta, CSeq_inst_Base::eRepr_raw, CSeq_inst_Base::GetExt(), CSeq_inst_Base::GetLength(), CSeq_literal_Base::GetLength(), CSeq_inst_Base::GetRepr(), CSeq_literal_Base::GetSeq_data(), CSeq_ext_Base::IsDelta(), CSeq_data_Base::IsGap(), CSeq_inst_Base::IsSetExt(), NCBI_THROW, NON_CONST_ITERATE, CSeqportUtil::ReverseComplement(), SeqLocRevCmpl(), CSeq_inst_Base::SetExt(), CSeq_inst_Base::SetSeq_data(), and CSeq_literal_Base::SetSeq_data().
|
inline |
Definition at line 1470 of file sequence.hpp.
|
inline |
Constructor initializes to state that it should be when the iterator first starts.
Definition at line 1629 of file sequence.hpp.
void CSeqSearch::Search | ( | const CBioseq_Handle & | seq | ) |
Search the sequence for patterns.
Definition at line 4940 of file sequence.cpp.
References CBioseq_Handle::eCoding_Iupac, CSeq_inst_Base::eTopology_circular, CBioseq_Handle::GetInst_Topology(), CBioseq_Handle::GetSeqVector(), i, CSeqSearch::m_Client, CSeqSearch::m_Fsa, CSeqSearch::m_LongestPattern, NULL, and CSeqVector::size().
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().
|
inline |
Definition at line 858 of file sequence.hpp.
References flags.
Referenced by CBlastDB_FastaFormatter::CBlastDB_FastaFormatter(), CVdbFastaExtractor::DumpAll(), CBlastDB_FastaFormatter::DumpAll(), CSeqFormatter::DumpAll(), CBlastDBExtractor::ExtractFasta(), CFastaProcess::SeqEntryProcess(), CVdbFastaExtractor::Write(), and CFastaOstreamComp::x_GetFastaOstream().
|
inline |
Definition at line 1251 of file sequence.hpp.
References client, and CSeqSearch::m_Client.
|
inline |
Definition at line 859 of file sequence.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), CBlastDBExtractor::ExtractFasta(), GetSequenceStringFromLoc(), CFastaExportJob::Run(), CFastaProcess::SeqEntryProcess(), CFastaTextDisplay::Update(), CBlastDB_FastaFormatter::Write(), and CFastaTitleItem::x_GetTitle().
|
inline |
Definition at line 861 of file sequence.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), and CFastaProcess::SeqEntryProcess().
Definition at line 3450 of file sequence.cpp.
References CFastaOstream::eSoftMask, location, CFastaOstream::m_HardMask, and CFastaOstream::m_SoftMask.
Referenced by BOOST_AUTO_TEST_CASE(), CBlastDBExtractor::ExtractFasta(), and CBlastDB_FastaFormatter::Write().
|
pure virtual |
Implemented in CCdsForMrnaPlugin.
Referenced by GetOverlappingFeatures(), and CCdsForMrnaPlugin::setUpFeatureIterator().
void CFastaOstream::SetWidth | ( | TSeqPos | width | ) |
Definition at line 3456 of file sequence.cpp.
References AutoPtr< X, Del >::get(), CFastaOstream::m_Dashes, CFastaOstream::m_LC_Ns, CFastaOstream::m_LC_Xs, CFastaOstream::m_UC_Ns, CFastaOstream::m_UC_Xs, CFastaOstream::m_Width, and AutoPtr< X, Del >::reset().
Referenced by CBlastDB_FastaFormatter::CBlastDB_FastaFormatter(), CVdbFastaExtractor::DumpAll(), CSeqFormatter::DumpAll(), CBlastDBExtractor::ExtractFasta(), s_CheckIdLookup(), and CVdbFastaExtractor::Write().
Used only by Write(CSeq_entry[_Handle], ...); permissive by default.
Definition at line 837 of file sequence.hpp.
Referenced by CFastaOstream::Write().
|
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().
CRef<CSeq_loc> SourceToProduct | ( | const CSeq_feat & | feat, |
const CSeq_loc & | source_loc, | ||
TS2PFlags | flags = 0 , |
||
CScope * | scope = 0 , |
||
int * | frame = 0 |
||
) |
Definition at line 790 of file sequence.cpp.
References _ASSERT, ERR_POST_X, flags, SRelLoc::fNoMerge, fS2P_AllowTer, fS2P_NoMerge, CSeqFeatData_Base::GetCdregion(), CSeq_feat_Base::GetData(), CCdregion_Base::GetFrame(), GetLength(), CSeq_feat_Base::GetLocation(), CSeq_feat_Base::GetProduct(), CSeqFeatData_Base::IsCdregion(), IsReverse(), SRelLoc::m_ParentLoc, SRelLoc::m_Ranges, max(), NON_CONST_ITERATE, CConstRef< C, Locker >::Reset(), SRelLoc::Resolve(), and Warning().
Referenced by TestOneCDS(), and CCdregionValidator::x_ValidateCodebreak().
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().
For manual work. As noted above, ranges need not contain any IDs.
Definition at line 1140 of file sequence.hpp.
|
static |
Translate a CDRegion into a protein.
Definition at line 4183 of file sequence.cpp.
References CBioseq_Handle::eCoding_Iupac, eExtreme_Biological, CCdregion_Base::eFrame_three, CCdregion_Base::eFrame_two, eOffset_FromStart, CCode_break_Base::GetAa(), CSeqFeatData_Base::GetCdregion(), CCdregion_Base::GetCode(), CCdregion_Base::GetCode_break(), CSeq_feat_Base::GetData(), CCdregion_Base::GetFrame(), CCode_break_Base::GetLoc(), CSeq_feat_Base::GetLocation(), CCode_break_Base::C_Aa::GetNcbieaa(), i, CSeqFeatData_Base::IsCdregion(), CCode_break_Base::C_Aa::IsNcbieaa(), CSeq_loc::IsPartialStart(), CSeq_loc::IsPartialStop(), CCdregion_Base::IsSetCode(), CCdregion_Base::IsSetCode_break(), CCdregion_Base::IsSetFrame(), ITERATE, LocationOffset(), NULL, prot, and x_Translate().
|
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().
|
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().
|
static |
Translate a seq-vector using a specified genetic code if the code is NULL, then the default genetic code is used.
seq | CSeqVector of sequence to be translated |
code | Genetic code to use for translation (NULL to use default) |
include_stop | If true, translate through stop codons and include trailing stop (true by default) |
remove_trailing_X | If true, remove trailing Xs from protein translation (false by default) |
alt_start | Pointer to bool to indicate whether an alternative start codon was used |
is_5prime_complete | If 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().
|
static |
Translate a seq-vector using a specified genetic code if the code is NULL, then the default genetic code is used.
seq | CSeqVector of sequence to be translated |
code | Genetic code to use for translation (NULL to use default) |
flags | Binary OR of "ETranslationFlags" |
alt_start | Pointer 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().
|
static |
Translate a string using a specified genetic code.
seq | String containing IUPAC representation of sequence to be translated |
code | Genetic code to use for translation (NULL to use default) |
include_stop | If true, translate through stop codons and include trailing stop (true by default) |
remove_trailing_X | If true, remove trailing Xs from protein translation (false by default) |
alt_start | Pointer to bool to indicate whether an alternative start codon was used |
is_5prime_complete | If 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().
|
static |
Translate a string using a specified genetic code.
seq | String containing IUPAC representation of sequence to be translated |
code | Genetic code to use for translation (NULL to use default) |
flags | Binary OR of "ETranslationFlags" |
alt_start | Pointer 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().
|
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().
|
static |
Definition at line 4401 of file sequence.cpp.
References _ASSERT, CScope::GetBioseqHandle(), CSeq_feat_Base::GetData(), CSeq_feat_Base::GetLocation(), CBioseq_Handle::GetScope(), CSeqFeatData_Base::IsCdregion(), prot, and CSeqTranslator::Translate().
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().
|
inline |
Definition at line 145 of file create_defline.hpp.
void CFastaOstream::Write | ( | const CBioseq & | seq, |
const CSeq_loc * | location = 0 , |
||
bool | no_scope = false , |
||
const string & | custom_title = kEmptyStr |
||
) |
Definition at line 3389 of file sequence.cpp.
References CScope::AddBioseq(), CDelta_seq_Base::e_Loc, CSeq_data_Base::e_Ncbieaa, CBioseq_Handle::eCoding_Iupac, CSeq_inst_Base::eRepr_delta, CSeq_inst_Base::eRepr_raw, CDelta_ext_Base::Get(), CSeq_ext_Base::GetDelta(), CSeq_inst_Base::GetExt(), CBioseq_Base::GetInst(), CObjectManager::GetInstance(), CSeq_inst_Base::GetRepr(), CSeqVector::IsProtein(), ITERATE, location, NULL, CSeqVector::SetCoding(), CFastaOstream::Write(), CFastaOstream::x_GetMaskingStates(), CFastaOstream::x_WriteSeqIds(), CFastaOstream::x_WriteSeqTitle(), and CFastaOstream::x_WriteSequence().
|
virtual |
Definition at line 2748 of file sequence.cpp.
References location, CFastaOstream::WriteSequence(), and CFastaOstream::WriteTitle().
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().
|
virtual |
Unspecified locations designate complete sequences; non-empty custom titles override the usual title determination logic.
Definition at line 2727 of file sequence.cpp.
References eOverlap_Interval, CSeq_entry_Handle::GetScope(), kInvalidSeqPos, location, CSeq_loc::SetWhole(), CFastaOstream::SkipBioseq(), and TestForOverlap().
Referenced by BOOST_AUTO_TEST_CASE(), CMytestApplication::DoProcessStreamFasta(), CReadBlastApp::dump_fasta_for_pretty_blast(), CVdbFastaExtractor::DumpAll(), CSeqFormatter::DumpAll(), CBlastDBExtractor::ExtractFasta(), CAsn2FastaApp::HandleSeqEntry(), CFastaExportJob::Run(), s_CheckIdLookup(), CFastaProcess::SeqEntryProcess(), CFastaTextDisplay::Update(), CSortedProteins::View(), CFastaOstream::Write(), CVdbFastaExtractor::Write(), CBlastDB_FastaFormatter::Write(), CBLASTSeqToolJob::x_CreateProjectItems(), CWindowMaskerJob::x_CreateProjectItems(), and CFastaOstreamComp::x_Write().
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().
|
virtual |
Definition at line 3322 of file sequence.cpp.
References CSeqMap::CanResolveRange(), CSeq_data_Base::e_Ncbieaa, CBioseq_Handle::eCoding_Iupac, eSeqLocCheck_error, CFastaOstream::fAssembleParts, CSeqMap::fFindInnerRef, CBioseq_Handle::GetScope(), CBioseq_Handle::GetSeqId(), CBioseq_Handle::GetSeqMap(), CBioseq_Handle::GetSeqVector(), CBioseq_Handle::GetTSE_Handle(), CSeqVector::IsProtein(), CBioseq_Handle::IsSetInst_Seq_data(), label, location, CFastaOstream::m_Flags, CFastaOstream::m_HardMask, CFastaOstream::m_SoftMask, NCBI_THROW, CConstRef< C, Locker >::NotEmpty(), Seq_loc_Merge(), SeqLocCheck(), CSeqVector::SetCoding(), SSeqMapSelector::SetLinkUsedTSE(), CFastaOstream::x_GetMaskingStates(), and CFastaOstream::x_WriteSequence().
Referenced by CSeqFormatter::DumpAll(), CBlastDBExtractor::ExtractFasta(), GetSequenceStringFromLoc(), CFastaOstream::Write(), CBlastDB_FastaFormatter::Write(), CFastaOstreamEx::WriteFeature(), and CFastaOstreamEx::x_WriteTranslatedCds().
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.
|
virtual |
Definition at line 3033 of file sequence.cpp.
Referenced by CMytestApplication::DoProcessStreamDefline(), CAsn2FastaApp::HandleSeqEntry(), CFastaOstream::Write(), and CFastaTitleItem::x_GetTitle().
|
private |
Definition at line 5064 of file sequence.cpp.
References buffer, flags, kEmptyStr, CSeqSearch::m_LongestPattern, CSeqSearch::CPatternInfo::m_Sequence, CSeqSearch::CPatternInfo::m_Strand, CSeqSearch::x_AddPattern(), CSeqSearch::x_ExpandPattern(), and CSeqSearch::x_IsExpandPattern().
Referenced by CSeqSearch::AddNucleotidePattern().
|
private |
Definition at line 5116 of file sequence.cpp.
References flags, NON_CONST_ITERATE, swap(), CSeqSearch::x_IsAllowMismatch(), and CSeqSearch::x_StorePattern().
Referenced by CSeqSearch::x_AddNucleotidePattern(), and CSeqSearch::x_ExpandPattern().
|
private |
Definition at line 3248 of file create_defline.cpp.
References CTempString::empty(), CConstRef< C, Locker >::Empty(), NStr::EndsWith(), NStr::eNocase, NStr::EqualNocase(), NStr::eReverseSearch, CTempString::find(), NStr::Find(), COrgName_Base::C_Name::GetBinomial(), CBioseqIndex::GetBioseqForProduct(), CSeqEntryIndex::GetBioseqIndex(), CBioSource_Base::GetGenome(), CBinomialOrgName_Base::GetGenus(), COrgName_Base::GetName(), CBioSource::GetOrgname(), CBinomialOrgName_Base::GetSpecies(), CBioSource::GetTaxname(), int, COrgName_Base::C_Name::IsBinomial(), CBioSource_Base::IsSetGenome(), CBinomialOrgName_Base::IsSetGenus(), COrgName_Base::IsSetName(), CBioSource::IsSetOrgname(), CBinomialOrgName_Base::IsSetSpecies(), CBioSource::IsSetTaxname(), CTempString::length(), CWeakRef< C, Locker >::Lock(), CDeflineGenerator::m_FirstSuperKingdom, CDeflineGenerator::m_Genome, CDeflineGenerator::m_Genus, CDeflineGenerator::m_Idx, CDeflineGenerator::m_IsCrossKingdom, CDeflineGenerator::m_LocalAnnotsOnly, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_OmitTaxonomicName, CDeflineGenerator::m_SecondSuperKingdom, CDeflineGenerator::m_Source, CDeflineGenerator::m_Species, CDeflineGenerator::m_Taxname, NCBI_GENOME, CConstRef< C, Locker >::NotEmpty(), NPOS, s_proteinOrganellePrefix, s_TitleEndsInOrganism(), s_TrimMainTitle(), str(), string, x_GetSourceFeatViaCDS(), and CDeflineGenerator::x_IsComplete().
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 3098 of file create_defline.cpp.
References CTempString::empty(), CConstRef< C, Locker >::Empty(), NStr::EndsWith(), NStr::eNocase, NStr::EqualNocase(), NStr::eReverseSearch, CTempString::find(), NStr::Find(), CBioseqIndex::GetBioseqForProduct(), CSeqEntryIndex::GetBioseqIndex(), CBioseqIndex::GetBioSource(), CBioseqIndex::GetDescTaxname(), CBioseqIndex::GetGenome(), CBioseqIndex::GetGenus(), CBioseqIndex::GetOrganelle(), CBioseqIndex::GetSpecies(), CBioseqIndex::GetTaxname(), CBioSource::GetTaxname(), int, CBioSource::IsSetTaxname(), CTempString::length(), CWeakRef< C, Locker >::Lock(), CDeflineGenerator::m_FirstSuperKingdom, CDeflineGenerator::m_Genome, CDeflineGenerator::m_Genus, CDeflineGenerator::m_Idx, CDeflineGenerator::m_IsCrossKingdom, CDeflineGenerator::m_LocalAnnotsOnly, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_OmitTaxonomicName, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_SecondSuperKingdom, CDeflineGenerator::m_Source, CDeflineGenerator::m_Species, CDeflineGenerator::m_Taxname, NCBI_GENOME, CConstRef< C, Locker >::NotEmpty(), NPOS, s_proteinOrganellePrefix, s_TitleEndsInOrganism(), s_TrimMainTitle(), str(), string, x_GetSourceFeatViaCDS(), and CDeflineGenerator::x_IsComplete().
Referenced by CDeflineGenerator::GenerateDefline().
Definition at line 2102 of file create_defline.cpp.
References FEATURE_CHOICE_IS, FOR_EACH_CHAR_IN_STRING, CSeq_feat_Base::GetExcept(), CSeq_feat_Base::GetExcept_text(), CSeq_feat_Base::IsSetExcept(), CSeq_feat_Base::IsSetExcept_text(), CDeflineGenerator::ms_p_Low_Quality_Fsa, NCBI_SEQFEAT, and str().
Referenced by CDeflineGenerator::x_SetPrefix(), CDeflineGenerator::x_SetTitleFromProtein(), and CDeflineGenerator::x_SetTitleFromProteinIdx().
|
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.
out_result | This will store the result. Pass in a struct initialized by the default constructor. |
seqvec | This is used to get the bases. |
iStartPosInclusive | This is where we start our count. |
iEndPosInclusive | This is where we end our count. Note that it can be < or > iStartPosInclusive, depending on trim direction. |
iTrimDirection | 1 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().
|
private |
Definition at line 1437 of file create_defline.cpp.
References buf, CTempString::empty(), CTempString::find(), CDeflineGenerator::m_Clone, CDeflineGenerator::m_has_clone, CDeflineGenerator::m_HTGSPooled, CDeflineGenerator::m_HTGSUnfinished, NPOS, and NStr::NumericToString().
Referenced by CDeflineGenerator::x_SetTitleFromBioSrc(), CDeflineGenerator::x_SetTitleFromGPipe(), CDeflineGenerator::x_SetTitleFromSegSeq(), and CDeflineGenerator::x_SetTitleFromWGS().
|
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.
seqvec | This is used to access information about the sequence. |
in_out_uStartOfGoodBasesSoFar | This 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_uRightmostGoodBaseSoFar | Analogous to in_out_uLeftmostGoodBaseSoFar. It's inclusive. |
uEndOfGoodBasesSoFar | This limits how far this function may search (inclusive) when looking for the end of a gap segment. |
iTrimDirection | 1 to trim from left to right, -1 to trim from right to left. |
uChunkSize | The 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().
|
private |
Definition at line 5090 of file sequence.cpp.
References buf, eBase_A, eBase_C, eBase_G, eBase_T, flags, i, sc_CharToEnum, sc_EnumToChar, and CSeqSearch::x_AddPattern().
Referenced by CSeqSearch::x_AddNucleotidePattern().
|
protectedvirtual |
This finds the next gap on the bioseq, starting at given pos.
bioseq_h | the bioseq on which we're seeking the next relevant gap. |
pos_to_start_looking | This is the position on bioseq_h to start looking for a relevant gap. |
out_pos_of_gap | If 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_gap | If a gap is found, this holds the length of the gap. This is undefined if no 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().
|
protectedvirtual |
This returns the last good base that won't be trimmed (note: last really means "first" when we're starting from the end)
seqvec | This lets us explore the Bioseq to find out where to trim. |
iStartPosInclusive_arg | This is the where we start our trimming. Depending on direction, this could be < or > iEndPosInclusive_arg. |
iEndPosInclusive_arg | This is where the trimming ends (inclusive). Analogous to iStartPosInclusive_arg. |
iTrimDirection | 1 to trim from left to right, -1 to trim from right to left. |
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().
|
protectedvirtual |
Definition at line 2812 of file sequence.cpp.
References CSeq_id_Base::e_Ddbj, CSeq_id_Base::e_Embl, CSeq_id_Base::e_Genbank, CSeq_id_Base::e_Other, CSeq_id_Base::e_Tpd, CSeq_id_Base::e_Tpe, CSeq_id_Base::e_Tpg, CSeq_inst_Base::eMol_aa, CSeq_id::FastaAARank(), CSeq_id::FastaNARank(), CFastaOstream::fEnableGI, CFastaOstream::fHideGenBankPrefix, FindBestChoice(), CBioseq_Base::GetId(), CBioseq_Base::GetInst(), CSeq_inst_Base::GetMol(), ITERATE, CFastaOstream::m_Flags, CConstRef< C, Locker >::NotEmpty(), and CSeq_id_Base::Which().
Referenced by CFastaOstream::x_WriteAsFasta().
|
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->().
|
private |
Definition at line 1993 of file create_defline.cpp.
References CRef< C, Locker >::Empty(), FOR_EACH_SEQFEATXREF_ON_FEATURE, GetBestGeneForCds(), CSeq_feat_Base::GetData(), CSeqFeatXref_Base::GetData(), CSeqFeatData_Base::GetGene(), CMappedFeat::GetOriginalFeature(), CSeqFeatData_Base::IsGene(), CSeqFeatXref_Base::IsSetData(), CDeflineGenerator::m_ConstructedFeatTree, CDeflineGenerator::m_Feat_Tree, CDeflineGenerator::m_InitializedFeatTree, CDeflineGenerator::m_TopSEH, and CRef< C, Locker >::Reset().
Referenced by CDeflineGenerator::x_SetTitleFromProtein().
|
private |
Definition at line 1920 of file create_defline.cpp.
References CSeqFeatData_Base::e_Prot, eOverlap_Contained, CProt_ref_Base::eProcessed_not_set, FOR_EACH_SEQFEAT_ON_BIOSEQ_HANDLE, GetBestOverlappingFeat(), CSeq_feat_Base::GetData(), CBioseq_Handle::GetInst_Length(), GetLength(), CSeq_feat_Base::GetLocation(), CProt_ref_Base::GetProcessed(), CSeqFeatData_Base::GetProt(), CBioseq_Handle::GetScope(), CBioseq_Handle::GetSeqId(), CSeq_feat_Base::IsSetData(), CBioseq_Handle::IsSetInst(), CBioseq_Handle::IsSetInst_Length(), CSeq_feat_Base::IsSetLocation(), CProt_ref_Base::IsSetProcessed(), prot, and CSeq_loc::SetWhole().
Referenced by CDeflineGenerator::x_SetTitleFromProtein().
|
private |
Definition at line 3074 of file sequence.cpp.
Referenced by CFastaOstream::Write(), and CFastaOstream::WriteSequence().
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().
|
inlineprivate |
Definition at line 2978 of file sequence.cpp.
|
private |
internal methods
Definition at line 148 of file create_defline.cpp.
Referenced by CDeflineGenerator::CDeflineGenerator().
|
inlineprivate |
Definition at line 1270 of file sequence.hpp.
References CSeqSearch::fAllowMismatch, flags, and CSeqSearch::m_Flags.
Referenced by CSeqSearch::x_AddPattern().
|
private |
Definition at line 3401 of file create_defline.cpp.
References CDeflineGenerator::m_MICompleteness, and NCBI_COMPLETENESS.
Referenced by CDeflineGenerator::x_AdjustProteinTitleSuffix(), CDeflineGenerator::x_AdjustProteinTitleSuffixIdx(), CDeflineGenerator::x_SetTitleFromGPipe(), CDeflineGenerator::x_SetTitleFromNC(), CDeflineGenerator::x_SetTitleFromProtein(), and CDeflineGenerator::x_SetTitleFromProteinIdx().
|
inlineprivate |
Definition at line 1267 of file sequence.hpp.
References CSeqSearch::fExpandPattern, flags, and CSeqSearch::m_Flags.
Referenced by CSeqSearch::x_AddNucleotidePattern().
|
inlineprivate |
Definition at line 1264 of file sequence.hpp.
References CSeqSearch::fJustTopStrand, flags, and CSeqSearch::m_Flags.
Referenced by CSeqSearch::AddNucleotidePattern().
|
private |
Definition at line 3043 of file sequence.cpp.
|
protectedvirtual |
This moves this iterator to the next relevant gap.
Throws if this iterator has finished.
Definition at line 92 of file bioseqgaps_ci.cpp.
References _ASSERT, CBioseqGaps_CI::eFindNext_Found, CBioseq_Handle::GetAccessSeq_id_Handle(), kInvalidSeqPos, CBioseqGaps_CI::SCurrentGapInfo::length, CBioseqGaps_CI::m_bioseq_CI, CBioseqGaps_CI::m_infoOnCurrentGap, CBioseqGaps_CI::m_Params, CBioseqGaps_CI::Params::max_gap_len_to_ignore, CBioseqGaps_CI::Params::max_num_gaps_per_seq, NCBI_USER_THROW, CBioseqGaps_CI::SCurrentGapInfo::num_gaps_seen_so_far_on_this_seq, CBioseqGaps_CI::SCurrentGapInfo::num_seqs_seen_so_far, CBioseqGaps_CI::SCurrentGapInfo::seq_id, CBioseqGaps_CI::SCurrentGapInfo::start_pos, CBioseqGaps_CI::x_FindNextGapOnBioseq(), and CBioseqGaps_CI::x_NextBioseq().
Referenced by CBioseqGaps_CI::operator++().
|
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().
|
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.
vecTrimRules | Input 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().
|
private |
Definition at line 323 of file create_defline.cpp.
References CTempString::empty(), kEmptyCStr, CDeflineGenerator::m_FastaFormat, CDeflineGenerator::m_IsWGS, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_Taxname, NCBI_GENOME, result, and s_IsVirusOrPhage().
Referenced by CDeflineGenerator::x_SetBioSrc().
|
inlineprotected |
This returns the (inclusive) position at the beginning of the segment.
segment | This is the segment we're trying to find the beginning of. |
iTrimDirection | This is which direction in which we're trimming. The beginning will be in the opposite direction. |
Definition at line 1521 of file sequence.hpp.
References CSequenceAmbigTrimmer::x_SegmentGetEndInclusive().
Referenced by CSequenceAmbigTrimmer::x_CountAmbigInRange().
|
protected |
This returns the (inclusive) position at the end of the segment currently at iStartPosInclusive_arg.
segment | This is the segment we're trying to find the end of. |
iTrimDirection | This is which direction in which we're trimming. The end of the segment will be found by looking in that direction. |
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().
|
protected |
Returns the "next" segment.
The definition of "next" depends on iTrimDirection
in_out_segment | Caller gives the current CSeqMap_CI, which will be returned adjusted in the trim direction. |
iTrimDirection | The direction in which to increment. 1 means normal incrementing and -1 really means decrementing. |
Definition at line 692 of file seq_trimmer.cpp.
References _ASSERT, and s_IsValidDirection().
Referenced by CSequenceAmbigTrimmer::x_CountAmbigInRange().
|
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().
|
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().
|
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().
|
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().
|
private |
Definition at line 2800 of file create_defline.cpp.
References CSeqEntryIndex::GetBioseqIndex(), CBioseqIndex::GetFeatureForProduct(), CFeatureIndex::GetMappedFeat(), CMappedFeat::GetOriginalFeature(), kEmptyCStr, CDeflineGenerator::m_Idx, CDeflineGenerator::m_IsAA, CDeflineGenerator::m_IsPseudogene, CDeflineGenerator::m_IsTLS, CDeflineGenerator::m_IsTSA, CDeflineGenerator::m_IsUnreviewed, CDeflineGenerator::m_IsUnverified, CDeflineGenerator::m_IsWP, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_Multispecies, CDeflineGenerator::m_ThirdParty, CDeflineGenerator::m_TPAExp, CDeflineGenerator::m_TPAInf, CDeflineGenerator::m_TPAReasm, CDeflineGenerator::m_UnreviewedPrefix, CDeflineGenerator::m_UnverifiedPrefix, NPOS, prefix, and CDeflineGenerator::x_CDShasLowQualityException().
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 2854 of file create_defline.cpp.
References CTempString::empty(), NStr::EqualNocase(), CSeqMap::fFindGap, NStr::IntToString(), CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_Genome, CDeflineGenerator::m_HTGSCancelled, CDeflineGenerator::m_HTGSDraft, CDeflineGenerator::m_IsChromosome, CDeflineGenerator::m_IsDelta, CDeflineGenerator::m_IsPlasmid, CDeflineGenerator::m_LinkageGroup, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_MIBiomol, CDeflineGenerator::m_MICompleteness, CDeflineGenerator::m_MITech, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_TargetedLocus, CDeflineGenerator::m_TLSMaster, CDeflineGenerator::m_TSAMaster, CDeflineGenerator::m_Unordered, CDeflineGenerator::m_WGSMaster, NCBI_BIOMOL, NCBI_COMPLETENESS, NCBI_GENOME, NCBI_TECH, NPOS, suffix, and type.
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 1545 of file create_defline.cpp.
References CDefLineJoiner::Add(), eHideType, CTempString::empty(), CTempString::find(), ITERATE, CDefLineJoiner::Join(), CDeflineGenerator::m_Breed, CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_Cultivar, CDeflineGenerator::m_has_clone, CDeflineGenerator::m_Isolate, CDeflineGenerator::m_LinkageGroup, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_Map, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_SpecimenVoucher, CDeflineGenerator::m_Strain, CDeflineGenerator::m_Substrain, CDeflineGenerator::m_Taxname, s_AddVoucherAndIsolate(), s_EndsWithStrain(), CTempString::substr(), NStr::TruncateSpacesInPlace(), and CDeflineGenerator::x_DescribeClones().
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 1865 of file create_defline.cpp.
References CDefLineJoiner::Add(), eHideType, CTempString::empty(), CTempString::find(), NStr::FindNoCase(), ITERATE, CDefLineJoiner::Join(), CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_has_clone, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_Map, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_Strain, CDeflineGenerator::m_Substrain, CDeflineGenerator::m_Taxname, NPOS, s_EndsWithStrain(), NStr::TruncateSpacesInPlace(), CDeflineGenerator::x_DescribeClones(), and CDeflineGenerator::x_IsComplete().
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 2760 of file create_defline.cpp.
References CDefLineJoiner::Add(), eHideType, CTempString::empty(), CTempString::find(), CDefLineJoiner::Join(), CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_IsChromosome, CDeflineGenerator::m_Isolate, CDeflineGenerator::m_IsPlasmid, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_rEnzyme, CDeflineGenerator::m_Strain, CDeflineGenerator::m_Substrain, CDeflineGenerator::m_Taxname, s_EndsWithStrain(), CTempString::substr(), and NStr::TruncateSpacesInPlace().
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 1603 of file create_defline.cpp.
References CDefLineJoiner::Add(), eHideType, CTempString::empty(), CTempString::find(), NStr::FindNoCase(), CDefLineJoiner::Join(), CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_Genome, CDeflineGenerator::m_IsChromosome, CDeflineGenerator::m_IsPlasmid, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_MIBiomol, CDeflineGenerator::m_Organelle, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_Segment, CDeflineGenerator::m_Taxname, NCBI_BIOMOL, NCBI_GENOME, NPOS, NStr::ReplaceInPlace(), and CDeflineGenerator::x_IsComplete().
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 1706 of file create_defline.cpp.
References CTextJoiner< num_prealloc, TIn, TOut >::Add(), CSeqFeatData_Base::e_Cdregion, CSeqFeatData_Base::e_Gene, CSeqFeatData_Base::e_Prot, CTempString::empty(), NStr::EqualNocase(), fFGL_Content, FOR_SELECTED_SEQFEAT_ON_BIOSEQ_HANDLE, GetLabel(), CBioseq_Handle::GetScope(), SAnnotSelector::IncludeFeatType(), CTextJoiner< num_prealloc, TIn, TOut >::Join(), CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_Taxname, NStr::ReplaceInPlace(), CConstRef< C, Locker >::Reset(), SAnnotSelector::SetFeatType(), SAnnotSelector::SetResolveTSE(), SWITCH_ON_FEATURE_CHOICE, and x_FlyCG_PtoR().
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 1762 of file create_defline.cpp.
References CTempString::empty(), fFGL_Content, FOR_EACH_SEQFEAT_ON_BIOSEQ_HANDLE, GetLabel(), CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_MIBiomol, CDeflineGenerator::m_Taxname, NCBI_BIOMOL, and string.
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 1819 of file create_defline.cpp.
References CTextJoiner< num_prealloc, TIn, TOut >::Add(), NStr::IntToString(), CTextJoiner< num_prealloc, TIn, TOut >::Join(), CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_PatentCountry, CDeflineGenerator::m_PatentNumber, and CDeflineGenerator::m_PatentSequence.
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 1829 of file create_defline.cpp.
References CTextJoiner< num_prealloc, TIn, TOut >::Add(), CTempString::find_first_not_of(), isprint(), CTextJoiner< num_prealloc, TIn, TOut >::Join(), CTempString::length(), CDeflineGenerator::m_Comment, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_PDBChain, CDeflineGenerator::m_PDBChainID, CDeflineGenerator::m_PDBCompound, CDeflineGenerator::m_UsePDBCompoundForDefline, and CTempString::substr().
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 2387 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, CSeq_feat_Base::GetData(), CGene_ref_Base::GetDesc(), CProt_ref_Base::GetDesc(), CGene_ref_Base::GetLocus(), CGene_ref_Base::GetLocus_tag(), GetMappedCDSForProduct(), 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_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(), CDeflineGenerator::x_GetGeneRefViaCDS(), CDeflineGenerator::x_GetLongestProtein(), x_GetSourceFeatViaCDS(), and CDeflineGenerator::x_IsComplete().
Referenced by CDeflineGenerator::GenerateDefline().
|
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().
|
private |
Definition at line 2647 of file create_defline.cpp.
References CDefLineJoiner::Add(), eHideType, CTempString::empty(), ITERATE, CDefLineJoiner::Join(), CDeflineGenerator::m_Clone, CDeflineGenerator::m_Isolate, CDeflineGenerator::m_LocalAnnotsOnly, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_Strain, CDeflineGenerator::m_Taxname, s_EndsWithStrain(), string, NStr::TruncateSpacesInPlace(), CDeflineGenerator::x_DescribeClones(), and x_GetSegSeqInfoViaCDS().
Referenced by CDeflineGenerator::GenerateDefline().
|
private |
Definition at line 2695 of file create_defline.cpp.
References CDefLineJoiner::Add(), eHideType, CTempString::empty(), CTempString::find(), ITERATE, CDefLineJoiner::Join(), CDeflineGenerator::m_Breed, CDeflineGenerator::m_Chromosome, CDeflineGenerator::m_Clone, CDeflineGenerator::m_Cultivar, CDeflineGenerator::m_GeneralId, CDeflineGenerator::m_GeneralStr, CDeflineGenerator::m_Genome, CDeflineGenerator::m_Isolate, CDeflineGenerator::m_IsWGS, CDeflineGenerator::m_LinkageGroup, CDeflineGenerator::m_MainTitle, CDeflineGenerator::m_Map, CDeflineGenerator::m_Plasmid, CDeflineGenerator::m_SpecimenVoucher, CDeflineGenerator::m_Strain, CDeflineGenerator::m_Substrain, CDeflineGenerator::m_Taxname, CDeflineGenerator::m_Topology, NCBI_GENOME, NCBI_SEQTOPOLOGY, NStr::NumericToString(), s_AddVoucherAndIsolate(), s_EndsWithStrain(), CTempString::substr(), tmp, NStr::TruncateSpacesInPlace(), and CDeflineGenerator::x_DescribeClones().
Referenced by CDeflineGenerator::GenerateDefline().
|
protected |
Definition at line 701 of file seq_trimmer.cpp.
References CInt_fuzz_Base::eLim_unk, CSeq_inst_Base::eRepr_raw, CSeq_inst_Base::eRepr_virtual, CSeqMap::eSeqData, CSeqMap::eSeqGap, eType, CSeqVector::GetCoding(), CBioseq_Handle::GetEditHandle(), CSeqMap_CI::GetEndPosition(), CBioseq_Handle::GetInst(), CSeqMap_CI::GetLength(), CSeqVector::GetPackedSeqData(), CSeqMap_CI::GetPosition(), CSeqMap_CI::GetRefGapLiteral(), CBioseq_Handle::GetScope(), CBioseq_Handle::GetSeqMap(), CSeqMap_CI::GetType(), CSeqMap_CI::IsUnknownLength(), NCBI_USER_THROW_FMT, Ref(), CSeq_inst_Base::ResetExt(), CSeq_inst_Base::ResetSeq_data(), CSeqMap::ResolvedRangeIterator(), CAutoInitRef< T >::Set(), CSeq_inst_Base::SetExt(), CBioseq_EditHandle::SetInst(), CSeq_inst_Base::SetLength(), CSeq_inst_Base::SetRepr(), and CSeq_inst_Base::SetSeq_data().
Referenced by CSequenceAmbigTrimmer::DoTrim().
|
private |
Definition at line 5135 of file sequence.cpp.
References CSeqSearch::m_Fsa, and CSeqSearch::CPatternInfo::m_Sequence.
Referenced by CSeqSearch::x_AddPattern().
Test if a given flag is set.
Definition at line 1392 of file sequence.hpp.
References CSequenceAmbigTrimmer::m_fFlags.
Referenced by CSequenceAmbigTrimmer::DoTrim().
|
protectedvirtual |
The bioseq is trimmed to size 0.
bioseq_handle | The bioseq to trim to nothing. |
Definition at line 340 of file seq_trimmer.cpp.
References CSeq_inst_Base::eRepr_virtual, CSequenceAmbigTrimmer::eResult_NoTrimNeeded, CSequenceAmbigTrimmer::eResult_SuccessfullyTrimmed, CBioseq_Handle::GetBioseqLength(), CBioseq_Handle::GetEditHandle(), CBioseq_Handle::GetInst(), CSeq_inst_Base::ResetExt(), CSeq_inst_Base::ResetSeq_data(), SerialClone(), CBioseq_EditHandle::SetInst(), CSeq_inst_Base::SetLength(), and CSeq_inst_Base::SetRepr().
Referenced by CSequenceAmbigTrimmer::DoTrim().
Definition at line 2875 of file sequence.cpp.
References CFastaOstream::fEnableGI, CFastaOstream::fShowGnlAndAcc, CTextseq_id_Base::GetAccession(), CSeq_id::GetTextseq_Id(), CTextseq_id_Base::GetVersion(), CSeq_id_Base::IsGi(), CTextseq_id_Base::IsSetAccession(), CTextseq_id_Base::IsSetVersion(), CFastaOstream::m_Flags, CFastaOstream::m_Out, CConstRef< C, Locker >::NotEmpty(), s_WriteGnlAndAcc(), CSeq_id::WriteAsFasta(), and CFastaOstream::x_GetBestId().
|
inlineprotectedvirtual |
Reimplemented in CFastaOstreamEx.
Definition at line 904 of file sequence.hpp.
References buf.
Referenced by CFastaOstreamEx::x_WriteBuffer(), and CFastaOstream::x_WriteSequence().
|
protectedvirtual |
Definition at line 2927 of file sequence.cpp.
References CFastaOstream::fNoDupCheck, CFastaOstream::fSuppressRange, CSeq_id_Handle::GetHandle(), CBioseq_Base::GetId(), set< Key, Compare >::insert(), ITERATE, location, CFastaOstream::m_Flags, CFastaOstream::m_PreviousWholeIds, NCBI_THROW, and NULL.
Referenced by CFastaOstream::Write().
|
protectedvirtual |
Definition at line 3000 of file sequence.cpp.
Referenced by CFastaOstream::Write().
|
private |
Definition at line 3164 of file sequence.cpp.
References _ASSERT, CTempString::assign(), map_checker< Container >::begin(), CTempString::data(), CFastaOstream::eGM_count, CFastaOstream::eGM_dashes, CFastaOstream::eGM_letters, CFastaOstream::eGM_one_dash, CFastaOstream::eHardMask, map_checker< Container >::end(), CSeqMap::eSeqGap, CFastaOstream::eSoftMask, FIELD_IS_SET_AND_IS, CFastaOstream::fInstantiateGaps, CFastaOstream::fKeepUnknGapNomLen, CFastaOstream::fReverseStrand, CFastaOstream::fShowGapModifiers, CFastaOstream::fShowGapsOfSizeZero, AutoPtr< X, Del >::get(), CSeqVector_CI::GetBufferPtr(), CSeqVector_CI::GetBufferSize(), CSeqVector_CI::GetCurrentSeqMap_CI(),