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

NCBI C++ ToolKit: src/objtools/flatfile/fta_qscore.cpp Source File

64 #define THIS_FILE "fta_qscore.cpp" 72 #define IS_DIGIT_OR_NA(c) ((c) == 'N' || (c) == 'A' || ('0' <= (c) && (c) <= '9')) 74 #define QSBUF_MAXLINE 256 78 #define QSBUF_MAXACC 51 82 #define QSBUF_MAXTITLE 101 86 #define QSBUF_MAXSCORES 100 89 #define QS_MIN_VALID_SCORE 0 90 #define QS_MAX_VALID_SCORE 100 108 static bool QSbuf_ReadLine

(

const char

* qs_buf,

char

* dest_buf,

Int2

max_len,

int

* line)

112  if

(! qs_buf || ! dest_buf)

115  for

(

i

= 1;

i

<= max_len;

i

++, dest_buf++, qs_buf++) {

117  if

(*qs_buf ==

'\n'

|| *qs_buf ==

'\0'

)

129  if

(*dest_buf !=

'\n'

&& *dest_buf !=

'\0'

) {

145  if

(*dest_buf !=

'\n'

) {

194 static int QSbuf_ParseDefline

(

char

* qs_defline,

char

* def_acc,

char

* def_ver,

char

* def_title,

unsigned int

* def_len,

unsigned char

* def_max,

unsigned char

* def_min)

205  if

(! def_acc || ! def_ver || ! def_title ||

206

! def_len || ! def_max || ! def_min)

209  if

(! qs_defline || *qs_defline ==

'\0'

)

220  for

(q = qs_defline;

isspace

(*q);)

241  if

(*q !=

'.'

&& !

isspace

(*q))

340

sscanf(p,

"%ld"

, (

long

*)&temp);

341

*def_len = (

Uint4

)temp;

384

sscanf(p,

"%ld"

, (

long

*)&temp);

390

*def_min = (

Uint1

)temp;

434

sscanf(p,

"%ld"

, (

long

*)&temp);

440

*def_max = (

Uint1

)temp;

476 static Int4 QSbuf_ParseScores

(

char

* score_buf,

unsigned char

* scores,

Int4

max_toks,

unsigned char

* max_score,

unsigned char

* min_score,

bool

allow_na)

485  if

(! score_buf || *score_buf ==

'\0'

)

490  if

(! scores || max_toks < 1)

510  while

(ch !=

'\0'

) {

533

fprintf(stderr,

"error: score_buf contains an illegal character : >%c<\n"

, ch);

544  if

(max_toks < ++num_toks) {

558  if

(sscanf(p,

"%d"

, &

val

) == 1) {

627  bool

is_gap =

false

;

630  bool

problem =

false

;

639  Int2

nonzero_gap = 0;

657  if

(scores_str.empty()) {

676  if

(

delta

->IsLoc()) {

682  if

(!

delta

->IsLiteral()) {

698  if

(!

literal

.IsSetSeq_data()) {

709  size_t

scores_size =

literal

.GetLength();

710  for

(

size_t i

= 0;

i

< scores_size;

i

++) {

711  Uint1 byte

=

static_cast<Uint1>

(scores_str[curr_pos]);

712

new_scores.push_back(scores_str[curr_pos]);

721  if

(

byte

< min_score)

723  else if

(

byte

> max_score)

726  if

(is_gap &&

byte

!= 0) {

727  if

(nonzero_gap < 10) {

730

}

else if

(nonzero_gap == 10) {

748

interval.

SetId

(*(*bioseq.

SetId

().begin()));

753

graph->

SetGraph

().SetByte().SetValues().swap(new_scores);

768

graph->

SetGraph

().SetByte().SetMin(min_score);

769

graph->

SetGraph

().SetByte().SetMax(max_score);

770

graph->

SetGraph

().SetByte().SetAxis(0);

778  if

(! def_title.empty())

782

interval.

SetTo

(curr_pos - 1);

789

new_graphs.push_back(graph);

793

graphs.swap(new_graphs);

875  char

* my_buf =

nullptr

;

891  Uint4

total_scores = 0;

898  bool

problem =

false

;

903  if

(! qs_buf || *qs_buf ==

'\0'

|| ! def_acc || ! def_ver) {

921

my_buf = mybuf.data();

930

def_title = deftitle.data();

939  while

(*qs_buf !=

'\0'

) {

963  if

(*my_buf !=

'>'

) {

968

def_stat =

QSbuf_ParseDefline

(my_buf, def_acc, def_ver, def_title, &def_len, &def_max, &def_min);

974  if

(def_acc && *def_acc ==

'\0'

) {

978  if

(def_ver && *def_ver ==

'\0'

) {

982  if

(def_title && *def_title ==

'\0'

) {

990  if

(def_max < def_min || def_min > def_max) {

1014  if

(qs_scores < 0) {

1021  std::copy

(scores, scores + qs_scores, std::back_inserter(scores_str));

1022

total_scores += qs_scores;

1026  if

(graph.

Empty

())

1029  if

(total_scores != def_len) {

1033  if

(total_scores != bioseq.

GetLength

()) {

1038  if

(def_max != max_score) {

1042  if

(def_min != min_score) {

1070

graph->

SetGraph

().SetByte().SetValues().swap(scores_str);

1074

graph->

SetGraph

().SetByte().SetMin(min_score);

1075

graph->

SetGraph

().SetByte().SetMax(max_score);

1076

graph->

SetGraph

().SetByte().SetAxis(0);

1088

graphs.push_back(graph);

1097  if

(qscore.empty() || ver < 1)

1100

snprintf(charver, 100,

"%d"

, (

int

)ver);

1115

annot->SetData().SetGraph().swap(graphs);

1116

annot->SetNameDesc(

"Graphs"

);

1118

bioseq.

SetAnnot

().push_front(annot);

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

TSeqPos GetLength(void) const

#define ERR_QSCORE_NoTitle

#define ERR_QSCORE_BadMinMax

#define ERR_QSCORE_BadBioseqLen

#define ERR_QSCORE_MissingByteStore

#define ERR_QSCORE_UnknownDelta

#define ERR_QSCORE_BadQscoreRead

#define ERR_QSCORE_NoSeqVer

#define ERR_QSCORE_MemAlloc

#define ERR_QSCORE_NonLiteralDelta

#define ERR_QSCORE_ZeroLengthLiteral

#define ERR_QSCORE_BadLength

#define ERR_QSCORE_BadMax

#define ERR_QSCORE_NonZeroInGap

#define ERR_QSCORE_NonByteGraph

#define ERR_QSCORE_BadBioseqId

#define ERR_QSCORE_InvalidArgs

#define ERR_QSCORE_BadDefline

#define ERR_QSCORE_ScoresVsLen

#define ERR_QSCORE_NoAccession

#define ERR_QSCORE_BadTitle

#define ERR_QSCORE_BadScoreLine

#define ERR_QSCORE_OutOfScores

#define ERR_QSCORE_ScoresVsBspLen

#define ERR_QSCORE_BadMin

#define QS_MAX_VALID_SCORE

#define QS_MIN_VALID_SCORE

static int QSbuf_ParseDefline(char *qs_defline, char *def_acc, char *def_ver, char *def_title, unsigned int *def_len, unsigned char *def_max, unsigned char *def_min)

static bool QSbuf_ReadLine(const char *qs_buf, char *dest_buf, Int2 max_len, int *line)

static void QSbuf_To_Single_Qscore_SeqGraph(const char *qs_buf, CBioseq &bioseq, char *def_acc, char *def_ver, bool check_minmax, bool allow_na, CSeq_annot::C_Data::TGraph &graphs)

static Int4 QSbuf_ParseScores(char *score_buf, unsigned char *scores, Int4 max_toks, unsigned char *max_score, unsigned char *min_score, bool allow_na)

static void Split_Qscore_SeqGraph_By_DeltaSeq(CSeq_annot::C_Data::TGraph &graphs, CBioseq &bioseq)

bool QscoreToSeqAnnot(const string &qscore, CBioseq &bioseq, char *acc, Int2 ver, bool check_minmax, bool allow_na)

#define IS_DIGIT_OR_NA(c)

bool StringEqu(const char *s1, const char *s2)

void StringCpy(char *d, const char *s)

size_t StringLen(const char *s)

bool StringHasNoText(const char *s)

#define FtaErrPost(sev, level,...)

unsigned int TSeqPos

Type for sequence locations and lengths.

void SetId(CSeq_id &id)

set the 'id' field in all parts of this location

void Reset(void)

Reset reference object.

bool Empty(void) const THROWS_NONE

Check if CRef is empty – not pointing to any object, which means having a null value.

uint8_t Uint1

1-byte (8-bit) unsigned integer

int16_t Int2

2-byte (16-bit) signed integer

int32_t Int4

4-byte (32-bit) signed integer

char Char

Alias for char.

uint32_t Uint4

4-byte (32-bit) unsigned integer

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

CTempString literal(const char(&str)[Size])

Templatized initialization from a string literal.

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 EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive equality of a substring with another string.

@ eNocase

Case insensitive compare.

void SetTo(TTo value)

Assign a value to To data member.

void SetId(TId &value)

Assign a value to Id data member.

void SetFrom(TFrom value)

Assign a value to From 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.

const TGraph & GetGraph(void) const

Get the Graph member data.

const TTitle & GetTitle(void) const

Get the Title member data.

const TByte & GetByte(void) const

Get the variant data.

void SetGraph(TGraph &value)

Assign a value to Graph data member.

const TValues & GetValues(void) const

Get the Values member data.

bool IsByte(void) const

Check if variant Byte is selected.

void SetLoc(TLoc &value)

Assign a value to Loc data member.

bool IsSetTitle(void) const

Check if a value has been assigned to Title data member.

TRepr GetRepr(void) const

Get the Repr member data.

TId & SetId(void)

Assign a value to Id data member.

const TInst & GetInst(void) const

Get the Inst member data.

list< CRef< CSeq_graph > > TGraph

TAnnot & SetAnnot(void)

Assign a value to Annot data member.

const TId & GetId(void) const

Get the Id member data.

bool IsSetExt(void) const

extensions for special types Check if a value has been assigned to Ext data member.

const TExt & GetExt(void) const

Get the Ext member data.

const TDelta & GetDelta(void) const

Get the variant data.

const Tdata & Get(void) const

Get the member data.

bool IsSetId(void) const

equivalent identifiers Check if a value has been assigned to Id data member.

@ eRepr_delta

sequence made by changes (delta) to others

static void byte(MDB_val *v)

Int4 delta(size_t dimension_, const Int4 *score_)

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

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


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