def splitGeno(self,method='slidingWindow',size=5e4,step=None,annotation_file=None,cis=1e4,funct=None,minSnps=1.,maxSnps=SP.inf,cache=False,out_dir='./cache',fname=None,rewrite=False):
        """
        split into windows
        Args:
            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
            minSnps:    only windows with nSnps>=minSnps are considered
            maxSnps:    only windows with nSnps>=maxSnps are considered
            cache:      if results need to be cashed
            out_dir:    folder used for caching
            fname:      name of the hdf5 file used for caching
            rewrite:    if true, rewrite the existing cache hdf5 file
        """
        self.info= {} # forget everything
        # check if it is necessary to read form file or not
        read_from_file = False
        if cache:
            assert fname is not None, 'Splitter:: specify fname'
            if not os.path.exists(out_dir):
                os.makedirs(out_dir)
            out_file = os.path.join(out_dir,fname)
            read_from_file = os.path.exists(out_file) and not rewrite

        self.size = size

        if read_from_file:
            # reads from file
            f = h5py.File(out_file,'r')
            self._wnd_pos = f['wnd_pos'][:]
            self._idx_wnd_start = f['idx_wnd_start'][:]
            self._nSnps = f['nSnps'][:]
            f.close()
        else:
            # calculates windows using the indicated method
            if method=='slidingWindow':
                self._splitGenoSlidingWindow(size=size,step=step,minSnps=minSnps,maxSnps=maxSnps)
            elif method=='geneWindow':
                self._splitGenoGeneWindow(annotation_file=annotation_file,cis=cis,funct=funct,minSnps=minSnps,maxSnps=maxSnps)

            if cache:
                f = h5py.File(out_file,'w')
                f.create_dataset('wnd_pos', data=self._wnd_pos)
                f.create_dataset('idx_wnd_start', data=self._idx_wnd_start)
                f.create_dataset('nSnps', data=self._nSnps)
                f.close()