NCBI C++ ToolKit
Functions
cuSequence.cpp File Reference
#include <ncbi_pch.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/seq/Seq_annot.hpp>
#include <objects/seq/Seq_data.hpp>
#include <objects/seq/Seq_descr.hpp>
#include <objects/seq/Seq_inst.hpp>
#include <objects/seq/Seqdesc.hpp>
#include <objects/seq/NCBIeaa.hpp>
#include <objects/seq/IUPACaa.hpp>
#include <objects/seq/NCBIstdaa.hpp>
#include <objects/seqfeat/BioSource.hpp>
#include <objects/seqfeat/Org_ref.hpp>
#include <objects/seqloc/PDB_seq_id.hpp>
#include <objects/seqblock/PDB_block.hpp>
#include <objects/seqloc/Giimport_id.hpp>
#include <objects/seqloc/Patent_seq_id.hpp>
#include <objects/seqset/Bioseq_set.hpp>
#include <objects/id1/id1_client.hpp>
#include <util/sequtil/sequtil_convert.hpp>
#include <algo/structure/cd_utils/cuSequence.hpp>
#include <algo/structure/cd_utils/cuDbPriority.hpp>
+ Include dependency graph for cuSequence.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

bool SeqIdsMatch (const CRef< CSeq_id > &ID1, const CRef< CSeq_id > &ID2)
 
bool SeqIdHasMatchInBioseq (const CRef< CSeq_id > &id, const CBioseq &bioseq)
 
int GetCDDPssmIdFromSeqId (const CRef< CSeq_id > &id)
 
int GetMMDBId (const CBioseq &bioseq)
 
TTaxId GetTaxIdInBioseq (const CBioseq &bioseq)
 
bool IsEnvironmentalSeq (const CBioseq &bioseq)
 
string GetSpeciesFromBioseq (const CBioseq &bioseq)
 
int GetSeqLength (const CBioseq &bioseq)
 
bool GetSeqLength (const CRef< CSeq_entry > &Seq, int &len)
 
void NcbistdaaToNcbieaaString (const std::vector< char > &vec, std::string *str)
 
bool NcbieaaToNcbistdaaString (const std::string &str, vector< char > &vec)
 
bool GetNcbieaaString (const CRef< CSeq_entry > &Seq, string &Str)
 
bool GetNcbieaaString (const CBioseq &bioseq, string &Str)
 
bool GetNcbistdSeq (const CBioseq &bioseq, vector< char > &seqData)
 
string GetRawSequenceString (const CBioseq &bioseq)
 
char GetResidueAtPosition (const CRef< CSeq_entry > &seqEntry, int pos, bool zeroBased)
 
char GetResidueAtPosition (const CBioseq &bioseq, int pos, bool zeroBased)
 
bool IsConsensus (const CRef< CSeq_id > &seqId)
 
bool GetAccAndVersion (const CRef< CBioseq > bioseq, string &acc, int &version, CRef< CSeq_id > &seqId)
 
bool GetPDBBlockFromSeqEntry (CRef< CSeq_entry > seqEntry, CRef< CPDB_block > &pdbBlock)
 
bool CopyGiSeqId (const CRef< CBioseq > &bioseq, CRef< CSeq_id > &giSeqId, unsigned int nth)
 
bool ExtractGi (const CRef< CBioseq > &bioseq, TGi &gi, unsigned int nth)
 
bool CopyPdbSeqId (const CRef< CBioseq > &bioseq, CRef< CSeq_id > &pdbSeqId, unsigned int nth)
 
bool ExtractPdbMolChain (const CRef< CBioseq > &bioseq, string &pdbMol, string &pdbChain, unsigned int nth)
 
bool HasSeqIdOfType (const CBioseq &bioseq, CSeq_id::E_Choice choice)
 
bool HasSeqIdOfType (const CRef< CSeq_entry > &seqEntry, CSeq_id::E_Choice choice)
 
unsigned int CopySeqIdsOfType (const CBioseq &bioseq, CSeq_id::E_Choice choice, list< CRef< CSeq_id > > &idsOfType)
 
unsigned int CopySeqIdsOfType (const CRef< CSeq_entry > &seqEntry, CSeq_id::E_Choice choice, list< CRef< CSeq_id > > &idsOfType)
 
bool CopyBioseqWithType (const CRef< CSeq_entry > &seqEntry, CSeq_id::E_Choice choice, CRef< CBioseq > &seqEntryBioseq)
 
