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

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

37 #include <klib/writer.h> 38 #include <sra/types.h> 40 #include <sra/sradb.h> 41 #include <sra/sradb-priv.h> 42 #include <vfs/manager.h> 43 #include <vfs/resolver.h> 60 #define NCBI_USE_ERRCODE_X SRAReader 82  const string

& message,

87

this->x_Init(

info

, message, prev_exc, severity);

95  const string

& message,

101

this->x_Init(

info

, message, prev_exc, severity);

109  const string

& message,

111  const string

& param,

117

this->x_Init(

info

, message, prev_exc, severity);

125  const string

& message,

133

this->x_Init(

info

, message, prev_exc, severity);

141

m_Param(other.m_Param)

160  return "CSraException"

;

227  if

( GetRCTarget(rc) == rcTimeout && GetRCState(rc) == rcExhausted ) {

291

rc = VFSManagerMake(&mgr);

295

rc = VFSManagerGetResolver(mgr, &res);

298

rc = VFSManagerMakePath(mgr, &accPath, acc.c_str());

301  const

VPath* resolvedPath;

302

rc = VResolverQuery(res, eProtocolHttp, accPath, &resolvedPath,

NULL

,

NULL

);

306

VPathGetPath(resolvedPath, &s);

307

ret.assign(s.addr, s.len);

308

rc2 = VPathRelease(resolvedPath);

312

rc2 = VPathRelease(accPath);

316

rc2 = VResolverRelease(res);

320

rc2 = VFSManagerRelease(mgr);

328  "Cannot find acc path"

, rc, acc);

331  if

( eol_pos !=

NPOS

) {

340

m_Trim(trim == eTrim)

350

m_Trim(trim == eTrim)

366  "Cannot open SRAMgr"

, rc);

396  "No spot id specified"

,

397  RC

(rcApp, rcFunctParam, rcDecoding, rcParam, rcIncomplete),

401

acc = sra.substr(0, dot);

426

: m_Error(0), m_Data(0), m_Bitoffset(0), m_Bitlen(0), m_Len(0)

431  m_Error

=

RC

(rcApp, rcColumn, rcDecoding, rcOffset, rcUnsupported);

435 #if SIZEOF_SIZE_T == 4 438  m_Error

=

RC

(rcApp, rcColumn, rcDecoding, rcSize, rcUnsupported);

462  if

(

rc_t

rc = SRAMgrOpenTableRead(mgr,

x_InitPtr

(),

"%.*s"

,

463  int

(acc.size()), acc.data()) ) {

467  "Cannot open run read"

, rc, acc);

469  m_Name

.

Init

(*

this

,

"NAME"

, vdb_ascii_t);

470  m_Read

.

Init

(*

this

,

"READ"

, insdc_fasta_t);

471  m_Qual

.

Init

(*

this

,

"QUALITY"

, ncbi_qual1_t);

472  m_SDesc

.

Init

(*

this

,

"SPOT_DESC"

, sra_spot_desc_t);

473  m_RDesc

.

Init

(*

this

,

"READ_DESC"

, sra_read_desc_t);

479  const char

* name,

const char

*

type

)

481  return

SRATableOpenColumnRead(run,

x_InitPtr

(), name,

type

);

486  const char

* name,

const char

*

type

)

492  "Cannot get SRA column"

, rc, name);

511  TSeqPos

trim_end = sdesc->clip_qual_right;

518  for

