stuart-lab / signac

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

calling peaks from a fragments file #1553

Closed WHUhuangke closed 10 months ago

WHUhuangke commented 10 months ago

Hello, I have met an issue about calling peaks from a fragments file, which has about 1.4 hundred millions lines of data. I left the calling progress running but after 8 hours it did not give any response. That is the first time I tried calling peaks and I did not set the macs2.path parameter, so I doubted that the R may can not find the path of my macs2 package. So I add the path parameter when calling the function the second time, but it still does not work. the code:

fragments <- read.table('/home/huangke/python_project/dgi-gcn/ATAC_fragment.tsv') granges <- CallPeaks(fragments,macs2.path='/opt/conda/lib/python3.9/site-packages/MACS2',verbose=TRUE)

Could anyone be kind enough to point out the mistakes I made and give some guidance ? Thanks in advance.

timoast commented 10 months ago

Hi, the first argument for the CallPeaks function should be a Seurat object, ChromatinAssay object, Fragment object, or the path to fragment file/s. Here you have supplied a dataframe. In Signac, we have designed functions wherever possible to avoid loading the whole fragment file into memory. You can supply the path to the file on disk instead.

WHUhuangke commented 10 months ago

Hi, the first argument for the CallPeaks function should be a Seurat object, ChromatinAssay object, Fragment object, or the path to fragment file/s. Here you have supplied a dataframe. In Signac, we have designed functions wherever possible to avoid loading the whole fragment file into memory. You can supply the path to the file on disk instead.

Thanks alot! I have turned to ArchR package for the preprocessing since it has better and simpler steps to handle atac data when only one fragments file in tsv format is provided, without any other files.