Skip to content

Commit

Permalink
comment out unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
zkamvar committed May 13, 2018
1 parent 714d5d0 commit fb32018
Showing 1 changed file with 37 additions and 29 deletions.
66 changes: 37 additions & 29 deletions src/bitwise_distance.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ SEXP get_pgen_matrix_genind(SEXP genind, SEXP freqs, SEXP pops, SEXP npop);
void fill_zygosity(struct zygosity *ind);
char get_similarity_set(struct zygosity *ind1, struct zygosity *ind2);
int get_zeros(char sim_set);
int get_difference(struct zygosity *z1, struct zygosity *z2);
int get_distance(struct zygosity *z1, struct zygosity *z2);
// int get_difference(struct zygosity *z1, struct zygosity *z2);
// int get_distance(struct zygosity *z1, struct zygosity *z2);
int get_distance_custom(char sim_set, struct zygosity *z1, struct zygosity *z2, int euclid);

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -2082,15 +2082,19 @@ Output: The number of locations in the given section that have differing zygosit
between the two samples.
cx, ca, and cn will be filled in both structs as a byproduct of this function.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
int get_difference(struct zygosity *z1, struct zygosity *z2)
{
int dif = 0;
fill_zygosity(z1);
fill_zygosity(z2);
dif = get_zeros(get_similarity_set(z1,z2));

return dif;
}
/*
* 2018-05-13 Officially removed due to disuse
*
* int get_difference(struct zygosity *z1, struct zygosity *z2)
* {
* int dif = 0;
* fill_zygosity(z1);
* fill_zygosity(z2);
* dif = get_zeros(get_similarity_set(z1,z2));
*
* return dif;
* }
*/


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -2103,24 +2107,28 @@ Output: The total distance between two samples, such that DD/rr are a distance
of 2, and Dr/rr are a distance of 1
cx, ca, and cn will be filled in both structs as a byproduct of this function.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
int get_distance(struct zygosity *z1, struct zygosity *z2)
{
int dist = 0;
char Hor;
char S;
char ch_dist;
fill_zygosity(z1);
fill_zygosity(z2);

S = get_similarity_set(z1,z2);
Hor = z1->ch | z2->ch;

ch_dist = Hor | S; // Force ones everywhere they are the same
dist = get_zeros(S); // Add one distance for every non-shared zygosity
dist += get_zeros(ch_dist); // Add another one for every difference that has no heterozygotes

return dist;
}
/*
* 2018-05-13 Officially removed due to disuse
*
* int get_distance(struct zygosity *z1, struct zygosity *z2)
* {
* int dist = 0;
* char Hor;
* char S;
* char ch_dist;
* fill_zygosity(z1);
* fill_zygosity(z2);
*
* S = get_similarity_set(z1,z2);
* Hor = z1->ch | z2->ch;
*
* ch_dist = Hor | S; // Force ones everywhere they are the same
* dist = get_zeros(S); // Add one distance for every non-shared zygosity
* dist += get_zeros(ch_dist); // Add another one for every difference that has no heterozygotes
*
* return dist;
* }
*/


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit fb32018

Please sign in to comment.