raiss.ld_matrix

Function set to compute LD correlation from a reference panel in predefined Region

LD matrix are then transformed to the pandas sparse format

Functions

generate_genome_matrices(region_files, ...)

go through region files and compute LD matrix for each transform and save the results in a pandas sparse dataframe

generate_sparse_matrix(plink_ld, ref_chr_df)

Extract correlation matrix from the plink correlation file generated by ld_matrix.launch_plink_ld read plink results create a sparse dataframe LD-matrix then save it to a zipped pickle

launch_plink_ld(startpos, endpos, chr, ...)

launch plink linkage desiquilibrium correlation and save the ouput

load_plink_ld(plink_ld, ref_chr_df)

load_sparse_matrix(path_sparse_LD, ref_chr_df)

Load matrix from LD matrix from scipy sparse file