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

Error handling -1 positions in BEDPE files #67

Open
bu-bgregor opened this issue Dec 16, 2022 · 1 comment
Open

Error handling -1 positions in BEDPE files #67

bu-bgregor opened this issue Dec 16, 2022 · 1 comment

Comments

@bu-bgregor
Copy link

epic2 fails when reading a BEDPE file with a -1 value for a start or end position:

Traceback (most recent call last):
File "/share/pkg.7/epic2/0.0.52/install/epic2_env/bin/epic2", line 257, in <module>
_main(args)
File "/share/pkg.7/epic2/0.0.52/install/epic2_env/lib/python3.10/site-packages/epic2/main.py", line 35, in _main
effective_genome_length, chromsizes = egl_and_chromsizes(args)
File "epic2/src/genome_info.pyx", line 320, in epic2.src.genome_info.egl_and_chromsizes
File "epic2/src/genome_info.pyx", line 136, in epic2.src.genome_info.find_readlength
OverflowError: can't convert negative value to uint32_t 

uint32_t types are used to read the start/end positions in genome_info.pyx and read_files.cpp, which of course won't correctly handle a negative value. The BEDPE format allows the -1 value to indicate unknown positions.

start1 - The zero-based starting position of the first end of the feature on chrom1.
The first base in a chromosome is numbered 0.
As with BED format, the start position in each BEDPE feature is therefore interpreted to be 1 greater than the start position listed in the feature. This column is required.
Use -1 for unknown.

Any suggestion on how to handle this?

@endrebak
Copy link
Member

endrebak commented Dec 17, 2022 via email

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