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/aln__converters_8cpp_source.html below:

NCBI C++ ToolKit: src/objtools/alnmgr/aln_converters.cpp Source File

57 #define NCBI_USE_ERRCODE_X Objtools_Aln_Conv 75  const

TSegs& segs = sa.

GetSegs

();

77  switch

(segs.Which()) {

80

row_1, row_2, direction, ids);

84

row_1, row_2, direction, ids);

89

row_1, row_2, direction, ids);

93

row_1, row_2, direction, ids);

98

row_1, row_2, direction, ids);

103

row_1, row_2, direction, ids);

107

row_1, row_2, direction, ids);

111  "Invalid CSeq_align::TSegs type."

);

120  if

( !ids )

return false

;

121  bool

have_nuc =

false

;

122  bool

have_prot =

false

;

124  switch

((*id)->GetBaseWidth()) {

132  if

(have_nuc && have_prot)

return true

;

162  for

(seg = 0, pos_1 = row_1, pos_2 = row_2;

164

++seg, pos_1 += dim, pos_2 += dim) {

171  bool

first_direct =

true

;

173

first_direct = !

IsReverse

((*strands)[pos_1]);

174  bool

minus_2 =

IsReverse

((*strands)[pos_2]);

175

direct = first_direct != minus_2;

186  if

(mixed || base_width_1 > 1) {

191  if

(base_width_1 > 1) {

192

from_1 *= base_width_1;

194  if

(base_width_2 > 1) {

195

from_2 *= base_width_2;

201  if

(from_1 >= 0 && from_2 >= 0) {

204

from_1, from_2,

len

, direct, first_direct));

205

last_to_1 = first_direct ? from_1 +

len

: from_1;

207  else if

(from_1 < 0 && from_2 >= 0) {

210  if

(!first_direct && ins_pos == 0) {

215  while

(seg + skip_seg < numseg) {

216  int

p = starts[pos_1 + skip_seg*dim];

218

ins_pos = p + lens[seg + skip_seg];

225

ins_pos, from_2,

len

, direct, first_direct));

227  else if

(from_1 >= 0) {

229

last_to_1 = first_direct ? from_1 +

len

: from_1;

260  for

(seg = 0, pos_1 = row_1, pos_2 = row_2;

262

++seg, pos_1 += dim, pos_2 += dim) {

263  TSeqPos

from_1 = starts[pos_1];

264  TSeqPos

from_2 = starts[pos_2];

265  bool

present_1 = presents[pos_1];

266  bool

present_2 = presents[pos_2];

271  bool

first_direct =

true

;

273

first_direct = !

IsReverse

((*strands)[pos_1]);

274  bool

minus_2 =

IsReverse

((*strands)[pos_2]);

275

direct = first_direct != minus_2;

286  if

(mixed || base_width_1 > 1) {

291  if

(base_width_1 > 1) {

292

from_1 *= base_width_1;

294  if

(base_width_2 > 1) {

295

from_2 *= base_width_2;

301  if

(present_1 && present_2) {

304

from_1, from_2,

len

, direct, first_direct));

305

last_to_1 = first_direct ? from_1 +

len

: from_1;

307  else if

(!present_1 && present_2) {

310

last_to_1, from_2,

len

, direct, first_direct));

312  else if

(present_1) {

314

last_to_1 = first_direct ? from_1 +

len

: from_1;

333  int

guessed_width_1 = 0;

334  int

guessed_width_2 = 0;

337  bool

global_first_direct =

true

;

340  if

( !loc[row_1]->GetTotalRange().

Empty

() ) {

341

global_first_direct = !loc[row_1]->IsReverseStrand();

357  bool

first_direct = !loc[row_1]->IsReverseStrand();

358  bool

direct = first_direct != loc[row_2]->IsReverseStrand();

360  if

(len_1 > 0 && len_2 > 0) {

362

last_to_1 = first_direct ? rng_1.

GetFrom

() + len_1 : rng_1.

GetFrom

();

374  bool

row_1_is_protein = prot_to_nuc_diff < nuc_to_nuc_diff;

375  bool

row_2_is_protein = nuc_to_prot_diff < nuc_to_nuc_diff;

377  if

(nuc_to_nuc_diff != 0) {

382

guessed_width_1 = row_1_is_protein ? 3 : 1;

383

guessed_width_2 = row_2_is_protein ? 3 : 1;

388  if

(!row_1_is_protein && !row_2_is_protein) {

391  if

(len_1 != len_2) {

395

pairwise_aln.

insert

(aln_rng);

401

direct, first_direct));

404

pairwise_aln.

insert

(aln_rng);

406

}

else if

(row_2_is_protein) {

409  if

(len_1 / 3 < len_2) {

413

pairwise_aln.

insert

(aln_rng);

419

direct, first_direct));

422

pairwise_aln.

insert

(aln_rng);

427  if

(len_2 / 3 < len_1) {

431

pairwise_aln.

insert

(aln_rng);

437

direct, first_direct));

440

pairwise_aln.

insert

(aln_rng);

445  else if

(len_2 > 0) {

453  if

(guessed_width_1 == 0) {

456  if

(guessed_width_2 == 0) {

459

from_1 *= guessed_width_1;

460

from_2 *= guessed_width_2;

461  len

*= guessed_width_2;

462  bool

gap_direct = global_first_direct != loc[row_2]->IsReverseStrand();

464

from_1, from_2,

len

, gap_direct, global_first_direct));

466  else if

(len_1 > 0) {

467

last_to_1 = first_direct ? rng_1.

GetFrom

() + len_1 : rng_1.

GetFrom

();

498  bool

first_direct =

true

;

502

direct = first_direct != minus_2;

513  if

(mixed || base_width_1 > 1) {

518  if

(base_width_1 > 1) {

519

from_1 *= base_width_1;

521  if

(base_width_2 > 1) {

522

from_2 *= base_width_2;

529

from_1, from_2,

len

, direct, first_direct));

553  bool

first_row =

true

;

555

TAlnRngColl curr_row;

562

starts_1[seg], starts_1[seg], lens[seg]);

564

pairwise_aln.

insert

(aln_rng);

566

curr_row.insert(aln_rng);

574  ITERATE

(TAlnRngColl, aln_rng_it, diff) {

575

pairwise_aln.

insert

(*aln_rng_it);

591  for

(seg = 0; seg < sa.

GetNumseg

(); seg++) {

593

starts_1[seg], starts_2[seg], lens[seg],

594

strands ? !

IsReverse

((*strands)[seg]) :

true

));

609  _ALNMGR_ASSERT

((row_1 == 0 || row_1 == 1) && (row_2 == 0 || row_2 == 1));

624  "Product strands are not consistent."

);

626  bool

product_plus =

true

;

637  "Genomic strands are not consistent."

);

639  bool

genomic_plus =

true

;

645  bool

direct = product_plus == genomic_plus;

646  bool

first_direct = row_1 == 0 ? product_plus : genomic_plus;

652  TSeqPos

product_pos = product_plus ? product_start : product_end;

656  TSeqPos

genomic_pos = (genomic_plus ?

661  TSeqPos

product_len = product_end - product_start + 1;

662  TSeqPos

genomic_len = genomic_end - genomic_start + 1;

667  TSeqPos

starts[] = { product_start, genomic_start };

668  if

(row_1 == row_2 ||

674

starts[row_1], starts[row_2], genomic_len,

675

row_1 == row_2 ?

true

: direct,

688  switch

(chunk.

Which

()) {

690

product_len = genomic_len = chunk.

GetMatch

();

693

product_len = genomic_len = chunk.

GetDiag

();

707  TSeqPos

ppos = product_plus ? product_pos : product_pos - product_len + 1;

708  TSeqPos

gpos = genomic_plus ? genomic_pos : genomic_pos - genomic_len + 1;

709  if

(row_1 == 0 && row_2 == 0) {

710  if

(product_len != 0) {

713

ppos, ppos, product_len,

true

, first_direct));

714

last_product_to = first_direct ? ppos + product_len : ppos;

716

}

else if

(row_1 == 1 && row_2 == 1) {

717  if

(genomic_len != 0) {

720

gpos, gpos, genomic_len,

true

, first_direct));

721

last_genomic_to = first_direct ? gpos + genomic_len : gpos;

724  if

(product_len != 0 && product_len == genomic_len &&

732

ppos, gpos, genomic_len, direct, first_direct));

733

last_product_to = first_direct ? ppos + product_len : ppos;

734

last_genomic_to = direct ? gpos + genomic_len : gpos;

737

gpos, ppos, genomic_len, direct, first_direct));

738

last_product_to = direct ? ppos + product_len : ppos;

739

last_genomic_to = first_direct ? gpos + genomic_len : gpos;

745  if

(product_len == 0 && genomic_len != 0) {

747

last_product_to, gpos, genomic_len,

748

direct, first_direct));

750  else if

(product_len != 0 && genomic_len == 0) {

752

last_product_to += product_len;

755

last_product_to -= product_len;

759  else if

(row_1 == 1) {

760  if

(genomic_len == 0 && product_len != 0) {

762

last_genomic_to, ppos, product_len,

763

direct, first_direct));

765  else if

(genomic_len != 0 && product_len == 0) {

767

last_genomic_to += genomic_len;

770

last_genomic_to -= genomic_len;

777

product_pos += product_len;

779

product_pos -= product_len;

782

genomic_pos += genomic_len;

784

genomic_pos -= genomic_len;

794  const

objects::CSeq_loc& loc_1,

795  const

objects::CSeq_loc& loc_2,

805

loc_1.IsReverseStrand() == loc_2.IsReverseStrand();

822  if

(wid1 == 3 || wid2 == 3) {

849

start1 += len1 -

len

;

853

start2 += len2 -

len

;

870

lshift1 = rshift1 = 0;

874

lshift2 = rshift2 = 0;

888  if

(best_it != syn_map.

end

()) {

889  return

best_it->second;

905  int

score = it->GetSeqId()->BestRankScore();

906  if

(score < best_score) {

912

syn_map[*it] = best_id;

918

<<

" instead of GI "

<< gi);

935  if

(src_idh != id_it->first) {

939

src_id->SetBaseWidth(mapper.GetWidthById(src_idh));

945  if

(dst_idh == src_idh) {

950  if

(aln_it == aln_map.

end

()) {

952

dst_id->SetBaseWidth(mapper.GetWidthById(dst_idh));

954

aln->SetUsingGenomic();

955

aln_map[dst_idh] = aln;

956

aligns.push_back(aln);

959

aln = aln_it->second;

User-defined methods of the data storage class.

bool IsReverse(ENa_strand s)

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

void ConvertSparseToPairwiseAln(CPairwiseAln &pairwise_aln, const CSparse_seg &sparse_seg, CSeq_align::TDim row_1, CSeq_align::TDim row_2, CAlnUserOptions::EDirection direction, const TAlnSeqIdVec *ids)

void ConvertDendiagToPairwiseAln(CPairwiseAln &pairwise_aln, const CSeq_align::TSegs::TDendiag &dendiags, CSeq_align::TDim row_1, CSeq_align::TDim row_2, CAlnUserOptions::EDirection direction, const TAlnSeqIdVec *ids)

CRef< CPairwiseAln > CreatePairwiseAlnFromSeqAlign(const CSeq_align &sa)

void ConvertSplicedToPairwiseAln(CPairwiseAln &pairwise_aln, const CSpliced_seg &spliced_seg, CSeq_align::TDim row_1, CSeq_align::TDim row_2, CAlnUserOptions::EDirection direction, const TAlnSeqIdVec *ids)

void ConvertSeqLocsToPairwiseAln(CPairwiseAln &aln, const objects::CSeq_loc &loc_1, const objects::CSeq_loc &loc_2, CAlnUserOptions::EDirection direction)

Build pairwise alignment from a pair of seq-locs.

map< CSeq_id_Handle, CRef< CPairwiseAln > > TAlnMap

void SeqLocMapperToPairwiseAligns(const objects::CSeq_loc_Mapper_Base &mapper, TPairwiseAlnList &aligns)

Build a list of pairwise alignments from a seq-loc mapper's mappings.

void ConvertDensegToPairwiseAln(CPairwiseAln &pairwise_aln, const CDense_seg &ds, CSeq_align::TDim row_1, CSeq_align::TDim row_2, CAlnUserOptions::EDirection direction, const TAlnSeqIdVec *ids)

void ConvertPackedsegToPairwiseAln(CPairwiseAln &pairwise_aln, const CPacked_seg &ps, CSeq_align::TDim row_1, CSeq_align::TDim row_2, CAlnUserOptions::EDirection direction, const TAlnSeqIdVec *ids)

void ConvertSeqAlignToPairwiseAln(CPairwiseAln &pairwise_aln, const CSeq_align &sa, CSeq_align::TDim row_1, CSeq_align::TDim row_2, CAlnUserOptions::EDirection direction, const TAlnSeqIdVec *ids)

void ConvertStdsegToPairwiseAln(CPairwiseAln &pairwise_aln, const CSeq_align::TSegs::TStd &stds, CSeq_align::TDim row_1, CSeq_align::TDim row_2, CAlnUserOptions::EDirection direction, const TAlnSeqIdVec *ids)

CSeq_id_Handle s_GetBestSynonym(const CSeq_id_Handle &idh, TSynonymsMap &syn_map, const CSeq_loc_Mapper_Base &mapper)

static bool IsMixedAlignment(const TAlnSeqIdVec *ids)

map< CSeq_id_Handle, CSeq_id_Handle > TSynonymsMap

list< CRef< CPairwiseAln > > TPairwiseAlnList

vector< TAlnSeqIdIRef > TAlnSeqIdVec

void SubtractAlnRngCollections(const CAlignRangeCollectionList< TAlnRng > &minuend, const CAlignRangeCollectionList< TAlnRng > &subtrahend, CAlignRangeCollectionList< TAlnRng > &difference)

Subtract one range collection from another.

#define _ALNMGR_ASSERT(expr)

class CAlignRangeCollectionList<TAlignRange> represent a sorted collection of TAlignRange.

const_iterator insert(const TAlignRange &r)

void AddInsertion(const TAlignRange &r)

CAlignRange Represents an element of pairwise alignment of two sequences.

Default IAlnSeqId implementation based on CSeq_id_Handle.

EDirection

Row direction flags.

@ eBothDirections

No filtering: use both direct and reverse sequences.

@ eDirect

Use only sequences whose strand is the same as that of the anchor.

@ eReverse

Use only sequences whose strand is opposite to that of the anchor.

CMappingRange - describes a single interval to interval mapping.

Storage for multiple mapping ranges.

A pairwise aln is a collection of ranges for a pair of rows.

int GetSecondBaseWidth(void) const

Base width of the second row.

const TAlnSeqIdIRef & GetFirstId(void) const

Get first sequence id.

int GetFirstBaseWidth(void) const

Base width of the first row.

void SetUsingGenomic(void)

Tell the pairwise alignment that the coordinates are already tranlated to genomic.

const TAlnSeqIdIRef & GetSecondId(void) const

Get second sequence id.

TDim CheckNumRows(void) const

Validatiors.

const CSeq_id & GetSeq_id(TDim row) const

Get seq-id (the first one if segments have different ids).

Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.

CSeq_loc_Mapper_Base –.

TDim CheckNumRows(void) const

container_type::const_iterator const_iterator

container_type::iterator iterator

const_iterator end() const

const_iterator find(const key_type &key) const

bool Empty(const CNcbiOstrstream &src)

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.

#define ERR_POST(message)

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

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

CConstRef< CSeq_id > GetSeqId(void) const

int BestRankScore(void) const

const CTextseq_id * GetTextseq_Id(void) const

Return embedded CTextseq_id, if any.

bool IsEmpty(void) const

True if the current location is empty.

TRange GetRange(void) const

Get the range.

ENa_strand GetStrand(void) const

const CSeq_id_Handle & GetDstIdHandle(void) const

const TIdMap & GetIdMap() const

TSeqPos GetLength(void) const

const CSeq_id_Handle & CollectSynonyms(const CSeq_id_Handle &id) const

TSeqPos GetDst_from(void) const

bool GetReverse(void) const

TSeqPos GetSrc_from(void) const

CRef< C > Ref(C *object)

Helper functions to get CRef<> and CConstRef<> objects.

position_type GetLength(void) const

position_type GetFirstToOpen(void) const

TThisType & SetLength(position_type len)

TThisType & SetSecondFrom(position_type second_from)

void SetDirect(bool direct=true)

TThisType & SetFirstFrom(position_type from)

void SetFirstDirect(bool direct=true)

position_type GetSecondToOpen(void) const

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

TFrom GetFrom(void) const

Get the From member data.

vector< TSeqPos > TStarts

vector< CRef< CSeq_loc > > TLoc

vector< ENa_strand > TStrands

vector< CRef< CSparse_align > > TRows

list< CRef< CStd_seg > > TStd

TMatch GetMatch(void) const

Get the variant data.

bool IsSetStrands(void) const

Check if a value has been assigned to Strands data member.

const TStarts & GetStarts(void) const

Get the Starts member data.

const TStarts & GetStarts(void) const

Get the Starts member data.

TGenomic_start GetGenomic_start(void) const

Get the Genomic_start member data.

vector< ENa_strand > TStrands

const TLens & GetLens(void) const

Get the Lens member data.

TDiag GetDiag(void) const

Get the variant data.

TNumseg GetNumseg(void) const

Get the Numseg member data.

TLen GetLen(void) const

Get the Len member data.

vector< TSignedSeqPos > TStarts

TProduct_type GetProduct_type(void) const

Get the Product_type member data.

TMismatch GetMismatch(void) const

Get the variant data.

TGenomic_strand GetGenomic_strand(void) const

Get the Genomic_strand member data.

bool IsSetStrands(void) const

Check if a value has been assigned to Strands data member.

bool CanGetProduct_strand(void) const

Check if it is safe to call GetProduct_strand method.

const TParts & GetParts(void) const

Get the Parts member data.

const TProduct_start & GetProduct_start(void) const

Get the Product_start member data.

TDim GetDim(void) const

Get the Dim member data.

const TProduct_end & GetProduct_end(void) const

Get the Product_end member data.

TDim GetDim(void) const

Get the Dim member data.

const TLens & GetLens(void) const

Get the Lens member data.

const TSecond_starts & GetSecond_starts(void) const

Get the Second_starts member data.

bool CanGetGenomic_strand(void) const

Check if it is safe to call GetGenomic_strand method.

TGenomic_ins GetGenomic_ins(void) const

Get the variant data.

const TLens & GetLens(void) const

Get the Lens member data.

list< CRef< CSpliced_exon > > TExons

const TExons & GetExons(void) const

Get the Exons member data.

bool IsSetSecond_strands(void) const

Check if a value has been assigned to Second_strands data member.

vector< int > TSecond_starts

const TFirst_starts & GetFirst_starts(void) const

Get the First_starts member data.

TGenomic_strand GetGenomic_strand(void) const

Get the Genomic_strand member data.

bool IsSetStrands(void) const

Check if a value has been assigned to Strands data member.

const TPresent & GetPresent(void) const

Get the Present member data.

TNumseg GetNumseg(void) const

Get the Numseg member data.

TProduct_strand GetProduct_strand(void) const

Get the Product_strand member data.

const TStrands & GetStrands(void) const

Get the Strands member data.

const TStrands & GetStrands(void) const

Get the Strands member data.

const TSecond_strands & GetSecond_strands(void) const

Get the Second_strands member data.

list< CRef< CSpliced_exon_chunk > > TParts

vector< int > TFirst_starts

bool CanGetProduct_strand(void) const

Check if it is safe to call GetProduct_strand method.

TGenomic_end GetGenomic_end(void) const

Get the Genomic_end member data.

const TStarts & GetStarts(void) const

Get the Starts member data.

TNumseg GetNumseg(void) const

Get the Numseg member data.

TProduct_strand GetProduct_strand(void) const

Get the Product_strand member data.

list< CRef< CSeq_align > > Tdata

TDim GetDim(void) const

Get the Dim member data.

const TRows & GetRows(void) const

Get the Rows member data.

TProduct_ins GetProduct_ins(void) const

Get the variant data.

vector< ENa_strand > TSecond_strands

list< CRef< CDense_diag > > TDendiag

const TStrands & GetStrands(void) const

Get the Strands member data.

const TSegs & GetSegs(void) const

Get the Segs member data.

bool CanGetGenomic_strand(void) const

Check if it is safe to call GetGenomic_strand method.

E_Choice Which(void) const

Which variant is currently selected.

@ e_Product_ins

insertion in product sequence (i.e. gap in the genomic sequence)

@ e_Diag

both sequences are represented, there is sufficient similarity between product and genomic sequences....

@ e_Genomic_ins

insertion in genomic sequence (i.e. gap in the product sequence)

@ e_Match

both sequences represented, product and genomic sequences match

@ e_Mismatch

both sequences represented, product and genomic sequences do not match

@ e_not_set

No variant selected.

bool IsSetVersion(void) const

Check if a value has been assigned to Version data member.

const TAccession & GetAccession(void) const

Get the Accession member data.


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