vector<string>
buffer(nrows);
108 intseg, pos, left_seg = -1, right_seg = -1;
113 for(seg = nsegs - 1, pos = seg * nrows +
row;
114seg >= 0; --seg, pos -= nrows) {
115 if(starts[pos] >= 0) {
121 for(seg = 0, pos =
row; seg < nsegs; ++seg, pos += nrows) {
123 if((start = starts[pos]) >= 0) {
134 char* ch_buff =
new char[
len+1];
136 if(left_seg < 0 || seg > right_seg && right_seg > 0) {
141memset(ch_buff, fill_ch,
len);
163 if(pos + scrn_width > aln_len) {
164scrn_width = aln_len - pos;
166}
while(pos < aln_len);
176rng.
Set(aln_pos, aln_pos + scrn_width - 1);
179aln_seq_str.reserve(scrn_width + 1);
193aln_pos += scrn_width;
201vector<string>
buffer(nrows);
202vector<CAlnMap::TSeqPosList> insert_aln_starts(nrows);
203vector<CAlnMap::TSeqPosList> insert_starts(nrows);
204vector<CAlnMap::TSeqPosList> insert_lens(nrows);
205vector<CAlnMap::TSeqPosList> scrn_lefts(nrows);
206vector<CAlnMap::TSeqPosList> scrn_rights(nrows);
213&insert_aln_starts[
row],
214&insert_starts[
row],
218&scrn_rights[
row]);
230<< scrn_rights[
row].front()
232scrn_lefts[
row].pop_front();
233scrn_rights[
row].pop_front();
237 if(pos + scrn_width > aln_len) {
238scrn_width = aln_len - pos;
240}
while(pos < aln_len);
254*
m_Out<<
"CLUSTAL W (1.83) multiple sequence alignment"<< endl << endl;
272 intseg, pos, left_seg = -1, right_seg = -1;
279 if(starts[pos] >= 0) {
285 for(seg = 0, pos =
row; seg < nsegs; ++seg, pos +=
m_NumRows) {
287 if((start = starts[pos]) >= 0) {
298 char* ch_buff =
new char[
len+1];
300 if(left_seg < 0 || seg > right_seg && right_seg > 0) {
305memset(ch_buff, fill_ch,
len);
314 for(
TSeqPospos = 0; pos < aln_len; pos++) {
315 boolidentity =
true;
316 charresidue =
buffer[0][pos];
339aln_pos += scrn_width;
340 if(aln_pos + scrn_width > aln_len) {
341scrn_width = aln_len - aln_pos;
343}
while(aln_pos < aln_len);
352 stringidentities_str;
353identities_str.reserve(scrn_width + 1);
357rng.
Set(aln_pos,
min(aln_pos + scrn_width - 1, aln_stop));
360aln_seq_str.reserve(scrn_width + 1);
369identities_str = aln_seq_str;
371 for(
size_t i= 0;
i< aln_seq_str.length();
i++) {
372 if(aln_seq_str[
i] != identities_str[
i]) {
373identities_str[
i] =
' ';
378 for(
size_t i= 0;
i< identities_str.length();
i++) {
379 if(identities_str[
i] !=
' ') {
380identities_str[
i] =
'*';
385*
m_Out<< identities_str
387aln_pos += scrn_width;
407 for(pos = 0; pos < aln_len; pos++) {
408 boolidentity =
true;
409 charresidue =
buffer[0][pos];
434 if(pos + scrn_width > aln_len) {
435scrn_width = aln_len - pos;
437}
while(pos < aln_len);
void PrintId(CAlnMap::TNumrow row) const
Field printers.
const CAlnMap::TNumrow m_NumRows
void PrintNumRow(CAlnMap::TNumrow row) const
void PrintSeqPos(TSeqPos pos) const
int GetWidth(TNumrow row) const
TSignedSeqPos GetSeqPosFromAlnPos(TNumrow for_row, TSeqPos aln_pos, ESearchDirection dir=eNone, bool try_reverse_dir=true) const
TSeqPos GetAlnStop(TNumseg seg) const
CDense_seg::TNumseg TNumseg
const CDense_seg & GetDenseg(void) const
TNumseg GetNumSegs(void) const
void PopsetStyle(int scrn_width=70, EAlgorithm algorithm=eUseAlnSeqString)
Printing methods.
EAlgorithm
which algorithm to choose
@ eUseWholeAlnSeqString
memory efficient, recommended for large alns
@ eUseAlnSeqString
memory ineficient
CAlnVecPrinter(const CAlnVec &aln_vec, CNcbiOstream &out)
Constructor.
void ClustalStyle(int scrn_width=50, EAlgorithm algorithm=eUseAlnSeqString)
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
void SetGapChar(TResidue gap_char)
bool IsSetGapChar() const
string & GetWholeAlnSeqString(TNumrow row, string &buffer, TSeqPosList *insert_aln_starts=0, TSeqPosList *insert_starts=0, TSeqPosList *insert_lens=0, unsigned int scrn_width=0, TSeqPosList *scrn_lefts=0, TSeqPosList *scrn_rights=0) const
string & GetAlnSeqString(string &buffer, TNumrow row, const CAlnMap::TSignedRange &aln_rng) const
@ eLeft
Towards lower aln coord (always to the left)
std::ofstream out("events_result.xml")
main entry point for tests
unsigned int TSeqPos
Type for sequence locations and lengths.
int TSignedSeqPos
Type for signed sequence position.
TThisType & Set(position_type from, position_type to)
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
const TStarts & GetStarts(void) const
Get the Starts member data.
const TLens & GetLens(void) const
Get the Lens member data.
vector< TSignedSeqPos > TStarts
constexpr auto front(list< Head, As... >, T=T()) noexcept -> Head
Magic spell ;-) needed for some weird compilers... very empiric.
#define row(bind, expected)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4