r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq
GNU General Public License v3.0
296 stars 124 forks source link

Error in addBmatToSnap.default #205

Open afcmalone opened 3 years ago

afcmalone commented 3 years ago

Hi, I am combining 6 snap objects. I have combined the objects using common bins to create a snap object in R, x.sp I then went to step 9 in your R vignette - https://github.com/r3fang/SnapATAC/blob/master/examples/10X_brain_5k/README.md#gene_tsne

When I re-add the cell-by-bin matrix to the snap object: x.sp = addBmatToSnap(x.sp, bin.size = 1000)

I get the error: Error in addBmatToSnap.default(x.sp, bin.size = 1000) : bins does not match between snap files, please regenerate the cell-by-bin matrix by snaptools

This is despite all the 6 individual snap files having the same bin sizes:

showBinSizes("Bx71_X.snap"); [1] 1000 showBinSizes("Bx78_X.snap"); [1] 1000 showBinSizes("Bx90X.snap"); [1] 1000 showBinSizes("c1.snap"); [1] 1000 showBinSizes("c2.snap"); [1] 1000 showBinSizes("c3.snap"); [1] 1000

Not sure why i am getting this error. I have alot of memory on my system for this step. Is bin size too small and will not compute?

Thanks AM