stuart-lab / signac

R toolkit for the analysis of single-cell chromatin data
https://stuartlab.org/signac/
Other
330 stars 88 forks source link

subset Fragment file after filtering cells #1790

Closed sshanyiiii closed 1 month ago

sshanyiiii commented 1 month ago

Hi,

As you mentioned in https://github.com/stuart-lab/signac/issues/1569, we need to subset the fragment file after filtering low QC cells, which does not appear in the Signac official tutorial. So I haven't done this step before. I'm curious when using fragement file to callpeaks, won't the cells saved in the Seurat object be automatically recognized from fragment file? If not, any function or good method to subset cells and create a new fragment file? Thanks!

https://github.com/stuart-lab/signac/issues/1569: If there are cells that you removed from the dataset (eg, through QC filtering) that have fragments present in the fragment file, these fragments will still be used in the peak calling. To fully remove them you'd need to create a new fragment file that only contains the fragments from the cells you keep.

timoast commented 1 month ago

To clarify, I didn't say that we need to subset the fragment file after filtering out cells, and in practice this makes very little difference to the peak calling.

If you want to subset the fragment file you can use the FilterCells function or the filter function in fragtk: https://github.com/stuart-lab/fragtk