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

NCBI C++ ToolKit: src/sra/readers/bam/bamread.cpp Source File

40 #include <klib/text.h> 41 #include <klib/sra-release-version.h> 42 #include <kfg/config.h> 44 #include <vfs/manager.h> 45 #include <kns/manager.h> 48 #include <align/bam.h> 49 #include <align/align-access.h> 62 #ifndef NCBI_THROW2_FMT 63 # define NCBI_THROW2_FMT(exception_class, err_code, message, extra) \ 64  throw NCBI_EXCEPTION2(exception_class, err_code, FORMAT(message), extra) 102  const string

& message,

107

this->x_Init(

info

, message, prev_exc, severity);

115  const string

& message,

121

this->x_Init(

info

, message, prev_exc, severity);

129  const string

& message,

131  const string

& param,

137

this->x_Init(

info

, message, prev_exc, severity);

145

m_Param(other.m_Param)

164  return "CBamException"

;

183  case eNoData

:

return "eNoData"

;

307  if

( acc.size() != 9 && acc.size() != 12 ) {

311  "SRZ accession must be 9 or 12 chars long: "

+acc);

316  string

prefix = acc.substr(0, 3);

318  if

( prefix !=

"SRZ"

&& prefix !=

"DRZ"

&& prefix !=

"ERZ"

) {

322  "SRZ accession must start with SRZ, DRZ, or ERZ: "

+acc);

335  "SRZ accesion is improperly formatted: "

+acc);

340  unsigned

level1 = num/1000;

342

snprintf(sub_dir,

sizeof

(sub_dir),

"%s/%06u/%s%s/provisional"

,

343

prefix.c_str(), level1, prefix.c_str(), acc.c_str()+3);

344

sub_dir[

sizeof

(sub_dir)-1] =

'\0'

;

357  "SRZ accession not found: "

+acc);

447  if

