r3fang / SnapATAC

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

How to extract matrices made by "snap-pre"? #4

Closed seishin0125 closed 5 years ago

seishin0125 commented 5 years ago

Hi, I'm thinking of applying cell-by-bin matrices to another scATAC-analysis pipelines such as pseudo-trajectory analysis.

In order to do so, I tried to extract cellxbin matrix (bmat) from mos object imported by data(mos). I have confirmed that mos contains "bmat" attribute by attributes() function, however, I couldn't get bmat by mos$bmat. Error in mos$bmat : $ operator not defined for this S4 class

Could you teach me how to extract bmat from "snap" object?

r3fang commented 5 years ago

Hi, you can extract bmat by slot(mos,bmat)

seishin0125 commented 5 years ago

Thank you very much for quick reply. In my case, slot() function did not go well. Instead, I could extract bmat by "mos@bmat".

Again, thank you so much for your help. I'm really looking forward to utilizing this SnapATAC tools for analysing my scATAC data.