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

pyatac pwm: OverflowError: can't convert negative value to unsigned int #10

Closed
jebard opened this issue Sep 2, 2015 · 2 comments
Closed
Assignees

Comments

@jebard
Copy link

jebard commented Sep 2, 2015

Hello! I've been playing around with the pyatac pwm command, and have been getting an error when running with default settings.

pyatac pwm --fasta genome.fa --bam BWA.10.bam --cores 10
Command run: /data/apps/NucleoATAC/bin/pyatac pwm --fasta genome.fa --bam BWA.10.bam --cores 10
pyatac version 0.2.1
start run at: 2015-09-02 15:21
---------Making PWM from bam---------------------------------------
Caught exception when processing:
chr1 8010 9010 1 region *

Traceback (most recent call last):
File "/user/jbard/.local/lib/python2.7/site-packages/NucleoATAC-0.2.1-py2.7.egg/pyatac/get_pwm.py", line 30, in _pwmHelper
ins.calculateInsertions( params.bam, lower = params.lower, upper = params.upper, atac = params.atac)
File "/user/jbard/.local/lib/python2.7/site-packages/NucleoATAC-0.2.1-py2.7.egg/pyatac/tracks.py", line 168, in calculateInsertions
self.vals = getInsertions(bamfile, self.chrom, self.start, self.end, lower, upper, atac)
File "pyatac/fragments.pyx", line 56, in pyatac.fragments.getInsertions (/user/jbard/.pyxbld/temp.linux-x86_64-2.7/pyrex/pyatac/fragments.c:2896)
ilen = abs(read.template_length) - 8
OverflowError: can't convert negative value to unsigned int
()
Traceback (most recent call last):
File "/data/apps/NucleoATAC/bin/pyatac", line 359, in
main()
File "/data/apps/NucleoATAC/bin/pyatac", line 67, in main
get_pwm(args)
File "/user/jbard/.local/lib/python2.7/site-packages/NucleoATAC-0.2.1-py2.7.egg/pyatac/get_pwm.py", line 72, in get_pwm
tmp = pool.map(_pwmHelper, zip(sets,itertools.repeat(params)))
File "/util/academic/python/anaconda/lib/python2.7/multiprocessing/pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "/util/academic/python/anaconda/lib/python2.7/multiprocessing/pool.py", line 567, in get
raise self._value
OverflowError: can't convert negative value to unsigned int

@AliciaSchep AliciaSchep self-assigned this Sep 3, 2015
@AliciaSchep
Copy link
Contributor

Do you have any fragments that would have length less than 8 bp in your bam file?

@jebard
Copy link
Author

jebard commented Sep 3, 2015

There were fragments shorter than 8bp. When doing alignments using bwa-mem I believe the soft clipping generated these short fragments. I've rerun the analysis using a bowtie2 generated BAM and have no issue. Thanks for the suggestion!

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