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

NCBI C++ ToolKit: src/algo/blast/gumbel_params/demo/gumbelparams_app.cpp Source File

62  virtual string Print

(

void

)

const

{

79  virtual void Init

(

void

);

80  virtual int Run

(

void

);

81  virtual void Exit

(

void

);

96

arg_desc->SetUsageContext(

GetArguments

().GetProgramBasename(),

97  "Real time Gumbel parameters estimation"

\

98  " for Blast search"

);

100

arg_desc->AddOptionalKey(

"scoremat"

,

"file"

,

101  "File containing score matrix values"

,

104

arg_desc->AddOptionalKey(

"scorematname"

,

"name"

,

"Score matrix name"

,

108  "blosum45"

,

"blosum62"

,

109  "blosum80"

,

"pam30"

,

"pam70"

,

112

arg_desc->AddOptionalKey(

"freqs1"

,

"file"

,

113  "File containing residue frequencies for" 116

arg_desc->AddOptionalKey(

"freqs2"

,

"file"

,

117  "File containing residue frequencies for" 120

arg_desc->AddDefaultKey(

"gapopen"

,

"open_penalty"

,

"Cost of opening a gap"

,

123

arg_desc->AddDefaultKey(

"gapextend"

,

"extend_penalty"

,

124  "Cost of extending a gap"

,

127

arg_desc->AddDefaultKey(

"lambda"

,

"accuracy"

,

128  "Desired accuracy of computed lambda"

,

131

arg_desc->AddDefaultKey(

"K"

,

"accuracy"

,

132  "Desired accuracy of computed K"

,

135

arg_desc->AddDefaultKey(

"gapped"

,

"gapped"

,

"Gapped or gapless regime"

,

138

arg_desc->AddDefaultKey(

"maxtime"

,

"val"

,

"Maximum allowed time for" 139  " computation of Gumbel parameters [s]"

,

142

arg_desc->AddDefaultKey(

"maxmemory"

,

"val"

,

"Maximum allowed memory for" 143  " computation of Gumbel parameters [Mb]"

,

146

arg_desc->AddDefaultKey(

"fromscore"

,

"num"

,

"Minimum value of the score" 147  " range for calculation of P-values"

,

150

arg_desc->AddDefaultKey(

"toscore"

,

"num"

,

"Maximum value of the score" 151  " range for calculation of P-values"

,

154

arg_desc->AddDefaultKey(

"len1"

,

"num"

,

"Length of sequence 1 for score" 155  " P-values calculation"

,

158

arg_desc->AddDefaultKey(

"len2"

,

"num"

,

"Length of sequence 2 for score" 159  " P-values calculation"

,

162

arg_desc->AddOptionalKey(

"indiags"

,

"file"

,

163  "Text file with input randomization parameters, " 164  "for diagnostics only"

,

167

arg_desc->AddOptionalKey(

"outdiags"

,

"file"

,

168  "Save diagnostics randomization parameters"

,

188

fintest >> param_val;

197

fintest >> num_params;

200  for

(

int i

=0;

i

< num_params && !fintest.eof();

i

++) {

201

fintest >> param_val;

202

fs_prelim.push_back(param_val);

209

fintest >> num_params;

212  for

(

int i

=0;

i

< num_params && !fintest.eof();

i

++) {

213

fintest >> param_val;

214

prelim.push_back(param_val);

221

fintest >> num_params;

224  for

(

int i

=0;

i

< num_params && !fintest.eof();

i

++) {

225

fintest >> param_val;

226

killing.push_back(param_val);

233

fintest >> param_val;

240

fintest >> param_val;

251  const

vector<Int4>& fs_prelim

253

fouttest << fs_prelim.size() <<

"\t"

;

254  for

(

size_t

k=0;k < fs_prelim.size();k++) {

255

fouttest << fs_prelim[k] <<

"\t"

;

259

fouttest << prelim.size() <<

"\t"

;

260  for

(

size_t

k=0;k < prelim.size();k++) {

261

fouttest << prelim[k] <<

"\t"

;

264  const

vector<Int4>& killing

266

fouttest << killing.size() <<

"\t"

;

267  for

(

size_t

k=0;k < killing.size();k++) {

268

fouttest << killing[k] <<

"\t"

;

281  if

(!args[

"scoremat"

] && !args[

"scorematname"

]) {

282  NcbiCerr

<<

"Error: Either score matrix name or file must be specified." 287  if

(args[

"scoremat"

] && args[

"scorematname"

]) {

288  NcbiCerr

<<

"Error: Either score matrix name or file must be specified." 293  if

(args[

"fromscore"

].AsInteger() > args[

"toscore"

].AsInteger()) {

294  NcbiCerr

<<

"Error: Incorrect values for score range, fromscore must be" 304  if

(args[

"scorematname"

]) {

306  string

name = args[

"scorematname"

].AsString();

307  if

(name ==

"blosum45"

) {

310  else if

(name ==

"blosum62"

) {

313  else if

(name ==

"blosum80"

) {

316  else if

(name ==

"pam30"

) {

319  else if

(name ==

"pam70"

) {

322  else if

(name ==

"pam250"

) {

332

opts->SetScoreMatrix(smat);

336  if

(args[

"scoremat"

]) {

338

vector<Int4> score_vals;

339  while

(!istr.eof()) {

341

args[

"scoremat"

].AsInputFile() >> elem;

342  if

(elem != INT_MAX) {

343

score_vals.push_back(elem);

347

opts->SetScoreMatrix(smat);

351  if

(args[

"freqs1"

]) {

353

vector<double> freqs;

354  while

(!istr.eof()) {

357

freqs.push_back(elem);

362  ITERATE

(vector<double>, it, freqs) {

370

opts->SetSeq1ResidueProbs(freqs);

374  if

(args[

"freqs2"

]) {

376

vector<double> freqs;

377  while

(!istr.eof()) {

380

freqs.push_back(elem);

383  ITERATE

(vector<double>, it, freqs) {

391

opts->SetSeq2ResidueProbs(freqs);

394

opts->SetGapOpening(args[

"gapopen"

].AsInteger());

395

opts->SetGapExtension(args[

"gapextend"

].AsInteger());

396

opts->SetLambdaAccuracy(args[

"lambda"

].AsDouble());

397

opts->SetKAccuracy(args[

"K"

].AsDouble());

398

opts->SetGapped(args[

"gapped"

].AsBoolean());

399

opts->SetMaxCalcTime(args[

"maxtime"

].AsDouble());

400

opts->SetMaxCalcMemory(args[

"maxmemory"

].AsDouble());

404  if

(args[

"indiags"

]) {

406  NcbiCerr

<<

"Error: Randomization parameters file is incomplete" 413  if

(!opts->Validate()) {

414  ITERATE

(vector<string>, it, opts->GetMessages()) {

421  if

(args[

"indiags"

]) {

430  if

(args[

"outdiags"

]) {

432

*gp_calc->GetRandParams());

437  NcbiCout

<<

"Parameters estimation\n" 438

<<

"Parameter value\terror\n" 439

<<

"Lambda\t"

<< g_params.

lambda

<<

"\t" 464

args[

"fromscore"

].AsInteger(),

465

args[

"toscore"

].AsInteger(),

466

args[

"len1"

].AsInteger(),

467

args[

"len2"

].AsInteger(),

474

pv_calculator.

Run

();

478  NcbiCout

<<

"P-values estimaton\nscore\tP-value\tP-value error\n"

;

480  NcbiCout

<< args[

"fromscore"

].AsInteger() + (

int

)k <<

"\t" 503 int main

(

int

argc,

const char

* argv[])

Score matrix that can take any value.

EScoreMatrixName

Names of standard scoring matrices.

Application for computing Gumbel parameters.

virtual void Exit(void)

Cleanup on application exit.

virtual void Init(void)

Initialize the application.

virtual int Run(void)

Run the application.

CGumbelParamsApplication(void)

Keeps track of Gumbel params calculation library version.

virtual string Print(void) const

Print version information.

CGumbelParamsCalcVersion(void)

Wrapper for Gumbel parameter calculation.

static CRef< CGumbelParamsOptions > CreateStandard20AAOptions(CGeneralScoreMatrix::EScoreMatrixName smat=CGeneralScoreMatrix::eBlosum62)

Creates standard options with score matrix and residue frequenceis for 20 aa alphabet.

Options that control random values used in internal parts of Gumbel parameter calculation for gapped ...

Int4 GetTotalReNumber(void) const

Get total realizations number.

vector< Int4 > & SetPrelimReNumbers(void)

Set preliminary realizations numbers.

const vector< Int4 > & GetPrelimReNumbersKilling(void) const

Get perliminary realizations numbers killing array.

const vector< Int4 > & GetFirstStagePrelimReNumbers(void) const

Get first stage preliminary realizations numbers.

vector< Int4 > & SetFirstStagePrelimReNumbers(void)

Set first stage preliminary realizations numbers.

Int4 GetTotalReNumberKilling(void) const

Get total realizations number killing.

void SetTotalReNumber(Int4 num)

Set total realizations number.

void SetRandomSeed(Uint4 val)

Set random seed.

Uint4 GetRandomSeed(void) const

Get random seed.

void SetTotalReNumberKilling(Int4 num)

Set total realizations number killing.

const vector< Int4 > & GetPrelimReNumbers(void) const

Get preliminary realizations numbers.

vector< Int4 > & SetPrelimReNumbersKilling(void)

Set perliminary realizations numbers killing array.

const SGumbelParams & GetGumbelParams(void) const

Get Gubmel parameters.

double GetCalcTime(void) const

Get calculation time.

Wrapper for P-values calculation.

CRef< CScorePValues > Run(void)

Calculate P-values.

CRef< CScorePValues > GetResult(void)

Get results of P-values calculation.

Input parameters for P-values calculation.

const vector< TPValue > & GetPValues(void) const

Get p-values.

const vector< TPValue > & GetErrors(void) const

Get errors for p-values calculation.

const Uint2 kMinorVersion

const Uint2 kMajorVersion

void SetFullVersion(CRef< CVersionAPI > version)

Set version data for the program.

void HideStdArgs(THideStdArgs hide_mask)

Set the hide mask for the Hide Std Flags.

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments.

int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)

Main function (entry point) for the NCBI application.

virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup the command line argument descriptions.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

const CNcbiArguments & GetArguments(void) const

Get the application's cached unprocessed command-line arguments.

@ fHideXmlHelp

Hide XML help description.

@ fHideLogfile

Hide log file description.

@ fHideFullVersion

Hide full version description.

@ fHideDryRun

Hide dryrun description.

@ fHideConffile

Hide configuration file description.

@ eInputFile

Name of file (must exist and be readable)

@ eBoolean

{'true', 't', 'false', 'f'}, case-insensitive

@ eDouble

Convertible into a floating point number (double)

@ eString

An arbitrary string.

@ eOutputFile

Name of file (must be writable)

@ eInteger

Convertible into an integer number (int or Int8)

void SetDiagStream(CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")

Set diagnostic stream.

void Reset(void)

Reset reference object.

int32_t Int4

4-byte (32-bit) signed integer

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

virtual string Print(void) const

Print version information.

unsigned int

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

int main(int argc, const char *argv[])

static void x_WriteRandParams(CNcbiOstream &fouttest, const CGumbelParamsRandDiagnostics &rand)

static bool x_ReadRandParams(CNcbiIstream &fintest, CGumbelParamsRandDiagnostics &params)

static const int kPatchVersion

const string version

version string

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

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

Defines command line argument related classes.

Defines unified interface to application:

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

Gumbel parameters and estimation errors.

double gapless_alpha_error


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