Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

RazorBack::Bioseqio_ Class Reference

Bioseqio_: the base class for biological sequence input/output. More...

#include <Bioseqio.hh>

Inheritance diagram for RazorBack::Bioseqio_:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Errtype_ {
  OK = 0, FILEERR, FORMATERR, TITLEERR,
  IDERR, ANNOTERR, SEQERR, TYPEERR
}
 I/O error types. More...

enum  Formatflags_ {
  UNKNOWN = 0, FASTA = 1, GCG = 2, PIR = 4,
  SWISS = 8, EMBL = 16, ANYFORMAT = 31
}
 available I/O formats. More...


Static Public Methods

const char* error_str (Errtype_ Err)
 error_str(), format_str(): return a const char ptr to a human-readable short description of the various enums.

const char* format_str (Formatflags_ F)

Protected Methods

 Bioseqio_ ()
 Create an empty I/O object. More...

 Bioseqio_ (const Bioseqio_ &B)
 copy ctor: we do not copy the buffer (see above).

Bioseqio_& operator= (const Bioseqio_ &B)
 assignment: buffer not overwritten! essentially, this is a null operation.

virtual ~Bioseqio_ ()
 dtor.

char* buffer ()
char& buffer (size_t Idx)
void make_buffer ()
 the rest of the I/O methods.

bool fetch_buffer (istream &Inf)
int clean_seq (string &S, int Type, bool Nocase, bool GapsOK=false) const
Errtype_ read_fasta (istream &Inf, string &Id, string &Title, string &Seq)
Errtype_ read_pir (istream &Inf, string &Id, string &Title, string &Annot, string &Seq)
Errtype_ read_gcg (istream &Inf, string &Id, string &Annot, string &Seq, int &Gcglen, int &Gcgcheck, char &Typechar)
Errtype_ read_swiss (istream &Inf, string &Id, string &Annot, string &Seq, int &Swlen, int &Mw, unsigned int &Crc32)
Errtype_ read_embl (istream &Inf, string &Id, string &Annot, string &Seq, int &Embllen, int Acgtx[5])

Static Protected Methods

int autodetect_type (const string &S)
Errtype_ write_fasta (ostream &Outf, const string &ID, const string &Title, const string &Seq)
Errtype_ write_pir (ostream &Outf, const string &ID, const string &Title, const string &Annot, const string &Seq)
Errtype_ write_gcg (ostream &Outf, const string &ID, const string &Title, const string &Annot, const string &Seq, Monomer_::Type_ Type)
Errtype_ write_swiss (ostream &Outf, const string &ID, const string &Title, const string &Annot, const string &Seq)
Errtype_ write_embl (ostream &Outf, const string &ID, const string &Title, const string &Annot, const string &Seq, Monomer_::Type_ Type)
int gcg_checksum (const string &S)
const char* current_datestr ()
int mol_weight (const string &S)
void BuildCRCTable (unsigned int CRCTable[256])
unsigned int crc_32 (const string &buffer)
void count_bases (const string &S, int Acgtx[5], bool Isdna)
bool compare_basecount (const string &S, const int Acgtx[5], bool Isdna)

Private Attributes

char* Buffer
 I/O buffer.


Static Private Methods

void parse_title (const char *Strc, string &Tok1, string &Rest)
void swissembl_comment (ostream &Outf, const string &S)

Static Private Attributes

const int BUFFERSIZE
 and its size.


Detailed Description

Bioseqio_: the base class for biological sequence input/output.

Defines the I/O methods for some popular formats.

Definition at line 46 of file Bioseqio.hh.


Member Enumeration Documentation

enum RazorBack::Bioseqio_::Errtype_
 

I/O error types.

Enumeration values:
OK  
FILEERR  
FORMATERR  
TITLEERR  
IDERR  
ANNOTERR  
SEQERR  
TYPEERR  

Definition at line 82 of file Bioseqio.hh.

enum RazorBack::Bioseqio_::Formatflags_
 

available I/O formats.

Enumeration values:
UNKNOWN  
FASTA  
GCG  
PIR  
SWISS  
EMBL  
ANYFORMAT  

Reimplemented in RazorBack::Alignment_.

Definition at line 84 of file Bioseqio.hh.


Constructor & Destructor Documentation

RazorBack::Bioseqio_::Bioseqio_ ( ) [inline, protected]
 

Create an empty I/O object.

The buffer will be allocated only when needed by an input method

Definition at line 60 of file Bioseqio.hh.

RazorBack::Bioseqio_::Bioseqio_ ( const Bioseqio_ & B ) [inline, protected]
 

copy ctor: we do not copy the buffer (see above).

Definition at line 63 of file Bioseqio.hh.

RazorBack::Bioseqio_::~Bioseqio_ ( ) [inline, protected, virtual]
 

