NCBI C++ ToolKit
Macros | Functions
fta_qscore.cpp File Reference
#include <ncbi_pch.hpp>
#include "ftacpp.hpp"
#include <objects/seqres/Seq_graph.hpp>
#include <objects/seq/Seq_annot.hpp>
#include <objects/seqloc/Seq_loc.hpp>
#include <objects/seqres/Byte_graph.hpp>
#include <objects/seqloc/Seq_interval.hpp>
#include <objects/seq/Seq_inst.hpp>
#include <objects/seq/Delta_ext.hpp>
#include <objects/seq/Delta_seq.hpp>
#include <objects/seq/Seq_ext.hpp>
#include <objects/seq/Seq_literal.hpp>
#include <objects/seq/Annot_descr.hpp>
#include "index.h"
#include <objtools/flatfile/flatdefn.h>
#include <algorithm>
#include "ftaerr.hpp"
#include "utilfun.h"
+ Include dependency graph for fta_qscore.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define THIS_FILE   "fta_qscore.cpp"
 
#define IS_DIGIT_OR_NA(c)   ((c) == 'N' || (c) == 'A' || ('0' <= (c) && (c) <= '9'))
 
#define QSBUF_MAXLINE
 
#define QSBUF_MAXACC
 
#define QSBUF_MAXTITLE
 
#define QSBUF_MAXSCORES
 
#define QS_MIN_VALID_SCORE   0 /* Minimum valid quality score value */
 
#define QS_MAX_VALID_SCORE   100 /* Maximum valid quality score value */
 

Functions

 USING_SCOPE (objects)
 
static bool QSbuf_ReadLine (const char *qs_buf, char *dest_buf, Int2 max_len, int *line)
 
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 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)
 
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)
 
bool QscoreToSeqAnnot (const string &qscore, CBioseq &bioseq, char *acc, Int2 ver, bool check_minmax, bool allow_na)
 

Macro Definition Documentation

◆ IS_DIGIT_OR_NA

#define IS_DIGIT_OR_NA (   c)    ((c) == 'N' || (c) == 'A' || ('0' <= (c) && (c) <= '9'))

Definition at line 72 of file fta_qscore.cpp.

◆ QS_MAX_VALID_SCORE

#define QS_MAX_VALID_SCORE   100 /* Maximum valid quality score value */

Definition at line 79 of file fta_qscore.cpp.

◆ QS_MIN_VALID_SCORE

#define QS_MIN_VALID_SCORE   0 /* Minimum valid quality score value */

Definition at line 78 of file fta_qscore.cpp.

◆ QSBUF_MAXACC

#define QSBUF_MAXACC
Value:
51 /* Maximum length for an accession \
read from the 'defline' at the \
start of a buffer of quality-score \
data, plus one for \0 */

Definition at line 75 of file fta_qscore.cpp.

◆ QSBUF_MAXLINE

#define QSBUF_MAXLINE
Value:
256 /* Maximum length for a line of data \
read from a buffer of quality-score \
data, plus one for the terminal \
newline character. */

Definition at line 74 of file fta_qscore.cpp.

◆ QSBUF_MAXSCORES

#define QSBUF_MAXSCORES
Value:
100 /* Maximum number of scores expected \
in a line of score data read from \
from a quality-score buffer */

Definition at line 77 of file fta_qscore.cpp.

◆ QSBUF_MAXTITLE

#define QSBUF_MAXTITLE
Value:
101 /* Maximum length for the title read \
from the 'defline' at the start of \
a buffer of quality-score data, \
plus one for \0 */

Definition at line 76 of file fta_qscore.cpp.

◆ THIS_FILE

#define THIS_FILE   "fta_qscore.cpp"

Definition at line 64 of file fta_qscore.cpp.

Function Documentation

◆ QSbuf_ParseDefline()

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

◆ QSbuf_ParseScores()

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

◆ QSbuf_ReadLine()

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

Definition at line 97 of file fta_qscore.cpp.

References i.

Referenced by QSbuf_To_Single_Qscore_SeqGraph().

◆ QSbuf_To_Single_Qscore_SeqGraph()

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

◆ QscoreToSeqAnnot()

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

Definition at line 1082 of file fta_qscore.cpp.

Referenced by EmblAscii(), GenBankAsciiOrig(), and XMLAscii().

◆ Split_Qscore_SeqGraph_By_DeltaSeq()

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

◆ USING_SCOPE()

USING_SCOPE ( objects  )
Modified on Mon Jul 15 05:34:46 2024 by modify_doxy.py rev. 669887