(

int r

= 0;

r

< sdesc->num_reads; ++

r

) {

519  if

( rdesc[

r

].

type

!= SRA_READ_TYPE_BIOLOGICAL ) {

526  TSeqPos

start = rdesc[

r

].seg.start;

529

start =

max

(start, trim_start);

530

end =

min

(end, trim_end);

531  if

( start >= end ) {

541  id

->SetGeneral().SetDb(

"SRA"

);

543

seq.

SetId

().push_back(

id

);

548

seq.

SetDescr

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

556

.assign(read.

data

()+start,

len

);

561

annot->

SetData

().SetGraph().push_back(graph);

562

graph->

SetTitle

(

"Phred Quality"

);

563

graph->

SetLoc

().SetWhole(*

id

);

568

values.reserve(

len

);

571  for

(

size_t i

= 0;

i

<

len

; ++

i

) {

572  int

v = qual[start+

i

];

590  switch

( seq_count ) {

606  if

( read_id == 0 || read_id > sdesc->num_reads ) {

617  if

( read_id == 0 || read_id > sdesc->num_reads ) {

622  TSeqPos

trim_end = sdesc->clip_qual_right;

624  size_t r

= read_id-1;

629  TSeqPos

start = rdesc[

r

].seg.start;

632

start =

max

(start, trim_start);

633

end =

min

(end, trim_end);

634  if

( start >= end ) {

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

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

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

rc_t TryInitRc(const CSraRun &run, const char *name, const char *type)

void Init(const CSraRun &run, const char *name, const char *type)

EErrCode

Error types that corelib can generate.

@ eNotFoundValue

DB value not found.

@ eProtectedDb

DB is protected.

@ eDataError

VDB data is incorrect.

@ eAddRefFailed

AddRef failed.

@ eNotFoundColumn

DB column not found.

@ eInvalidArg

Invalid argument error.

@ eNullPtr

Null pointer error.

@ eNotFoundDb

DB main file not found.

@ eTimeout

timeout, re-try logic is recommended

@ eNotFound

Data not found.

@ eInitFailed

Initialization failed.

@ eNotFoundTable

DB table not found.

@ eNotFoundIndex

VDB index not found.

@ eInvalidState

State of object is invalid for the operation.

@ eInvalidIndex

Invalid index for array-like retrieval.

~CSraException(void) noexcept

int TErrCode

Translate from the error code value to its string representation.

virtual const char * GetType(void) const

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

virtual TErrCode GetErrCode(void) const

virtual const char * GetErrCodeString(void) const

Translate from the error code value to its string representation.

CSraException(void)

Constructor.

static bool IsTimeout(rc_t rc)

virtual void ReportExtra(ostream &out) const

Report "non-standard" attributes.

virtual const CException * x_Clone(void) const

Helper clone method.

string FindAccPath(const string &acc) const

CRef< CSeq_entry > GetSpotEntry(const string &sra)

CSraPath & GetPath(void) const

spotid_t GetSpotInfo(const string &sra, CSraRun &run)

CSraMgr(ETrim trim=eNoTrim)

static void RegisterFunctions(void)

static string GetDefaultVolPath(void)

void AddRepPath(const string &rep_path)

static string GetDefaultRepPath(void)

string FindAccPath(const string &acc) const

void AddVolPath(const string &vol_path)

TObject ** x_InitPtr(void)

void x_DoInit(CSraMgr &mgr, const string &acc)

void Init(CSraMgr &mgr, const string &acc)

const string & GetAccession(void) const

TSeqPos GetSequenceLength(spotid_t spot_id, uint8_t read_id) const

CSeq_inst::TMol GetSequenceType(spotid_t spot_id, uint8_t read_id) const

CRef< CSeq_entry > GetSpotEntry(spotid_t spot_id) const

const char * data(void) const

const TValue & Value(void) const

CSraValue(const CSraColumn &col, spotid_t id, ECheckRc check_rc=eCheckRc)

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

main entry point for tests

unsigned int TSeqPos

Type for sequence locations and lengths.

const TSeqPos kInvalidSeqPos

Define special value for invalid sequence position.

#define ERR_POST_X(err_subcode, message)

Error posting with default error code and given error subcode.

EDiagSev

Severity level for the posted diagnostics.

TErrCode GetErrCode(void) const

Get error code.

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

Throw exception with extra parameter.

EErrCode

Error types that an application can generate.

virtual const char * GetErrCodeString(void) const

Get error code interpreted as text.

void Reset(void)

Reset reference object.

#define NCBI_PARAM_TYPE(section, name)

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

#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 string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)

Convert UInt to string.

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

Convert string to unsigned int.

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.

void SetMin(TMin value)

Assign a value to Min data member.

void SetTitle(const TTitle &value)

Assign a value to Title data member.

void SetNumval(TNumval value)

Assign a value to Numval data member.

TValues & SetValues(void)

Assign a value to Values data member.

void SetGraph(TGraph &value)

Assign a value to Graph data member.

void SetMax(TMax value)

Assign a value to Max data member.

void SetLoc(TLoc &value)

Assign a value to Loc data member.

void SetAxis(TAxis value)

Assign a value to Axis data member.

TSet & SetSet(void)

Select the variant.

void SetLevel(TLevel value)

Assign a value to Level data member.

const TSeq_set & GetSeq_set(void) const

Get the Seq_set member data.

void SetClass(TClass value)

Assign a value to Class data member.

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.

TTitle & SetTitle(void)

Select the variant.

TAnnot & SetAnnot(void)

Assign a value to Annot data member.

void SetInst(TInst &value)

Assign a value to Inst data member.

EMol

molecule class in living organism

void SetDescr(TDescr &value)

Assign a value to Descr 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_not_set

> cdna = rna

@ eMol_na

just a nucleic acid

Definition of all error codes used in SRA C++ support libraries.

static void hex(unsigned char c)

Multi-threading – mutexes; rw-locks; semaphore.

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

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

#define CHECK_VDB_TIMEOUT_FMT(msg, rc)

NCBI_DEFINE_ERR_SUBCODE_X(1)

DEFINE_STATIC_FAST_MUTEX(sx_PathMutex)

NCBI_PARAM_DECL(string, SRA, REP_PATH)

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

DEFINE_SRA_REF_TRAITS(SRAMgr, const)

NCBI_PARAM_DEF(string, SRA, REP_PATH, "")


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