vg
tools for working with variation graphs
Namespaces | Functions | Variables
alignment_io.hpp File Reference
#include <iostream>
#include <functional>
#include <zlib.h>
#include "vg/vg.pb.h"
#include <htslib/hfile.h>
#include <htslib/hts.h>
#include <htslib/sam.h>
#include <htslib/vcf.h>
#include <handlegraph/handle_graph.hpp>
#include <handlegraph/named_node_back_translation.hpp>
#include "gafkluge.hpp"

Namespaces

 vg
 
 vg::io
 

Functions

template<typename T >
size_t vg::io::unpaired_for_each_parallel (function< bool(T &)> get_read_if_available, function< void(T &)> lambda, uint64_t batch_size=DEFAULT_PARALLEL_BATCHSIZE)
 
template<typename T >
size_t vg::io::paired_for_each_parallel_after_wait (function< bool(T &, T &)> get_pair_if_available, function< void(T &, T &)> lambda, function< bool(void)> single_threaded_until_true, uint64_t batch_size=DEFAULT_PARALLEL_BATCHSIZE)
 
bool vg::io::get_next_record_from_gaf (function< size_t(nid_t)> node_to_length, function< string(nid_t, bool)> node_to_sequence, htsFile *fp, kstring_t &s_buffer, gafkluge::GafRecord &record)
 
bool vg::io::get_next_record_pair_from_gaf (function< size_t(nid_t)> node_to_length, function< string(nid_t, bool)> node_to_sequence, htsFile *fp, kstring_t &s_buffer, gafkluge::GafRecord &mate1, gafkluge::GafRecord &mate2)
 
size_t vg::io::gaf_unpaired_for_each (function< size_t(nid_t)> node_to_length, function< string(nid_t, bool)> node_to_sequence, const string &filename, function< void(Alignment &)> lambda)
 
size_t vg::io::gaf_unpaired_for_each (const HandleGraph &graph, const string &filename, function< void(Alignment &)> lambda)
 
size_t vg::io::gaf_paired_interleaved_for_each (function< size_t(nid_t)> node_to_length, function< string(nid_t, bool)> node_to_sequence, const string &filename, function< void(Alignment &, Alignment &)> lambda)
 
size_t vg::io::gaf_paired_interleaved_for_each (const HandleGraph &graph, const string &filename, function< void(Alignment &, Alignment &)> lambda)
 
size_t vg::io::gaf_unpaired_for_each_parallel (function< size_t(nid_t)> node_to_length, function< string(nid_t, bool)> node_to_sequence, const string &filename, function< void(Alignment &)> lambda, uint64_t batch_size)
 
size_t vg::io::gaf_unpaired_for_each_parallel (const HandleGraph &graph, const string &filename, function< void(Alignment &)> lambda, uint64_t batch_size)
 
size_t vg::io::gaf_paired_interleaved_for_each_parallel (function< size_t(nid_t)> node_to_length, function< string(nid_t, bool)> node_to_sequence, const string &filename, function< void(Alignment &, Alignment &)> lambda, uint64_t batch_size)
 
size_t vg::io::gaf_paired_interleaved_for_each_parallel (const HandleGraph &graph, const string &filename, function< void(Alignment &, Alignment &)> lambda, uint64_t batch_size)
 
size_t vg::io::gaf_paired_interleaved_for_each_parallel_after_wait (function< size_t(nid_t)> node_to_length, function< string(nid_t, bool)> node_to_sequence, const string &filename, function< void(Alignment &, Alignment &)> lambda, function< bool(void)> single_threaded_until_true, uint64_t batch_size)
 
size_t vg::io::gaf_paired_interleaved_for_each_parallel_after_wait (const HandleGraph &graph, const string &filename, function< void(Alignment &, Alignment &)> lambda, function< bool(void)> single_threaded_until_true, uint64_t batch_size)
 
gafkluge::GafRecord vg::io::alignment_to_gaf (function< size_t(nid_t)> node_to_length, function< string(nid_t, bool)> node_to_sequence, const Alignment &aln, const handlegraph::NamedNodeBackTranslation *translate_through, bool cs_cigar, bool base_quals, bool frag_links)
 
gafkluge::GafRecord vg::io::alignment_to_gaf (const HandleGraph &graph, const Alignment &aln, const handlegraph::NamedNodeBackTranslation *translate_through, bool cs_cigar, bool base_quals, bool frag_links)
 
void vg::io::gaf_to_alignment (function< size_t(nid_t)> node_to_length, function< string(nid_t, bool)> node_to_sequence, const gafkluge::GafRecord &gaf, Alignment &aln)
 Convert a GAF alignment into a vg Alignment. The alignment must be in node ID space. More...
 
void vg::io::gaf_to_alignment (const HandleGraph &graph, const gafkluge::GafRecord &gaf, Alignment &aln)
 Convert a GAF alignment into a vg Alignment. The alignment must be in node ID space. More...
 
short vg::io::quality_char_to_short (char c)
 
char vg::io::quality_short_to_char (short i)
 
string vg::io::string_quality_char_to_short (const string &quality)
 
string vg::io::string_quality_short_to_char (const string &quality)
 
void vg::io::alignment_quality_char_to_short (Alignment &alignment)
 
void vg::io::alignment_quality_short_to_char (Alignment &alignment)
 

Variables

const uint64_t vg::io::DEFAULT_PARALLEL_BATCHSIZE = 512