Closed prete closed 3 years ago
Hi, tried the preparation notebook and this cell fails:
adatas = [] for batchname in batches: barcodes = pd.read_csv(batches[batchname]['cells']) barcodes = barcodes[barcodes.is__cell_barcode==1] barcodes.loc[:,"batch"] = batchname barcodes.set_index('barcode', inplace=True) frags = get_fragment_bedtool(batches[batchname]['frag'], barcodes) peakcounts = peak.intersect(frags, wa=True, wb=True).to_dataframe() sparse_data = np.asarray([np.ones(peakcounts.shape[0]), peakcounts.name, peakcounts.itemRgb]).T sparse_data = np.unique(sparse_data, axis=0) mat = coo_matrix((sparse_data[:,0], (sparse_data[:,1], sparse_data[:,2])), shape=(len(peak), len(barcodes))) adata = anndata.AnnData(mat.T.tocsr(), obs=barcodes, var=peakdf) adatas.append(adata)
the error is in this line:
adata = anndata.AnnData(mat.T.tocsr(), obs=barcodes, var=peakdf)
because peakdf it's not defined in that notebook, was it meant to be dfpeak ?
peakdf
dfpeak
Hi @prete . Yes, that is correct. peakdf should be dfpeak. I pushed a corrected version of the notebook. Thank you very much for reporting!
Hi, tried the preparation notebook and this cell fails:
the error is in this line:
because
peakdf
it's not defined in that notebook, was it meant to bedfpeak
?