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

NCBI C++ ToolKit: src/algo/gnomon/parse.cpp Source File

46

template<class L, class

R

> inline

49  if

(left.MScore() ==

BadScore

())

return true

;

50  int len

= right.Stop()-left.Stop();

51  return

(

len

>

kTooFarLen

&& score+left.MScore() < right.Score());

68 template

<

class

Left,

class

Right>

inline 69 bool s_EvaluateNewScore

(

const

Left& left,

const

Right& right,

double

& rscore,

bool

& openrgn,

bool

rightanchor =

false

)

76  int len

= right.Stop()-left.Stop();

77  if

(

len

> right.MaxLen())

return false

;

78  if

(!right.NoRightEnd() &&

len

< right.MinLen())

return true

;

80  double

scr, score = 0;

83

scr = left.BranchScore(right);

84  if

(scr ==

BadScore

())

return true

;

88

scr = right.BranchScore(left);

89  if

(scr ==

BadScore

())

return true

;

90

scr += right.DenScore()-left.DenScore();

95  if

(right.StopInside())

return false

;

97  if

(right.NoRightEnd() && !rightanchor) scr = right.ClosingLengthScore();

98  else

scr = right.LengthScore();

99  if

(scr ==

BadScore

())

return true

;

102

scr = right.RgnScore();

103  if

(scr ==

BadScore

())

return true

;

106  if

(!right.NoRightEnd())

108

scr = right.TermScore();

109  if

(scr ==

BadScore

())

return true

;

113

openrgn = right.OpenRgn();

120 template

<

class

L,

class

R>

121 inline bool s_ForwardStep

(

const

L& left,

R

& right,

int

leftprot,

int

rightprot)

126  else if

(score ==

BadScore

())

return true

;

128  int

protnum = right.GetSeqScores().ProtNumber(left.Stop(),right.Stop());

130  if

(rightprot == 0 && (leftprot != 0 || protnum != 0))

137  if

(rightprot == 1 && protnum == 0)

return true

;

138  else if

(protnum > 0) --protnum;

141  if

(left.Score() !=

BadScore

() && openrgn)

143  double

scr = score-protnum*right.GetSeqScores().MultiProtPenalty()+left.Score();

144  if

(scr > right.Score())

146

right.UpdateLeftState(left);

147

right.UpdateScore(scr);

160  else if

(score ==

BadScore

())

return true

;

162  if

(left.Score() !=

BadScore

() && openrgn)

164  double

scr = score+left.Score();

165  if

(scr > right.

Score

())

172  return

(openrgn && !

s_TooFar

(left, right, score));

181  else if

(score ==

BadScore

())

return true

;

183  if

(left.Score() !=

BadScore

() && openrgn)

185  double

scr = score+left.Score();

186  if

(scr > right.

Score

())

193  return

(openrgn && !

s_TooFar

(left, right, score));

197 template

<

class

L,

class

R>

198 inline void s_MakeStep

(vector<L>& lvec, vector<R>& rvec,

int

leftprot,

int

rightprot)

200  if

(lvec.empty())

return

;

201  typename

vector<L>::reverse_iterator

i

= lvec.rbegin();

202  if

(

i

->Stop() == rvec.back().Stop()) ++

i

;

203  for

(;

i

!= lvec.rend() &&

s_ForwardStep

(*

i

,rvec.back(),leftprot,rightprot);++

i

);

205  if

