@@ -26,12 +26,12 @@ struct variant {
26
26
uint32_t position;
27
27
std::string nuc;
28
28
uint32_t depth;
29
- float qual;
30
- float freq;
31
- float gapped_freq = 0 ;
29
+ double qual;
30
+ double freq;
31
+ double gapped_freq = 0 ;
32
32
int cluster_assigned = -1 ;
33
33
bool version_1_var=false ;
34
- float std_dev;
34
+ double std_dev;
35
35
36
36
// for these true means flagged as problematic
37
37
bool vague_assignment=false ; // cannot be distinguished between two groups
@@ -51,16 +51,16 @@ struct variant {
51
51
};
52
52
void split (const std::string &s, char delim, std::vector<std::string> &elems);
53
53
std::vector<variant> gmm_model (std::string prefix, std::string output_prefix);
54
- void parse_internal_variants (std::string filename, std::vector<variant> &base_variants, uint32_t depth_cutoff, float lower_bound, float upper_bound, std::vector<uint32_t > deletion_positions, uint32_t round_val, double quality_threshold);
55
- std::vector<uint32_t > find_deletion_positions (std::string filename, uint32_t depth_cutoff, float lower_bound, float upper_bound, uint32_t round_val);
56
- std::vector<uint32_t > find_low_quality_positions (std::string filename, uint32_t depth_cutoff, float lower_bound, float upper_bound, float quality_threshold, uint32_t round_val);
54
+ void parse_internal_variants (std::string filename, std::vector<variant> &base_variants, uint32_t depth_cutoff, double lower_bound, double upper_bound, std::vector<uint32_t > deletion_positions, uint32_t round_val, double quality_threshold);
55
+ std::vector<uint32_t > find_deletion_positions (std::string filename, uint32_t depth_cutoff, double lower_bound, double upper_bound, uint32_t round_val);
56
+ std::vector<uint32_t > find_low_quality_positions (std::string filename, uint32_t depth_cutoff, double lower_bound, double upper_bound, double quality_threshold, uint32_t round_val);
57
57
std::vector<std::vector<double >> solve_possible_solutions (std::vector<float > tmp_means, double error);
58
58
uint32_t smallest_value_index (std::vector<double > values);
59
59
std::vector<std::vector<double >> transpose_vector (const std::vector<std::vector<double >>& input_vector);
60
60
void assign_variants_simple (std::vector<variant> &variants, std::vector<std::vector<double >> prob_matrix, uint32_t index, std::vector<double > means, uint32_t lower_n);
61
61
gaussian_mixture_model retrain_model (uint32_t n, arma::mat data, std::vector<variant> variants, uint32_t lower_n, double var_floor);
62
62
void assign_clusters (std::vector<variant> &variants, gaussian_mixture_model gmodel, uint32_t lower_n);
63
63
double calculate_mean (const std::vector<double >& data);
64
- void calculate_reference_frequency (std::vector<variant> &variants, std::string filename, uint32_t depth_cutoff, float lower_bound, float upper_bound, std::vector<uint32_t > deletion_positions);
64
+ void calculate_reference_frequency (std::vector<variant> &variants, std::string filename, uint32_t depth_cutoff, double lower_bound, double upper_bound, std::vector<uint32_t > deletion_positions);
65
65
kmeans_model train_model (uint32_t n, arma::mat data);
66
66
#endif
0 commit comments