(!line_reader.
AtEOF());
208 if(header.empty()) {
209header = default_header;
214 if(header == CSeq_submit::GetTypeInfo()->GetName()) {
221 else if(header == CSeq_entry::GetTypeInfo()->GetName()) {
225 else if(header == CBioseq_set::GetTypeInfo()->GetName()) {
229 else if(header == CBioseq::GetTypeInfo()->GetName()) {
261 autohandle =
m_Scope->AddTopLevelSeqEntry(*se);
293 m_Scope->ResetDataAndHistory();
338 for(
const auto& entry : root.
GetSeq_set()) {
348 if(root.
IsSet()) {
351 else if(root.
IsSeq()) {
422 for(
const auto& desc : bioseq.
GetDescr().
Get()) {
424 if(desc->IsMolinfo()) {
427 else if(desc->IsSource()) {
430 else if(desc->IsTitle()) {
436 for(
const auto& annot : bioseq.
GetAnnot()) {
437 if(annot->IsFtable()) {
438 for(
const auto& feat : annot->GetData().GetFtable()) {
449 if((!
IsSeqSet(
n->m_Type) &&
n->m_Type !=
eSubmit) || !
n->m_Ref->m_Text.empty()) {
453 label=
n->m_Ref->GetText();
469 for(
const auto& desc : seqset.
GetDescr().
Get()) {
471 if(desc->IsMolinfo()) {
474 else if(desc->IsSource()) {
477 else if(desc->IsTitle()) {
483 for(
const auto& annot : seqset.
GetAnnot()) {
484 if(annot->IsFtable()) {
485 for(
const auto& feat : annot->GetData().GetFtable()) {
549 for(
auto& feat :
ftable) {
550 if(&*feat == &old_feat) {
551feat.Reset(&new_feat);
691unique_ptr<CNcbiIstream> InputStream(
new CNcbiIfstream(fname, ios::binary));
707unique_ptr<CObjectIStream> objectStream;
724 if(!tofix.empty()) {
726 boolin_file =
false;
728 if(node->m_Type ==
eFile) in_file =
true;
731 for(
auto& fix : tofix) {
741vector<vector<CDiscrepancyObject*>> all_fixes;
743 for(
auto& fix : tofix) {
747 if(node->m_Type ==
eFile) {
752 if(path != current_path) {
754vector<CDiscrepancyObject*> fixes;
755all_fixes.push_back(fixes);
757all_fixes.back().push_back(&obj);
759 for(
auto& fix : all_fixes) {
770 if(node->m_Type ==
eFile) {
775 boolcompressed =
false;
777cout <<
"Autofixing "<< path <<
"\n";
779 size_tdot = path.find_last_of(
'.');
780 if(dot != string::npos) {
781 size_tslash = path.find_last_of(
"/\\");
782 if(slash != string::npos && slash >= dot) {
786 stringfixed_path = !compressed && (dot != string::npos) ? path.substr(0, dot) +
".autofix"+ path.substr(dot) : path +
".autofix.sqn";
788 stringheader =
in->ReadFileHeader();
803 if(header.empty()) {
804header = default_header;
810 if(header == CSeq_submit::GetTypeInfo()->GetName()) {
815 else if(header == CSeq_entry::GetTypeInfo()->GetName()) {
818 else if(header == CBioseq_set::GetTypeInfo()->GetName()) {
821 else if(header == CBioseq::GetTypeInfo()->GetName()) {
828 if(
in->EndOfData()) {
832header =
in->ReadFileHeader();
844 if(
A->m_Index !=
B->m_Index) {
860 for(
auto* fix : *
m_Fixes) {
876 if(
A->m_Index !=
B->m_Index) {
892 for(
auto* fix : *
m_Fixes) {
907 if(
A->m_Index !=
B->m_Index) {
923 for(
auto* fix : *
m_Fixes) {
938 if(
A->m_Index !=
B->m_Index) {
954 for(
auto* fix : *
m_Fixes) {
969 if(
A->m_Index !=
B->m_Index) {
985 for(
auto* fix : *
m_Fixes) {
1002 for(
auto* fix : *
m_Fixes) {
1019 for(
auto* fix : *
m_Fixes) {
1034 for(
auto* fix : *
m_Fixes) {
1052 for(
auto& annot : bss->
GetAnnot()) {
1053 if(annot->IsFtable()) {
1054 for(
auto& feat : annot->GetData().GetFtable()) {
1075 for(
auto* fix : *
m_Fixes) {
1093 for(
auto& annot : bs->
GetAnnot()) {
1094 if(annot->IsFtable()) {
1095 for(
auto& feat : annot->GetData().GetFtable()) {
1102 for(
auto* fix : *
m_Fixes) {
@Auth_list.hpp User-defined methods of the data storage class.
CCopyHook_Bioseq_set(CDiscrepancyContext *context)
CDiscrepancyContext * m_Context
void CopyObject(CObjectStreamCopier &copier, const CObjectTypeInfo &passed_info) override
CDiscrepancyContext * m_Context
void CopyObject(CObjectStreamCopier &copier, const CObjectTypeInfo &passed_info) override
CCopyHook_Bioseq(CDiscrepancyContext *context)
void CopyObject(CObjectStreamCopier &copier, const CObjectTypeInfo &passed_info) override
CCopyHook_Seq_annot(CDiscrepancyContext *context)
CDiscrepancyContext * m_Context
CDiscrepancyContext * m_Context
void CopyObject(CObjectStreamCopier &copier, const CObjectTypeInfo &passed_info) override
CCopyHook_Seq_descr(CDiscrepancyContext *context)
void CopyObject(CObjectStreamCopier &copier, const CObjectTypeInfo &passed_info) override
CCopyHook_Submit_block(CDiscrepancyContext *context)
CDiscrepancyContext * m_Context
Copy hook for a standalone object.
friend class CReadHook_Bioseq_set
BIG FILE.
CRef< CBioseq > m_AF_Bioseq
friend class CReadHook_Bioseq_set_class
bool CanFixSubmit_block()
vector< CDiscrepancyObject * > * m_Fixes
CRef< CSeq_descr > m_AF_Seq_descr
void PopulateSeqSet(CParseNode &node)
CRef< objects::CScope > m_Scope
void Populate(CParseNode &node)
CParseNode * FindNode(const CRefNode &obj)
bool CanFixDesc(CRefNode &refnode)
CRef< CBioseq_set > m_AF_Bioseq_set
friend class CCopyHook_Seq_annot
CRef< CParseNode > m_RootNode
void AutofixFile(vector< CDiscrepancyObject * > &fixes, const string &default_header)
void ParseObject(const CBioseq &root)
CRef< feature::CFeatTree > m_FeatTree
friend class CCopyHook_Seq_descr
void ReplaceSeq_feat(CReportObj &obj, const CSeq_feat &old_feat, CSeq_feat &new_feat, bool alt=false)
CRef< CParseNode > m_CurrentNode
bool InGenProdSet() const
const CSerialObject * FindObject(CReportObj &obj, bool alt=false) override
objects::CScope & GetScope() const
map< string, size_t > Autofix() override
friend class CCopyHook_Bioseq_set
friend class CCopyHook_Bioseq
bool CanFixFeat(CRefNode &refnode)
void BuildSeqSummary(const CBioseq &bs, CSeqSummary &summary)
void PopulateSubmit(CParseNode &node)
void PopulateBioseq(CParseNode &node)
void Extend(CParseNode &node, CObjectIStream &stream)
friend class CReadHook_Bioseq
map< const CRefNode *, CParseNode * > m_NodeMap
friend class CCopyHook_Submit_block
CRef< CSeq_annot > m_AF_Seq_annot
static bool InNucProtSet(const CParseNode *node)
static bool CompareRefs(CRef< CReportObj > a, CRef< CReportObj > b)
void ReplaceObject(CReportObj &obj, CSerialObject *, bool alt=false)
void ParseAll(CParseNode &node)
CRef< CSubmit_block > m_AF_Submit_block
void ParseStrings(const string &fname) override
void ParseStream(CObjectIStream &stream, const string &fname, bool skip, const string &default_header=kEmptyStr) override
static bool IsSeqSet(EObjType n)
void AutofixSubmit_block()
virtual CRef< CAutofixReport > Autofix(CDiscrepancyObject *obj, CDiscrepancyContext &context) const =0
CRef< CDiscrepancyContext::CRefNode > m_Ref
CRef< CDiscrepancyContext::CRefNode > m_Fix
CRef< CDiscrepancyCore > m_Case
EFormat
The formats are checked in the same order as declared here.
@ eBZip2
bzip2 compressed file
@ eBinaryASN
Binary ASN.1.
@ eLzo
lzo compressed file
@ eGZip
GNU zip compressed file.
static EFormat Format(const string &path, EOnError onerror=eDefault)
Guess file format.
Read hook for data member of a containing object (eg, SEQUENCE)
void ReadClassMember(CObjectIStream &stream, const CObjectInfoMI &passed_info) override
This method will be called at approriate time when the object of requested type is to be read.
CDiscrepancyContext * m_Context
CReadHook_Bioseq_set_class(CDiscrepancyContext *context)
CReadHook_Bioseq_set(CDiscrepancyContext *context)
void ReadObject(CObjectIStream &stream, const CObjectInfo &passed_info) override
This method will be called at approriate time when the object of requested type is to be read.
CDiscrepancyContext * m_Context
CReadHook_Bioseq(CDiscrepancyContext *context)
CDiscrepancyContext * m_Context
void ReadObject(CObjectIStream &stream, const CObjectInfo &passed_info) override
This method will be called at approriate time when the object of requested type is to be read.
Read hook for a standalone object.
bool IsFtable(void) const
@Seq_descr.hpp User-defined methods of the data storage class.
CSeq_feat_EditHandle â.
namespace ncbi::objects::
Base class for all serializable objects.
Simple implementation of ILineReader for i(o)streams.
vector< CRef< CReportObj > > TReportObjectList
unique_ptr< CObjectIStream > OpenUncompressedStream(const string &fname, bool &compressed)
std::ofstream out("events_result.xml")
main entry point for tests
@ eTakeOwnership
An object can take ownership of another.
EMethod
Compression/decompression methods.
@ eNone
no compression method (copy "as is")
@ eGZipFile
.gz file (including concatenated files)
@ fDefault
Use algorithm-specific defaults.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
@ eSerial_AsnText
ASN.1 text.
@ eSerial_AsnBinary
ASN.1 binary.
bool AtEOF(void) const
Indicates (negatively) whether there is any more input.
void DefaultRead(CObjectIStream &in, const CObjectInfoMI &object)
void Read(const CObjectInfo &object)
Read object of know type.
void DefaultRead(CObjectIStream &in, const CObjectInfo &object)
Default read.
void SetLocalReadHook(CObjectIStream &stream, CReadObjectHook *hook) const
Set local (for the specified stream) read hook.
pair< TObjectPtr, TTypeInfo > ObjectInfo(C &obj)
virtual bool EndOfData(void)
Check if there is still some meaningful data that can be read; in text streams this function will ski...
void ReadObject(const CObjectInfo &object)
Read child object.
TObjectPtr GetObjectPtr(void) const
Get pointer to object.
CMemberIterator FindMember(const string &memberName) const
Find class member by its name.
static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)
Create serial object writer and attach it to an output stream.
virtual string ReadFileHeader(void)
Read file header.
CObjectInfo GetMember(void) const
Get class member data.
void SetStreamPos(CNcbiStreampos pos)
Set the current read position in underlying input stream This is the same as istream::seekg()
void WriteObject(const CConstObjectInfo &object)
CNcbiStreampos GetStreamPos(void) const
Get the current stream position.
TTypeInfo GetTypeInfo(void) const
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
CObjectIStream & In(void) const
void DefaultCopy(CObjectStreamCopier &copier, const CObjectTypeInfo &type)
void SetLocalCopyHook(CObjectStreamCopier &stream, CCopyObjectHook *hook) const
Set local (for the specified stream) copy hook.
void DefaultSkip(CObjectIStream &in, const CObjectTypeInfo &object)
Default skip.
CObjectOStream & Out(void) const
void SetLocalReadHook(CObjectIStream &stream, CReadClassMemberHook *hook) const
void Copy(const CObjectTypeInfo &type)
Copy data.
@ eDelayBufferPolicyAlwaysParse
Parse always.
void Replace(const CSeq_feat &new_feat) const
Replace the feature with new Seq-feat object.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
TObjectType * GetPointerOrNull(void) const THROWS_NONE
Get pointer value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
IO_PREFIX::streampos CNcbiStreampos
Portable alias for streampos.
static const char label[]
const TAuthors & GetAuthors(void) const
Get the Authors member data.
bool CanGetAuthors(void) const
Check if it is safe to call GetAuthors method.
const TSeq & GetSeq(void) const
Get the variant data.
bool IsSetClass(void) const
Check if a value has been assigned to Class data member.
const TDescr & GetDescr(void) const
Get the Descr member data.
bool CanGetDescr(void) const
Check if it is safe to call GetDescr method.
TSet & SetSet(void)
Select the variant.
bool CanGetSeq_set(void) const
Check if it is safe to call GetSeq_set method.
TClass GetClass(void) const
Get the Class member data.
const TSet & GetSet(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
bool IsSet(void) const
Check if variant Set is selected.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
TSeq & SetSeq(void)
Select the variant.
@ eClass_pop_set
population study
@ eClass_phy_set
phylogenetic study
@ eClass_mut_set
set of mutations
@ eClass_eco_set
ecological sample study
@ eClass_nuc_prot
nuc acid and coded proteins
@ eClass_gen_prod_set
genomic products, chrom+mRNA+protein
@ eClass_segset
segmented sequence + parts
@ eClass_small_genome_set
viral segments or mitochondrial minicircles
void SetData(TData &value)
Assign a value to Data data member.
bool CanGet(void) const
Check if it is safe to call Get method.
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
const Tdata & Get(void) const
Get the member data.
bool CanGetDescr(void) const
Check if it is safe to call GetDescr method.
const TFtable & GetFtable(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TDescr & GetDescr(void) const
Get the Descr member data.
const TCit & GetCit(void) const
Get the Cit member data.
const TEntrys & GetEntrys(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TSub & GetSub(void) const
Get the Sub member data.
bool IsSetSub(void) const
Check if a value has been assigned to Sub data member.
bool IsEntrys(void) const
Check if variant Entrys is selected.
bool IsSetCit(void) const
citation for this submission Check if a value has been assigned to Cit data member.
bool CanGetData(void) const
Check if it is safe to call GetData method.
The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format
Lightweight interface for getting lines of data with minimal memory copying.
constexpr auto sort(_Init &&init)
std::istream & in(std::istream &in_, double &x_)
C++ I/O stream wrappers to compress/decompress data on-the-fly.
CConstRef< CSeqdesc > m_Molinfo
CParseNode & AddDescriptor(const CSeqdesc &seqdesc)
CConstRef< CSeqdesc > m_Title
vector< CRef< CParseNode > > m_Children
vector< CRef< CParseNode > > m_Features
vector< CRef< CParseNode > > m_Descriptors
CConstRef< CSerialObject > m_Obj
CParseNode & AddFeature(const CSeq_feat &feat)
CConstRef< CSeqdesc > m_Biosource
map< const CAuth_list *, CParseNode * > m_AuthorMap
shared_ptr< CSeqSummary > m_BioseqSummary
vector< const CAuth_list * > m_Authors
CRef< CRefNode > m_Parent
static CS_CONTEXT * context
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