raiss.windows

implement the imputation window is sliding along the genome:

  • ImpG like: Non overlapping windows, the imputation is apply in batch to unknown snp in the window

  • centered_window: A sliding window centered on the Snp to impute

Functions

compute_window_and_size(start_ld_block, ...)

Compute the number of window to pave the Linkage desiquilibrium block tightly with a window size the closest to the one specified by the user :param start_ld_block: the start of the Linkage desiquilibrium block :type start_ld_block: int :param end_ld_block: the end of the Linkage desiquilibrium block :type end_ld_block: int :param window_size: size in bp of the window to compute imputation_style :type window_size: int :param all unknown snps in the window will be imputed from the known snp in: :param the windows:

empty_imputed_dataframe()

format_result_df(imp, ref_panel, known, unknowns)

impg_like_imputation(ld_file, ref_panel, ...)

Each missing Snp is imputed by known snps found in a window Argument.

in_region(pos_vector, start, end)

parse_region_position(ld_file)

Retrieve the region definition from a ld-file generated by impute_jass Argument : ld_file : A ld file generated by jass_impute

prepare_zscore_for_imputation(ref_panel, zscore)

Prepare the known Z score by - realigning them on the reference ref_panel - filtering snps that are not present in the ref panel - Adding columns that will contain information on imputation: * Var : theoritical variance estimate of z * Nsnp_to_impute : Number of known snp used to perform imputation * ld_score : the sum of the square correlation of the snp with all other known snp (give an idea if the we have enough information to compute a precise z estimate)

print_progression(i, Nwindows)

print the percentage of window treated in the ld block

realigned_zfiles_on_panel(ref_panel, zscore)

Check if the counted allele is the same in the reference panel and the Zscore files.