<< __LINE__ << endl
102 CFileFile(Filename);
137 returnObjects.front();
194Objects.push_back(Result);
218 LOG_POST(
Error<<
"This file is not recognized as a supported GFF format.");
222reader->ReadSeqAnnots(annots, In);
223 for(
const auto& annot_it : annots) {
249vector<CRef<CSeq_entry>> SeqEntries;
250SeqEntries.swap(agpToSeqEntry.
GetResult());
251 for(
const auto& entry_it : SeqEntries) {
264 const string&
Type= ObjS->ReadFileHeader();
265ObjS->SetStreamPos(0);
286}
catch(std::exception& e) {
287 if(Objects.empty() || !In.eof()) {
289 LOG_POST(
Error<<
"Failed to deserialize object: "<< e.what());
343: m_Results(Results), m_ObjLevel(0)
383 types.insert(cand->type_info.GetTypeInfo()->GetName());
387vector<string> modules;
390modules.push_back(
"NCBI-Sequence");
393modules.push_back(
"NCBI-Seqloc");
396modules.push_back(
"NCBI-Seqalign");
399modules.push_back(
"NCBI-Seqfeat");
402modules.push_back(
"NCBI-Seqset");
405modules.push_back(
"NCBI-Submit");
408modules.push_back(
"NCBI-BioTree");
411modules.push_back(
"NCBI-Entrezgene");
414modules.push_back(
"NCBI-GUI-Project");
417modules.push_back(
"NCBI-PubMed");
420 ITERATE(vector<string>, module, modules) {
455}
catch(std::exception) { ; }
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.
void NCBI_BioTree_RegisterModuleClasses(void)
void NCBI_Entrezgene_RegisterModuleClasses(void)
void NCBI_GUI_Project_RegisterModuleClasses(void)
void NCBI_PubMed_RegisterModuleClasses(void)
void NCBI_Seqalign_RegisterModuleClasses(void)
void NCBI_Seqfeat_RegisterModuleClasses(void)
void NCBI_Seqloc_RegisterModuleClasses(void)
void NCBI_Seqset_RegisterModuleClasses(void)
void NCBI_Sequence_RegisterModuleClasses(void)
void NCBI_Submit_RegisterModuleClasses(void)
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.
virtual int ReadStream(CNcbiIstream &is, EFinalize eFinalize=eFinalize_Yes)
Read an AGP file from the given input stream.
This class is used to turn an AGP file into a vector of Seq-entry's.
@ fSetSeqGap
Found gaps will not be given Seq-data such as Type and Linkage.
@ fForceLocalId
All IDs will be treated as local IDs.
TSeqEntryRefVec & GetResult(void)
This gets the results found, but don't call before finalizing.
Base class for reading FASTA sequences.
list< CRef< CSerialObject > > TSerialObjectList
static EFormat x_GuessFormat(CNcbiIfstream &In)
static void x_LoadFile(CNcbiIstream &In, EFormat Format, TSerialObjectList &Objects)
static CRef< objects::CSeq_entry > x_LoadFasta(CNcbiIstream &In)
static CRef< objects::CSeq_annot > x_LoadRepeatMasker(CNcbiIstream &In)
static void LoadFile(const string &Filename, TSerialObjectList &Objects, EFormat Format=CFormatGuess::eUnknown)
static void x_LoadAsnTextOrXml(CNcbiIstream &In, ESerialDataFormat Format, TSerialObjectList &Objects)
static void x_LoadAGP(CNcbiIstream &In, TSerialObjectList &Objects)
static void x_LoadGff(CNcbiIstream &In, EFormat Format, TSerialObjectList &Objects)
static void x_LoadAsnBinary(CNcbiIstream &In, TSerialObjectList &Objects)
Wraps CFormatGuess, and if CFormatGuess's result is Unknown, it tries every file reader until one wor...
CFormatGuess::EFormat GuessFormat()
EFormat
The formats are checked in the same order as declared here.
@ eBinaryASN
Binary ASN.1.
@ eGff2
GFF2, CGff2Reader, any GFF-like that doesn't fit the others.
@ eGtf
New GTF, CGtfReader.
@ eAgp
AGP format assembly, AgpRead.
@ eGff3
GFF3, CGff3Reader.
@ eFasta
FASTA format sequence record, CFastaReader.
@ eUnknown
unknown format
@ eRmo
RepeatMasker Output.
Serialized objects sniffer.
const TCandidates & GetCandidates() const
Return reference on the internal vector of object candidates.
vector< SCandidateInfo > TCandidates
void AddCandidate(CObjectTypeInfo ti, EEventCallBackMode emode=eCallAlways)
Add new possible type to the recognition list.
Implements a concrete class for reading RepeatMasker output from tabular form and rendering it as ASN...
CRef< CSeq_annot > ReadSeqAnnot(ILineReader &lr, ILineErrorListener *pMessageListener=0)
Read an object from a given line reader, render it as a single Seq-annot, if possible.
Base class for all serializable objects.
Class CSniffReader reads NCBI object files in number of different formats.
virtual void OnObjectFoundPost(const CObjectInfo &object)
Event handling virtual function, called when candidate is found and deserialized.
virtual void OnTopObjectFoundPre(const CObjectInfo &object, CNcbiStreampos stream_pos)
virtual void OnTopObjectFoundPost(const CObjectInfo &object)
virtual void Reset()
Event indicates that sniffer objects needs to reset it's status and get ready for the next probing.
list< CRef< CSerialObject > > & m_Results
virtual void OnObjectFoundPre(const CObjectInfo &object, CNcbiStreampos stream_pos)
Event handling virtual function, called when candidate is found but before deserialization.
CSniffReader(list< CRef< CSerialObject > > &Results)
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
Include a standard set of the NCBI C++ Toolkit most basic headers.
Operators to edit gaps in sequences.
static const struct type types[]
void reset(element_type *p=0, EOwnership ownership=eTakeOwnership)
Reset will delete the old pointer (if owned), set content to the new value, and assume the ownership ...
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Int8 GetLength(void) const
Get size of file.
virtual bool Exists(void) const
Check existence of file.
virtual const CTypeInfo * GetThisTypeInfo(void) const =0
ESerialDataFormat
Data file format.
@ eSerial_AsnText
ASN.1 text.
@ eSerial_AsnBinary
ASN.1 binary.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
IO_PREFIX::streampos CNcbiStreampos
Portable alias for streampos.
static void GetRegisteredClassNames(const string &module, TRegClasses &names)
static TTypeInfo GetClassInfoByName(const string &name)
TObjectPtr Create(CObjectMemoryPool *memoryPool=0) const
Create object of this type on heap (can be deleted by operator delete)
Defines to provide correct exporting from DLLs in Windows.
Definition of all error codes used in objmgr libraries (xobjmgr.lib, xobjutil.lib and others).
GenericReader< UTF8< char >, UTF8< char >, CrtAllocator > Reader
Reader with UTF8 encoding and default allocator.
std::istream & in(std::istream &in_, double &x_)
static const char * type_name(CS_INT value)
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