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

pyBwOpen] bw is NULL #1351

Closed
Krithika-Bhuvan opened this issue Jan 13, 2025 · 4 comments
Closed

pyBwOpen] bw is NULL #1351

Krithika-Bhuvan opened this issue Jan 13, 2025 · 4 comments

Comments

@Krithika-Bhuvan
Copy link

Krithika-Bhuvan commented Jan 13, 2025

Hello, thanks for making this great package.

I have a list of bw files that I'm trying to plot together. I am able to get the heatmap for them individually without issues. BUT when i plot them together, I get this error below.

I have done these group plots with deeptools on other datasets without issues. Any idea why its happening for this dataset ? Thanks.

[urlOpen] Couldn't open 5 for reading
[urlOpen] Couldn't open 5 for reading
[pyBwOpen] bw is NULL!
Traceback (most recent call last):
  File "/opt/conda/envs/app/bin/computeMatrix", line 10, in <module>
    sys.exit(main())
  File "/opt/conda/envs/app/lib/python3.9/site-packages/deeptools/computeMatrix.py", line 398, in main
    hm.computeMatrix(scores_file_list, args.regionsFileName, parameters, blackListFileName=args.blackListFileName, verbose=args.verbose, allArgs=args)
  File "/opt/conda/envs/app/lib/python3.9/site-packages/deeptools/heatmapper.py", line 251, in computeMatrix
    chromSizes, _ = getScorePerBigWigBin.getChromSizes(score_file_list)
  File "/opt/conda/envs/app/lib/python3.9/site-packages/deeptools/getScorePerBigWigBin.py", line 158, in getChromSizes
    fh = pyBigWig.open(fname)
RuntimeError: Received an error during file opening!

Code below. My bigwig files are drosophila normalized bw files.

echo ":::Deeptools computeMatrix for RNAPOL"
computeMatrix scale-regions \
	-S $s1 $s3 $s5 $s7 $s9 $s11 $s13 $15 \
	-R $BED \
	--beforeRegionStartLength 5000 \
	--regionBodyLength 5000 \
	--afterRegionStartLength 5000 \
	-out $outdir/matrix_se_RNAPOL.mat.gz \
	--skipZeros

echo "Deeptools plotHeatmap for RNAPOL"
plotHeatmap \
	-m $outdir/matrix_se_RNAPOL.mat.gz \
	-out $outdir/heatmap_se_RNAPOL.pdf \
	--heatmapHeight 15 \
	--numPlotsPerRow 4 \
	--regionsLabel super_enhancers
@WardDeb
Copy link
Member

WardDeb commented Jan 14, 2025

Are you sure all files exist ? I can't really evaluate what's going on, but ensure that:
-S $s1 $s3 $s5 $s7 $s9 $s11 $s13 $15 \
all point to valid bw files to begin with.

@Krithika-Bhuvan
Copy link
Author

Thanks for the feedback. After many hours of testing on the HPC and on my local machine.
When i run the same code on 1 bw file, 2 bw file, 3 bw file, the code is working. My instinct right now is that deeptools can take up to 4 bw files at a time max. Is that right ?

@WardDeb
Copy link
Member

WardDeb commented Jan 17, 2025

No, there is no limit.
RuntimeError: Received an error during file opening! implies that one of the bigwig files doesn't exist. Make sure that these do, and double check for any typos in your script.

@Krithika-Bhuvan
Copy link
Author

Krithika-Bhuvan commented Jan 17, 2025

Thank you. I am currently trying out the same code when i use 4 BW files at at time in the "-S" setting. Its strange that the exact same code works fine when I run 1 BW sample at a time. So far I've tested upto using 4 BW Files . I think it might be related to some latency or something else in the HPC.

I saw another user post on this github related to HPC - this user mentioned an error when working on the HPC and no error when working on the local machine.

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