( !

id

&&

str

.find(

'|'

) !=

NPOS

) {

451  if

( !ids.empty() ) {

469  if

( external ||

str

.find(

'|'

) !=

NPOS

) {

499

SraReleaseVersion release_version;

500

SraReleaseVersionGet(&release_version);

501

s << (release_version.version>>24) <<

'.' 502

<< ((release_version.version>>16)&0xff) <<

'.' 503

<< (release_version.version&0xffff);

504  if

( release_version.revision != 0 ||

505

release_version.type != SraReleaseVersion::eSraReleaseVersionTypeFinal ) {

506  const char

*

type

=

""

;

507  switch

( release_version.type ) {

508  case

SraReleaseVersion::eSraReleaseVersionTypeDev:

type

=

"dev"

;

break

;

509  case

SraReleaseVersion::eSraReleaseVersionTypeAlpha:

type

=

"a"

;

break

;

510  case

SraReleaseVersion::eSraReleaseVersionTypeBeta:

type

=

"b"

;

break

;

511  case

SraReleaseVersion::eSraReleaseVersionTypeRC:

type

=

"RC"

;

break

;

512  default

:

type

=

""

;

break

;

514

s <<

'-'

<<

type

<< release_version.revision;

538

{

"debug:"

,

Trace

},

539

{

"fatal:"

,

Fatal

},

543  if

( !token.

empty

() && token[token.

size

()-1] ==

':'

) {

545  if

( token ==

tag

.tag ) {

554 static

thread::id s_DiagCheckThreadID;

560

s_DiagCheckThreadID = this_thread::get_id();

567  return

s_DiagCheckThreadID == this_thread::get_id();

581  for

(

SIZE_TYPE

token_pos = 0, token_end; token_pos <

msg

.size(); token_pos = token_end + 1 ) {

582

token_end =

msg

.find(

' '

, token_pos);

583  if

( token_end ==

NPOS

) {

584

token_end =

msg

.size();

587

sev_manip =

tag

->manip;

591  if

( sev_manip ==

Trace

) {

610  string

host = app->GetConfig().GetString(

"CONN"

,

"HTTP_PROXY_HOST"

,

kEmptyStr

);

611  int

port = app->GetConfig().GetInt(

"CONN"

,

"HTTP_PROXY_PORT"

, 0);

612  if

( !host.empty() && port != 0 ) {

615  "Cannot create KConfig singleton"

, rc);

619  "/http/proxy/path"

, path.c_str()) ) {

621  "Cannot set KConfig proxy path"

, rc);

624  "/http/proxy/enabled"

,

true

) ) {

626  "Cannot set KConfig proxy enabled"

, rc);

640  auto

req_ctx_version = req_ctx.

GetVersion

();

641  if

( &req_ctx == s_LastRequestContext && req_ctx_version == s_LastRequestContextVersion ) {

644  _TRACE

(

"CVDBMgr: Updating request context with version: "

<<req_ctx_version);

645

s_LastRequestContext = &req_ctx;

646

s_LastRequestContextVersion = req_ctx_version;

650  "Cannot create KNSManager singleton"

, rc);

654

KNSManagerSetSessionID(kns_mgr, req_ctx.

GetSessionID

().c_str());

658

KNSManagerSetClientIP(kns_mgr, req_ctx.

GetClientIP

().c_str());

662

KNSManagerSetPageHitID(kns_mgr, req_ctx.

GetHitID

().c_str());

670  if

( app && app->

GetConfig

().

GetBool

(

"VDB"

,

"ALLOW_ALL_CERTS"

,

false

) ) {

671  if

(

rc_t

rc = KNSManagerSetAllowAllCerts(kns_mgr,

true

) ) {

673  "Cannot enable all HTTPS certificates in KNSManager"

, rc);

686 #ifdef NCBI_PRODUCTION_VER 687  str

<< NCBI_PRODUCTION_VER <<

"/"

;

689 #ifdef NCBI_DEVELOPMENT_VER 693

KNSManagerSetUserAgent(kns_mgr,

"%s; VDB %s"

,

728  static bool

initialized =

false

;

729  if

( !initialized ) {

736

ask_level = klogDebug;

738

ask_level = klogInfo;

741

KLogLevelSet(ask_level);

745  const char

*

msg

=

"info: VDB initialized"

;

754  "Cannot create KNSManager singleton"

, rc);

772  "cannot get VFSManager"

, rc);

774

VFSManagerLogNamesServiceErrors(*

this

,

false

);

776  if

(

rc_t

rc = VFSManagerGetKNSMgr(*

this

, kns_mgr.

x_InitPtr

()) ) {

778  "Cannot get KNSManager"

, rc);

789  "Cannot create AlignAccessMgr"

, rc);

799  return

s.length() >= 2 &&

isalpha

(

Uchar

(s[0])) && s[1] ==

':'

;

809  if

( s.find_first_of(

"/\\"

) ==

NPOS

) {

847  string

fixed_path = path;

855

replace(fixed_path.begin(), fixed_path.end(),

'\\'

,

'/'

);

860

fixed_path[0] =

'/'

;

863  const char

* c_path = fixed_path.c_str();

865  const char

* c_path = path.c_str();

869  if

(

rc_t

rc = VFSManagerMakePath(mgr, &kpath, c_path) ) {

871  "Cannot create VPath object"

, rc);

879

{ VPathRelease(kpath); }

884  const string

& db_name)

890

kdb_name.

get

()) ) {

893  "Cannot open BAM DB"

, rc, db_name);

899  const string

& base_name,

904

dst.push_back(base_name.substr(0, base_name.size()-old_ext.

size

())+new_ext);

910  const string

& db_name,

915

vector<string> index_name_candidates;

916  if

( idx_name.empty() || idx_name == db_name ) {

917

index_name_candidates.push_back(db_name+

kBaiExt

);

921

index_name_candidates.push_back(idx_name);

923  for

(

size_t i

= 0;

i

< index_name_candidates.size(); ++

i

) {

925

index_name_candidates[

i

]));

929

kidx_name.

get

()) ) {

930  if

(

i

< index_name_candidates.size()-1 &&

931

GetRCTarget(rc) == rcFile &&

932

GetRCState(rc) == rcNotFound ) {

937

*m_DB.x_InitPtr() = 0;

939  "Cannot open BAM DB"

, rc, db_name);

943

idx_name = index_name_candidates[

i

];

951  const string

& db_name,

966  const string

& db_name,

967  const string

& idx_name,

970

m_IndexName(idx_name)

1003  string label

= it.GetRefSeqId();

1033  len

= it.GetLength();

1038

(*lengths)[it.GetRefSeqId()] =

len

;

1057  if

(

rc_t

rc = AlignAccessDBExportBAMFile(

m_AADB

->m_DB,

file

.x_InitPtr()) ) {

1059  "Cannot get BAMFile pointer"

, rc);

1061  const char

* header;

1063  if

(

rc_t

rc = BAMFileGetHeaderText(

file

, &header, &

size

) ) {

1065  "Cannot get BAM header text"

, rc);

1072 #ifdef HAVE_NEW_PILEUP_COLLECTOR 1091

EIntronMode intron_mode)

1093

initialize(ref_range, intron_mode);

1098

EIntronMode intron_mode)

1100

m_RefToOpen = m_RefFrom = ref_range.

GetFrom

();

1102

m_IntronMode = intron_mode;

1104  for

(

auto

& c : max_count ) c = 0;

1106

cc_acgt.resize(

len

);

1108

cc_match.resize(

len

);

1110

cc_gap.resize(

len

);

1113  if

( count_introns() ) {

1114

cc_intron.resize(

len

);

1123  _ASSERT

(accumulate(&cc_gap[0], &cc_gap[m_RefToOpen-m_RefFrom+1], 0) == 0);

1130  _ASSERT

(accumulate(&cc_gap[

len

], &cc_gap[m_RefToOpen-m_RefFrom+1], 0) == 0);

1137  _ASSERT

(accumulate(&cc_intron[0], &cc_intron[m_RefToOpen-m_RefFrom+1], 0) == 0);

1141  g

+= cc_intron[

i

];

1142

cc_intron[

i

] =

g

;

1144  _ASSERT

(accumulate(&cc_intron[

len

], &cc_intron[m_RefToOpen-m_RefFrom+1], 0) == 0);

1180  const char

* src = read.

data

()+read_pos;

1181

SPileupValues::SCountACGT* dst = cc_acgt.data()+pos;

1182

SPileupValues::SCountACGT* dst_end = cc_acgt.data()+end;

1183

TCount* dst_match = cc_match.data()+pos;

1186  __m128i

bits =

_mm_set_epi32

(1<<(

'T'

&0x1f), 1<<(

'G'

&0x1f), 1<<(

'C'

&0x1f), 1<<(

'A'

&0x1f));

1189  for

( ; dst < dst_end; ++src, ++dst, ++dst_match ) {

1192  unsigned b

= *src & 0x1f;

1193

dst_match[0] +=

b

== (

'='

& 0x1f);

1195

add_bases_acgt(dst,

b

, bits,

mask

);

1197

add_bases_acgt(dst,

b

);

1203 static inline unsigned

get_raw_base0(

unsigned bb

)

1209 static inline unsigned

get_raw_base1(

unsigned bb

)

1223  return

(

size

+ 0xf) & ~0xf;

1234  const char

* src = read.

data

()+read_pos/2;

1235

SPileupValues::SCountACGT* dst = cc_acgt.data()+pos;

1236

SPileupValues::SCountACGT* dst_end = cc_acgt.data()+end-1;

1237

TCount* dst_match = cc_match.data()+pos;

1240  unsigned b

= get_raw_base1(

bb

);

1241

dst_match[0] +=

b

== 0;

1243

add_bases_acgt(dst,

b

, bits,

mask

);

1245

add_bases_acgt_raw(dst,

b

);

1252  for

( ; dst < dst_end; ++src, dst += 2, dst_match += 2 ) {

1254  unsigned

b0 = get_raw_base0(

bb

);

1255  unsigned

b1 = get_raw_base1(

bb

);

1256

dst_match[0] += b0 == 0;

1257

dst_match[1] += b1 == 0;

1259

add_bases_acgt(dst+0, b0, bits,

mask

);

1260

add_bases_acgt(dst+1, b1, bits,

mask

);

1262

add_bases_acgt_raw(dst+0, b0);

1263

add_bases_acgt_raw(dst+1, b1);

1266  if

( dst <= dst_end ) {

1268  unsigned b

= get_raw_base0(

bb

);

1269

dst_match[0] +=

b

== 0;

1271

add_bases_acgt(dst,

b

, bits,

mask

);

1273

add_bases_acgt_raw(dst,

b

);

1281  if

( ref_pos > m_RefToOpen ) {

1283  if

( ref_pos > m_RefToOpen+FLUSH_SIZE ) {

1285  if

( m_RefToOpen != m_RefFrom ) {

1287

advance_current_beg(m_RefToOpen, callback);

1289  _ASSERT

(m_RefToOpen == m_RefFrom);

1290  TSeqPos

add_zeros = ref_pos-m_RefToOpen;

1291  TSeqPos

flush_zeros = align_to_16_down(add_zeros);

1292  _ASSERT

(flush_zeros%16 == 0);

1293

callback->AddZerosBy16(flush_zeros);

1294

m_RefToOpen = m_RefFrom += flush_zeros;

1295  if

( ref_pos > m_RefToOpen ) {

1296

advance_current_end(ref_pos);

1300

advance_current_end(ref_pos);

1302  TSeqPos

flush = ref_pos-m_RefFrom;

1303  if

( ref_pos != m_RefStop ) {

1304

flush = align_to_16_down(flush);

1308  if

( count_introns() ) {

1309

decode_intron(flush);

1311  TSeqPos

total = m_RefToOpen-m_RefFrom;

1312  if

( flush >= 16 ) {

1314

update_max_counts(flush);

1315

callback->AddValuesBy16(flush, *

this

);

1323

TCount gap_save = cc_gap[total];

1327

cc_gap[

copy

] = gap_save;

1329  if

( count_introns() ) {

1330

TCount intron_save = cc_intron[total];

1334

cc_intron[

copy

] = intron_save;

1337  _ASSERT

(accumulate(&cc_gap[0], &cc_gap[m_RefToOpen-m_RefFrom+1], 0) == 0);

1339

accumulate(&cc_intron[0], &cc_intron[m_RefToOpen-m_RefFrom+1], 0) == 0);

1342  _ASSERT

(ref_pos == m_RefStop);

1343  _ASSERT

(ref_pos == m_RefToOpen);

1344

update_max_counts(flush);

1345

callback->AddValuesTail(flush, *

this

);

1346

m_RefFrom = m_RefStop;

1354  _ASSERT

(ref_end > m_RefToOpen);

1355  _ASSERT

(ref_end <= m_RefStop);

1356  TSeqPos

cur_pos = m_RefToOpen-m_RefFrom;

1357  TSeqPos

new_pos = (

min

(m_RefStop + 15, ref_end + FLUSH_SIZE) - m_RefFrom) & ~15;

1362

TCount gap_save = cc_gap[cur_pos];

1364

cc_gap[cur_pos] = gap_save;

1365

cc_gap[new_pos] = 0;

1367  if

( count_introns() ) {

1368

TCount intron_save = cc_intron[cur_pos];

1370

cc_intron[cur_pos] = intron_save;

1371

cc_intron[new_pos] = 0;

1373

m_RefToOpen =

min

(m_RefStop, m_RefFrom + new_pos);

1379  if

( m_RefToOpen < m_RefStop ) {

1380

advance_current_end(m_RefStop);

1382  _ASSERT

(m_RefToOpen == m_RefStop);

1383

decode_gap(m_RefStop - m_RefFrom);

1385  if

(

TSeqPos

flush = m_RefToOpen-m_RefFrom ) {

1387

update_max_counts(flush);

1388

callback->AddValuesTail(flush, *

this

);

1393

update_max_counts(m_RefStop - m_RefFrom);

1400  _ASSERT

(m_RefFrom+length <= m_RefToOpen);

1401  _ASSERT

(length % 16 == 0 || m_RefToOpen == m_RefStop);

1402

length = align_to_16_up(length);

1406  if

( count_introns() ) {

1410

max_count[kStat_Intron] = 0;

1418  if

( m_SplitACGTLen <

len

) {

1420  for

(

int

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

1421

cc_split_acgt[k].clear();

1422

cc_split_acgt[k].resize(len16);

1425

cc_split_acgt[0].

data

(),

1426

cc_split_acgt[1].

data

(),

1427

cc_split_acgt[2].

data

(),

1428

cc_split_acgt[3].

data

());

1429

m_SplitACGTLen =

len

;

1435  const string

& ref_id,

1437

ICollectPileupCallback* callback,

1439  TSeqPos

gap_to_intron_threshold)

const 1441

values.initialize(graph_range, intron_mode);

1447  for

( ; ait; ++ait ) {

1448  if

( callback && !callback->AcceptAlign(ait) ) {

1453  TSeqPos

ref_pos = rit->GetRefSeqPos();

1454

values.update_current_ref_start(ref_pos, callback);

1455  TSeqPos

read_len = rit->GetShortSequenceLength();

1456  CTempString

read_raw = rit->GetShortSequenceRaw();

1459  if

( ref_pos >= graph_range.

GetToOpen

() ) {

1463  Uint4

op = rit->GetCIGAROp(

i

);

1464  Uint4

seglen = op >> 4;

1467  TSeqPos

ref_end = ref_pos + seglen;

1471

values.add_match_ref_range(ref_pos, ref_end);

1479  if

( read_pos+ref_end > read_len+ref_pos ) {

1481

values.add_match_ref_range(ref_pos, ref_end);

1484

values.add_bases_ref_range_raw(ref_pos, ref_end, read_raw, read_pos);

1495

values.add_intron_ref_range(ref_pos, ref_end);

1500  if

( seglen > gap_to_intron_threshold ) {

1501

values.add_intron_ref_range(ref_pos, ref_end);

1504

values.add_gap_ref_range(ref_pos, ref_end);

1515  for

( ; ait; ++ait ) {

1516  if

( callback && !callback->AcceptAlign(ait) ) {

1521  TSeqPos

ref_pos = ait.GetRefSeqPos();

1522

values.update_current_ref_start(ref_pos, callback);

1524  _ASSERT

((values.m_RefToOpen-values.m_RefFrom)%16 == 0 || values.m_RefToOpen == values.m_RefStop);

1525  TSeqPos

read_len = ait.GetShortSequenceLength();

1527  TSeqPos

read_pos = ait.GetCIGARPos();

1529  const char

* ptr = cigar.

data

();

1530  const char

* end = ptr + cigar.

size

();

1531  while

( ptr != end ) {

1532  if

( ref_pos >= graph_range.

GetToOpen

() ) {

1538  for

( ; ++ptr != end; ) {

1540  if

( c >=

'0'

&& c <=

'9'

) {

1541

seglen = seglen*10+(c-

'0'

);

1547  if

( seglen == 0 ) {

1548  ERR_POST

(

"Bad CIGAR length: "

<<

type

<<

"0 in "

<<cigar);

1552  TSeqPos

ref_end = ref_pos + seglen;

1553  if

(

type

==

'='

) {

1555

values.add_match_ref_range(ref_pos, ref_end);

1559  else if

(

type

==

'M'

||

type

==

'X'

) {

1562  if

( read_pos+ref_end > read_len+ref_pos ) {

1564

values.add_match_ref_range(ref_pos, ref_end);

1567

values.add_bases_ref_range(ref_pos, ref_end, read, read_pos);

1572  else if

(

type

==

'S'

) {

1575  else if

(

type

==

'I'

) {

1578  else if

(

type

==

'N'

) {

1580

values.add_intron_ref_range(ref_pos, ref_end);

1583  else if

(

type

==

'D'

) {

1585  if

( seglen > gap_to_intron_threshold ) {

1586

values.add_intron_ref_range(ref_pos, ref_end);

1589

values.add_gap_ref_range(ref_pos, ref_end);

1593  else if

(

type

!=

'P'

) {

1594  ERR_POST

(

"Bad CIGAR char: "

<<

type

<<

" in "

<<cigar);

1598  _ASSERT

((values.m_RefToOpen-values.m_RefFrom)%16 == 0 || values.m_RefToOpen == values.m_RefStop);

1604  if

( callback && graph_range.

GetToOpen

() != values.m_RefFrom ) {

1606  TSeqPos

flush16 = align_to_16_down(flush);

1607  TSeqPos

flush_tail = flush - flush16;

1609

values.advance_current_beg(values.m_RefFrom+flush16, callback);

1612

values.advance_current_beg(values.m_RefFrom+flush_tail, callback);

1616

values.finalize(callback);

1624  if

(

tag

.size() != 2 ) {

1642  if

(

tag

.size() != 2 ) {

1675

AlignAccessRefSeqEnumerator* ptr = 0;

1676  if

(

rc_t

rc = AlignAccessDBEnumerateRefSequences(bam_db.

m_AADB

->m_DB, &ptr) ) {

1677  if

( !(GetRCObject(rc) == rcRow &&

1678

GetRCState(rc) == rcNotFound) ) {

1687  m_AADBImpl

->m_Iter.SetReferencedPointer(ptr);

1714  if

(

this

!= &iter ) {

1738  if

(

rc_t

rc = AlignAccessRefSeqEnumeratorNext(

m_AADBImpl

->m_Iter) ) {

1740  if

( !(GetRCObject(rc) == rcRow &&

1741

GetRCState(rc) == rcNotFound) ) {

1744  "Cannot find next refseq"

, rc);

1763  const char

*

msg

)

const 1780  else if

( GetRCState(rc) == rcInsufficient &&

size

>

buf

.capacity() ) {

1788  "Cannot get value"

, rc,

msg

);

1794  const char

*

msg

, TGetString func)

const 1797  while

(

buf

.empty() ) {

1811

AlignAccessRefSeqEnumeratorGetID);

1833  if

(

rc_t

rc = AlignAccessRefSeqEnumeratorGetLength(

m_AADBImpl

->m_Iter, &length) ) {

1835  "CBamRefSeqIterator::GetLength() cannot get length"

, rc);

1839  "CBamRefSeqIterator::GetLength() length is too big"

);

1854

m_Iter(db, file_pos)

1860  const string

& ref_label,

1866

m_Iter(db, ref_label, ref_pos, window,

1875  const string

& ref_label,

1883

m_Iter(db, ref_label, ref_pos, window,

1893

m_ShortSequence.clear();

1899

AlignAccessAlignmentEnumerator* ptr)

1916

m_ShortSeqId.clear();

1917

m_ShortSeqAcc.clear();

1918

m_ShortSequence.clear();

1926  for

(

size_t i

= 0;

i

< m_CIGAR.size(); ++

i

) {

1927  if

( m_CIGAR[

i

] ==

'M'

) {

1938  if

(

rc_t

rc = AlignAccessAlignmentEnumeratorGetRefSeqPos(m_Iter, &pos) ) {

1939  if

( GetRCObject(rc) == RCObject(rcData) &&

1940

GetRCState(rc) == rcNotFound ) {

1944  "Cannot get RefSeqPos"

, rc);

1965

m_BamFlagsAvailability(eBamFlags_NotTried)

1974  else if

( file_pos && *file_pos ) {

1979

AlignAccessAlignmentEnumerator* ptr = 0;

1980  if

(

rc_t

rc = AlignAccessDBEnumerateAlignments(bam_db.

m_AADB

->m_DB, &ptr) ) {

1981  if

( !AlignAccessAlignmentEnumeratorIsEOF(rc) ) {

1996  const string

& ref_id,

2002

m_BamFlagsAvailability(eBamFlags_NotTried)

2013

AlignAccessAlignmentEnumerator* ptr = 0;

2014  if

(

rc_t

rc = AlignAccessDBWindowedAlignments(bam_db.

m_AADB

->m_DB, &ptr,

2015

ref_id.c_str(), ref_pos, window) ) {

2017

AlignAccessAlignmentEnumeratorRelease(ptr);

2020  if

( !AlignAccessAlignmentEnumeratorIsEOF(rc) ) {

2031  while

(

m_AADBImpl

->GetRefSeqPos() < ref_pos ) {

2032  if

(

rc_t

rc = AlignAccessAlignmentEnumeratorNext(ptr) ) {

2034  if

( !AlignAccessAlignmentEnumeratorIsEOF(rc) ) {

2050  const string

& ref_id,

2058

m_BamFlagsAvailability(eBamFlags_NotTried)

2081  if

(

this

!= &iter ) {

2107  if

(

rc_t

rc = AlignAccessAlignmentEnumeratorNext(

m_AADBImpl

->m_Iter) ) {

2109  if

( !(GetRCObject(rc) == rcRow &&

2110

GetRCState(rc) == rcNotFound) ) {

2136  const char

*

msg

)

const 2153  else if

( GetRCState(rc) == rcInsufficient &&

size

>

buf

.capacity() ) {

2161  "Cannot get value"

, rc,

msg

);

2167  const char

*

msg

, TGetString func)

const 2170  while

(

buf

.empty() ) {

2181  const char

*

msg

, TGetString2 func)

const 2184  while

(

buf

.empty() ) {

2197  return m_RawImpl

->m_RawDB->GetData().GetHeader().GetRefName(

m_RawImpl

->m_Iter.GetRefSeqIndex());

2201

AlignAccessAlignmentEnumeratorGetRefSeqID);

2210  return m_RawImpl

->m_Iter.GetRefSeqPos();

2221  return m_RawImpl

->m_Iter.GetNextRefSeqIndex();

2233  Int4

next_ref_index =

m_RawImpl

->m_Iter.GetNextRefSeqIndex();

2234  if

( next_ref_index == -1 ) {

2239  return m_RawImpl

->m_RawDB->GetData().GetHeader().GetRefName(next_ref_index);

2252  return m_RawImpl

->m_Iter.GetNextRefSeqPos();

2264  return m_RawImpl

->m_Iter.GetShortSeqId();

2268

AlignAccessAlignmentEnumeratorGetShortSeqID);

2277  return m_RawImpl

->m_Iter.GetShortSeqAcc();

2281

AlignAccessAlignmentEnumeratorGetShortSeqAccessionID);

2290  if

(

m_RawImpl

->m_ShortSequence.empty() ) {

2296  if

(

m_AADBImpl

->m_ShortSequence.empty() ) {

2298

AlignAccessAlignmentEnumeratorGetShortSequence);

2308  return m_RawImpl

->m_Iter.GetShortSequenceLength();

2319

AlignAccessAlignmentEnumeratorGetCIGAR);

2326  return m_RawImpl

->m_Iter.HasAmbiguousMatch();

2338  return m_RawImpl

->m_Iter.GetCIGARPos();

2365  return m_RawImpl

->m_Iter.GetCIGAR(raw_cigar);

2370  const char

* ptr =

m_AADBImpl

->m_CIGAR.data();

2371  const char

* end = ptr +

m_AADBImpl

->m_CIGAR.size();

2374  while

( ptr != end ) {

2376  for

(

len

= 0; ++ptr != end; ) {

2378  if

( c >=

'0'

&& c <=

'9'

) {

2385  const char

*

types

=

"MIDNSHP=X"

;

2386  const char

* ptr = strchr(

types

,

type

);

2387  unsigned

op = ptr? unsigned(ptr-

types

): 15u;

2388

raw_cigar.push_back((

len

<<4)|(op));

2397  return m_RawImpl

->m_Iter.GetCIGARRefSize();

2402  const char

* ptr =

m_AADBImpl

->m_CIGAR.data();

2403  const char

* end = ptr +

m_AADBImpl

->m_CIGAR.size();

2406  while

( ptr != end ) {

2408  for

(

len

= 0; ++ptr != end; ) {

2410  if

( c >=

'0'

&& c <=

'9'

) {

2421  else if

(

type

==

'I'

||

type

==

'S'

) {

2424  else if

(

type

==

'D'

||

type

==

'N'

) {

2428  else if

(

type

!=

'P'

) {

2434  "Bad CIGAR length: "

<<

type

<<

"0 in "

<<

m_AADBImpl

->m_CIGAR);

2445  return m_RawImpl

->m_Iter.GetCIGARShortSize();

2450  const char

* ptr =

m_AADBImpl

->m_CIGAR.data();

2451  const char

* end = ptr +

m_AADBImpl

->m_CIGAR.size();

2454  while

( ptr != end ) {

2456  for

(

len

= 0; ++ptr != end; ) {

2458  if

( c >=

'0'

&& c <=

'9'

) {

2469  else if

(

type

==

'I'

||

type

==

'S'

) {

2473  else if

(

type

==

'D'

||

type

==

'N'

) {

2476  else if

(

type

!=

'P'

) {

2482  "Bad CIGAR length: "

<<

type

<<

"0 in "

<<

m_AADBImpl

->m_CIGAR);

2494  return m_RawImpl

->m_Iter.GetCIGARAlignment();

2501  TSeqPos

ref_size = 0, short_size = 0;

2502  const char

* ptr =

m_AADBImpl

->m_CIGAR.data();

2503  const char

* end = ptr +

m_AADBImpl

->m_CIGAR.size();

2506  while

( ptr != end ) {

2508  for

(

len

= 0; ++ptr != end; ) {

2510  if

( c >=

'0'

&& c <=

'9'

) {

2522  else if

(

type

==

'I'

||

type

==

'S'

) {

2526  else if

(

type

==

'D'

||

type

==

'N'

) {

2530  else if

(

type

!=

'P'

) {

2536  "Bad CIGAR length: "

<<

type

<<

"0 in "

<<

m_AADBImpl

->m_CIGAR);

2539

ret.first.SetLength(ref_size);

2540

ret.second.SetLength(short_size);

2565  bool

paired =

IsPaired

(), is_1st =

false

, is_2nd =

false

;

2576

paired = (

flags

& (BAMFlags_WasPaired |

2577

BAMFlags_IsMappedAsPair)) != 0;

2578

is_1st = (

flags

& BAMFlags_IsFirst) != 0;

2579

is_2nd = (

flags

& BAMFlags_IsSecond) != 0;

2583  if

( is_1st && !is_2nd ) {

2586  else if

( is_2nd && !is_1st ) {

2592

detector->AddSpotId(

id

,

this

);

2625

AlignmentStrandDirection dir;

2626  if

( AlignAccessAlignmentEnumeratorGetStrandDirection(

m_AADBImpl

->m_Iter, &dir) != 0 ) {

2647  return m_RawImpl

->m_Iter.IsSetStrand();

2664  "Strand is not set"

);

2674  return m_RawImpl

->m_Iter.GetMapQuality();

2679  if

(

rc_t

rc = AlignAccessAlignmentEnumeratorGetMapQuality(

m_AADBImpl

->m_Iter, &q) ) {

2681  "Cannot get MapQuality"

, rc);

2696  if

(

rc_t

rc = AlignAccessAlignmentEnumeratorGetIsPaired(

m_AADBImpl

->m_Iter, &

f

) ) {

2698  "Cannot get IsPaired flag"

, rc);

2708  return m_RawImpl

->m_Iter.IsFirstInPair();

2713  if

(

rc_t

rc=AlignAccessAlignmentEnumeratorGetIsFirstInPair(

m_AADBImpl

->m_Iter, &

f

) ) {

2715  "Cannot get IsFirstInPair flag"

, rc);

2725  return m_RawImpl

->m_Iter.IsSecondInPair();

2730  if

(

rc_t

rc=AlignAccessAlignmentEnumeratorGetIsSecondInPair(

m_AADBImpl

->m_Iter, &

f

) ) {

2732  "Cannot get IsSecondInPair flag"

, rc);

2742  return m_RawImpl

->m_Iter.IsSecondary();

2748  return

(

flags

& BAMFlags_IsNotPrimary) != 0;

2760  "Cannot get BAM file alignment"

, rc);

2768  if

(

rc_t

rc = BAMAlignmentGetRefSeqId(*

this

, &

id

) ) {

2770  "Cannot get BAM RefSeqIndex"

, rc);

2779  return m_RawImpl

->m_Iter.GetRefSeqIndex();

2791  if

(

rc_t

rc = BAMAlignmentGetFlags(*

this

, &

flags

) ) {

2793  "Cannot get BAM flags"

, rc);

2801  return

BAMAlignmentGetFlags(*

this

, &

flags

) == 0;

2854  return impl

->GetAuxIterator();

2864  if

( length == 0 ) {

2874  string

& iupac = inst.

SetSeq_data

().SetIupacna().Set();

2875

iupac.assign(

data

.data(), length);

2921

cache->

SetType

().SetStr(

"Secondary"

);

2933

obj.

SetType

().SetStr(

"Mate read"

);

2934

obj.

AddField

(

"Match by local Seq-id"

,

true

);

2955  m_RawImpl

->m_Iter.GetSegments(starts, lens);

2956

segcount =

int

(lens.size());

2961  const char

* ptr =

m_AADBImpl

->m_CIGAR.data();

2962  const char

* end = ptr +

m_AADBImpl

->m_CIGAR.size();

2965  TSeqPos

refstart = 0, seqstart = 0;

2966  while

( ptr != end ) {

2968  for

( seglen = 0; ++ptr != end; ) {

2970  if

( c >=

'0'

&& c <=

'9'

) {

2971

seglen = seglen*10+(c-

'0'

);

2984  else if

(

type

==

'I'

||

type

==

'S'

) {

2989  else if

(

type

==

'D'

||

type

==

'N'

) {

2995  else if

(

type

==

'P'

) {

3002  if

( seglen == 0 ) {

3004  "Bad CIGAR length: "

<<

type

<<

3007

starts.push_back(refstart);

3008

starts.push_back(seqstart);

3009

lens.push_back(seglen);

3015

strands.reserve(2*segcount);

3017  for

(

int i

= 0;

i

< segcount; ++

i

) {

3023

starts[

i

*2+1] = end - (pos +

len

);

3032  bool

add_aux = !tags.empty();

3045  Int4

next_ref_index = -1;

3053  if

( next_ref_id.

empty

() ) {

3062  if

( add_cigar || add_aux ) {

3071

obj->

SetData

().push_back(field);

3077

CBamDb::TTagList::const_iterator info_iter = find(tags.begin(), tags.end(), name);

3078  if

( info_iter == tags.end() ) {

3083  if

( aux_it->IsArray() ) {

3084  if

( aux_it->IsFloat() ) {

3086  for

(

size_t i

= 0;

i

< aux_it->size(); ++

i

) {

3087  arr

.push_back(aux_it->GetFloat(

i

));

3092  for

(

size_t i

= 0;

i

< aux_it->size(); ++

i

) {

3098  if

( aux_it->IsChar() ) {

3099

field->

SetData

().SetStr(

string

(1, aux_it->GetChar()));

3101  else if

( aux_it->IsString() ) {

3102

field->

SetData

().SetStr(aux_it->GetString());

3104  else if

( aux_it->IsFloat() ) {

3105

field->

SetData

().SetReal(aux_it->GetFloat());

3111

obj->

SetData

().push_back(field);

3116

align->

SetExt

().push_back(obj);

3128

obj->

SetData

().push_back(field);

3133

field->

SetData

().SetInt(next_ref_pos);

3134

obj->

SetData

().push_back(field);

3141  for

( ; mate_iter; ++mate_iter ) {

3149

obj->

SetData

().push_back(field);

3155

align->

SetExt

().push_back(obj);

3170

annot->

SetData

().SetAlign();

3174

annot->

SetDesc

().Set().push_back(desc);

3196

entry->

SetAnnot

().push_back(annot);

3197

annot->

SetData

().SetAlign().push_back(align);

void x_Assign(CObject_id &dst, const CObject_id &src)

static CRef< CSeq_id > sx_GetShortSeq_id(const string &str, IIdMapper *idmapper, bool external)

static bool s_OmitAmbiguousMatchCigar(void)

static const SVDBSeverityTag kSeverityTags[]

static bool s_ExplicitMateInfo(void)

static char s_VDBVersion[32]

static bool s_HasWindowsDriveLetter(const string &s)

static rc_t VDBLogWriter(void *, const char *buffer, size_t size, size_t *written)

static void s_InitLocalKNS(KNSManager *kns_mgr)

static CBamRef< KConfig > s_InitProxyConfig()

static void s_InitAllKNS(KNSManager *kns_mgr)

static int s_GetDiagHandler(void)

NCBI_PARAM_DEF(bool, BAM, CIGAR_IN_ALIGN_EXT, true)

static const SVDBSeverityTag * s_GetVDBSeverityTag(CTempString token)

DEFINE_STATIC_FAST_MUTEX(sx_SDKMutex)

static void s_InitVDBVersion()

SPECIALIZE_BAM_REF_TRAITS(KConfig,)

static const char kBamExt[]

static VPath * sx_GetVPath(const CBamVFSManager &mgr, const string &path)

static void s_InitStaticKNS(KNSManager *kns_mgr)

NCBI_PARAM_DECL(string, SRZ, REP_PATH)

static bool s_IsSysPath(const string &s)

static void s_InitDiagCheck()

static bool s_DiagIsSafe()

#define NCBI_THROW2_FMT(exception_class, err_code, message, extra)

static CObject_id & sx_GetObject_id(CTempString name, CRef< CObject_id > &cache)

static void s_AddReplacedExt(vector< string > &dst, const string &base_name, CTempString old_ext, CTempString new_ext)

static CRef< CUser_object > sx_GetSecondaryIndicator(CRef< CUser_object > &cache)

NCBI_PARAM_DEF_EX(string, SRZ, REP_PATH, NCBI_SRZ_REP_PATH, eParam_NoThread, SRZ_REP_PATH)

static void sx_MapId(CSeq_id &id, IIdMapper *idmapper)

static CRef< CSeq_id > sx_GetRefSeq_id(const string &str, IIdMapper *idmapper)

static const char kBaiExt[]

static void s_UpdateVDBRequestContext(void)

static bool s_GetCigarInAlignExt(void)

ostream & operator<<(ostream &out, const CBamRcFormatter &rc)

DEFINE_BAM_REF_TRAITS(VFSManager,)

static CRef< CAnnotdesc > sx_GetMatchAnnotIndicator(CRef< CAnnotdesc > &cache)

static DECLARE_TLS_VAR(const CRequestContext *, s_LastRequestContext)

#define NCBI_THROW3(exc_cls, err_code, msg, extra1, extra2)

ncbi::TMaskedQueryRegions mask

ISpotIdDetector interface is used to detect spot id in case of incorrect flag combination.

virtual ~ISpotIdDetector(void)

ISpotIdDetector * GetSpotIdDetector(void) const

friend class CBamFileAlign

CIRef< ISpotIdDetector > m_SpotIdDetector

CRef< CSeq_align > GetMatchAlign(void) const

Int4 GetRefSeqIndex(void) const

bool TryGetFlags(Uint2 &flags) const

CRef< CBioseq > GetShortBioseq(void) const

CTempString GetShortSequence(void) const

TSeqPos GetShortSequenceLength(void) const

bool x_HasAmbiguousMatch() const

TSeqPos GetCIGARShortSize(void) const

void SetRefSeq_id(CRef< CSeq_id > seq_id)

TSeqPos GetNextRefSeqPos() const

CRef< CSeq_id > GetShortSeq_id(void) const

TSeqPos GetRefSeqPos(void) const

AutoPtr< SCreateCache > m_CreateCache

bool x_CheckRC(CBamString &buf, rc_t rc, size_t size, const char *msg) const

CRef< CSeq_annot > x_GetSeq_annot(const string *annot_name) const

void SetShortSeq_id(CRef< CSeq_id > seq_id)

CTempString GetCIGAR(void) const

CRef< SRawImpl > m_RawImpl

Uint2 GetFlags(void) const

void x_GetStrand(void) const

CRef< CSeq_id > GetRefSeq_id(void) const

TSeqPos GetCIGARRefSize(void) const

Int4 GetNextRefSeqIndex() const

SCreateCache & x_GetCreateCache(void) const

bool IsSecondary(void) const

CTempString GetRefSeqId(void) const

bool IsSecondInPair(void) const

CBamRawAlignIterator * GetRawIndexIteratorPtr() const

CBamAuxIterator GetAuxIterator() const

CTempString GetShortSeqId(void) const

IIdMapper * GetIdMapper(void) const

Uint1 GetMapQuality(void) const

TSeqPos GetCIGARPos(void) const

bool IsSetStrand(void) const

EBamFlagsAvailability m_BamFlagsAvailability

void GetRawCIGAR(vector< Uint4 > &raw_cigar) const

CRef< CSeq_id > m_ShortSeq_id

bool UsesRawIndex() const

CRef< SAADBImpl > m_AADBImpl

void x_GetString(CBamString &buf, const char *msg, TGetString func) const

CBamAlignIterator & operator++(void)

CTempString GetNextRefSeqId(void) const

void x_CheckValid(void) const

void x_GetCIGAR(void) const

bool IsPaired(void) const

CBamAlignIterator & operator=(const CBamAlignIterator &iter)

CRef< CSeq_id > m_RefSeq_id

bool IsFirstInPair(void) const

ENa_strand GetStrand(void) const

CTempString GetShortSeqAcc(void) const

pair< COpenRange< TSeqPos >, COpenRange< TSeqPos > > GetCIGARAlignment(void) const

CRef< CSeq_entry > x_GetMatchEntry(const string *annot_name) const

virtual ~ICollectPileupCallback()

virtual bool AcceptAlign(const CBamAlignIterator &ait)

AutoPtr< TRefSeqLengths > m_RefSeqLengths

static int GetDebugLevel()

TSeqPos GetPageSize() const

string GetHeaderText(void) const

bool ExcludeAlignTag(CTempString tag)

CRef< CSeq_id > GetShortSeq_id(const string &str, bool external=false) const

size_t CollectPileup(SPileupValues &values, const string &ref_id, CRange< TSeqPos > graph_range, ICollectPileupCallback *callback=0, SPileupValues::EIntronMode intron_mode=SPileupValues::eNoCountIntron, TSeqPos gap_to_intron_threshold=kInvalidSeqPos) const

bool UsesRawIndex() const

bool IncludeAlignTag(CTempString tag)

CRef< CSeq_id > GetRefSeq_id(const string &label) const

TTagList m_IncludedAlignTags

vector< STagInfo > TTagList

unordered_map< string, CRef< CSeq_id > > TRefSeqIds

AutoPtr< TRefSeqIds > m_RefSeqIds

IIdMapper * GetIdMapper(void) const

TSeqPos GetRefSeqLength(const string &str) const

const TTagList & GetIncludedAlignTags() const

static bool UseRawIndex(EUseAPI use_api)

CRef< CObjectFor< CBamRawDb > > m_RawDB

unordered_map< string, TSeqPos > TRefSeqLengths

virtual const char * GetErrCodeString(void) const

Translate from the error code value to its string representation.

EErrCode

Error types that CBamXxx classes can generate.

@ eAddRefFailed

AddRef failed.

@ eInvalidArg

Invalid argument error.

@ eInitFailed

Initialization failed.

@ eInvalidBAIFormat

Invalid data in BAM index file.

@ eInvalidBAMFormat

Invalid data in BAM file.

@ eFileNotFound

File not found.

@ eBadCIGAR

Bad CIGAR string.

@ eNoData

Data not found.

@ eNullPtr

Null pointer error.

virtual const CException * x_Clone(void) const

Helper clone method.

int TErrCode

Translate from the error code value to its string representation.

virtual const char * GetType(void) const

CBamException(void)

Constructor.

virtual TErrCode GetErrCode(void) const

virtual void ReportExtra(ostream &out) const

Report "non-standard" attributes.

~CBamException(void) noexcept

static void ReportError(const char *msg, rc_t rc)

bool TryGetFlags(Uint2 &flags) const

Uint2 GetFlags(void) const

CBamFileAlign(const CBamAlignIterator &iter)

Int4 GetRefSeqIndex(void) const

const CBamRef< const AlignAccessMgr > & GetAlignAccessMgr() const

const CBamVFSManager & GetVFSManager() const

CBamRef< const AlignAccessMgr > m_AlignAccessMgr

void x_GetString(CBamString &buf, const char *msg, TGetString func) const

CRef< CObjectFor< CBamRawDb > > m_RawDB

CRef< CSeq_id > GetRefSeq_id(void) const

TSeqPos GetLength(void) const

CTempString GetRefSeqId(void) const

bool x_CheckRC(CBamString &buf, rc_t rc, size_t size, const char *msg) const

CRef< CSeq_id > m_CachedRefSeq_id

CBamRefSeqIterator & operator++(void)

void x_InvalidateBuffers(void)

void x_CheckValid(void) const

CBamRefSeqIterator & operator=(const CBamRefSeqIterator &iter)

CRef< SAADBImpl > m_AADBImpl

void x_AllocBuffers(void)

void SetReferencedPointer(TObject *ptr)

TObject ** x_InitPtr(void)

void reserve(size_t min_capacity)

AutoArray< char > m_Buffer

void x_reserve(size_t min_capacity)

Incapsulate compile time information such as __FILE__, __LINE__, NCBI_MODULE, current function.

CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:

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

@ eBadFormat

Invalid SRZ accession format.

@ eNotFound

Accession not found.

virtual const char * GetErrCodeString(void) const override

Get error code interpreted as text.

vector< string > m_VolPath

static string GetDefaultRepPath(void)

void AddRepPath(const string &rep_path)

vector< string > m_RepPath

string FindAccPath(const string &acc, EMissing mising)

void AddVolPath(const string &vol_path)

static string GetDefaultVolPath(void)

CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...

CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)

add a data field to the user object that holds a given value

General IdMapper interface.

virtual void MapObject(CSerialObject &)=0

Map all embedded IDs in a given object at once.

static void SplitBufferInto4(const int *src, size_t count, int *dest0, int *dest1, int *dest2, int *dest3)

Split source memory buffer into 4 buffers Source buffer contains 4*count elements Each destination bu...

static void Find4MaxElements(const unsigned int *src, size_t count, unsigned int dest[4])

Find maximum values in 4 arrays, or dest Source buffer contains 4*count elements with the following l...

static void ClearBuffer(char *dest, size_t count)

Fill destination memory buffer with zeros.

static void MoveBuffer(const int *src, size_t count, int *dest)

Copy memory buffer when source and destination overlap.

static unsigned int FindMaxElement(const unsigned int *src, size_t count)

Find maximum value in an array.

static vector< string > arr

std::ofstream out("events_result.xml")

main entry point for tests

static const char * str(char *buf, int n)

static const struct type types[]

static string GetAppName(EAppNameType name_type=eBaseName, int argc=0, const char *const *argv=NULL)

static CNcbiApplicationGuard InstanceGuard(void)

Singleton method.

const CNcbiRegistry & GetConfig(void) const

Get the application's cached configuration parameters (read-only).

unsigned int TSeqPos

Type for sequence locations and lengths.

CVersionInfo GetVersion(void) const

Get the program version information.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

element_type * get(void) const

Get pointer.

const TSeqPos kInvalidSeqPos

Define special value for invalid sequence position.

void reset(element_type *p=0)

Reset will delete the old pointer, set content to the new value, and assume the ownership upon the ne...

const CNcbiDiag &(* FManip)(const CNcbiDiag &)

Diagnostic stream manipulator.

string GetSessionID(void) const

Session ID.

CAtomicCounter::TValue TVersion

bool IsSetSessionID(void) const

static CRequestContext & GetRequestContext(void)

Shortcut to CDiagContextThreadData::GetThreadData().GetRequestContext()

string GetClientIP(void) const

Client IP/hostname.

bool IsSetHitID(EHitIDSource src=eHitID_Any) const

Check if there's an explicit hit id or the default one.

bool IsSetClientIP(void) const

string GetHitID(void) const

Get explicit hit id or the default one (from HTTP_NCBI_PHID etc).

#define ERR_POST(message)

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

TVersion GetVersion(void) const

Return version increased on every context change (hit/subhit id, client ip, session id).

EDiagSev

Severity level for the posted diagnostics.

void Error(CExceptionArgs_Base &args)

TErrCode GetErrCode(void) const

Get error code.

#define NCBI_THROW(exception_class, err_code, message)

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

void Trace(CExceptionArgs_Base &args)

void Warning(CExceptionArgs_Base &args)

void Fatal(CExceptionArgs_Base &args)

#define NCBI_THROW2(exception_class, err_code, message, extra)

Throw exception with extra parameter.

EErrCode

Error types that an application can generate.

#define NCBI_THROW_FMT(exception_class, err_code, message)

The same as NCBI_THROW but with message processed as output to ostream.

virtual const char * GetErrCodeString(void) const

Get error code interpreted as text.

void Info(CExceptionArgs_Base &args)

static string CreateAbsolutePath(const string &path, ERelativeToWhat rtw=eRelativeToCwd)

Get an absolute path from some, possibly relative, path.

static string MakePath(const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)

Assemble a path from basic components.

const string AsFastaString(void) const

static SIZE_TYPE ParseIDs(CBioseq::TId &ids, const CTempString &s, TParseFlags flags=fParse_Default)

Parse a string representing one or more Seq-ids, appending the results to IDS.

void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const

Append a label for this Seq-id to the supplied string.

@ eContent

Untagged human-readable accession or the like.

T & GetData(void)

Get data as a reference.

void Reset(void)

Reset reference object.

TObjectType & GetNCObject(void) const

Get object.

#define NCBI_PARAM_TYPE(section, name)

Generate typename for a parameter from its {section, name} attributes.

@ eParam_NoThread

Do not use per-thread values.

uint8_t Uint1

1-byte (8-bit) unsigned integer

int32_t Int4

4-byte (32-bit) signed integer

unsigned char Uchar

Alias for unsigned char.

uint32_t Uint4

4-byte (32-bit) unsigned integer

uint16_t Uint2

2-byte (16-bit) unsigned integer

position_type GetLength(void) const

TThisType & SetFrom(position_type from)

position_type GetToOpen(void) const

virtual bool GetBool(const string &section, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const

Get boolean value of specified parameter name.

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

NCBI_NS_STD::string::size_type SIZE_TYPE

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 bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)

Check if a string ends with a specified suffix value.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

static string IntToString(int value, TNumToStringFlags flags=0, int base=10)

Convert int to string.

const char * data(void) const

Return a pointer to the array represented.

bool empty(void) const

Return true if the represented string is empty (i.e., the length is zero)

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

Check if a string starts with a specified prefix value.

static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to unsigned int.

static string & ToUpper(string &str)

Convert string to upper case – string& version.

size_type size(void) const

Return the length of the represented array.

virtual string Print(void) const

Print version information.

static const char label[]

TFrom GetFrom(void) const

Get the From member data.

bool IsSetData(void) const

the object itself Check if a value has been assigned to Data data member.

TData & SetData(void)

Assign a value to Data data member.

void SetLabel(TLabel &value)

Assign a value to Label data member.

TStr & SetStr(void)

Select the variant.

void SetType(TType &value)

Assign a value to Type data member.

void SetData(TData &value)

Assign a value to Data data member.

TLens & SetLens(void)

Assign a value to Lens data member.

void SetSegs(TSegs &value)

Assign a value to Segs data member.

vector< ENa_strand > TStrands

vector< TSignedSeqPos > TStarts

void SetType(TType value)

Assign a value to Type data member.

TExt & SetExt(void)

Assign a value to Ext data member.

TStarts & SetStarts(void)

Assign a value to Starts data member.

TStrands & SetStrands(void)

Assign a value to Strands data member.

void SetNumseg(TNumseg value)

Assign a value to Numseg data member.

TIds & SetIds(void)

Assign a value to Ids data member.

@ eType_diags

unbroken, but not ordered, diagonals

ENa_strand

strand of nucleic acid

TGi GetGi(void) const

Get the variant data.

bool IsGi(void) const

Check if variant Gi is selected.

TSet & SetSet(void)

Select the variant.

TSeq & SetSeq(void)

Select the variant.

TSeq_set & SetSeq_set(void)

Assign a value to Seq_set data member.

void SetData(TData &value)

Assign a value to Data data member.

TId & SetId(void)

Assign a value to Id data member.

void SetDesc(TDesc &value)

Assign a value to Desc data member.

TName & SetName(void)

Select the variant.

TUser & SetUser(void)

Select the variant.

list< CRef< CSeq_id > > TId

void SetInst(TInst &value)

Assign a value to Inst data member.

void SetRepr(TRepr value)

Assign a value to Repr data member.

void SetLength(TLength value)

Assign a value to Length data member.

void SetSeq_data(TSeq_data &value)

Assign a value to Seq_data data member.

void SetMol(TMol value)

Assign a value to Mol data member.

@ eRepr_raw

continuous sequence

@ eMol_na

just a nucleic acid

unsigned int

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

#define NCBI_DEVELOPMENT_VER

static void hex(unsigned char c)

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

string s_Value(TValue value)

const GenericPointer< typename T::ValueType > T2 value

#define NCBI_PACKAGE_NAME

#define NCBI_PACKAGE_VERSION

#define NCBI_SRZ_VOL_PATH

#define NCBI_SRZ_REP_PATH

Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...

void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)

Defines CRequestContext class for NCBI C++ diagnostic API.

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

static __m128i _mm_cvtsi32_si128(int a)

static __m128i _mm_srl_epi32(__m128i a, __m128i count)

static void _mm_store_si128(__m128i *p, __m128i a)

static __m128i _mm_load_si128(const __m128i *p)

static __m128i _mm_add_epi32(__m128i a, __m128i b)

static __m128i _mm_set_epi32(int, int, int, int)

static __m128i _mm_set1_epi32(int)

static __m128i _mm_and_si128(__m128i, __m128i)

bool x_HasAmbiguousMatch() const

SAADBImpl(const CBamDb::SAADBImpl &db, AlignAccessAlignmentEnumerator *ptr)

CBamRef< AlignAccessAlignmentEnumerator > m_Iter

TSeqPos GetRefSeqPos() const

void x_InvalidateBuffers()

CBamString m_ShortSequence

TObjectIdCache m_ObjectIdLcl

TObjectIdCache m_ObjectIdCIGAR

TObjectIdCache m_ObjectIdRefId

TObjectIdCache m_ObjectIdMateRead

CRef< CUser_object > m_SecondaryIndicator

TObjectIdCache m_ObjectIdHP

CRef< CAnnotdesc > m_MatchAnnotIndicator

TObjectIdCache m_ObjectIdTracebacks

TObjectIdCache m_ObjectIdRefPos

SRawImpl(CObjectFor< CBamRawDb > &db, const CBGZFPos *file_pos=nullptr)

CBamString m_ShortSequence

void x_InvalidateBuffers()

SAADBImpl(const CBamMgr &mgr, const string &db_name)

CBamRef< const AlignAccessDB > m_DB

void advance_current_end(TSeqPos ref_end)

void decode_intron(TSeqPos len)

void add_bases_graph_range_raw(TSeqPos pos, TSeqPos end, CTempString read, TSeqPos read_pos)

void update_max_counts(TSeqPos len)

void add_bases_graph_range(TSeqPos pos, TSeqPos end, CTempString read, TSeqPos read_pos)

void finalize(ICollectPileupCallback *callback)

void initialize(CRange< TSeqPos > ref_range, EIntronMode intron_mode=eNoCountIntron)

void advance_current_beg(TSeqPos ref_pos, ICollectPileupCallback *callback)

void decode_gap(TSeqPos len)

void make_split_acgt(TSeqPos len)

static const TShift kBAI_min_shift

static void Delete(const VPath *kpath)

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