def load_annotations(self, aname, sep='<STR_LIT:U+002C>'):
ann = pd.read_csv(aname)<EOL>cell_names = np.array(list(self.adata.obs_names))<EOL>all_cell_names = np.array(list(self.adata_raw.obs_names))<EOL>if(ann.shape[<NUM_LIT:1>] > <NUM_LIT:1>):<EOL><INDENT>ann = pd.read_csv(aname, index_col=<NUM_LIT:0>, sep=sep)<EOL>if(ann.shape[<NUM_LIT:0>] != all_cell_names.size):<EOL><INDENT>ann = pd.read_csv(aname, index_col=<NUM_LIT:0>, header=None, sep=sep)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if(ann.shape[<NUM_LIT:0>] != all_cell_names.size):<EOL><INDENT>ann = pd.read_csv(aname, header=None, sep=sep)<EOL><DEDENT><DEDENT>ann.index = np.array(list(ann.index.astype('<STR_LIT>')))<EOL>ann1 = np.array(list(ann.T[cell_names].T.values.flatten()))<EOL>ann2 = np.array(list(ann.values.flatten()))<EOL>self.adata_raw.obs['<STR_LIT>'] = pd.Categorical(ann2)<EOL>self.adata.obs['<STR_LIT>'] = pd.Categorical(ann1)<EOL>
Loads cell annotations.

        Loads the cell annoations specified by the 'aname' path.

        Parameters
        ----------
        aname - string
            The path to the annotations file. First column should be cell IDs
            and second column should be the desired annotations.