NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions
fasta.cpp File Reference
#include <ncbi_pch.hpp>
#include <objtools/readers/fasta.hpp>
#include "fasta_aln_builder.hpp"
#include <objtools/readers/fasta_exception.hpp>
#include <objtools/readers/reader_exception.hpp>
#include <objtools/readers/source_mod_parser.hpp>
#include <objtools/error_codes.hpp>
#include <corelib/ncbiutil.hpp>
#include <util/format_guess.hpp>
#include <util/sequtil/sequtil_convert.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/general/User_object.hpp>
#include <objects/misc/sequence_macros.hpp>
#include <objects/seq/Bioseq.hpp>
#include <objects/seq/Delta_ext.hpp>
#include <objects/seq/Delta_seq.hpp>
#include <objects/seq/NCBIeaa.hpp>
#include <objects/seq/IUPACaa.hpp>
#include <objects/seq/IUPACna.hpp>
#include <objects/seq/Seg_ext.hpp>
#include <objects/seq/Seq_annot.hpp>
#include <objects/seq/Seq_descr.hpp>
#include <objects/seq/Seq_ext.hpp>
#include <objects/seq/Seq_hist.hpp>
#include <objects/seq/Seq_inst.hpp>
#include <objects/seq/Seq_literal.hpp>
#include <objects/seq/Seqdesc.hpp>
#include <objects/seq/seqport_util.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seqalign/Seq_align.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/seqloc/Seq_interval.hpp>
#include <objects/seqloc/Seq_loc.hpp>
#include <objects/seqloc/Seq_loc_mix.hpp>
#include <objects/seqloc/Seq_point.hpp>
#include <objects/seqset/Bioseq_set.hpp>
#include <objects/seqset/Seq_entry.hpp>
#include <objtools/readers/message_listener.hpp>
#include <objtools/readers/line_error.hpp>
#include <objtools/readers/fasta_reader_utils.hpp>
#include <objtools/readers/mod_reader.hpp>
#include <ctype.h>
+ Include dependency graph for fasta.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CTempPusher< TStack >
 
class  CTempRefSwap< TObject >
 
class  CFastaMapper
 

Macros

#define FASTA_LINE_EXPT(_eSeverity, _uLineNum, _MessageStrmOps, _eErrCode, _eProblem, _sFeature, _sQualName, _sQualValue)
 
#define FASTA_PROGRESS(_MessageStrmOps)
 
#define FASTA_WARNING(_uLineNum, _MessageStrmOps, _eProblem, _Feature)    FASTA_LINE_EXPT(eDiag_Warning, _uLineNum, _MessageStrmOps, CObjReaderParseException::eFormat, _eProblem, _Feature, kEmptyStr, kEmptyStr)
 
#define FASTA_WARNING_EX(_uLineNum, _MessageStrmOps, _eProblem, _Feature, _sQualName, _sQualValue)    FASTA_LINE_EXPT(eDiag_Warning, _uLineNum, _MessageStrmOps, CObjReaderParseException::eFormat, _eProblem, _Feature, _sQualName, _sQualValue)
 
#define FASTA_ERROR(_uLineNum, _MessageStrmOps, _eErrCode)    FASTA_LINE_EXPT(eDiag_Error, _uLineNum, _MessageStrmOps, _eErrCode, ILineError::eProblem_GeneralParsingError, kEmptyStr, kEmptyStr, kEmptyStr)
 
#define NCBI_USE_ERRCODE_X   Objtools_Rd_Fasta
 

Typedefs

typedef CTempPusher< stack< CFastaReader::TFlags > > CFlagGuard
 

Functions

bool s_ASCII_IsUpper (unsigned char c)
 
bool s_ASCII_IsLower (unsigned char c)
 
bool s_ASCII_IsAlpha (unsigned char c)
 
unsigned char s_ASCII_MustBeLowerToUpper (unsigned char c)
 
bool s_ASCII_IsAmbigNuc (unsigned char c)
 
static bool s_ASCII_IsUnAmbigNuc (unsigned char c)
 
static void s_AddBiomol (CMolInfo::EBiomol biomol, CBioseq &bioseq)
 
static bool sRefineNaMol (const char *beginSeqData, const char *endSeqData, CBioseq &bioseq)
 
CRef< CSeq_entryReadFasta (CNcbiIstream &in, CFastaReader::TFlags flags, int *counter, CFastaReader::TMasks *lcv, ILineErrorListener *pMessageListener)
 A const-correct replacement for the deprecated ReadFasta function. More...
 
void ReadFastaFileMap (SFastaFileMap *fasta_map, CNcbiIfstream &input)
 Function reads input stream (assumed that it is FASTA format) one molecule entry after another filling the map structure describing and pointing on molecule entries. More...
 
void ScanFastaFile (IFastaEntryScan *scanner, CNcbiIfstream &input, CFastaReader::TFlags fread_flags)
 Scan FASTA files, call IFastaEntryScan::EntryFound (payload function) More...
 
