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

SCENIC+: pycistopic QC errors #169

Open
skoturan opened this issue Sep 17, 2024 · 2 comments
Open

SCENIC+: pycistopic QC errors #169

skoturan opened this issue Sep 17, 2024 · 2 comments

Comments

@skoturan
Copy link

skoturan commented Sep 17, 2024

Hi, I'm trying to run the new SCENIC+ using this tutorial:
https://pycistopic.readthedocs.io/en/latest/notebooks/human_cerebellum.html

When I get to the QC steps after inferring consensus peaks, pycistopic qc does not run. The error looks like this:

/.....site-packages/pycisTopic/topic_binarization.py:319: RuntimeWarning: invalid value encountered in divide mean1 = np.cumsum(hist * bin_centers) / weight1
..../site-packages/pycisTopic/topic_binarization.py:320: RuntimeWarning: invalid value encountered in divide mean2 = (np.cumsum((hist * bin_centers)[::-1]) / weight2[::-1])[::-1]

The strange thing is, it ran once already and I got some plots for sample level QC. But the TSS enrichment look very odd (attached image), and different from previous runs on the old SCENIC+ version....

When I ran the following code it seemed to work earlier:

pycistopic qc -f /rds/general/............../atac_fragments.tsv.gz -r /rds/general/................../consensus_peak_calling/consensus_regions.bed -t /rds/general/.................../consensus_peak_calling/tss_hg38.bed -o /rds/general/............../outs/qc/MCSF_16h_batch1 --min_fragments_per_cb 100 --tss_flank_window 1000 --tss_smoothing_rolling_window 10 --tss_minimum_signal_window 100 --tss_window 50

I added the the following patraemters to match the analysis I did in the old SCENIC+:
--min_fragments_per_cb 100
--tss_flank_window 1000
--tss_smoothing_rolling_window 10
--tss_minimum_signal_window 100
--tss_window 50`

I'm uncertain if they make sense or if it's appropriate for the dataset.

Any suggestions or ideas on what could have gone wrong?
The data is the single-nuclear ATAC modality from 10x multiome.

Screenshot 2024-09-17 at 16 44 08

Thanks in advance!

@ghuls
Copy link
Member

ghuls commented Sep 19, 2024

What are the values for weight1 and weight2? The error seems to indicate that there are zeros there (or infinity or some other weird values).

@skoturan
Copy link
Author

skoturan commented Sep 20, 2024

Hi!
Thanks for your message.

This is what the values are:

Screenshot 2024-09-20 at 12 18 18

Lots of zeros..

I don't understand why..also not sure if things went wrong at the peak calling step or at consensus_peaks.to_bed.

The bed file looks like this:
Screenshot 2024-09-20 at 14 44 59

Any thoughts on what's going wrong?

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

2 participants