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

Inconsistent behavior: bam to bw processing will sometimes hang #77

Closed
donaldcampbelljr opened this issue Jan 28, 2025 · 1 comment
Closed
Labels

Comments

@donaldcampbelljr
Copy link
Member

Emulating gtars command from PEPATAC:
./target/release/gtars uniwig --file "/home/drc/Downloads/gtars_74_issue/input/testchr1.bam" -c /home/drc/Downloads/gtars_74_issue/input/canFam4Y.chrom.sizes -m 25 -s 1 -t bam -y bw -p 6 -u shift --bamscale 100227120.0 -l /home/drc/Downloads/gtars_74_issue/output/test

I do not get a completion. The program simply hangs during bigwig creation.

I'm seeing the intermediate lines being written as such:

chr1	0	123554979	0
chr1	123554979	123555028	0.00000000997734
chr1	123555028	123555030	0.00000001995468
chr1	123555030	123555051	0.00000000997734
chr1	123555051	123555079	0.00000001995468
chr1	123555079	123555102	0.00000000997734
chr1	123555102	123555120	0
chr1	123555120	123555122	0.00000000997734
chr1	123555122	123555163	0.00000001995468
chr1	123555163	123555171	0.000000029932018
chr1	123555171	123555173	0.00000001995468
chr1	123555173	123555214	0.00000000997734
chr1	123555214	123555291	0
chr1	123555291	123555342	0.00000000997734
chr1	123555342	123555394	0
chr1	123555394	123555428	0.00000001995468
chr1	123555428	123555432	0.000000029932018
chr1	123555432	123555445	0.00000003990936
chr1	123555445	123555479	0.00000001995468
chr1	123555479	123555483	0.00000000997734
chr1	123555483	123555529	0
chr1	123555529	123555549	0.00000000997734
chr1	123555549	123555550	0.00000001995468
chr1	123555550	123555573	0.000000029932018
chr1	123555573	123555580	0.00000003990936
chr1	123555580	123555600	0.000000029932018
chr1	123555600	123555601	0.00000001995468
chr1	123555601	123555675	0.00000000997734
chr1	123555675	123555700	0
chr1	123555700	123555727	0.00000000997734
chr1	123555727	123555751	0.00000001995468
chr1	123555751	123555778	0.00000000997734
chr1	123555778	123555824	0
chr1	123555824	123555853	0.00000000997734
chr1	123555853	123555875	0.00000001995468
chr1	123555875	123555904	0.00000000997734
chr1	123555904	123555996	0
chr1	123555996	123556047	0.00000000997734
chr1	123556047	123556111	0
chr1	123556111	123556135	0.00000000997734
chr1	123556135	123556162	0.00000001995468
chr1	123556162	123556186	0.00000000997734
chr1	123556186	123556341	0
chr1	123556341	123556392	0.00000000997734
chr1	123556392	123556428	0
chr1	123556428	123556429	0.00000001995468

The counts are not extending past the chrom size in this particular example (123556469).

However, I noticed that the 4th column's numbers are very small and that if I simply change the --bamscale number to something smaller, the process will no longer hang and will complete just fine.

Again, I'm having difficulties reproducing the exact same error.

If the files are hanging during bigwig creation, a temp solution could be to manipulate the pepatac.py lines (this occurs in a few places! - 4 total) :
https://github.com/databio/pepatac/blob/0d1aad08910aa3e7be1f410071a5c4e595884272/pipelines/pepatac.py#L1551

If one lowers the scaling factor by a few orders of magnitude, it will allow the bigwig conversion to complete.

Originally posted by @donaldcampbelljr in #74

@donaldcampbelljr
Copy link
Member Author

I tried to reproduce this to see if it is actually a bigTools issue by feeding these bedGraph files to the bigtools cli tool, but I could only reproduce it the program hanging if the first line was present.
chr1 0 123554979 0

If it was not present, it did not matter how large or small the numbers in the 4th column are, the program/conversion would complete just fine.

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

No branches or pull requests

1 participant