NCBI C++ ToolKit
|
#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"
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) |
#define IS_DIGIT_OR_NA | ( | c | ) | ((c) == 'N' || (c) == 'A' || ('0' <= (c) && (c) <= '9')) |
Definition at line 72 of file fta_qscore.cpp.
#define QS_MAX_VALID_SCORE 100 /* Maximum valid quality score value */ |
Definition at line 79 of file fta_qscore.cpp.
#define QS_MIN_VALID_SCORE 0 /* Minimum valid quality score value */ |
Definition at line 78 of file fta_qscore.cpp.
#define QSBUF_MAXACC |
Definition at line 75 of file fta_qscore.cpp.
#define QSBUF_MAXLINE |
Definition at line 74 of file fta_qscore.cpp.
#define QSBUF_MAXSCORES |
Definition at line 77 of file fta_qscore.cpp.
#define QSBUF_MAXTITLE |
Definition at line 76 of file fta_qscore.cpp.
#define THIS_FILE "fta_qscore.cpp" |
Definition at line 64 of file fta_qscore.cpp.
|
static |
Definition at line 183 of file fta_qscore.cpp.
References NStr::CompareNocase(), ERR_QSCORE_BadTitle, ErrPostEx, isalnum(), isdigit(), isspace(), QS_MAX_VALID_SCORE, QS_MIN_VALID_SCORE, r(), SEV_ERROR, StringChr, StringCpy(), StringEquNI(), and StringHasNoText().
Referenced by QSbuf_To_Single_Qscore_SeqGraph().
|
static |
Definition at line 465 of file fta_qscore.cpp.
References IS_DIGIT_OR_NA, isspace(), max(), min(), QS_MAX_VALID_SCORE, QS_MIN_VALID_SCORE, StringEqu(), and val.
Referenced by QSbuf_To_Single_Qscore_SeqGraph().
|
static |
Definition at line 97 of file fta_qscore.cpp.
References i.
Referenced by QSbuf_To_Single_Qscore_SeqGraph().
|
static |
Definition at line 855 of file fta_qscore.cpp.
References copy(), CRef< C, Locker >::Empty(), ERR_QSCORE_BadBioseqId, ERR_QSCORE_BadBioseqLen, ERR_QSCORE_BadDefline, ERR_QSCORE_BadLength, ERR_QSCORE_BadMax, ERR_QSCORE_BadMin, ERR_QSCORE_BadMinMax, ERR_QSCORE_BadQscoreRead, ERR_QSCORE_BadScoreLine, ERR_QSCORE_InvalidArgs, ERR_QSCORE_MemAlloc, ERR_QSCORE_NoAccession, ERR_QSCORE_NoSeqVer, ERR_QSCORE_NoTitle, ERR_QSCORE_ScoresVsBspLen, ERR_QSCORE_ScoresVsLen, ErrPostEx, CBioseq::GetLength(), CBioseq_Base::IsSetId(), QS_MAX_VALID_SCORE, QS_MIN_VALID_SCORE, QSBUF_MAXLINE, QSBUF_MAXSCORES, QSBUF_MAXTITLE, QSbuf_ParseDefline(), QSbuf_ParseScores(), QSbuf_ReadLine(), CRef< C, Locker >::Reset(), CSeq_graph_Base::SetGraph(), CSeq_graph_Base::SetLoc(), CSeq_graph_Base::SetNumval(), CSeq_graph_Base::SetTitle(), SEV_ERROR, StringEqu(), and StringLen().
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().
|
static |
Definition at line 613 of file fta_qscore.cpp.
References byte(), delta(), CSeq_inst_Base::eRepr_delta, ERR_QSCORE_MissingByteStore, ERR_QSCORE_NonByteGraph, ERR_QSCORE_NonLiteralDelta, ERR_QSCORE_NonZeroInGap, ERR_QSCORE_OutOfScores, ERR_QSCORE_UnknownDelta, ERR_QSCORE_ZeroLengthLiteral, ErrPostEx, CDelta_ext_Base::Get(), CSeq_graph_Base::C_Graph::GetByte(), CSeq_ext_Base::GetDelta(), CSeq_inst_Base::GetExt(), CSeq_graph_Base::GetGraph(), CBioseq_Base::GetInst(), CBioseq::GetLength(), CSeq_inst_Base::GetRepr(), CSeq_graph_Base::GetTitle(), CByte_graph_Base::GetValues(), i, CSeq_graph_Base::C_Graph::IsByte(), CSeq_inst_Base::IsSetExt(), CSeq_graph_Base::IsSetTitle(), literal(), QS_MAX_VALID_SCORE, QS_MIN_VALID_SCORE, CSeq_interval_Base::SetFrom(), CSeq_graph_Base::SetGraph(), CSeq_interval_Base::SetId(), CBioseq_Base::SetId(), CSeq_graph_Base::SetLoc(), CSeq_graph_Base::SetNumval(), CSeq_graph_Base::SetTitle(), CSeq_interval_Base::SetTo(), SEV_ERROR, and SEV_WARNING.
USING_SCOPE | ( | objects | ) |