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

NCBI C++ ToolKit: src/gui/widgets/loaders/columnar_vcf_cache.cpp Source File

63

: m_NCKey(netcache_key)

66  size_t

seq_id_end =

m_NCKey

.find(

"___"

);

67  if

(string::npos != seq_id_end) {

72  size_t

key_suffix =

m_NCKey

.rfind(

"_"

);

73  if

(string::npos != key_suffix) {

83

, m_LastModified(last_modified)

121  for

(

unsigned i

=0;

i

< retries_count; ++

i

) {

124

vector<string> synonyms {

id

};

125

vector<pair<CConstRef<CSeq_id>, vector<string>>> chrsyn_list;

126

chrsyn_list.emplace_back(&seq_id, synonyms);

132  auto

&istr =

file

.GetIstream(

false

);

136  if

(enforce_size_limit) {

139  auto

variants_list = reader.

ReadVariantsForChrs

(istr, chrsyn_list,

nullptr

, err_cont,

nullptr

);

140  if

(variants_list.size() != 1) {

141  string msg

{

"Unexpected number of BLOBs produced by the reader "

};

152  const auto

&vars_data = variants_list[0].second->GetSerializedData();

153  out

->write(vars_data.data(), vars_data.size());

158

blob_size =

out

->tellp();

161

extra.

Print

(

"Output-Size"

,

out

->tellp());

164  md5

.Update(vars_data.data(), vars_data.size());

165

extra.Print(

"Output-Hash"

,

md5

.GetHexSum());

168  if

(err_cont->Count()) {

176  LOG_POST

(

Error

<<

"Loading VCF "

<< url <<

" failed: "

<< e.GetMsg());

177  if

(

i

< (retries_count-1)) {

179

std::this_thread::sleep_for(2000

ms

);

183  string msg

{

"URL "

};

185  msg

+=

" is not accessible."

;

194  LOG_POST

(

Error

<<

"Loading VCF "

<< url <<

" failed: "

<< e);

196

report_error(e.GetMsg());

200  catch

(

const

exception& e) {

201  LOG_POST

(

Error

<<

"Loading VCF "

<< url <<

" failed: "

<< e.what());

203

report_error(e.what());

215  for

(

size_t i

= 0;

i

< err_cont->Count(); ++

i

) {

216  const ILineError

& lerror = err_cont->GetError(

i

);

223  const string

reg_section {

"INFO_column"

};

224  const string

reg_key {

"tags"

};

226  string

info_tags = reg.

GetString

(reg_section, reg_key,

string

());

227  if

(info_tags.empty())

230

extra.

Print

(

"INFO-tags"

, info_tags);

231

list< string > info_list;

233  for

(

const auto

&

tag

: info_list) {

Class responsible to read VCF files.

void LoadAllInfo(bool value)

void LoadAllSamples(bool value)

void SetVariationsLimits(int count)

Limits the number of variations to be read.

set< string > & LoadSelectedInfoFields()

vector< TSeqIdVarsListPair > ReadVariantsForChrs(CNcbiIstream &in, const vector< pair< CConstRef< objects::CSeq_id >, vector< string >>> &chr_list, ICanceled *canceled=nullptr, objects::ILineErrorListener *listener=nullptr, TReportProgress prog_func=TReportProgress(), TOnVCFVariantListReady on_variants_list_ready=TOnVCFVariantListReady())

Reads a list of variants.

CColumnarVcfCache(const std::string &netcache_key)

std::string m_LastModified

virtual std::string x_GetCacheKey()

Generates the cache key.

virtual CNetICacheClient x_InitBlobCache()

Creates the BLOB NetCache instance.

virtual CNetICacheClient x_InitSyncCache()

Creates the sync NetCache instance.

ECacheState SetState(ECacheState desired_state)

Changes the state of the cache object.

@ eState_Created

The remote file is not accessible.

@ eState_NotAccessible

The remote file is being processed.

void x_Initialize()

Initializes the cache instances.

bool m_isImmutableKey

do not try to shorten or otherwise modify the root cache key

CNetICacheClient x_InitICache(const std::string &cache, const std::string &service, const std::string &db)

Creates a NetCache instance.

std::unique_ptr< CNcbiOstream > GetWriteStream()

Returns stream interface to write BLOB data.

static CNcbiApplication * Instance(void)

Singleton method.

Client to NetCache server (implements ICache interface)

static string s_GetCurrentVersion(bool format_only=false)

virtual string Message() const

virtual unsigned int Line(void) const =0

iterator_bool insert(const value_type &val)

const unsigned s_MaxVarsPerCHR

static const string kVcfCacheBlob

static const string kVcfCacheSync

The NCBI C++ standard methods for dealing with std::string.

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

main entry point for tests

static void md5(const char *src, const char *out)

const CNcbiRegistry & GetConfig(void) const

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

CDiagContext_Extra & Print(const string &name, const string &value)

The method does not print the argument, but adds it to the string.

void Post(CRequestStatus::ECode status, CTempString status_msg=CTempString())

Write the collected resource info and timing to the log.

CDiagContext & GetDiagContext(void)

Get diag context instance.

CDiagContext_Extra Extra(void) const

Create a temporary CDiagContext_Extra object.

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

void Error(CExceptionArgs_Base &args)

void Warning(CExceptionArgs_Base &args)

@ fParse_Default

By default in ParseIDs and IsValid, allow raw parsable non-numeric accessions and plausible local acc...

virtual string GetString(const string &section, const string &name, const string &default_value, TFlags flags=0) const

Get the parameter string value.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

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

CMD5 - class for computing Message Digest version 5 checksums.

void SetInfoFields(set< string > &fields)

Get the list of INFO fields to read.

bool CreateBlob(const std::string &url, const std::string &id, CColumnarVcfCache &cache, size_t &blob_size, TReportError report_error, const unsigned retries_count=1, bool enforce_size_limit=true)

Creates a VCF blob for a given scaffold id and VCF url.

void ReportSyntaxErrors(CErrorContainer *err_cont)

Reports VCF syntax errors to AppLog.

std::function< void(const string &)> TReportError

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

Process information in the NCBI Registry, including working with configuration files.

Defines NCBI C++ API for timing-and-logging, classes, and macros.

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

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


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