A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/denseg__graphic__ds_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/seq_graphic/denseg_graphic_ds.cpp Source File

54 static const string kCigar

=

"CIGAR"

;

61  const

objects::CSeq_align& align, objects::CScope& scope,

TNumrow

anchor)

70  _ASSERT

(align.GetSegs().IsDenseg());

71  _ASSERT

(align.CheckNumRows() == 2);

72  _ASSERT

(align.GetSegs().GetDenseg().CheckNumSegs() > 0);

74  _ASSERT

(!align.GetSegs().GetDenseg().IsSetWidths());

90  if

(bsh.IsProtein()) {

153  switch

(iter->first) {

195 const

objects::CBioseq_Handle&

220  bool

try_reverse_dir)

const 233

pre_iter = curr_iter;

253  if

(try_reverse_dir ||

270  if

(try_reverse_dir ||

288  bool

try_reverse_dir)

const 302  while

(curr_iter && ((reversed && aln_pos < curr_iter->GetRange().GetFrom()) ||

303

(!reversed && aln_pos > curr_iter->

GetRange

().

GetTo

()))) {

304

pre_iter = curr_iter;

310  if

((reversed && aln_pos > curr_iter->

GetRange

().

GetTo

()) ||

311

(!reversed && aln_pos < curr_iter->GetRange().GetFrom())) {

325  if

(try_reverse_dir ||

341  if

(try_reverse_dir ||

383  size_t

mis_str_idx = 0;

384  size_t

curr_seq_idx = 0;

385

TCigar::const_iterator c_iter = cigars.begin();

386  while

(

f

<

t

&& c_iter != cigars.end()) {

387  size_t

span = c_iter->second;

388  switch

(c_iter->first) {

392  if

(curr_p + span >

f

) {

394  size_t

left_over = span -

offset

;

405  buffer

.replace(curr_seq_idx, left_over, mismatch_str, mis_str_idx, left_over);

407

mis_str_idx += left_over;

408

curr_seq_idx += left_over;

417  if

(curr_p + span >

f

) {

419  size_t

left_over = curr_p -

f

;

420

curr_seq_idx += left_over;

428  if

(curr_p + span >

f

&& curr_seq_idx > 0) {

429  buffer

.replace(curr_seq_idx, span, span,

'-'

);

430

curr_seq_idx += span;

463

}

catch

(exception& e) {

480  size_t

curr_seq_idx = 0;

481  while

(curr_iter &&

f

<

t

) {

486  size_t

off = curr_f -

f

;

487  if

(curr_seq_idx <

buffer

.length())

488  buffer

.replace(curr_seq_idx, off, off,

'-'

);

494  if

(

t

< curr_f + span) {

499  if

(curr_seq_idx <

buffer

.length())

500  buffer

.replace(curr_seq_idx, left_over, left_over,

'-'

);

507

row_f = row_t - left_over + 1;

510

row_t = row_f + left_over - 1;

512

seq_vec.

GetSeqData

(row_f, row_t + 1, tmp_str);

516

0,

static_cast<TSeqPos>

(tmp_str.length()), tmp_seq);

517  swap

(tmp_str, tmp_seq);

519  if

(curr_seq_idx <

buffer

.length())

520  buffer

.replace(curr_seq_idx, left_over, tmp_str, 0, left_over);

523

curr_seq_idx += left_over;

537  bool

anchor_direct)

const 542  size_t f

= (size_t)seq_rng.

GetFrom

();

543  size_t t

= (size_t)seq_rng.

GetTo

();

560  size_t

mis_str_idx = 0;

561  size_t

curr_seq_idx = 0;

562

TCigar::const_iterator c_iter = cigars.begin();

563  while

(

f

<

t

&& c_iter != cigars.end()) {

564  size_t

span = c_iter->second;

565  switch

(c_iter->first) {

569  if

(curr_p + span >

f

) {

571  size_t

left_over = span -

offset

;

573  buffer

+= mismatch_str.substr(mis_str_idx, left_over);

575

mis_str_idx += left_over;

576

curr_seq_idx += left_over;

585  if

(curr_p + span >

f

) {

587  size_t

left_over = curr_p -

f

;

588  buffer

+= anchor_seq.substr(curr_seq_idx, left_over);

589

curr_seq_idx += left_over;

597  if

(curr_p + span >

f

&& curr_seq_idx > 0) {

598

curr_seq_idx += span;

602  if

(curr_p + span >

f

) {

604  size_t

left_over = span -

offset

;

606  buffer

+= mismatch_str.substr(mis_str_idx, left_over);

607

mis_str_idx += left_over;

620  if

(!anchor_direct && reversed) {

664  if

( !cigar_str.empty() ) {

670  bool

is_bam = !

isdigit

(cigar_str[0]);

673  const size_t

c_len = cigar_str.length();

675  size_t

len_start = is_bam ?

i

+ 1 :

i

;

676  size_t

len_end = len_start;

677  size_t

type_index =

i

;

678  while

(len_end < c_len && cigar_str[len_end] <

'='

) {

684

type_index = len_end;

694

cigar.emplace_back(c_op,

len

);

697  if

(!cigar.empty()) {

709  if

((*iter)->GetType().IsStr() &&

712  if

(cigar_field && cigar_field->

GetData

().

IsStr

()) {

727  if

((*iter)->GetType().IsStr() &&

730  if

(mismatch_field && mismatch_field->

GetData

().

IsStr

()) {

virtual TNumrow GetNumRows(void) const

number of rows in alignment

virtual const objects::CSeq_id & GetSeqId(TNumrow row) const

bool m_IsCigarUnambiguous

string x_GetMismatchStr() const

virtual const TCigar * GetCigar() const

Get CIGAR vector.

virtual bool IsCigarUnambiguous() const

Check if cigar doesn't have ambiguous M's.

virtual IAlnSegmentIterator * CreateSegmentIterator(TNumrow row, const TSignedRange &range, IAlnSegmentIterator::EFlags flag) const

virtual const objects::CBioseq_Handle & GetBioseqHandle(TNumrow row) const

virtual TSignedSeqPos GetAlnPosFromSeqPos(TNumrow row, TSeqPos seq_pos, IAlnExplorer::ESearchDirection dir=IAlnExplorer::eNone, bool try_reverse_dir=true) const

virtual TSignedSeqPos GetSeqPosFromSeqPos(TNumrow for_row, TNumrow row, TSeqPos seq_pos) const

virtual TNumrow GetAnchor(void) const

virtual TSeqPos GetAlnStart(void) const

CRef< objects::CScope > m_Scope

string x_GetCigarStr() const

virtual TSignedSeqPos GetSeqPosFromAlnPos(TNumrow for_row, TSeqPos aln_pos, IAlnExplorer::ESearchDirection dir=IAlnExplorer::eNone, bool try_reverse_dir=true) const

map< TNumrow, objects::CBioseq_Handle > m_BioseqHandles

IAlnExplorer::TNumrow TNumrow

virtual TSignedRange GetAlnRange(void) const

virtual TSeqPos GetAlnStop(void) const

virtual TSeqPos GetSeqLength(TNumrow row) const

CConstRef< objects::CSeq_align > m_Alignment

virtual string & GetAlnSeqString(TNumrow row, string &buffer, const TSignedRange &aln_rng) const

virtual bool IsPositiveStrand(TNumrow row) const

virtual bool IsNegativeStrand(TNumrow row) const

virtual TSignedRange GetSeqAlnRange(TNumrow row) const

virtual TSeqPos GetSeqStop(TNumrow row) const

CDensegGraphicDataSource(const objects::CSeq_align &align, objects::CScope &scope, TNumrow anchor)

CDensegGraphicDataSource.

virtual TSeqPos GetBaseWidth(TNumrow row) const

virtual string & GetSeqString(string &buffer, TNumrow row, const TSignedRange &seq_rng, const TSignedRange &aln_rng, bool anchor_direct) const

Get sequence string for a given row in sequence range.

string & x_GetAlnStringFromCigar(TNumrow row, string &buffer, const TSignedRange &aln_range) const

virtual ~CDensegGraphicDataSource()

virtual EPolyATail HasPolyATail() const

Check if there is any unaligned polyA tail.

virtual TSeqPos GetSeqStart(TNumrow row) const

virtual IAlnExplorer::EAlignType GetAlignType() const

Implementation of IAlnSegmentIterator for CDense_seg.

static SIZE_TYPE ReverseComplement(const string &src, TCoding src_coding, TSeqPos pos, TSeqPos length, string &dst)

CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const

Return a field reference representing the tokenized key, or a NULL reference if the key doesn't exist...

ESearchDirection

Position search options.

@ eRight

Towards higher aln coord (always to the right)

@ eLeft

Towards lower aln coord (always to the left)

@ eBackwards

Towards lower seq coord (to the left if plus strand, right if minus)

@ eForward

Towards higher seq coord (to the right if plus strand, left if minus)

vector< TCigarPair > TCigar

IAlnExplorer::TSignedRange TSignedRange

IAlnExplorer::TNumrow TNumrow

EPolyATail

Cetantiy of having unaligned polyA tail.

virtual string & GetSeqString(string &buffer, TNumrow row, const TSignedRange &seq_rng, const TSignedRange &aln_rng, bool anchor_direct) const

Get sequence string for a given row in sequence range.

Alignment segment iterator interface.

@ eAllSegments

Iterate all segments.

@ eSkipGaps

Skip gap segments (show only aligned ranges)

virtual const TSignedRange & GetRange(void) const =0

Get the selected row range.

@ fReversed

The selected row is reversed (relative to the anchor).

virtual TSegTypeFlags GetType(void) const =0

Get current segment type.

virtual const TSignedRange & GetAlnRange(void) const =0

Get alignment range for the segment.

static const string kMismatch

USING_SCOPE(ncbi::objects)

static const string kCigar

static const string kTracebacks

unsigned int TSeqPos

Type for sequence locations and lengths.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

int TSignedSeqPos

Type for signed sequence position.

void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

void Error(CExceptionArgs_Base &args)

CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const

Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.

@ eCoding_Iupac

Set coding to printable coding (Iupacna or Iupacaa)

void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const

Fill the buffer string with the sequence data for the interval [start, stop).

void Reset(void)

Reset reference object.

void Reset(void)

Reset reference object.

position_type GetLength(void) const

bool NotEmpty(void) const

position_type GetToOpen(void) const

static TThisType GetWhole(void)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static size_t StringToSizet(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to size_t.

TTo GetTo(void) const

Get the To member data.

TFrom GetFrom(void) const

Get the From member data.

const TStr & GetStr(void) const

Get the variant data.

const TData & GetData(void) const

Get the Data member data.

bool IsStr(void) const

Check if variant Str is selected.

list< CRef< CUser_object > > TExt

#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