bool GetBioseqWithType (CRef< CSeq_entry > &seqEntry, CSeq_id::E_Choice choice, CRef< CBioseq > &seqEntryBioseq)
 
bool AddCommentToBioseq (CBioseq &bioseq, const string &comment)
 
void SimplifyBioseqForCD (CBioseq &bioseq, const vector< string > &keptComments, bool keepPDBBlock)
 
void SimplifySeqEntryForCD (CRef< CSeq_entry > &seqEntry, const vector< string > &keptComments, bool keepPDBBlock)
 
string GetDbSourceForSeqId (const CRef< CSeq_id > &seqID)
 
string GetAccessionForSeqId (const CRef< CSeq_id > &seqID)
 
void GetAccessionAndDatabaseSource (const CRef< CSeq_id > &seqID, string &accession, string &dbSource, bool getGenericSource)
 
bool extractBioseqInfo (const CRef< CBioseq > bioseq, BioseqInfo &info)
 

Function Documentation

◆ AddCommentToBioseq()

bool AddCommentToBioseq ( CBioseq bioseq,
const string comment 
)

◆ CopyBioseqWithType()

bool CopyBioseqWithType ( const CRef< CSeq_entry > &  seqEntry,
CSeq_id::E_Choice  choice,
CRef< CBioseq > &  seqEntryBioseq 
)

◆ CopyGiSeqId()

bool CopyGiSeqId ( const CRef< CBioseq > &  bioseq,
CRef< CSeq_id > &  giSeqId,
unsigned int  nth 
)

Definition at line 487 of file cuSequence.cpp.

References CSeq_id::Assign(), CBioseq_Base::GetId(), and result.

Referenced by ExtractGi().

◆ CopyPdbSeqId()

bool CopyPdbSeqId ( const CRef< CBioseq > &  bioseq,
CRef< CSeq_id > &  pdbSeqId,
unsigned int  nth 
)

Definition at line 522 of file cuSequence.cpp.

References CSeq_id::Assign(), CBioseq_Base::GetId(), and result.

Referenced by ExtractPdbMolChain().

◆ CopySeqIdsOfType() [1/2]

unsigned int CopySeqIdsOfType ( const CBioseq bioseq,
CSeq_id::E_Choice  choice,
list< CRef< CSeq_id > > &  idsOfType 
)

Definition at line 595 of file cuSequence.cpp.

References CBioseq_Base::GetId().

Referenced by CopyBioseqWithType(), CopySeqIdsOfType(), and GetBioseqWithType().

◆ CopySeqIdsOfType() [2/2]

unsigned int CopySeqIdsOfType ( const CRef< CSeq_entry > &  seqEntry,
CSeq_id::E_Choice  choice,
list< CRef< CSeq_id > > &  idsOfType 
)

◆ extractBioseqInfo()

bool extractBioseqInfo ( const CRef< CBioseq bioseq,
BioseqInfo info 
)

◆ ExtractGi()

bool ExtractGi ( const CRef< CBioseq > &  bioseq,
TGi gi,
unsigned int  nth 
)

Definition at line 508 of file cuSequence.cpp.

References CopyGiSeqId(), CSeq_id_Base::GetGi(), result, and ZERO_GI.

◆ ExtractPdbMolChain()

bool ExtractPdbMolChain ( const CRef< CBioseq > &  bioseq,
string pdbMol,
string pdbChain,
unsigned int  nth 
)

◆ GetAccAndVersion()

bool GetAccAndVersion ( const CRef< CBioseq bioseq,
string acc,
int version,
CRef< CSeq_id > &  seqId 
)

◆ GetAccessionAndDatabaseSource()

void GetAccessionAndDatabaseSource ( const CRef< CSeq_id > &  seqID,
string accession,
string dbSource,
bool  getGenericSource 
)

◆ GetAccessionForSeqId()

string GetAccessionForSeqId ( const CRef< CSeq_id > &  seqID)

Definition at line 803 of file cuSequence.cpp.

References GetAccessionAndDatabaseSource().

◆ GetBioseqWithType()

bool GetBioseqWithType ( CRef< CSeq_entry > &  seqEntry,
CSeq_id::E_Choice  choice,
CRef< CBioseq > &  seqEntryBioseq 
)

◆ GetCDDPssmIdFromSeqId()

int GetCDDPssmIdFromSeqId ( const CRef< CSeq_id > &  id)