dtor.

Definition at line 72 of file Bioseqio.hh.


Member Function Documentation

Bioseqio_ & RazorBack::Bioseqio_::operator= ( const Bioseqio_ & B ) [inline, protected]
 

assignment: buffer not overwritten! essentially, this is a null operation.

Definition at line 69 of file Bioseqio.hh.

char * RazorBack::Bioseqio_::buffer ( ) [inline, protected]
 

Definition at line 74 of file Bioseqio.hh.

char & RazorBack::Bioseqio_::buffer ( size_t Idx ) [inline, protected]
 

Definition at line 75 of file Bioseqio.hh.

const char* RazorBack::Bioseqio_::error_str ( Errtype_ Err ) [static]
 

error_str(), format_str(): return a const char ptr to a human-readable short description of the various enums.

const char* RazorBack::Bioseqio_::format_str ( Formatflags_ F ) [static]
 

void RazorBack::Bioseqio_::make_buffer ( ) [inline, protected]
 

the rest of the I/O methods.

Definition at line 96 of file Bioseqio.hh.

bool RazorBack::Bioseqio_::fetch_buffer ( istream & Inf ) [protected]
 

int RazorBack::Bioseqio_::clean_seq ( string & S,
int Type,
bool Nocase,
bool GapsOK = false ) const [protected]
 

int RazorBack::Bioseqio_::autodetect_type ( const string & S ) [static, protected]
 

Errtype_ RazorBack::Bioseqio_::read_fasta ( istream & Inf,
string & Id,
string & Title,
string & Seq ) [protected]
 

Errtype_ RazorBack::Bioseqio_::read_pir ( istream & Inf,
string & Id,
string & Title,
string & Annot,
string & Seq ) [protected]
 

Errtype_ RazorBack::Bioseqio_::read_gcg ( istream & Inf,
string & Id,
string & Annot,
string & Seq,
int & Gcglen,
int & Gcgcheck,
char & Typechar ) [protected]
 

Errtype_ RazorBack::Bioseqio_::read_swiss ( istream & Inf,
string & Id,
string & Annot,
string & Seq,
int & Swlen,
int & Mw,
unsigned int & Crc32 ) [protected]
 

Errtype_ RazorBack::Bioseqio_::read_embl ( istream & Inf,
string & Id,
string & Annot,
string & Seq,
int & Embllen,
int Acgtx[5] ) [protected]
 

Errtype_ RazorBack::Bioseqio_::write_fasta ( ostream & Outf,
const string & ID,
const string & Title,
const string & Seq ) [static, protected]
 

Errtype_ RazorBack::Bioseqio_::write_pir ( ostream & Outf,
const string & ID,
const string & Title,
const string & Annot,
const string & Seq ) [static, protected]
 

Errtype_ RazorBack::Bioseqio_::write_gcg ( ostream & Outf,
const string & ID,
const string & Title,
const string & Annot,
const string & Seq,
Monomer_::Type_ Type ) [static, protected]
 

Errtype_ RazorBack::Bioseqio_::write_swiss ( ostream & Outf,
const string & ID,
const string & Title,
const string & Annot,
const string & Seq ) [static, protected]
 

Errtype_ RazorBack::Bioseqio_::write_embl ( ostream & Outf,
const string & ID,
const string & Title,
const string & Annot,
const string & Seq,
Monomer_::Type_ Type ) [static, protected]
 

int RazorBack::Bioseqio_::gcg_checksum ( const string & S ) [static, protected]
 

const char* RazorBack::Bioseqio_::current_datestr ( ) [static, protected]
 

int RazorBack::Bioseqio_::mol_weight ( const string & S ) [static, protected]
 

void RazorBack::Bioseqio_::BuildCRCTable ( unsigned int CRCTable[256] ) [static, protected]
 

unsigned int RazorBack::Bioseqio_::crc_32 ( const string & buffer ) [static, protected]
 

void RazorBack::Bioseqio_::count_bases ( const string & S,
int Acgtx[5],
bool Isdna ) [static, protected]
 

bool RazorBack::Bioseqio_::compare_basecount ( const string & S,
const int Acgtx[5],
bool Isdna ) [static, protected]
 

void RazorBack::Bioseqio_::parse_title ( const char * Strc,
string & Tok1,
string & Rest ) [static, private]
 

void RazorBack::Bioseqio_::swissembl_comment ( ostream & Outf,
const string & S ) [static, private]
 


Member Data Documentation

char * RazorBack::Bioseqio_::Buffer [private]
 

I/O buffer.

Definition at line 50 of file Bioseqio.hh.

const int RazorBack::Bioseqio_::BUFFERSIZE [static, private]
 

and its size.

Definition at line 51 of file Bioseqio.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:44 2002 for The Razorback C++ Library: Bioinformatics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001