Annotate the input bed file using one of the annotation beds.
        Parameters
        ----------
        bt : pybedtools.BedTool
            BedTool for either one of the anchors, the loops,
            or the loop inners.
        
        name : str
            The key for the annoation bed file in annot_beds. 
        
        col_name : str
            Used to name the columns that will be made.
            
        complete : bool
            If True, this method will check whether the features in the
            annotation bed are completely contained by the features in the input
            bed.
            
        df_col : str
            If the name for bt isn't the index of self.df, this specifies
            which column of self.df contains the names for bt. For instance,
            if bt is the anchor1 BedTool, the df_col='anchor11'.

def annotate_bed(
        self,
        bt,
        name,
        col_name,
        complete=None,
        df_col=None,
    ):
        """
        Annotate the input bed file using one of the annotation beds.
        Parameters
        ----------
        bt : pybedtools.BedTool
            BedTool for either one of the anchors, the loops,
            or the loop inners.
        
        name : str
            The key for the annoation bed file in annot_beds. 
        
        col_name : str
            Used to name the columns that will be made.
            
        complete : bool
            If True, this method will check whether the features in the
            annotation bed are completely contained by the features in the input
            bed.
            
        df_col : str
            If the name for bt isn't the index of self.df, this specifies
            which column of self.df contains the names for bt. For instance,
            if bt is the anchor1 BedTool, the df_col='anchor11'.
        
        """
        import numpy as np
        import pandas as pd
        has_name_col = len(self.annot_beds[name][0].fields) > 3
        print('one')
        if complete:
            res = bt.intersect(self.annot_beds[name], sorted=True, wo=True, F=1)
        else:
            res = bt.intersect(self.annot_beds[name], sorted=True, wo=True)
        print('two')
        try:
            df = res.to_dataframe(names=range(len(res[0].fields)))
            ind = df[3].values
            if df_col is None:
                self.df[col_name] = False
                self.df.ix[set(ind), col_name] = True
            else:
                tdf = pd.DataFrame(True, index=ind, columns=[col_name])
                self.df = self.df.merge(tdf, left_on=df_col, right_index=True,
                                        how='outer')
                self.df[col_name] = self.df[col_name].fillna(False)
                #self.df.ix[self.df[col_name].isnull(), col_name] = False
            print('a')
            if has_name_col:
                vals = df[7].values
            else:
                vals = list(df[4].astype(str) + ':' +
                            df[5].astype(str) + '-' +
                            df[6].astype(str))
            print('b')
            df.index = vals
            gb = df.groupby(3)
            t = pd.Series(gb.groups)
            print('c')
            t = pd.DataFrame(t.apply(lambda x: set(x)))
            print('d')
            t.columns = ['{}_features'.format(col_name)]
            self.df = self.df.merge(t, left_on=df_col, right_index=True,
                                    how='outer')
            print('e')
        except IndexError:
            pass