Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template basic_fasta_file

boost::genetics::basic_fasta_file

Synopsis

// In header: <boost/genetics/fasta.hpp>

template<typename ChromosomeType, typename StringType, typename IndexType, 
         bool Writable> 
class basic_fasta_file : public boost::genetics::fasta_file_interface {
public:
  // types
  typedef ChromosomeType chromosome_type;
  typedef IndexType      index_type;     
  typedef StringType     string_type;    

  // construct/copy/destruct
  basic_fasta_file();
  basic_fasta_file(const std::string &);
  basic_fasta_file(mapper &);
  basic_fasta_file & operator=(basic_fasta_file &&);
  ~basic_fasta_file();

  // public member functions
  virtual void append(const std::string &);
  void append(const char *, const char *);
  virtual const chromosome & find_chromosome(size_t) const;
  virtual void 
  find_inexact(std::vector< fasta_result > &, const std::string &, size_t, 
               size_t, size_t, bool);
  virtual const chromosome & get_chromosome(size_t) const;
  virtual size_t get_num_chromosomes() const;
  virtual void make_index(size_t);
  size_t size() const;
  void swap(basic_fasta_file &);
  virtual void write_ascii(std::ostream &) const;
  virtual void write_binary(writer &) const;
};

Description

basic_fasta_file public construct/copy/destruct

  1. basic_fasta_file();
    Create an empty FASTA reference file. Use append() to add files.
  2. basic_fasta_file(const std::string & filename);
    Create a FASTA reference from a single text file.
  3. basic_fasta_file(mapper & map);
    Use a mapper to instantly load from a mapped file.
  4. basic_fasta_file & operator=(basic_fasta_file && rhs);
    Move from another reference of the same type.
  5. ~basic_fasta_file();

basic_fasta_file public member functions

  1. virtual void append(const std::string & filename);
    Append a single FASTA file to this file.
  2. void append(const char * p, const char * end);
    Append the image of a FASTA file to this file.
  3. virtual const chromosome & find_chromosome(size_t location) const;
    Find a chomosome for a location.
  4. virtual void 
    find_inexact(std::vector< fasta_result > & result, const std::string & dstr, 
                 size_t max_distance, size_t max_results, size_t max_gap, 
                 bool is_brute_force);
    Search the FASTA file for strings with some allowable errors.
  5. virtual const chromosome & get_chromosome(size_t index) const;
    Get the chromosomes in this file.
  6. virtual size_t get_num_chromosomes() const;
  7. virtual void make_index(size_t num_indexed_chars);
    Must be called after appending FASTA data.
  8. size_t size() const;
    Number of base pairs in this file.
  9. void swap(basic_fasta_file & rhs);
    Swap FASTA files.
  10. virtual void write_ascii(std::ostream & os) const;
    copy the bytes in this file to an image.
  11. virtual void write_binary(writer & wr) const;
    copy the bytes in this file to an image.

PrevUpHomeNext