vg
tools for working with variation graphs
Public Member Functions | Private Member Functions | Private Attributes | List of all members
vg::Viz Class Reference

#include <viz.hpp>

Public Member Functions

 Viz (void)
 
 ~Viz (void)
 
 Viz (PathHandleGraph *x, vector< Packer > *p, const vector< string > &n, const string &o, int w, int h, bool c, bool d, bool t)
 
void init (PathHandleGraph *x, vector< Packer > *p, const vector< string > &n, const string &o, int w, int h, bool c, bool d, bool t)
 
void draw (void)
 
void draw_graph (void)
 
void close (void)
 

Private Member Functions

double node_offset (id_t id)
 
double nodes_before_offset (size_t pos)
 
uint64_t id_to_rank (nid_t id)
 
void set_hash_color (const string &str)
 
void compute_borders_and_dimensions (void)
 
void check_status (const cairo_status_t &status, const std::string &task="calling Cairo")
 

Private Attributes

unordered_map< nid_t, uint64_t > id_rank_map
 
PathHandleGraphxgidx = nullptr
 
vector< Packer > * packs = nullptr
 
vector< string > pack_names
 
string outfile
 
cairo_surface_t * surface = nullptr
 
cairo_t * cr = nullptr
 
bool output_png = false
 
bool output_svg = false
 
bool show_cnv = true
 
bool show_dna = true
 
bool show_paths = true
 
int image_width = 0
 
int image_height = 0
 
int left_border = 0
 
int top_border = 0
 
size_t seq_length = 0
 

Constructor & Destructor Documentation

◆ Viz() [1/2]

vg::Viz::Viz ( void  )
inline

◆ ~Viz()

vg::Viz::~Viz ( void  )
inline

◆ Viz() [2/2]

vg::Viz::Viz ( PathHandleGraph x,
vector< Packer > *  p,
const vector< string > &  n,
const string &  o,
int  w,
int  h,
bool  c,
bool  d,
bool  t 
)

Member Function Documentation

◆ check_status()

void vg::Viz::check_status ( const cairo_status_t &  status,
const std::string &  task = "calling Cairo" 
)
private

◆ close()

void vg::Viz::close ( void  )

◆ compute_borders_and_dimensions()

void vg::Viz::compute_borders_and_dimensions ( void  )
private

◆ draw()

void vg::Viz::draw ( void  )

◆ draw_graph()

void vg::Viz::draw_graph ( void  )

◆ id_to_rank()

uint64_t vg::Viz::id_to_rank ( nid_t  id)
private

◆ init()

void vg::Viz::init ( PathHandleGraph x,
vector< Packer > *  p,
const vector< string > &  n,
const string &  o,
int  w,
int  h,
bool  c,
bool  d,
bool  t 
)

◆ node_offset()

double vg::Viz::node_offset ( id_t  id)
private

◆ nodes_before_offset()

double vg::Viz::nodes_before_offset ( size_t  pos)
private

◆ set_hash_color()

void vg::Viz::set_hash_color ( const string &  str)
private

Member Data Documentation

◆ cr

cairo_t* vg::Viz::cr = nullptr
private

◆ id_rank_map

unordered_map<nid_t, uint64_t> vg::Viz::id_rank_map
private

◆ image_height

int vg::Viz::image_height = 0
private

◆ image_width

int vg::Viz::image_width = 0
private

◆ left_border

int vg::Viz::left_border = 0
private

◆ outfile

string vg::Viz::outfile
private

◆ output_png

bool vg::Viz::output_png = false
private

◆ output_svg

bool vg::Viz::output_svg = false
private

◆ pack_names

vector<string> vg::Viz::pack_names
private

◆ packs

vector<Packer>* vg::Viz::packs = nullptr
private

◆ seq_length

size_t vg::Viz::seq_length = 0
private

◆ show_cnv

bool vg::Viz::show_cnv = true
private

◆ show_dna

bool vg::Viz::show_dna = true
private

◆ show_paths

bool vg::Viz::show_paths = true
private

◆ surface

cairo_surface_t* vg::Viz::surface = nullptr
private

◆ top_border

int vg::Viz::top_border = 0
private

◆ xgidx

PathHandleGraph* vg::Viz::xgidx = nullptr
private

The documentation for this class was generated from the following files: