windows.py 744 Bytes
Newer Older
1
2
3
4
"""
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
5
- centered_window:  A sliding window centered on the Snp to impute
6
7

"""
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25


def 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

    """
    (chrom, startpos, endpos ) = LD_file.split("/")[-1].split(".")[0].split('_')
    return (chrom, startpos, endpos)

def centered_window_imputation(LD_file, ref_panel_folder, Zfile):
    """
        Each missing Snp is imputed by known snp found in a window centered on the SNP to impute

    """
    pass