(rvec.size() > 1) {

206

rvec.back().UpdatePrevExon(rvec[rvec.size()-2]);

211 inline void s_MakeStep

(vector<L>& lvec, vector<CIntron>& rvec)

213  if

(lvec.empty())

return

;

215  typename

vector<L>::reverse_iterator

i

= lvec.rbegin();

217  int

rlimit = right.

Stop

();

218  if

(

i

->Stop() == rlimit) ++

i

;

220  while

(

i

!= lvec.rend() &&

i

->Stop() >= nearlimit)

225  if

(

i

== lvec.rend())

return

;

226  for

(

const

L* p = &*

i

; p !=0; p = p->PrevExon())

234 inline void s_MakeStep

(

const CSeqScores

& seqscr, vector<L>& lvec, vector<CIntergenic>& rvec,

bool

rightanchor =

false

)

236  if

(lvec.empty())

return

;

239  int

rlimit = right.

Stop

();

240  if

(lvec[

i

].Stop() == rlimit) --

i

;

243  while

(

i

>= 0 && lvec[

i

].Stop() >= nearlimit)

248  for

(

const

L* p = &lvec[

i

]; p !=0; p = p->PrevExon())

256

rvec.push_back(

CSingleExon

(strand, point, seqscr, exon_params));

258  if

(rvec.back().Score() ==

BadScore

()) rvec.pop_back();

264  for

(

int

kr = 0; kr < 2; ++kr)

266  for

(

int

phr = 0; phr < 3; ++phr)

268

rvec[kr][phr].push_back(

R

(strand,phr,point,seqscr,exon_params));

270  if

(rvec[kr][phr].back().Score() ==

BadScore

()) rvec[kr][phr].pop_back();

278

rvec.push_back(

R

(strand,0,point,seqscr,exon_params));

279  for

(

int

kl = 0; kl < 2; ++kl)

281  for

(

int

phl = 0; phl < 3; ++phl)

286  if

(rvec.back().Score() ==

BadScore

()) rvec.pop_back();

291  for

(

int

phr = 0; phr < 3; ++phr)

293  for

(

int

kr = 0; kr < 2; ++kr)

295

rvec[kr][phr].push_back(

CInternalExon

(strand,phr,point,seqscr,exon_params));

296  for

(

int

phl = 0; phl < 3; ++phl)

298  for

(

int

kl = 0; kl < 2; ++kl)

300  s_MakeStep

(lvec[kl][phl], rvec[kr][phr], kl, kr);

303  if

(rvec[kr][phr].back().Score() ==

BadScore

()) rvec[kr][phr].pop_back();

308 template

<

class

L1,

class

L2>

311  for

(

int

k = 0; k < 2; ++k)

313  for

(

int

phl = 0; phl < 3; ++phl)

315  int

phr = (shift+phl)%3;

316

rvec[k][phr].push_back(

CIntron

(strand,phr,point,seqscr,intron_params));

317  if

(k == 1) rvec[k][phr].back().UpdateScore(

BadScore

());

320  if

(rvec[k][phr].back().Score() ==

BadScore

()) rvec[k][phr].pop_back();

327  if

(scr1 ==

BadScore

())

return

scr2;

328  else if

(scr2 ==

BadScore

())

return

scr1;

329  else if

(scr1 >= scr2)

return

scr1+

log

(1+exp(scr2-scr1));

330  else return

scr2+

log

(1+exp(scr1-scr2));

337  bool

leftanchor,

bool

rightanchor)

348  for

(

int

k = 0; k < 2; ++k)

350  for

(

int

phase = 0; phase < 3; ++phase)

368  double

BigScore = 10000;

371  m_seplus

.back().UpdateScore(BigScore);

374  for

(

int i

= 0;

i

<

len

; ++

i

)

449  for

