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

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

50  TInDels

indels = GetInDels(fs_only);

54  if

(

i

->IntersectingWith(

a

,

b

))

55

selected_indels.push_back( *

i

);

58  return

selected_indels;

66  if

(!

i

->IsMismatch())

67

selected_indels.push_back(*

i

);

70

TExons::const_iterator e =

Exons

().begin();

72  if

(

i

->IsMismatch() ||

i

->Len()%3 == 0)

75  for

( ;e !=

Exons

().end() && (e->Limits().Empty() || !

i

->IntersectingWith(e->GetFrom(),e->GetTo())); ++e);

76  if

(

i

->InDelEnd() > e->GetTo() && e !=

Exons

().end()) {

77

TInDels::const_iterator

next

=

i

;

79  int len

=

i

->Len() + (

i

->GetType() ==

next

->GetType() ?

next

->Len() : -

next

->Len());

87

selected_indels.push_back(*

i

);

91  return

selected_indels;

128  if

(

Exons

().back().Limits().NotEmpty()) {

135  if

(

Exons

().front().Limits().NotEmpty()) {

141  if

(

Exons

().back().Limits().NotEmpty()) {

165  for

(

int i

= (

int

)

Exons

().

size

()-1;

i

> 0; --

i

) {

166  if

(

Exons

()[

i

].m_fsplice &&

Exons

()[

i

-1].m_ssplice &&

Exons

()[

i

].m_fsplice_sig !=

"XX"

&&

Exons

()[

i

-1].m_ssplice_sig !=

"XX"

) {

172  for

(

int i

= 0;

i

< (

int

)

Exons

().size()-1; ++

i

) {

173  if

(

Exons

()[

i

].m_ssplice &&

Exons

()[

i

+1].m_fsplice &&

Exons

()[

i

].m_ssplice_sig !=

"XX"

&&

Exons

()[

i

+1].m_fsplice_sig !=

"XX"

) {

179  return l

> cds.

GetTo

()+limit;

187  if

(it->m_fsplice_sig !=

"XX"

)

189  if

(it->m_ssplice_sig !=

"XX"

)

202  for

(

int

ie = 0; ie < (

int

)

Exons

().size(); ++ie) {

203  if

(

Exons

()[ie].Limits().Empty())

204

diff +=

Exons

()[ie].m_seq.size();

206

diff +=

Exons

()[ie].Limits().GetLength();

211  if

(

i

->IsDeletion())

213  else if

(

i

->IsInsertion())

220  if

(

a

.Orientation() !=

g

.Strand())

236

vector<TSignedSeqRange> transcript_exons;

237  for

(

int

ie = 0; ie < (

int

)

Exons

().size(); ++ie) {

245

transcript_exons.push_back(texon);

254  return "UnknownTarget"

;

434  if

(

r

.NotEmpty()) {

500

*s =

SPStop

(mapper(*s,

false

), s->m_status);

513

new_cds_info = another_cds_info;

515

new_cds_info = *

this

;

558

*

this

= new_cds_info;

686  bool

modified =

false

;

687  for

(

unsigned int i

= 1;

i

<

Exons

().size(); ++

i

) {

688  bool

hole = !

Exons

()[

i

-1].m_ssplice || !

Exons

()[

i

].m_fsplice;

689  int

intron =

Exons

()[

i

].GetFrom()-

Exons

()[

i

-1].GetTo()-1;

692

new_exons.back().m_ssplice =

Exons

()[

i

].m_ssplice;

693

new_exons.back().AddTo(

Exons

()[

i

].GetTo()-

Exons

()[

i

-1].GetTo());

696  int

loc =

Exons

()[

i

-1].GetTo() + 1 + (intron-

len

)/2;

700

new_exons.push_back(

Exons

()[

i

]);

785  if

(intersection.

Empty

())

790  MyExons

()[

i

].m_ssplice_sig.clear();

792  MyExons

()[

i

+1].m_fsplice=

false

;

797  MyExons

()[

i

].m_fsplice_sig.clear();

799  MyExons

()[

i

-1].m_ssplice=

false

;

803  MyExons

()[

i

-1].m_ssplice=

false

;

807  MyExons

()[

i

+1].m_fsplice=

false

;

823

cds_clip_limits &= clip_limits;

826

intersection =

Exons

().front().Limits() & clip_limits;

829

intersection =

Exons

().back().Limits() & clip_limits;

831

cds_clip_limits.

SetTo

(intersection.

GetTo

());

836

precise_cds_clip_limits += e->Limits() & cds_clip_limits;

837

cds_clip_limits = precise_cds_clip_limits;

851  if

( cds_clip_limits.

NotEmpty

()) {

857

cds_clip_limits.

SetTo

(

tmp

.GetTo());

868  swap

(left_determinant, right_determinant);

872  for

(

auto

& exon :

MyExons

()) {

875  if

(exon.GetFrom() <= clip_limits.

GetFrom

()) {

876

exon.m_fsplice =

false

;

877

exon.m_fsplice_sig.clear();

879  if

(exon.GetTo() >= clip_limits.

GetTo

()) {

880

exon.m_ssplice =

false

;

881

exon.m_ssplice_sig.clear();

883

exon.Limits() = clip;

914  MyExons

().front().m_fsplice =

false

;

916  MyExons

().back().m_ssplice =

false

;

924  Status

() &= ~left_determinant;

926  Status

() &= ~right_determinant;

933

TInDels::const_iterator indl =

m_fshifts

.begin();

935  for

(CGeneModel::TExons::const_iterator e =

Exons

().begin(); e !=

Exons

().end() && indl !=

m_fshifts

.end(); ++e) {

936  if

(e->Limits().Empty())

939  for

( ;indl !=

m_fshifts

.end() && indl->InDelEnd() < (indl->IsDeletion() ? e->GetFrom() : e->GetFrom()+1); ++indl);

940  for

( ;indl !=

m_fshifts

.end() && e->GetFrom() == left && indl->IsDeletion() && indl->Loc() == left; ++indl);

942  if

(indl !=

m_fshifts

.end() && indl->Loc() < e->GetFrom()) {

944  int

extra = e->GetFrom()-indl->Loc();

949  for

( ; indl !=

m_fshifts

.end() && indl->Loc() <= e->GetTo(); ++indl)

950

indels.push_back(*indl);

952  for

( ; indl !=

m_fshifts

.end() && e->GetTo() != right && indl->IsDeletion() && indl->Loc() == e->GetTo()+1; ++indl)

953

indels.push_back(*indl);

955  if

(!indels.empty() && indels.back().InDelEnd() > e->GetTo()+1) {

956  _ASSERT

(indels.back().IsMismatch());

957  int

extra = indels.back().InDelEnd()-e->GetTo()-1;

958

indels.back() =

CInDelInfo

(indels.back().Loc(),indels.back().Len()-extra,

CInDelInfo::eMism

,indels.back().GetInDelV().substr(0,indels.back().Len()-extra));

971  if

(

i

->IntersectingWith(

a

,

b

))

972

fshifts.push_back( *

i

);

1004  if

(intersection==0 || intersection==

limits

.GetLength() || intersection==alimits.

GetLength

())

1021  return limits

.IntersectingWith(alimits) &&

limits

!= alimits;

1026

pair<int, int> rslt(-1, -1);

1027  int

last_exon =

a

.Exons().size()-1;

1030  if

(last_exon == 0 ||

a

.Limits().GetFrom() == intersect.

GetFrom

())

1032  else if

(last_exon == 1)

1033

aleft = intersect.

GetFrom

() >

a

.Exons()[0].GetTo() ? 1 : 0;

1037

aleft = std::lower_bound(

a

.Exons().begin(),

a

.Exons().end(), intersect.

GetFrom

(), [](

const CModelExon

& e,

TSignedSeqPos

p){ return e.GetTo() < p; })-

a

.Exons().begin();

1038  if

(intersect.

GetFrom

() <

a

.Exons()[aleft].GetFrom())

1042  if

(aleft == last_exon ||

a

.Limits().GetTo() == intersect.

GetTo

())

1044  else if

(aleft == last_exon-1)

1045

aright = intersect.

GetTo

() >

a

.Exons()[aleft].GetTo() ? last_exon : aleft;

1049

aright = std::lower_bound(

a

.Exons().begin()+aleft,

a

.Exons().end(), intersect.

GetTo

(), [](

const CModelExon

& e,

TSignedSeqPos

p){ return e.GetTo() < p; })-

a

.Exons().begin();

1050  if

(intersect.

GetTo

() <

a

.Exons()[aright].GetFrom())

1054

rslt.second = aright;

1061  if

(

b

.Strand() !=

a

.Strand())

1065  bool

aflex =

false

;

1076  bool

bflex =

false

;

1087  if

(intersect.

GetLength

() < min_overlap)

1097

aright = rslt.second;

1107

bright = rslt.second;

1110  if

(aright-aleft != bright-bleft)

1113  for

(

int

ea = aleft, eb = bleft; ea < aright; ++ea, ++eb) {

1114  if

(

a

.Exons()[ea].GetTo() !=

b

.Exons()[eb].GetTo())

1116  if

(

a

.Exons()[ea+1].GetFrom() !=

b

.Exons()[eb+1].GetFrom())

1120  return

2*(aright-aleft)+1;

1130  if

(intersect.

GetLength

() <= 1)

return

0;

1132  int

anum = (

int

)

a

.Exons().size()-1;

1133  for

(; intersect.

GetFrom

() <

a

.Exons()[anum].GetFrom() ; --anum);

1134  bool

aexon = intersect.

GetFrom

() <=

a

.Exons()[anum].GetTo();

1135  if

(!aexon && intersect.

GetTo

() <

a

.Exons()[anum+1].GetFrom())

return

0;

1137  int

bnum = (

int

)

b

.Exons().size()-1;

1138  for

(; intersect.

GetFrom

() <

b

.Exons()[bnum].GetFrom(); --bnum);

1139  bool

bexon = intersect.

GetFrom

() <=

b

.Exons()[bnum].GetTo();

1140  if

(!bexon && intersect.

GetTo

() <

b

.Exons()[bnum+1].GetFrom())

return

0;

1146  int

firstcommonpoint = -1;

1148

unique_ptr<CAlignMap> pmapa, pmapb;

1150  while

(left <= intersect.

GetTo

())

1152  TSignedSeqPos

aright = aexon ?

a

.Exons()[anum].GetTo() :

a

.Exons()[anum+1].GetFrom()-1;

1153  TSignedSeqPos

bright = bexon ?

b

.Exons()[bnum].GetTo() :

b

.Exons()[bnum+1].GetFrom()-1;

1156  if

(!aexon && bexon)

1158  if

(

a

.Exons()[anum].m_ssplice &&

a

.Exons()[anum+1].m_fsplice)

return

0;

1159  if

(left ==

a

.Exons()[anum].GetTo()+1 &&

a

.Exons()[anum].m_ssplice)

return

0;

1160  if

(right == aright &&

a

.Exons()[anum+1].m_fsplice)

return

0;

1162  if

(aexon && !bexon)

1164  if

(

b

.Exons()[bnum].m_ssplice &&

b

.Exons()[bnum+1].m_fsplice)

return

0;

1165  if

(left ==

b

.Exons()[bnum].GetTo()+1 &&

b

.Exons()[bnum].m_ssplice)

return

0;

1166  if

(right == bright &&

b

.Exons()[bnum+1].m_fsplice)

return

0;

1169  if

(aexon && bexon) {

1170  if

(firstcommonpoint < 0) {

1171

firstcommonpoint = left;

1172

}

else if

((anum > 0 && left ==

a

.Exons()[anum].GetFrom() && !

a

.Exons()[anum].m_fsplice) ||

1173

(bnum > 0 && left ==

b

.Exons()[bnum].GetFrom() && !

b

.Exons()[bnum].m_fsplice)) {

1176

pmapa.reset(

new CAlignMap

(

a

.Exons(),

a

.FrameShifts(),

a

.Strand()));

1177

pmapb.reset(

new CAlignMap

(

b

.Exons(),

b

.FrameShifts(),

b

.Strand()));

1178

afirst = pmapa->MapOrigToEdited(firstcommonpoint);

1179

bfirst = pmapb->MapOrigToEdited(firstcommonpoint);

1180  if

(afirst < 0 || bfirst < 0)

return

0;

1185  if

(asecond < 0 || bsecond < 0 || (asecond-afirst)%3 != (bsecond-bfirst)%3)

return

0;

1189  if

(aexon && aright == right &&

a

.Exons()[anum].m_ssplice &&

1190

bexon && bright == right &&

b

.Exons()[bnum].m_ssplice) ++commonspl;

1191  if

(!aexon && aright == right &&

a

.Exons()[anum+1].m_fsplice &&

1192

!bexon && bright == right &&

b

.Exons()[bnum+1].m_fsplice) ++commonspl;

1196  if

(right == aright)

1202  if

(right == bright)

1209  return

firstcommonpoint >= 0 ? commonspl+1 : 0;

1217  for

(

unsigned int i

= 1;

i

<

a

.Exons().

size

(); ++

i

) {

1218  if

(!

a

.Exons()[

i

-1].m_ssplice || !

a

.Exons()[

i

].m_fsplice){

1221  if

(k->Limits().IntersectingWith(hole)) {

1242  MyExons

().back().m_ssplice =

true

;

1248  MyExons

().front().m_fsplice =

true

;

1269  else if

(!infront) {

1271  MyExons

().back().m_ssplice =

true

;

1277  MyExons

().front().m_fsplice =

true

;

1293  else if

(!infront) {

1295  MyExons

().back().m_ssplice =

true

;

1297  MyExons

().back().m_ssplice_sig =

"XX"

;

1303  MyExons

().front().m_fsplice =

true

;

1305  MyExons

().front().m_fsplice_sig =

"XX"

;

1341  for

(

int i

= 0;

i

<

int

(exons_with_gaps.size())-1; ++

i

) {

1342  if

(exons_with_gaps[

i

].GetTo() < left_edge && left_edge < exons_with_gaps[

i

+1].GetFrom()) {

1343  _ASSERT

( !exons_with_gaps[

i

].m_ssplice && !exons_with_gaps[

i

+1].m_fsplice );

1344  _ASSERT

( right_edge >= exons_with_gaps[

i

+1].GetFrom() );

1350  for

(

int

tpos = tlim.

GetFrom

()+del; left_edge < 0 && tpos <= tlim.

GetTo

(); tpos += 3) {

1358  if

(exons_with_gaps[

i

].GetTo() < right_edge && right_edge < exons_with_gaps[

i

+1].GetFrom()) {

1359  _ASSERT

( !exons_with_gaps[

i

].m_ssplice && !exons_with_gaps[

i

+1].m_fsplice );

1360  _ASSERT

( left_edge <= exons_with_gaps[

i

].GetTo() );

1366  for

(

int

tpos = tlim.

GetTo

()-del; right_edge < 0 && tpos >= tlim.

GetFrom

(); tpos -= 3) {

1393  for

(

i

=0,j=0;

i

<

a

.size() || j<

b

.size(); ) {

1394  if

(

i

==

a

.size())

1396  else if

(j==

b

.size())

1398  else if

(

a

[

i

].GetTo()+1<

b

[j].GetFrom())

1400  else if

(

b

[j].GetTo()+1<

a

[

i

].GetFrom())

1403  b

[j].Extend(

a

[

i

++]);

1404  while

(j+1<

b

.size() &&

b

[j].GetTo()+1>=

b

[j+1].GetFrom()) {

1405  b

[j+1].Extend(

b

[j]);

1410  MyExons

().back().m_ident = 0;

1422  if

(indl->IsDeletion())

1424

TInDels::const_iterator

next

= indl;

1441  if

(

Exons

()[0].Limits().NotEmpty()) {

1460  MyExons

().front().AddFrom(-amount);

1467  MyExons

().back().AddTo(amount);

1503 #ifdef HAVE_IOS_REGISTER_CALLBACK 1507  T

&

slot

(ios_base& iob)

1509  void

*&p = iob.pword(m_index);

1510  T

*c =

static_cast<T

*

>

(p);

1513

iob.register_callback(ios_callback, m_index);

1519  static void

ios_callback(ios_base::event e, ios_base& iob,

int

index)

1521  if

(e == ios_base::erase_event) {

1522  delete static_cast<T

*

>

(iob.pword(index));

1523

}

else if

(e == ios_base::copyfmt_event) {

1524  void

*&p = iob.pword(index);

1526  T

*old =

static_cast<T

*

>

(p);

1599

is.setstate(ios::failbit);

1645  r

.print(os);

return

os;

1649 const char

* dot =

"."

;

1655

os << (

seqid

.empty()?dot:

seqid

) <<

'\t'

;

1657

os << (

type

.empty()?dot:

type

) <<

'\t'

;

1659

os << (

start

+1) <<

'\t'

;

1663

os << (

end

+1) <<

'\t'

;

1668  if

(

phase

< 0) os << dot;

else

os <<

phase

; os <<

'\t'

;

1670

os <<

"model="

<<

model

;

1672  if

(!

i

->second.empty())

1673

os <<

';'

<<

i

->first <<

'='

<<

i

->second;

1700

rec.

start

= NStr::StringToNumeric<int>(v[3])-1;

1703

rec.

end

= NStr::StringToNumeric<int>(v[4])-1;

1704

rec.

score

= v[5]==dot?

BadScore

():NStr::StringToNumeric<double>(v[5]);

1706

rec.

phase

= v[7]==dot?-1:NStr::StringToNumeric<int>(v[7]);

1710  bool

model_id_present =

false

;

1716  if

(

key

==

"model"

) {

1717

rec.

model

= NStr::StringToNumeric<Int8>(

value

);

1718

model_id_present =

true

;

1719

}

else if

(

key

==

"Target"

) {

1722

rec.

tstart

= NStr::StringToNumeric<int>(tt[1])-1;

1723

rec.

tend

= NStr::StringToNumeric<int>(tt[2])-1;

1724  if

(tt.size() > 3 && tt[3] ==

"-"

)

1731  if

(!model_id_present)

1744  if

(prev_pos < indel.

Loc

())

1763  int

prev_pos = start;

1766  if

(indel.

Loc

() < start)

1776  if

(prev_pos < end+1)

1787

vector<string> operations;

1792  if

((*o)[0] ==

'c'

) {

1794

o->erase(o->begin());

1795

}

else if

((*o)[0] ==

'n'

) {

1797

o->erase(o->begin());

1800  if

((*o)[0] ==

'M'

) {

1802

}

else if

((*o)[0] ==

'D'

) {

1804

indels.back().SetStatus(status);

1806

}

else if

((*o)[0] ==

'I'

) {

1808  len

= (

int

)o->length()-1;

1811

indels.back().SetStatus(status);

1815  len

= (

int

)o->length()-1;

1818

indels.back().SetStatus(status);

1829  if

((

type

&

eProt

)!=0)

return "ProSplign"

;

1837  if

(

a

.GeneID()!=0)

1839  if

(

a

.RankInGene()!=0)

1841  if

(

a

.TrustedGroup()!=0)

1867  if

(

a

.TargetLen() > 0)

1870  if

(

a

.Ident() > 0)

1873  if

(

a

.Weight() > 1)

1876  if

(!

a

.ProteinHit().empty())

1901  if

(

a

.GetCdsInfo().ReadingFrame().NotEmpty()) {

1920  bool

tCoords =

false

;

1926  if

(protcds.

NotEmpty

() && protcds != rf) {

1935  else if

(cds_info.

OpenCds

())

1937  attributes

[

"flags"

] +=

","

+adj+

"Start"

;

1955  if

(

a

.isNMD(50))

attributes

[

"flags"

] +=

",NMD"

;

1984  return TSignedSeqRange

(NStr::StringToNumeric<TSignedSeqPos>(start)-1,NStr::StringToNumeric<TSignedSeqPos>(stop)-1);

1989  bool

open_cds =

false

;

1990  bool

confirmed_start =

false

;

1991  bool

confirmed_stop =

false

;

1992  bool

has_start =

false

;

1993  bool

has_stop =

false

;

1994  bool

tcoords =

false

;

1996

vector<string>

flags

;

2021  else if

(*

f

==

"ConfirmedStart"

) { confirmed_start =

true

; has_start =

true

; }

2022  else if

(*

f

==

"PutativeStart"

) { open_cds =

true

; has_start =

true

; }

2023  else if

(*

f

==

"Start"

) has_start =

true

;

2024  else if

(*

f

==

"ConfirmedStop"

) { confirmed_stop =

true

; has_stop =

true

; }

2025  else if

(*

f

==

"Stop"

) has_stop =

true

;

2026  else if

(*

f

==

"tCoords"

) tcoords =

true

;

2032  a

.SetRankInGene(NStr::StringToNumeric<int>(

attributes

[

"rankInGene"

]));

2035  a

.SetTrustedGroup(NStr::StringToNumeric<int>(

attributes

[

"TrustedGroup"

]));

2046

target =

"gnl|GNOMON|"

+target.substr(4);

2048

target =

"pir||"

+target;

2052  a

.SetTargetId(*target_id);

2056

vector<string> support;

2058  ITERATE

(vector<string>, s, support) {

2059  bool

core = (*s)[0] ==

'*'

;

2060  Int8 id

= NStr::StringToNumeric<Int8>(core ? s->substr(1) : *s);

2065

vector<string> trustedmrna;

2067  ITERATE

(vector<string>, s, trustedmrna) {

2071

vector<string> trustedprot;

2073  ITERATE

(vector<string>, s, trustedprot) {

2080  a

.SetIdent(NStr::StringToNumeric<double>(

attributes

[

"Ident"

]));

2083  a

.SetWeight(NStr::StringToNumeric<double>(

attributes

[

"Weight"

]));

2096

protcds =

a

.GetAlignMap().MapRangeOrigToEdited(protcds,

false

);

2103  swap

(has_start, has_stop);

2114

reading_frame.

SetTo

(reading_frame.

GetTo

()-3);

2118  swap

(has_start, has_stop);

2123

cds_info.

SetStart

(start,confirmed_start);

2125

cds_info.

SetStop

(stop,confirmed_stop);

2128

vector<string> stops;

2130  ITERATE

(vector<string>, s, stops) {

2131

vector<string> parts;

2135

pstop =

a

.GetAlignMap().MapRangeOrigToEdited(pstop,

false

);

2137  if

(parts.size() > 2) {

2138  if

(parts[2] ==

"C"

)

2140  else if

(parts[2] ==

"N"

)

2142  else if

(parts[2] ==

"S"

)

2147

cds_info.

AddPStop

(pstop, status);

2154

max_cds_limits = tlim;

2166

max_cds_limits =

a

.GetAlignMap().MapRangeOrigToEdited(max_cds_limits,

false

);

2170  if

(max_cds_limits.

GetTo

() < tlim.

GetTo

())

2180  a

.SetCdsInfo(cds_info);

2188  a

.SetCdsInfo(cds_info);

2197  if

(

a

.Strand() ==

ePlus

)

2199  else if

(

a

.Strand() ==

eMinus

)

2203

mrna.

type

=

"mRNA"

;

2204

mrna.

start

=

a

.Limits().GetFrom();

2205

mrna.

end

=

a

.Limits().GetTo();

2206

mrna.

score

=

a

.Score();

2213

vector<SGFFrec> exons,cdss;

2217

exon.

type

=

"exon"

;

2236  TInDels

corrections =

a

.FrameShifts();

2237  for

(

unsigned int i

= 0;

i

<

a

.Exons().

size

(); ++

i

) {

2266

exon.

attributes

[

"Target"

] = targetid+target;

2279  if

(

a

.Strand() ==

ePlus

) {

2280

exon.

attributes

[

"Splices"

] = fs+

".."

+ss;

2282

exon.

attributes

[

"Splices"

] = ss+

".."

+fs;

2286

exons.push_back(exon);

2299  TSignedSeqRange

cds_limits =

a

.GetAlignMap().MapRangeEditedToOrig(tcds,

true

);

2310

cds.

attributes

[

"Target"

] = targetid+ctarget;

2311

cdss.push_back(cds);

2316  if

(!

a

.Continuous()) {

2319  if

(exons.front().start >= 0) {

2320

rec.

start

= exons.front().start;

2322  _ASSERT

(exons.size() > 1 && exons[1].start >= 0);

2323

rec.

start

= exons[1].start;

2325  if

(exons.back().end >= 0) {

2326

rec.

end

= exons.back().end;

2328  _ASSERT

(exons.size() > 1 && exons[exons.size()-2].end >= 0);

2329

rec.

end

= exons[exons.size()-2].end;

2331

rec.

type

=

"mRNA_part"

;

2336

e->attributes[

"Parent"

] += suffix;

2342  if

(

a

.Strand()==

ePlus

)

2345

phase = (e->tend - e->tstart+1 - phase)%3;

2348

phase = (3-phase)%3;

2350

e->attributes[

"Parent"

] += suffix;

2363 

{

return Precede

( __x, __y ); }

2371  if

(

a

.GetFrom()==

b

.GetFrom())

2372  a

.SetFrom(

b

.GetTo()+1);

2373  else if

(

a

.GetTo()==

b

.GetTo())

2374  a

.SetTo(

b

.GetFrom()-1);

2392

vector<SGFFrec> recs;

2395

recs.push_back(rec);

2396

}

while

(is >> rec && rec.

seqid

== recs.front().seqid && rec.

model

==

id

&& rec.

type

!=

"mRNA"

);

2409  bool

tcoords =

false

;

2411

vector<CModelExon> exons;

2412

vector<TSignedSeqRange> transcript_exons;

2423  else if

(rec.

strand

==

'-'

)

2430  if

(

r

->type ==

"mRNA"

) {

2433

}

else if

(

r

->type ==

"exon"

) {

2434  if

(

r

->tstart >= 0 &&

r

->tstrand ==

'-'

) {

2439  if

(!

r

->attributes[

"Splices"

].empty()) {

2440  string

splices =

r

->attributes[

"Splices"

];

2441  auto

ispl = splices.find(

".."

);

2442  if

(ispl != string::npos) {

2444

fs = splices.substr(0,2);

2445  if

(ispl+4 == splices.length())

2446

ss = splices.substr(ispl+2,2);

2453  if

(!

r

->attributes[

"Ident"

].empty()) {

2454

eident = NStr::StringToNumeric<double>(

r

->attributes[

"Ident"

]);

2457  if

(

r

->start >= 0 &&

r

->end >= 0)

2458

exons.push_back(

CModelExon

(

r

->start,

r

->end,

false

,

false

,fs,ss,eident));

2461  if

(!

r

->attributes[

"Source"

].empty()) {

2464  _ASSERT

((

int

)v.size() == 4);

2466

src.

m_range

.

SetFrom

(NStr::StringToNumeric<TSignedSeqPos>(v[1])-1);

2467

src.

m_range

.

SetTo

(NStr::StringToNumeric<TSignedSeqPos>(v[2])-1);

2473

exons.push_back(

CModelExon

(1,-1,

false

,

false

,fs,ss,eident,

r

->attributes[

"Seq"

],src));

2477

transcript_exons.push_back(texon);

2478  readGFF3Gap

(

r

->attributes[

"Gap"

],

r

->start,

r

->end, indels);

2479  if

(!

r

->attributes[

"Target"

].empty())

2480  attributes

[

"Target"

] =

r

->attributes[

"Target"

];

2481

}

else if

(

r

->type ==

"CDS"

) {

2484  if

(

r

->strand==

'+'

) {

2490  if

(

r

->tstart < 0) {

2499

}

else if

(

r

->type ==

"mRNA_part"

) {

2504  for

(

int i

= 0;

i

< (

int

)exons.size(); ++

i

) {

2506  if

(

a

.Limits().IntersectingWith(e.

Limits

())) {

2509  if

(

i

> 0 && exons[

i

-1].Limits().NotEmpty()) {

2517  sort

(indels.begin(),indels.end());

2519  if

(!transcript_exons.empty())

2520

amap =

CAlignMap

(

a

.Exons(), transcript_exons, indels,

a

.Orientation(), NStr::StringToNumeric<int>(

attributes

[

"TargetLen"

]));

2522

amap =

CAlignMap

(

a

.Exons(), indels,

a

.Strand());

2524  a

.FrameShifts() = indels;

2579

os.setstate(ios::failbit);

2590

is.setstate(ios::failbit);

2596

: m_id( model_id), m_core_align(core)

void remove_if(Container &c, Predicate *__pred)

TSignedSeqPos FShiftedMove(TSignedSeqPos orig_pos, int len) const

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

TSignedSeqPos MapOrigToEdited(TSignedSeqPos orig_pos) const

TSignedSeqPos MapEditedToOrig(TSignedSeqPos edited_pos) const

TSignedSeqRange ShrinkToRealPoints(TSignedSeqRange orig_range, bool snap_to_codons=false) const

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

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

string TargetAccession() const

void RecalculateAlignMap(int left, int right)

CConstRef< objects::CSeq_id > GetTargetId() const

virtual CAlignMap GetAlignMap() const

void SetTargetId(const objects::CSeq_id &id)

void Cut(TSignedSeqRange hole)

CCDSInfo MapFromEditedToOrig(const CAlignMap &amap) const

bool PStop(bool includeall=true) const

void SetStart(TSignedSeqRange r, bool confirmed=false)

CCDSInfo MapFromOrigToEdited(const CAlignMap &amap) const

TSignedSeqRange MaxCdsLimits() const

void Set5PrimeCdsLimit(TSignedSeqPos p)

void Remap(const CRangeMapper &mapper)

bool IsMappedToGenome() const

void SetScore(double score, bool open=false)

bool m_genomic_coordinates

TSignedSeqRange m_reading_frame_from_proteins

TSignedSeqRange Start() const

bool ConfirmedStart() const

TSignedSeqRange m_reading_frame

void Clip(TSignedSeqRange limits)

void AddPStop(SPStop stp)

TSignedSeqRange Cds() const

void CombineWith(const CCDSInfo &another_cds_info)

TSignedSeqRange ReadingFrame() const

TSignedSeqRange m_max_cds_limits

TSignedSeqRange ProtReadingFrame() const

void SetStop(TSignedSeqRange r, bool confirmed=false)

const TPStops & PStops() const

bool ConfirmedStop() const

void Clear5PrimeCdsLimit()

void SetReadingFrame(TSignedSeqRange r, bool protein=false)

bool operator==(const CCDSInfo &another) const

TSignedSeqRange Stop() const

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

TSignedSeqPos FShiftedMove(TSignedSeqPos pos, int len) const

void ExtendRight(int amount)

void RemoveExtraFShifts(int left, int right)

bool isNMD(int limit=50) const

void TrimEdgesToFrameInOtherAlignGaps(const TExons &exons_with_gaps)

void AddNormalExon(TSignedSeqRange exon, const string &fs, const string &ss, double ident, bool infront)

virtual void CutExons(TSignedSeqRange hole)

int MutualExtension(const CGeneModel &a) const

TSignedSeqRange TranscriptLimits() const

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

EStrand Orientation() const

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

const TExons & Exons() const

TSignedSeqRange ReadingFrame() const

virtual CAlignMap GetAlignMap() const

TSignedSeqRange RealCdsLimits() const

TSignedSeqRange TranscriptExon(int i) const

void ReverseComplementModel()

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

void SetStrand(EStrand s)

void RemoveShortHolesAndRescore(const CGnomonEngine &gnomon)

virtual void Clip(TSignedSeqRange limits, EClipMode mode, bool ensure_cds_invariant=true)

void SetCdsInfo(const CCDSInfo &cds_info)

void AddGgapExon(double ident, const string &seq, const CInDelInfo::SSource &src, bool infront)

TSignedSeqRange Limits() const

bool IsSubAlignOf(const CGeneModel &a) const

int HasCompatibleOverlap(const CGeneModel &a, int min_overlap=2) const

const CCDSInfo & GetCdsInfo() const

vector< CModelExon > TExons

bool CdsInvariant(bool check_start_stop=true) const

TSignedSeqRange MaxCdsLimits() const

bool ConfirmedStart() const

void ExtendLeft(int amount)

TInDels GetInDels(bool fs_only) const

static string TypeToString(int type)

void Remap(const CRangeMapper &mapper)

int isCompatible(const CGeneModel &a) const

void GetScore(CGeneModel &model, bool extend5p=false, bool obeystart=false, bool extend_max_cds=false) const

int GetMinIntronLen() const

static CRef< CSeq_id > GnomonMRNA(Int8 id)

static CRef< CSeq_id > ToSeq_id(const string &str)

static string ToString(const CSeq_id &id)

TSignedSeqPos Loc() const

EStatus GetStatus() const

CInDelInfo::SSource m_source

TSignedSeqPos GetFrom() const

const TSignedSeqRange & Limits() const

TSignedSeqPos GetTo() const

void Extend(const CModelExon &e)

map< IOS_BASE *, T > TMap

CStreamState(const T &deflt)

bool operator==(const CSupportInfo &s) const

CSupportInfo(Int8 model_id, bool core=false)

bool operator<(const CSupportInfo &s) const

container_type::iterator iterator

const_iterator begin() const

const_iterator end() const

iterator_bool insert(const value_type &val)

const_iterator find(const key_type &key) const

iterator_bool insert(const value_type &val)

parent_type::iterator iterator

const_iterator end() const

const_iterator lower_bound(const key_type &key) const

bool Empty(const CNcbiOstrstream &src)

static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)

static void DLIST_NAME() remove(DLIST_LIST_TYPE *list, DLIST_TYPE *item)

static const struct attribute attributes[]

static const TDS_WORD limits[]

CNcbiIstream & Getline(CNcbiIstream &is, string &line)

CStreamState< string > contig_stream_state(kEmptyStr)

CNcbiOstream & printGFF3(CNcbiOstream &os, CAlignModel a)

TSignedSeqRange StringToRange(const string &s)

void readGFF3Gap(const string &gap, TSignedSeqPos start, TSignedSeqPos end, TInDels &indels)

void ParseAttributes(map< string, string > &attributes, CAlignModel &a)

CNcbiOstream & operator<<(CNcbiOstream &s, const setcontig &c)

CStreamState< EModelFileFormat > model_file_format_state(eGFF3FileFormat)

CNcbiIstream & InputError(CNcbiIstream &is)

CStreamState< pair< string, string > > line_buffer(make_pair(kEmptyStr, kEmptyStr))

void CollectAttributes(const CAlignModel &a, map< string, string > &attributes)

TSignedSeqRange operator-(TSignedSeqRange a, TSignedSeqRange b)

void Ungetline(CNcbiIstream &is)

CNcbiIstream & operator>>(CNcbiIstream &is, const getcontig &c)

pair< int, int > ExonNumsForInterval(const CGeneModel &a, TSignedSeqRange &intersect)

string BuildGFF3Gap(int &prev_pos, const CInDelInfo &indel)

CNcbiIstream & readGFF3(CNcbiIstream &is, CAlignModel &align)

bool Precede(TSignedSeqRange l, TSignedSeqRange r)

bool Include(TSignedSeqRange big, TSignedSeqRange small)

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

vector< CInDelInfo > TInDels

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define ERASE_ITERATE(Type, Var, Cont)

Non-constant version with ability to erase current element, if container permits.

int TSignedSeqPos

Type for signed sequence position.

#define VECTOR_ERASE(Var, Cont)

Use this macro inside body of ERASE_ITERATE cycle to erase from vector-like container.

#define NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

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)

TSeqPos GetLength(const CSeq_id &id, CScope *scope)

Get sequence length if scope not null, else return max possible TSeqPos.

int64_t Int8

8-byte (64-bit) signed integer

position_type GetLength(void) const

bool NotEmpty(void) const

bool IntersectingWith(const TThisType &r) const

TThisType & CombineWith(const TThisType &r)

static TThisType GetEmpty(void)

static position_type GetWholeFrom(void)

CRange< TSignedSeqPos > TSignedSeqRange

static TThisType GetWhole(void)

static position_type GetWholeTo(void)

#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.

CNcbiIstream & NcbiGetlineEOL(CNcbiIstream &is, string &str, string::size_type *count=NULL)

Read from "is" to "str" the next line (taking into account platform specifics of End-of-Line)

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)

Convert double to string.

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static string Join(const TContainer &arr, const CTempString &delim)

Join strings using the specified delimiter.

static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)

Split a string into two pieces using the specified delimiters.

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

@ fConvErr_NoThrow

Do not throw an exception on error.

@ fAllowLeadingSymbols

Ignore leading non-numeric characters.

@ fSplit_MergeDelimiters

Merge adjacent delimiters.

#define NCBI_XALGOGNOMON_EXPORT

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 auto sort(_Init &&init)

constexpr auto front(list< Head, As... >, T=T()) noexcept -> Head

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

const struct ncbi::grid::netcache::search::fields::SIZE size

const struct ncbi::grid::netcache::search::fields::KEY key

const GenericPointer< typename T::ValueType > T2 value

Useful/utility classes and methods.

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

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

bool operator()(const TSignedSeqRange &__x, const TSignedSeqRange &__y) const

void print(CNcbiOstream &os) const

map< string, string > attributes

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