◆ GetDbSourceForSeqId()

string GetDbSourceForSeqId ( const CRef< CSeq_id > &  seqID)

Definition at line 796 of file cuSequence.cpp.

References GetAccessionAndDatabaseSource().

◆ GetMMDBId()

int GetMMDBId ( const CBioseq bioseq)

◆ GetNcbieaaString() [1/2]

bool GetNcbieaaString ( const CBioseq bioseq,
string Str 
)

◆ GetNcbieaaString() [2/2]

bool GetNcbieaaString ( const CRef< CSeq_entry > &  Seq,
string Str 
)

◆ GetNcbistdSeq()

bool GetNcbistdSeq ( const CBioseq bioseq,
vector< char > &  seqData 
)

◆ GetPDBBlockFromSeqEntry()

bool GetPDBBlockFromSeqEntry ( CRef< CSeq_entry seqEntry,
CRef< CPDB_block > &  pdbBlock 
)

◆ GetRawSequenceString()

string GetRawSequenceString ( const CBioseq bioseq)

◆ GetResidueAtPosition() [1/2]

char GetResidueAtPosition ( const CBioseq bioseq,
int  pos,
bool  zeroBased 
)

Definition at line 389 of file cuSequence.cpp.

References GetNcbieaaString(), and str().

◆ GetResidueAtPosition() [2/2]

char GetResidueAtPosition ( const CRef< CSeq_entry > &  seqEntry,
int  pos,
bool  zeroBased 
)

◆ GetSeqLength() [1/2]

int GetSeqLength ( const CBioseq bioseq)

◆ GetSeqLength() [2/2]

bool GetSeqLength ( const CRef< CSeq_entry > &  Seq,
int len 
)

◆ GetSpeciesFromBioseq()

string GetSpeciesFromBioseq ( const CBioseq bioseq)

◆ GetTaxIdInBioseq()

TTaxId GetTaxIdInBioseq ( const CBioseq bioseq)

◆ HasSeqIdOfType() [1/2]

bool HasSeqIdOfType ( const CBioseq bioseq,
CSeq_id::E_Choice  choice 
)

Definition at line 559 of file cuSequence.cpp.

References CBioseq_Base::GetId(), and result.

Referenced by HasSeqIdOfType().

◆ HasSeqIdOfType() [2/2]

bool HasSeqIdOfType ( const CRef< CSeq_entry > &  seqEntry,
CSeq_id::E_Choice  choice 
)

◆ IsConsensus()

bool IsConsensus ( const CRef< CSeq_id > &  seqId)

◆ IsEnvironmentalSeq()

bool IsEnvironmentalSeq ( const CBioseq bioseq)

Definition at line 184 of file cuSequence.cpp.

References ENVIRONMENTAL_SEQUENCE_TAX_ID, and GetTaxIdInBioseq().

◆ NcbieaaToNcbistdaaString()

bool NcbieaaToNcbistdaaString ( const std::string str,
vector< char > &  vec 
)

◆ NcbistdaaToNcbieaaString()

void NcbistdaaToNcbieaaString ( const std::vector< char > &  vec,
std::string str 
)

Definition at line 258 of file cuSequence.cpp.

References CSeqConvert::Convert(), CSeqUtil::e_Ncbieaa, CSeqUtil::e_Ncbistdaa, and str().

Referenced by GetNcbieaaString().

◆ SeqIdHasMatchInBioseq()

bool SeqIdHasMatchInBioseq ( const CRef< CSeq_id > &  id,
const CBioseq bioseq 
)

Definition at line 80 of file cuSequence.cpp.

References Empty(), CBioseq_Base::GetId(), result, and SeqIdsMatch().

Referenced by CCdCore::GetSeqIndex().

◆ SeqIdsMatch()

bool SeqIdsMatch ( const CRef< CSeq_id > &  ID1,
const CRef< CSeq_id > &  ID2 
)

◆ SimplifyBioseqForCD()

void SimplifyBioseqForCD ( CBioseq bioseq,
const vector< string > &  keptComments,
bool  keepPDBBlock 
)

◆ SimplifySeqEntryForCD()

void SimplifySeqEntryForCD ( CRef< CSeq_entry > &  seqEntry,
const vector< string > &  keptComments,
bool  keepPDBBlock 
)
Modified on Fri Sep 20 14:57:40 2024 by modify_doxy.py rev. 669887