static void s_AppendMods (const CModHandler::TModList &mods, string &title)
 

Macro Definition Documentation

◆ FASTA_ERROR

#define FASTA_ERROR (   _uLineNum,
  _MessageStrmOps,
  _eErrCode 
)     FASTA_LINE_EXPT(eDiag_Error, _uLineNum, _MessageStrmOps, _eErrCode, ILineError::eProblem_GeneralParsingError, kEmptyStr, kEmptyStr, kEmptyStr)

Definition at line 117 of file fasta.cpp.

◆ FASTA_LINE_EXPT

#define FASTA_LINE_EXPT (   _eSeverity,
  _uLineNum,
  _MessageStrmOps,
  _eErrCode,
  _eProblem,
  _sFeature,
  _sQualName,
  _sQualValue 
)
Value:
do { \
stringstream err_strm_49518053; \
err_strm_49518053 << _MessageStrmOps; \
PostWarning(pMessageListener, (_eSeverity), (_uLineNum), (err_strm_49518053.str()), (_eErrCode), (_eProblem), (_sFeature), (_sQualName), (_sQualValue)); \
} while(0)

Definition at line 91 of file fasta.cpp.

◆ FASTA_PROGRESS

#define FASTA_PROGRESS (   _MessageStrmOps)
Value:
do { \
stringstream err_strm_49518053; \
err_strm_49518053 << _MessageStrmOps; \
if( pMessageListener ) { \
pMessageListener->PutProgress(err_strm_49518053.str()); \
} \
} while(false)

Definition at line 101 of file fasta.cpp.

◆ FASTA_WARNING

#define FASTA_WARNING (   _uLineNum,
  _MessageStrmOps,
  _eProblem,
  _Feature 
)     FASTA_LINE_EXPT(eDiag_Warning, _uLineNum, _MessageStrmOps, CObjReaderParseException::eFormat, _eProblem, _Feature, kEmptyStr, kEmptyStr)

Definition at line 111 of file fasta.cpp.

◆ FASTA_WARNING_EX

#define FASTA_WARNING_EX (   _uLineNum,
  _MessageStrmOps,
  _eProblem,
  _Feature,
  _sQualName,
  _sQualValue 
)     FASTA_LINE_EXPT(eDiag_Warning, _uLineNum, _MessageStrmOps, CObjReaderParseException::eFormat, _eProblem, _Feature, _sQualName, _sQualValue)

Definition at line 114 of file fasta.cpp.

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   Objtools_Rd_Fasta

Definition at line 120 of file fasta.cpp.

Typedef Documentation

◆ CFlagGuard

Definition at line 162 of file fasta.cpp.

Function Documentation

◆ s_AddBiomol()

static void s_AddBiomol ( CMolInfo::EBiomol  biomol,
CBioseq bioseq 
)
static

Definition at line 1518 of file fasta.cpp.

References Ref(), and CBioseq_Base::SetDescr().

Referenced by sRefineNaMol().

◆ s_AppendMods()

static void s_AppendMods ( const CModHandler::TModList mods,
string title 
)
static

Definition at line 1975 of file fasta.cpp.

References mod().

Referenced by CFastaReader::x_AddMods().

◆ s_ASCII_IsAlpha()

bool s_ASCII_IsAlpha ( unsigned char  c)
inline

Definition at line 178 of file fasta.cpp.

References s_ASCII_IsLower(), and s_ASCII_IsUpper().

Referenced by CFastaReader::CheckDataLine().

◆ s_ASCII_IsAmbigNuc()

bool s_ASCII_IsAmbigNuc ( unsigned char  c)
inline

Definition at line 189 of file fasta.cpp.

Referenced by CFastaReader::CheckDataLine().

◆ s_ASCII_IsLower()

bool s_ASCII_IsLower ( unsigned char  c)
inline

Definition at line 173 of file fasta.cpp.

Referenced by s_ASCII_IsAlpha().

◆ s_ASCII_IsUnAmbigNuc()

static bool s_ASCII_IsUnAmbigNuc ( unsigned char  c)
inlinestatic

Definition at line 210 of file fasta.cpp.

Referenced by CFastaReader::CreateWarningsForSeqDataInTitle().

◆ s_ASCII_IsUpper()

bool s_ASCII_IsUpper ( unsigned char  c)
inline

Definition at line 168 of file fasta.cpp.

Referenced by s_ASCII_IsAlpha().

◆ s_ASCII_MustBeLowerToUpper()

unsigned char s_ASCII_MustBeLowerToUpper ( unsigned char  c)
inline

Definition at line 184 of file fasta.cpp.

Referenced by CFastaReader::ParseDataLine().

◆ sRefineNaMol()

static bool sRefineNaMol ( const char *  beginSeqData,
const char *  endSeqData,
CBioseq bioseq 
)
static
Modified on Fri Sep 20 14:57:44 2024 by modify_doxy.py rev. 669887