Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapatac2.tl.macs3 command encountered an error using the call_broad_peaks function #379

Open
haloudashu opened this issue Feb 18, 2025 · 0 comments

Comments

@haloudashu
Copy link

haloudashu commented Feb 18, 2025

Hi Dr. Zhang
Thank you great contribution to scalable scATAC analysis tools. I use snapatac2 version 2.8.0 to read a 93Mb fragment file as Anndata, and then use snapatac2.tl.macs3 to make a boradPeak calling:

import snapatac2 as snap

snap.tl.macs3(atac, 
              qvalue=0.05, 
              nolambda=False, 
              shift=0, 
              extsize=400, 
              min_len=400, 
              blacklist=None, 
              call_broad_peaks=True, 
              broad_cutoff=0.1, 
              n_jobs=4)

Run time report error:

2025-02-18 10:38:44 - INFO - [836 MB] #3 Pre-compute pvalue-qvalue table...
2025-02-18 10:39:32 - INFO - [1257 MB] #3 Call peaks for each chromosome...
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[12], line 1
----> 1 snap.tl.macs3(atac, qvalue=qvalue, nolambda=nolambda, shift=snapshift, extsize=extsize, min_len=min_len, blacklist=None, call_broad_peaks=broad, broad_cutoff=broad_cutoff, n_jobs=core)

File snapatac2/tools/_call_peaks.py:145, in macs3(adata, groupby, qvalue, call_broad_peaks, broad_cutoff, replicate, replicate_qvalue, max_frag_size, selections, nolambda, shift, extsize, min_len, blacklist, key_added, tempdir, inplace, n_jobs)
    142 options.scanwindow = 2 * options.d
    144 if groupby is None:
--> 145     peaks = _snapatac2.call_peaks_bulk(adata, options, max_frag_size)
    146     if inplace:
    147         adata.uns[key_added + "_pseudobulk"] = peaks.to_pandas() if not adata.isbacked else peaks

AttributeError: 'MACS3.IO.PeakIO.BroadPeakIO' object has no attribute 'peaks'

Excuse me, is this a bug?
I referred to issue # 365 and found that this method requires a significant amount of memory resources. Is there any better solution?
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant