split geno into windows and store output in csv file
    Args:
        pos:    genomic position in the format (chrom,pos)
        method:     method used to slit the windows:
                    'slidingWindow':    uses a sliding window
                    'geneWindow':       uses windows centered on genes
        size:       window size used in slidingWindow method
        step:       moving step used in slidingWindow method
        annotation_file:    file containing the annotation file for geneWindow method
        out_file:   output csv file

def splitGeno(pos,method='slidingWindow',size=5e4,step=None,annotation_file=None,cis=1e4,funct=None,out_file=None):
    """
    split geno into windows and store output in csv file
    Args:
        pos:    genomic position in the format (chrom,pos)
        method:     method used to slit the windows:
                    'slidingWindow':    uses a sliding window
                    'geneWindow':       uses windows centered on genes
        size:       window size used in slidingWindow method
        step:       moving step used in slidingWindow method
        annotation_file:    file containing the annotation file for geneWindow method
        out_file:   output csv file
    """
    assert method in ['slidingWindow','geneWindow'], 'method not known'

    # create folder if does not exists
    out_dir, fname = os.path.split(out_file)
    if (out_dir!='') and (not os.path.exists(out_dir)): os.makedirs(out_dir)

    # calculates windows using the indicated method
    if method=='slidingWindow':
        nWnds,nSnps = splitGenoSlidingWindow(pos,out_file,size=size,step=step)
    elif method=='geneWindow':
        #out = splitGenoGeneWindow(pos,out_file,annotation_file=annotation_file,cis=cis,funct=funct)
        pass

    return nWnds,nSnps