(
new CAgpRow(arg, agp_version, reader));
100 return Ref(
new CAgpRow(agp_version, reader) );
111 intFromString(
const string& line);
113 stringGetErrorMessage();
114 string ToString(
boolreorder_linkage_evidences=
false);
131 if(cols.size()==8) {
144 if(cols.size()==8) {
166eOrientationPlus = 43,
167eOrientationMinus = 45,
168eOrientationUnknown = 48,
169eOrientationIrrelevant = 110
190eGapYes_count=eGapContamination+1
196fLinkageEvidence_paired_ends = (1 << 0),
197fLinkageEvidence_align_genus = (1 << 1),
198fLinkageEvidence_align_xgenus = (1 << 2),
199fLinkageEvidence_align_trnscpt= (1 << 3),
200fLinkageEvidence_within_clone = (1 << 4),
201fLinkageEvidence_clone_contig = (1 << 5),
202fLinkageEvidence_map = (1 << 6),
203fLinkageEvidence_strobe = (1 << 7),
204fLinkageEvidence_pcr = (1 << 8),
205fLinkageEvidence_proximity_ligation = (1 << 9),
207fLinkageEvidence_HIGHEST_BIT_MASK = fLinkageEvidence_proximity_ligation,
209fLinkageEvidence_unspecified = 0,
210fLinkageEvidence_INVALID = -1,
211fLinkageEvidence_na = -2
224 returnc==
'N'|| c==
'U';
229 returnc==
'A'|| c==
'D'|| c==
'P';
233 returngap_type==eGapCentromere || gap_type==eGapTelomere ||
234gap_type==eGapShort_arm || gap_type==eGapHeterochromatin ||
235gap_type==eGapContamination;
245 returnIsDraftComponent(component_type);
251 if( gap_type==eGapFragment)
return false;
252 returnlinkage==
false;
257 returnGapValidAtObjectEnd(gap_type);
261 static boolCheckComponentEnd(
const string& comp_id,
TAgpPoscomp_end,
TAgpLencomp_len,
264 returnCheckComponentEnd(GetComponentId(), component_end, comp_len, *m_AgpErr);
268 stringLinkageEvidencesToString(
void);
270 static stringLinkageEvidenceFlagsToString(
int le);
273 returnLinkageEvidenceFlagsToString(linkage_evidence_flags);
275 static const char* le_str(ELinkageEvidence
le);
276 static intstr_to_le(
const string&
str);
280 stringSubstOldGap(
booldo_subst);
288 int*perror_code,
boollog_errors =
true);
289 intParseComponentCols(
boollog_errors=
true);
290 intParseGapCols(
boollog_errors=
true);
293 static const TStrgap_types[eGapCount];
298 static TMapStrEGap* gap_type_codes_creator(
void);
310 voidSetErrorHandler(
CAgpErr* arg);
315 returngap_types[
i];
320 returnm_agp_version;
353 virtual intReadStream(
CNcbiIstream& is, EFinalize eFinalize = eFinalize_Yes );
360 returnReadStream(is, (bFinalize ? eFinalize_Yes : eFinalize_No) );
368 virtual intFinalize();
376 virtual stringGetErrorMessage(
const string& filename=
NcbiEmptyString);
383 boolProcessThisRow();
478 voidx_CheckPragmaComment(
void);
482 voidSetErrorHandler(
CAgpErr* arg);
485 returnm_agp_version;
505 virtual voidMsg(
int code,
const string& details,
intappliesTo=fAtThisLine);
506 virtual void Msg(
int code,
intappliesTo=fAtThisLine)
513 virtual stringGetErrorMessage(
int mask=0xFFFFFFFF);
514 virtual intAppliesTo(
int mask=0xFFFFFFFF);
551E_Last, E_First=1, E_LastToSkipLine=E_ObjRangeNeComp,
616G_First = G_InvalidCompId,
622 if(
code==W_ShortGap ||
code==W_AssumingVersion)
return "NOTE";
626 static const char* GetMsg(
int code);
632 static stringFormatMessage(
const string&
msg,
const string& details);
652CODE_First = E_First,
657CODE_Extended = ((((G_Last / 10 ) + 2) * 10) + 1),
659CODE_Last=CODE_Extended+20
663 stringGetPrintableCode(
int code,
boolstrict=
false)
const;
680 const string& filename,
intlinenum,
const string& content);
681 static voidPrintLineXml(
CNcbiOstream& ostr,
const string& filename,
intlinenum,
const string& content,
booltwo_lines_involved);
688 static const Uint8s_StrictModeWarningMask =
689(
Uint8(1) << (W_ExtraTab -W_First)) |
690(
Uint8(1) << (W_GapLineMissingCol9 -W_First)) |
691(
Uint8(1) << (W_NoEolAtEof -W_First)) |
692(
Uint8(1) << (W_GapLineIgnoredCol9 -W_First)) |
693(
Uint8(1) << (W_ObjOrderNotNumerical -W_First)) |
694(
Uint8(1) << (W_GapSizeNot100 -W_First)) |
695(
Uint8(1) << (W_ShortGap -W_First)) |
696(
Uint8(1) << (W_CommentsAfterStart -W_First)) |
697(
Uint8(1) << (W_AssumingVersion -W_First)) |
698(
Uint8(1) << (W_AGPVersionCommentInvalid -W_First)) |
699(
Uint8(1) << (W_AGPVersionCommentUnnecessary-W_First)) ;
702 returns_StrictModeWarningMask & (
Uint8(1) << (
code-W_First));
704 const char* ErrorWarningOrNoteEx(
int code);
712 virtual voidPrintMessageXml(
CNcbiOstream& ostr,
int code,
const string& details,
intappliesTo);
715 static voidPrintTotals(
CNcbiOstream& ostr,
inte_count,
intw_count,
intnote_count,
intskipped_count);
718PrintTotals(ostr, e_count, w_count, 0, skipped_count);
720 static voidPrintTotalsXml(
CNcbiOstream& ostr,
inte_count,
intw_count,
intnote_count,
intskipped_count);
724 booluse_xml=
false,
747 virtual voidMsg(
int code,
const string& details,
intappliesTo=fAtThisLine);
748 virtual void Msg(
int code,
intappliesTo=fAtThisLine)
754 virtual voidLineDone(
const string& s,
int line_num,
boolinvalid_line=
false);
759 voidStartFile(
const string& s);
768 stringSkipMsg(
const string&
str,
boolskip_other=
false);
771 if(
code>=E_First &&
code<CODE_Last) m_MustSkip[
code] = !skip_other;
774 boolMustSkip(
int code);
782 intCountTotals(
intfrom,
intto=E_First);
783 intGetCount(EErrCode
code)
const;
788 voidPrintMessageCounts(
CNcbiOstream& ostr,
intfrom,
intto=E_First,
boolreport_lines_skipped=
false,
TMapCcodeToString* hints=
nullptr);
792 intm_MsgCount[CODE_Last];
793 charm_MustSkip[CODE_Last];
840 return static_cast<int>(m_InputFiles.size());
845 returnm_InputFiles[num-1];
851m_UpgradedWarnings.insert(
code);
859 return(m_UpgradedWarnings.find(
code) != m_UpgradedWarnings.end());
881 static stringGetExpandedPattern(
value_type* p);
@ eAgpVersion_auto
auto-detect using the first gap line
@ eAgpVersion_1_1
AGP spec 1.1.
@ eAgpVersion_2_0
AGP spec 2.0 or later.
ncbi::TMaskedQueryRegions mask
Accession naming patterns; find ranges for consequtive digits.
vector< double > TDoubleVec
multimap< int, string > TMapCountToString
Correctly print multiple errors and warnings on consequitive lines; suppress undesired or higly repet...
map< int, string > TMapCcodeToString
void UpgradeToError(EErrCode code)
AutoPtr< CNcbiOstrstream > m_messages
vector< string > m_InputFiles
bool m_two_lines_involved
set< EErrCode > m_UpgradedWarnings
bool TreatAsError(EErrCode code) const
virtual void Msg(int code, int appliesTo=fAtThisLine)
bool TreatAsError(int code) const
AutoPtr< CNcbiOstream > m_out_destroyer
void SkipMsg(int code, bool skip_other=false)
static void PrintTotals(CNcbiOstream &ostr, int e_count, int w_count, int skipped_count)
const string & GetFile(int num)
static bool IsStrictModeWarning(int code)
virtual void Msg(int code, int appliesTo=fAtThisLine)
static const char * ErrorWarningOrNote(int code)
@ W_AGPVersionCommentUnnecessary
@ W_BreakingGapSameCompId
@ W_AGPVersionCommentInvalid
@ W_UnSingleCompNotInFull
@ W_OrientationZeroDeprecated
string m_messages_prev_line
Detects scaffolds, object boundaries, errors that involve 2 consecutive lines, and is intended as a s...
EFinalize
Whether or not the function should call Finalize() when it's done successfully.
CAgpErr * GetErrorHandler()
virtual void OnObjectChange()
CRef< CAgpRow > m_prev_row
CRef< CAgpRow > m_this_row
virtual void OnScaffoldEnd()
EAgpVersion m_agp_version
virtual void OnGapOrComponent()
int ReadStream(CNcbiIstream &is, bool bFinalize)
Deprecated backward-compatibility wrapper.
A container for both the original string column values (Get*() methods) and the values converted to i...
bool CheckComponentEnd(TAgpLen comp_len)
string & GetComponentId()
bool GapValidAtObjectEnd() const
static CRef< CAgpRow > New(CAgpErr *arg, EAgpVersion agp_version=eAgpVersion_auto, CAgpReader *reader=nullptr)
string LinkageEvidenceFlagsToString()
CAgpErr * GetErrorHandler()
int linkage_evidence_flags
a bit map which holds summary of info in linkage_evidences.
map< string, EGap > TMapStrEGap
static bool IsGap(char c)
bool GapEndsScaffold() const
string & GetOrientation()
static bool GapValidAtObjectEnd(EGap gap_type)
EAgpVersion m_agp_version
static bool IsDraftComponent(char c)
string & GetComponentType()
TLinkageEvidenceVec linkage_evidences
static const char * GapTypeToString(int i)
CRef< CAgpRow > Clone(void) const
static CRef< CAgpRow > New(EAgpVersion agp_version=eAgpVersion_auto, CAgpReader *reader=nullptr)
string & GetComponentEnd()
static CSafeStatic< TMapStrEGap > gap_type_codes
string & GetComponentBeg()
string & GetLinkageEvidence()
vector< ELinkageEvidence > TLinkageEvidenceVec
Might have duplicates, and is empty on error or if there are no actual linkage evidences (e....
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
container_type::iterator iterator
Include a standard set of the NCBI C++ Toolkit most basic headers.
The NCBI C++ standard methods for dealing with std::string.
std::ofstream out("events_result.xml")
main entry point for tests
static unsigned int line_num
static const char * str(char *buf, int n)
unsigned int TSeqPos
Type for sequence locations and lengths.
@ eNoOwnership
No ownership is assumed.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
NCBI_NS_STD::string::size_type SIZE_TYPE
enum ENcbiOwnership EOwnership
Ownership relations between objects.
#define NCBI_XOBJREAD_EXPORT
double value_type
The numeric datatype used by the parser.
Static variables safety - create on demand, destroy on application termination.
Multi-threading â mutexes; rw-locks; semaphore.
bool le(T x_, T y_, T round_)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
string ToString(const wxRect &rc)
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