(

int

k = 0; k < 2; ++k) {

450  for

(

int

ph = 0; ph < 3; ++ph) {

470

to.setf(IOS_BASE::right,IOS_BASE::adjustfield);

477

to.setf(IOS_BASE::right,IOS_BASE::adjustfield);

478

to.setf(IOS_BASE::fixed,IOS_BASE::floatfield);

481  if

(

t

> 1000000000) to <<

"+Inf"

;

482  else if

(

t

< -1000000000) to <<

"-Inf"

;

499

support.

Extend

(algn,

false

);

501

supporting_align = &algn;

516  if

(!support.

Exons

().empty()) {

524

gene.

Extend

(support,

false

);

528

gene = *supporting_align;

549

vector< vector<const CExon*> > gen_exons;

552  if

(

dynamic_cast<const CIntron

*

>

(

Path

()) &&

Path

()->LeftState())

553

gen_exons.push_back(vector<const CExon*>());

557  if

(p->isGeneRightEnd())

558

gen_exons.push_back(vector<const CExon*>());

560

gen_exons.back().push_back(

static_cast<const CExon

*

>

(p));

565  ITERATE

(vector< vector<const CExon*> >, g_it, gen_exons) {

566  EStrand

strand = g_it->back()->Strand();

573  for

(

int i

= (

int

)g_it->size()-1;

i

>= 0; --

i

) {

574  const CExon

* pe = (*g_it)[

i

];

579

local_gene.

AddExon

(local_exon);

583  if

(

i

!= (

int

)g_it->size()-1) {

588

ssig.push_back(

toACGT

(seqp[local_exon.

GetTo

()+1]));

589

ssig.push_back(

toACGT

(seqp[local_exon.

GetTo

()+2]));

596

gene.

AddExon

(exon, fsig, ssig);

602  TSignedSeqRange

local_reading_frame(g_it->back()->Start(), g_it->front()->Stop());

604  if

(!g_it->back()->isGeneLeftEnd()) {

605  const CExon

* pe = g_it->back();

606  int

estart = pe->

Start

();

607  int

estop = pe->

Stop

();

608  int

rframe = pe->

Phase

();

609  int

lframe = pe->

isPlus

() ? (rframe-(estop-estart))%3 : (rframe+(estop-estart))%3;

612  int

del = pe->

isPlus

() ? (3-lframe)%3 : (1+lframe)%3;

614  if

(localmap.

FShiftedLen

(local_reading_frame) <= del) {

621  if

(!g_it->front()->isGeneRightEnd()) {

622  const CExon

* pe = g_it->front();

623  int

rframe = pe->

Phase

();

624  int

del = pe->

isPlus

() ? (1+rframe)%3 : (3-rframe)%3;

626  if

(localmap.

FShiftedLen

(local_reading_frame) <= del) {

634  if

(local_reading_frame.

Empty

()) {

646

gene, reading_frame);

650  if

(g_it->back()->isGeneLeftEnd()) {

667  if

(g_it->front()->isGeneRightEnd()) {

708

vector<const CHMM_State*> states;

710

reverse(states.begin(),states.end());

724  for

(

int i

= 0;

i

< (

int

)states.size(); ++

i

)

727  if

(

dynamic_cast<const CIntergenic

*

>

(p)) cout << endl;

TSignedSeqPos FShiftedMove(TSignedSeqPos orig_pos, int len) const

TSignedSeqRange MapRangeEditedToOrig(TSignedSeqRange edited_range, bool withextras=true) const

TSignedSeqPos MapEditedToOrig(TSignedSeqPos edited_pos) const

int FShiftedLen(TSignedSeqRange ab, ERangeEnd lend, ERangeEnd rend) const

TSignedSeqRange MapRangeOrigToEdited(TSignedSeqRange orig_range, ERangeEnd lend, ERangeEnd rend) const

void SetStart(TSignedSeqRange r, bool confirmed=false)

void SetScore(double score, bool open=false)

TSignedSeqRange Start() const

void AddPStop(SPStop stp)

TSignedSeqRange ProtReadingFrame() const

void SetStop(TSignedSeqRange r, bool confirmed=false)

const TPStops & PStops() const

void SetReadingFrame(TSignedSeqRange r, bool protein=false)

void AddExon(TSignedSeqRange exon, const string &fs="", const string &ss="", double ident=0, const string &seq="", const CInDelInfo::SSource &src=CInDelInfo::SSource())

void ExtendRight(int amount)

const list< CRef< CSeq_id > > & TrustedProt() const

void Extend(const CGeneModel &a, bool ensure_cds_invariant=true)

void InsertTrustedProt(CRef< CSeq_id > g)

int FShiftedLen(TSignedSeqRange ab, bool withextras=true) const

const CSupportInfoSet & Support() const

const TExons & Exons() const

TSignedSeqRange ReadingFrame() const

virtual CAlignMap GetAlignMap() const

void SetStrand(EStrand s)

void ReplaceSupport(const CSupportInfoSet &support_set)

void SetCdsInfo(const CCDSInfo &cds_info)

bool ConfirmedStop() const

void InsertTrustedmRNA(CRef< CSeq_id > g)

bool AddSupport(const CSupportInfo &support)

TSignedSeqRange Limits() const

const list< CRef< CSeq_id > > & TrustedmRNA() const

const CCDSInfo & GetCdsInfo() const

TSignedSeqRange MaxCdsLimits() const

bool ConfirmedStart() const

void ExtendLeft(int amount)

int isCompatible(const CGeneModel &a) const

const CHMM_State * LeftState() const

virtual string GetStateName() const =0

virtual SStateScores GetStateScores() const =0

void UpdateLeftState(const CHMM_State &left)

void UpdateScore(double scr)

vector< CSingleExon > m_seplus

vector< CInternalExon > m_ieminus[2][3]

vector< CLastExon > m_leplus

vector< CIntergenic > m_igplus

vector< CLastExon > m_leminus[2][3]

vector< CIntron > m_inminus[2][3]

const CHMM_State * m_path

vector< CSingleExon > m_seminus

const CHMM_State * Path() const

list< CGeneModel > GetGenes() const

vector< CFirstExon > m_feplus[2][3]

vector< CIntron > m_inplus[2][3]

const CSeqScores & m_seqscr

CParse(const CSeqScores &ss, const CIntronParameters &intron_params, const CIntergenicParameters &intergenic_params, const CExonParameters &exon_params, bool leftanchor, bool rightanchor)

vector< CIntergenic > m_igminus

vector< CInternalExon > m_ieplus[2][3]

vector< CFirstExon > m_feminus

bool isReadingFrameRightEnd(int i, int strand) const

int LeftAlignmentBoundary(int b) const

int DonorNumber(int strand) const

double StartScore(int i, int strand) const

const TGeneModelList & Alignments() const

TSignedSeqPos From() const

int StopNumber(int strand) const

const EResidue * SeqPtr(int i, int strand) const

double AcceptorScore(int i, int strand) const

double DonorScore(int i, int strand) const

int AcceptorNumber(int strand) const

bool isReadingFrameLeftEnd(int i, int strand) const

const CAlignMap & FrameShiftedSeqMap() const

double StopScore(int i, int strand) const

int StartNumber(int strand) const

bool Include(TSignedSeqRange big, TSignedSeqRange small)

void ReverseComplement(const BidirectionalIterator &first, const BidirectionalIterator &last)

list< CGeneModel > TGeneModelList

TResidue toACGT(EResidue c)

#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 NCBI_THROW(exception_class, err_code, message)

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

bool NotEmpty(void) const

CRange< TSignedSeqPos > TSignedSeqRange

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define BEGIN_SCOPE(ns)

Define a new scope.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

void SetFrom(TFrom value)

Assign a value to From data member.

TTo GetTo(void) const

Get the To member data.

TFrom GetFrom(void) const

Get the From member data.

void SetTo(TTo value)

Assign a value to To data member.

unsigned int

A callback function used to compare two keys in a database.

constexpr bool empty(list< Ts... >) noexcept

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

void s_MakeStep(vector< L > &lvec, vector< R > &rvec, int leftprot, int rightprot)

double AddProbabilities(double scr1, double scr2)

void Out(T t, int w, CNcbiOstream &to=cout)

bool s_ForwardStep(const L &left, R &right, int leftprot, int rightprot)

void AddSupport(const TGeneModelList &align_list, TSignedSeqRange inside_range, CGeneModel &gene, TSignedSeqRange reading_frame)

bool s_TooFar(const L &left, const R &right, double score)

bool s_EvaluateNewScore(const Left &left, const Right &right, double &rscore, bool &openrgn, bool rightanchor=false)

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

SRState(const CHMM_State &l, const CHMM_State &r)


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