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

Wildcard causes segfault with pywfa installed via pip, works when installed from source #16

Open
matthuska opened this issue Aug 15, 2024 · 3 comments

Comments

@matthuska
Copy link

If I install pywfa using pip, I can run the example script from the README without any problems. However, if I use the wildcard option of WavefrontAligner I get a segfault:

$ diff works.py fails.py 
5c5
< a = WavefrontAligner(pattern)
---
> a = WavefrontAligner(pattern, wildcard="N")
$ python works.py
      ALIGNMENT	3M1X4M1D7M1I9M1X6M
      ALIGNMENT.COMPACT	1X1D1I1X
      PATTERN    TCTTTACTCGCGCGTT-GGAGAAATACAATAGT
                 ||| |||| ||||||| ||||||||| ||||||
      TEXT       TCTATACT-GCGCGTTTGGAGAAATAAAATAGT
$ python fails.py 
Segmentation fault

If I build from pywfa source (using the exact steps from the README), the segfault goes away and the wildcard works as expected:

$ python fails.py 
      ALIGNMENT 3M1X4M1D7M1I9M1X6M
      ETRACE    1X1D1I1X
      CIGAR     8M1D7M1I16M
      PATTERN    TCTTTACTCGCGCGTT-GGAGAAATACAATAGT
                 ||| |||| ||||||| ||||||||| ||||||
      TEXT       TCTATACT-GCGCGTTTGGAGAAATAAAATAGT
@kcleal
Copy link
Owner

kcleal commented Aug 15, 2024

Hi @matthuska,
The pip package is out of sync with the repo and doesn't have the wildcard functionality. Ive been meaning to update the build, but have been a bit too busy lately.

@matthuska
Copy link
Author

If you would be interested, I could do a small PR that sets up a GitHub action to automatically publish releases to PyPI. I use it myself and it makes doing releases a bit easier (just create the release on the GitHub web page, done).

As an example: https://github.com/rki-mf1/breakfast/blob/master/.github/workflows/release.yml

@kcleal
Copy link
Owner

kcleal commented Aug 16, 2024

Thanks that would be awesome. However, Im not sure that the current install script is compatible with osx-arm64, if you could add a runner that builds and tests using Ubuntu that would be great. I can try and sort out the macOS issue. The package will be released as a source distribution rather than a built wheel.

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