1 #ifndef OBJECTS_ALNMGR___ALNVEC__HPP
2 #define OBJECTS_ALNMGR___ALNVEC__HPP
70 string& GetSeqString (
string&
buffer,
73 string& GetSeqString (
string&
buffer,
76 string& GetSegSeqString(
string&
buffer,
81 string& GetAlnSeqString(
string&
buffer,
89 string& GetColumnVector(
string&
buffer,
92 bool gaps_in_count =
false)
const;
101 unsigned int scrn_width = 0,
119 bool IsSetGapChar()
const;
125 bool IsSetEndChar()
const;
132 void SetGenCode(
int gen_code,
135 bool IsSetGenCode()
const;
136 int GetGenCode(TNumrow
row)
const;
142 const CSeq_id& consensus_id)
const;
148 vector<string>* consens =
NULL)
const;
151 int CalculateScore (TNumrow row1, TNumrow row2)
const;
152 int CalculatePercentIdentity(
TSeqPos aln_pos)
const;
155 static void TranslateNAToAA(
const string& na,
string& aa,
156 int gen_code = kDefaultGenCode);
160 static int CalculateScore (
const string& s1,
const string& s2,
161 bool s1_is_prot,
bool s2_is_prot,
162 int gen_code1 = kDefaultGenCode,
163 int gen_code2 = kDefaultGenCode);
166 static unsigned char FromIupac(
unsigned char c);
167 static unsigned char ToIupac (
unsigned char c);
169 static void TransposeSequences(vector<string>& segs);
173 void RetrieveSegmentSequences(
size_t segment, vector<string>& segs)
const;
180 void CreateConsensus(vector<string>& consens)
const;
214 eUseWholeAlnSeqString
218 void PopsetStyle (
int scrn_width = 70,
219 EAlgorithm algorithm = eUseAlnSeqString);
221 void ClustalStyle(
int scrn_width = 50,
222 EAlgorithm algorithm = eUseAlnSeqString);
264 string na_buff, aa_buff;
275 pos : seq_vec.
size() - pos - 1];
448 case 'A':
return 0x01;
449 case 'C':
return 0x02;
450 case 'M':
return 0x03;
451 case 'G':
return 0x04;
452 case 'R':
return 0x05;
453 case 'S':
return 0x06;
454 case 'V':
return 0x07;
455 case 'T':
return 0x08;
456 case 'W':
return 0x09;
457 case 'Y':
return 0x0a;
458 case 'H':
return 0x0b;
459 case 'K':
return 0x0c;
460 case 'D':
return 0x0d;
461 case 'B':
return 0x0e;
462 case 'N':
return 0x0f;
470 const char *
data =
"-ACMGRSVTWYHKDBN";
471 return ((c < 16) ?
data[c] : 0);
void CollectNucleotideFrequences(const vector< string > &rows, int col, int base_count[], int numBases)
void CollectProteinFrequences(const vector< string > &rows, int col, int base_count[], int numBases)
TSignedSeqPos GetStop(TNumrow row, TNumseg seg, int offset=0) const
list< TSeqPos > TSeqPosList
int GetWidth(TNumrow row) const
TSegTypeFlags GetSegType(TNumrow row, TNumseg seg, int offset=0) const
TSignedSeqPos GetStart(TNumrow row, TNumseg seg, int offset=0) const
bool IsPositiveStrand(TNumrow row) const
TSignedSeqPos GetSeqPosFromAlnPos(TNumrow for_row, TSeqPos aln_pos, ESearchDirection dir=eNone, bool try_reverse_dir=true) const
TNumseg GetSeg(TSeqPos aln_pos) const
TDim GetNumRows(void) const
unsigned int TSegTypeFlags
CDense_seg::TNumseg TNumseg
TSeqPos GetAlnStop(void) const
CSeqVector::TResidue TResidue
EAlgorithm
which algorithm to choose
@ eUseAlnSeqString
memory ineficient
TCoding GetNaCoding(void) const
TCoding GetAaCoding(void) const
CSeqVector & x_GetConsensusSeqVector(void) const
CSeq_data::E_Choice TCoding
bool IsSetGenCode() const
bool IsSetEndChar() const
TResidue GetGapChar(TNumrow row) const
string & GetSeqString(string &buffer, TNumrow row, TSeqPos seq_from, TSeqPos seq_to) const
void SetEndChar(TResidue gap_char)
TResidue GetEndChar() const
static void TranslateNAToAA(const string &na, string &aa, int gen_code=kDefaultGenCode)
map< TNumrow, CBioseq_Handle > TBioseqHandleCache
int GetGenCode(TNumrow row) const
void SetGapChar(TResidue gap_char)
bool IsSetGapChar() const
map< TNumrow, CRef< CSeqVector > > TSeqVectorCache
void SetNaCoding(TCoding coding)
CAlnVec & operator=(const CAlnVec &)
CSeqVector & x_GetSeqVector(TNumrow row) const
CScope & GetScope(void) const
void SetAaCoding(TCoding coding)
CSeqVector::TResidue TResidue
void SetGenCode(int gen_code, TNumrow row=-1)
static unsigned char ToIupac(unsigned char c)
TResidue GetResidue(TNumrow row, TSeqPos aln_pos) const
TBioseqHandleCache m_BioseqHandlesCache
vector< int > TResidueCount
static unsigned char FromIupac(unsigned char c)
TSeqVectorCache m_SeqVectorCache
string & GetSegSeqString(string &buffer, TNumrow row, TNumseg seg, TNumseg offset=0) const
objects::CSeqVector::TResidue TResidue
std::ofstream out("events_result.xml")
main entry point for tests
objects::CSeqVectorTypes::TResidue TResidue
unsigned int TSeqPos
Type for sequence locations and lengths.
int TSignedSeqPos
Type for signed sequence position.
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
TResidue GetGapChar(ECaseConversion case_cvt=eCaseConversion_none) const
Return gap symbol corresponding to the selected coding.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
#define NCBI_XALNMGR_EXPORT
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
static const char * GetResidue(TokenStatBlkPtr stoken)
const struct ncbi::grid::netcache::search::fields::SIZE size
#define row(bind, expected)