#include <primer_filter.hpp>
|
| | 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 () |
| |
|
| 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) |
| |
◆ PrimerFinder()
| 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
◆ ~PrimerFinder()
| vg::PrimerFinder::~PrimerFinder |
( |
| ) |
|
◆ add_primer_pair()
| 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.
◆ get_graph_coordinates_from_sequence()
| std::pair< string, size_t > vg::PrimerFinder::get_graph_coordinates_from_sequence |
( |
const string & |
seq | ) |
|
|
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
◆ get_primer_pairs_of_chrom()
| const vector< PrimerPair > & vg::PrimerFinder::get_primer_pairs_of_chrom |
( |
const string & |
chrom_name | ) |
const |
◆ get_reference_paths()
| vector< string > vg::PrimerFinder::get_reference_paths |
( |
| ) |
|
◆ load_primers()
| 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.
◆ longest_match_len()
| size_t vg::PrimerFinder::longest_match_len |
( |
Primer & |
primer, |
|
|
const string & |
left_seq, |
|
|
const string & |
right_seq, |
|
|
const bool & |
first_node |
|
) |
| |
|
private |
Find the length of the longest match between two sequences. Also find and store offset in Primer object. Used in: map_to_nodes
◆ make_primer()
| void vg::PrimerFinder::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 |
|
) |
| |
|
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
◆ map_to_nodes()
| void vg::PrimerFinder::map_to_nodes |
( |
Primer & |
primer, |
|
|
const string & |
path_name |
|
) |
| |
|
private |
Find and store corresponding node ids to Primer object. Used in: make_primer load_primers
◆ split() [1/2]
| vector< string > vg::PrimerFinder::split |
( |
const string & |
str | ) |
|
|
private |
Split a string into vectors. Used in: load_primers
◆ split() [2/2]
| vector< string > vg::PrimerFinder::split |
( |
const string & |
str, |
|
|
const char & |
delim |
|
) |
| |
|
private |
Split a string into vectors given delimiter.
◆ startswith()
| bool vg::PrimerFinder::startswith |
( |
const string & |
str, |
|
|
const string & |
prefix |
|
) |
| |
|
private |
Works like str.startswith(prefix) in python Used in: load_primers
◆ strip()
| const string vg::PrimerFinder::strip |
( |
const string & |
s | ) |
const |
|
private |
Strip empty spaces on the sides of a string. Used in: load_primers
◆ total_reference_paths()
| const size_t vg::PrimerFinder::total_reference_paths |
( |
| ) |
const |
return the total number of reference paths
◆ update_min_max_product_size()
| void vg::PrimerFinder::update_min_max_product_size |
( |
PrimerPair & |
primer_pair | ) |
|
|
private |
Update minimum and maximum prodcut to a primer pair object. Used in: add_primer_pair load_primers
◆ update_variation()
| void vg::PrimerFinder::update_variation |
( |
PrimerPair & |
primer_pair, |
|
|
const string & |
path_name |
|
) |
| |
|
private |
Check if primers in a primer_pair object have variations on the pangenome. Used in: add_primer_node load_primers
◆ chroms
| unordered_map<string, vector<PrimerPair> > vg::PrimerFinder::chroms |
|
private |
◆ distance_index
| const SnarlDistanceIndex* vg::PrimerFinder::distance_index |
|
private |
◆ gbwt_graph
| const gbwtgraph::GBWTGraph& vg::PrimerFinder::gbwt_graph |
|
private |
◆ gbwt_index
| const gbwt::GBWT& vg::PrimerFinder::gbwt_index |
|
private |
◆ giraffe_mapper
◆ graph
◆ r_index
| const gbwt::FastLocate& vg::PrimerFinder::r_index |
|
private |
The documentation for this class was generated from the following files: