|
vg
tools for working with variation graphs
|
#include <primer_filter.hpp>
Public Member Functions | |
| PrimerFinder (const unique_ptr< handlegraph::PathPositionHandleGraph > &graph_param, const SnarlDistanceIndex *distance_index_param, ifstream &primers_file_handle, const gbwtgraph::GBWTGraph &gbwt_graph, const gbwt::GBWT &gbwt_index, const gbwt::FastLocate &r_index, MinimizerMapper *giraffe_mapper_param=nullptr) | |
| ~PrimerFinder () | |
| void | add_primer_pair (const string &path_name, const size_t &left_primer_starting_node_id, const size_t &left_primer_offset, const size_t &left_primer_length, const size_t &right_primer_starting_node_id, const size_t &right_primer_offset, const size_t &right_primer_length) |
| void | load_primers (ifstream &file_handle) |
| const vector< PrimerPair > & | get_primer_pairs_of_chrom (const string &chrom_name) const |
| const size_t | total_reference_paths () const |
| vector< string > | get_reference_paths () |
Private Member Functions | |
| std::pair< string, size_t > | get_graph_coordinates_from_sequence (const string &seq) |
| void | update_min_max_product_size (PrimerPair &primer_pair) |
| void | make_primer (Primer &primer, const string &path_name, const size_t &starting_node_id, const size_t &offset, const size_t &length, const bool &is_left) |
| void | map_to_nodes (Primer &primer, const string &path_name) |
| size_t | longest_match_len (Primer &primer, const string &left_seq, const string &right_seq, const bool &first_node) |
| const string | strip (const string &s) const |
| void | update_variation (PrimerPair &primer_pair, const string &path_name) |
| vector< string > | split (const string &str) |
| vector< string > | split (const string &str, const char &delim) |
| bool | startswith (const string &str, const string &prefix) |
Private Attributes | |
| unordered_map< string, vector< PrimerPair > > | chroms |
| const PathPositionHandleGraph * | graph |
| const SnarlDistanceIndex * | distance_index |
| MinimizerMapper * | giraffe_mapper |
| const gbwtgraph::GBWTGraph & | gbwt_graph |
| const gbwt::GBWT & | gbwt_index |
| const gbwt::FastLocate & | r_index |
| vg::PrimerFinder::PrimerFinder | ( | const unique_ptr< handlegraph::PathPositionHandleGraph > & | graph_param, |
| const SnarlDistanceIndex * | distance_index_param, | ||
| ifstream & | primers_file_handle, | ||
| const gbwtgraph::GBWTGraph & | gbwt_graph, | ||
| const gbwt::GBWT & | gbwt_index, | ||
| const gbwt::FastLocate & | r_index, | ||
| MinimizerMapper * | giraffe_mapper_param = nullptr ) |
Construct Primer finder given PathPositionHandleGraph, reference graph name and pointer to SnarlDistanceIndex
| vg::PrimerFinder::~PrimerFinder | ( | ) |
Destructor
| void vg::PrimerFinder::add_primer_pair | ( | const string & | path_name, |
| const size_t & | left_primer_starting_node_id, | ||
| const size_t & | left_primer_offset, | ||
| const size_t & | left_primer_length, | ||
| const size_t & | right_primer_starting_node_id, | ||
| const size_t & | right_primer_offset, | ||
| const size_t & | right_primer_length ) |
Add a Primer_pair object given primers' starting node id, offset relative to the starting node, and length, all in the POSTIVE orientation. The new primer_pair object is automatically added to primer_pairs vector - and selected_primer_pairs if conditions are met. Mainly used for unit testing.
|
private |
Private functions used by public or private functions. Get the graph coordinates by mapping and surjecting the template To be used if the chromosome_name isn't a valid path Returns a pair of the path/chromosome name and the offset of the template in the path Used in: load_primers
| const vector< PrimerPair > & vg::PrimerFinder::get_primer_pairs_of_chrom | ( | const string & | chrom_name | ) | const |
return vector of Primer pairs
| vector< string > vg::PrimerFinder::get_reference_paths | ( | ) |
| void vg::PrimerFinder::load_primers | ( | ifstream & | file_handle | ) |
Read the path to the primer3 output. Primers information is parsed, processed, and stored in primer_pairs vector - and selected_primer_pairs if conditions are met.
|
private |
Find the length of the longest match between two sequences. Also find and store offset in Primer object. Used in: map_to_nodes
|
private |
Update a Primer object given starting node id, offset relative to the starting node, and the length of primer. Used in: add_primer_pair
|
private |
Find and store corresponding node ids to Primer object. Used in: make_primer load_primers
|
private |
Split a string into vectors. Used in: load_primers
|
private |
Split a string into vectors given delimiter.
|
private |
Works like str.startswith(prefix) in python Used in: load_primers
|
private |
Strip empty spaces on the sides of a string. Used in: load_primers
| const size_t vg::PrimerFinder::total_reference_paths | ( | ) | const |
return the total number of reference paths
|
private |
Update minimum and maximum prodcut to a primer pair object. Used in: add_primer_pair load_primers
|
private |
Check if primers in a primer_pair object have variations on the pangenome. Used in: add_primer_node load_primers
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.17.0