@@ -26,12 +26,12 @@ struct variant {
2626 uint32_t position;
2727 std::string nuc;
2828 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 ;
3232 int cluster_assigned = -1 ;
3333 bool version_1_var=false ;
34- float std_dev;
34+ double std_dev;
3535
3636 // for these true means flagged as problematic
3737 bool vague_assignment=false ; // cannot be distinguished between two groups
@@ -51,16 +51,16 @@ struct variant {
5151};
5252void split (const std::string &s, char delim, std::vector<std::string> &elems);
5353std::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);
5757std::vector<std::vector<double >> solve_possible_solutions (std::vector<float > tmp_means, double error);
5858uint32_t smallest_value_index (std::vector<double > values);
5959std::vector<std::vector<double >> transpose_vector (const std::vector<std::vector<double >>& input_vector);
6060void 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);
6161gaussian_mixture_model retrain_model (uint32_t n, arma::mat data, std::vector<variant> variants, uint32_t lower_n, double var_floor);
6262void assign_clusters (std::vector<variant> &variants, gaussian_mixture_model gmodel, uint32_t lower_n);
6363double 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);
6565kmeans_model train_model (uint32_t n, arma::mat data);
6666#endif
0 commit comments