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

NCBI C++ ToolKit: src/algo/align/nw/nw_spliced_aligner16.cpp Source File

46

{

'G'

,

'T'

}, {

'G'

,

'C'

}, {

'A'

,

'T'

}, {

'?'

,

'?'

}

82  const char

* seq2,

size_t

len2)

103  switch

(splice_type) {

110

eInvalidSpliceTypeIndex,

123  const Uint2

kMaskDnr0 (0x0010);

124  const Uint2

kMaskDnr1 (0x0020);

125  const Uint2

kMaskDnr2 (0x0040);

126  const Uint2

kMaskDnr3 (0x0080);

128  const Uint2

kMaskAcc0 (0x0100);

129  const Uint2

kMaskAcc1 (0x0200);

130  const Uint2

kMaskAcc2 (0x0400);

131  const Uint2

kMaskAcc3 (0x0800);

133  const Uint2

kMask_ZeroJump (0x1000);

158  const TScore

cds_penalty_extra (-1);

159  const size_t

ibs (12);

163  const size_t

N1 (

data

->m_len1 + 1);

164  const size_t

N2 (

data

->m_len2 + 1);

175

vector<TScore> stl_rowV (N2), stl_rowF (N2);

176  TScore

* rowV (&stl_rowV.front());

177  TScore

* rowF (&stl_rowF.front());

188  const bool

bFreeGapLeft1 (

data

->m_esf_L1 &&

data

->m_offset1 == 0);

189  const bool

bFreeGapRight1 (

data

->m_esf_R1 &&

192  const bool

bFreeGapLeft2 (

data

->m_esf_L2 &&

data

->m_offset2 == 0);

193  const bool

bFreeGapRight2 (

data

->m_esf_R2 &&

196  const bool

sw_left (bFreeGapLeft1 && bFreeGapLeft2);

197  const bool

sw_right (bFreeGapRight1 && bFreeGapRight2);

201  TScore

wg1 (wgleft1), ws1 (wsleft1);

211  size_t

i_global_max (N1 - 1), j_global_max (N2 - 1);

234

jAllDonors[

st

] = &stl_jAllDonors[

st

*N2];

235

vAllDonors[

st

] = &stl_vAllDonors[

st

*N2];

247

vector<Uint1> stl_splices (N2);

251  for

(k = 0; k < N2; ++k) {

253

rowV[k] = rowF[k] = kInfMinus;

257  const Uint2

v1 ((seq2[k-1] << 8) | seq2[k]);

258  if

(v1 == g_nwspl_acceptor_16[0]) c |= eAcc0;

259  if

(v1 == g_nwspl_acceptor_16[1]) c |= eAcc1;

260  if

(v1 == g_nwspl_acceptor_16[2]) c |= eAcc2;

264  const Uint2

v1 ((seq2[k+1] << 8) | seq2[k+2]);

265  if

(v1 == g_nwspl_donor_16[0]) c |= eDnr0;

266  if

(v1 == g_nwspl_donor_16[1]) c |= eDnr1;

267  if

(v1 == g_nwspl_donor_16[2]) c |= eDnr2;

279  if

(cds_start < cds_stop) {

280

cds_start -=

data

->m_offset1;

281

cds_stop -=

data

->m_offset1;

284  for

(

size_t i

(0), j(0);

i

< N1; ++

i

, j = 0) {

286

V =

i

> 0? (V0 += wsleft2) : 0;

288

backtrace_matrix[k++] =

kMaskFc

;

289  Uint1

ci (

i

> 0? seq1[

i

]:

'N'

);

291  if

(ci ==

'N'

) ci =

'z'

;

293

jTail[0] = jTail[1] = jTail[2] = jTail[3]

294

= jHead[0] = jHead[1] = jHead[2] = jHead[3] = 0;

295

vBestDonor[0] = vBestDonor[1] = vBestDonor[2] = vBestDonor[3] = kInfMinus;

296

jBestDonor[0] = jBestDonor[1] = jBestDonor[2] = jBestDonor[3] = 0;

303 #define NWSPL_DETECTDONOR(st_idx) \ 304  if(splices[j] & eDnr##st_idx ) \ 306  const size_t tl (jTail[st_idx]++); \ 307  jAllDonors[st_idx][tl] = j; \ 308  vAllDonors[st_idx][tl] = V; \ 319  const size_t

tl (jTail[g_topidx]++);

320

jAllDonors[g_topidx][tl] = j;

321

vAllDonors[g_topidx][tl] = V_max = V;

323  if

(cds_start <=

i

&&

i

< cds_stop) {

325  if

(

i

!= 0 || ! bFreeGapLeft1) {

326

ws1 += cds_penalty_extra;

328  if

(j != 0 || ! bFreeGapLeft2) {

329

ws2 += cds_penalty_extra;

333  if

(

i

== N1 - 1 && bFreeGapRight1) {

337  for

(j = 1; j < N2; ++j, ++k) {

340  G

= pV[j] + sm[ci][(

unsigned

char)seq2[j]];

354  if

(j == N2 - 1 && bFreeGapRight2) {

397 #define NW_NDON_EVAL(st_idx) \ 399  const size_t jt (jTail[st_idx]); \ 400  const size_t jh (jHead[st_idx]); \ 401  if (jt > jh && j - jAllDonors[st_idx][jh] >= m_IntronMinSize) { \ 402  const TScore x (static_cast<TScore>((jAllDonors[st_idx][jh] - \ 403  jBestDonor[st_idx]) >> ibs)); \ 404  if (vAllDonors[st_idx][jh] + x > vBestDonor[st_idx]) { \ 405  vBestDonor[st_idx] = vAllDonors[st_idx][jh]; \ 406  jBestDonor[st_idx] = jAllDonors[st_idx][jh]; \ 422 #define NW_SIG_EVAL(st_idx) \ 423  if(splices[j] & eAcc##st_idx) { \ 424  const size_t ilen (j - jBestDonor[st_idx]); \ 425  vAcc = vBestDonor[st_idx] + m_Wi[st_idx] - static_cast<TScore>(ilen >> ibs); \ 428  acceptor = kMaskAcc##st_idx; \ 429  backtrace_matrix[k - ilen] |= kMaskDnr##st_idx; \ 439

vAcc = vBestDonor[g_topidx] +

m_Wi

[g_topidx];

442

acceptor = kMaskAcc3;

443  const size_t

ilen (j - jBestDonor[g_topidx]);

444

backtrace_matrix[k - ilen] |= kMaskDnr3;

447  if

(sw_left && V < 0) {

448

tracer |= kMask_ZeroJump;

452  if

(sw_right && V > global_max) {

463 #define NW_DON_EVAL(st_idx) \ 464  if(splices[j] & eDnr##st_idx ) { \ 465  const size_t ilen (j - jBestDonor[st_idx]); \ 466  const TScore x (static_cast<TScore>(ilen >> ibs)); \ 467  if(V + x > vBestDonor[st_idx]) { \ 468  const size_t tl_ (jTail[st_idx]++); \ 469  jAllDonors[st_idx][tl_] = j; \ 470  vAllDonors[st_idx][tl_] = V; \ 482  const size_t

tl (jTail[g_topidx]++);

483

jAllDonors[g_topidx][tl] = j;

484

vAllDonors[g_topidx][tl] = V_max = V;

487

backtrace_matrix[k] = tracer;

521  size_t

i_global_max,

size_t

j_global_max)

523  const size_t

N1 (

data

->m_len1 + 1);

524  const size_t

N2 (

data

->m_len2 + 1);

526  data

->m_transcript.clear();

527  data

->m_transcript.reserve(N1 + N2);

529  size_t

k (i_global_max * N2 + j_global_max);

530  size_t

i1 (

data

->m_offset1 + i_global_max - 1);

531  size_t

i2 (

data

->m_offset2 + j_global_max - 1);

533  const size_t

dim_slack_ins (N2 - 1 - j_global_max);

534  data

->m_transcript.insert(

data

->m_transcript.end(),

538  const size_t

dim_slack_del (N1 - 1 - i_global_max);

539  data

->m_transcript.insert(

data

->m_transcript.end(),

544  Uint2

Key (backtrace_matrix[k]);

545  if

(Key & kMask_ZeroJump) {

547  const size_t

dim_ins (i2 -

data

->m_offset2 + 1);

548  data

->m_transcript.insert(

data

->m_transcript.end(),

552  const size_t

dim_del (i1 -

data

->m_offset1 + 1);

553  data

->m_transcript.insert(

data

->m_transcript.end(),

561  size_t

intron_length (1);

562  const Uint2

donor ((Key & 0x0F00) >> 4);

565

Key = backtrace_matrix[--k];

572  if

(k == 0)

continue

;

583  while

(k > 0 && (Key &

kMaskEc

)) {

585

Key = backtrace_matrix[k--];

595  while

(k > 0 && (Key &

kMaskFc

)) {

597

Key = backtrace_matrix[k];

608  size_t

start1,

size_t

start2)

const 621  const size_t

dim (transcript.size());

625  const char

* p1 (

m_Seq1

+ start1);

626  const char

* p2 (

m_Seq2

+ start2);

643  switch

(transcript[

i

]) {

651

state1 = 1; state2 = 0; score +=

m_Wg

;

655

state1 = 0; state2 = 0;

659

state1 = 0; state2 = 1; score +=

m_Wg

;

666  for

(;

i

< dim; ++

i

) {

682  unsigned char

c1 = *p1;

683  unsigned char

c2 = *p2;

692  if

(state1 != 1) score +=

m_Wg

;

693

state1 = 1; state2 = 0;

700  if

(state2 != 1) score +=

m_Wg

;

701

state1 = 0; state2 = 1;

716  if

( (*p2 == g_nwspl_donor[i_][0] &&

717

*(p2 + 1) == g_nwspl_donor[i_][1]) || i_ == g_topidx) {

725

state1 = 2; state2 = 0;

737  for

(

Int8

i_ = dim - 1; i_ >= 0; --i_) {

738  if

(transcript[i_] ==

eTS_Insert

) ++

g

;

else break

;

747  for

(

Int8

i_ = dim - 1; i_ >= 0; --i_) {

748  if

(transcript[i_] ==

eTS_Delete

) ++

g

;

else break

;

757  for

(

size_t

i_ = 0; i_ < dim; ++i_) {

758  if

(transcript[i_] ==

eTS_Insert

) ++

g

;

else break

;

767  for

(

size_t

i_ = 0; i_ < dim; ++i_) {

768  if

(transcript[i_] ==

eTS_Delete

) ++

g

;

else break

;

virtual ETranscriptSymbol x_GetDiagTS(size_t i1, size_t i2) const

SNCBIFullScoreMatrix m_ScoreMatrix

FProgressCallback m_prg_callback

vector< ETranscriptSymbol > TTranscript

virtual TScore x_Align(CNWAligner::SAlignInOut *data)

const size_t splice_type_count_16

virtual TScore ScoreFromTranscript(const TTranscript &transcript, size_t start1=kMax_UInt, size_t start2=kMax_UInt) const

TScore m_Wi[splice_type_count_16]

static TScore GetDefaultWi(unsigned char splice_type)

void x_DoBackTrace(const Uint2 *backtrace_matrix, CNWAligner::SAlignInOut *data, size_t i_global_max, size_t j_global_max)

#define NCBI_THROW(exception_class, err_code, message)

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

uint8_t Uint1

1-byte (8-bit) unsigned integer

uint16_t Uint2

2-byte (16-bit) unsigned integer

int64_t Int8

8-byte (64-bit) signed integer

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

const unsigned char kMaskFc

const unsigned char kMaskEc

const unsigned char kMaskE

const unsigned char kMaskD

#define NW_NDON_EVAL(st_idx)

#define NW_SIG_EVAL(st_idx)

#define NW_DON_EVAL(st_idx)

#define NWSPL_DETECTDONOR(st_idx)

#define NCBI_FSM_DIM

Recommended approach: unpack and index directly.

int TNCBIScore

data types

static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

const char g_msg_InconsistentArguments[]

const char g_msg_InvalidTranscriptSymbol[]

const char g_msg_InvalidSpliceTypeIndex[]

int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)


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