Skip to content

Commit

Permalink
preliminary tests show that the refactorisation of a-LD-kNNi has impr…
Browse files Browse the repository at this point in the history
…oved computational efficiency
  • Loading branch information
jeffersonfparil committed Nov 8, 2023
1 parent f36cf10 commit d706f8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/imputation/adaptive_ld_knn_imputation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use crate::gwas::pearsons_correlation;
use ndarray::{prelude::*, Zip};
use std::io;

// For benchmarking
use std::time::Instant;
// // For benchmarking
// use std::time::Instant;

fn calculate_euclidean_distances(
window_freqs: ArrayView2<f64>,
Expand Down Expand Up @@ -319,7 +319,7 @@ impl GenotypesAndPhenotypes {
} // Impute across pools with missing data
} // Impute if we have missing data
} // Iterate across alleles across loci within the window
println!("window_freqs:\n{:?}", &window_freqs);
// println!("window_freqs:\n{:?}", &window_freqs);
}, // Parallel processing across windows
);
// }
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct Args {
/// Imputation parameter, i.e. maximum number of top correlated loci within the window which are considered in linkage disequillibrium (LD) with the locus requiring imputation. The resulting loci will be used to calculate pairwise distances (adaptive if we have too much missing data in the window at which point we use all the loci within the window).
#[clap(long, default_value_t = 10)]
n_loci_to_estimate_distance: u64,
/// Imputation parameter, i.e. number of nearest neighbours from which the imputed weighted (weights based on distance from the pool requiring imputation) mean allele frequencies will be calculated from (adaptive if all k neighbours are also requiring imputation at the locus, at which point we increase k until at least one pool in non-missing at the locus).
/// Imputation parameter, i.e. number of nearest neighbours from which the imputed weighted (weights based on distance from the pool requiring imputation) mean allele frequencies will be calculated from.
#[clap(long, default_value_t = 5)]
k_neighbours: u64,
}
Expand Down

0 comments on commit d706f8e

Please sign in to comment.