nanoporetech / bwapy Goto Github PK
View Code? Open in Web Editor NEWPython bindings to bwa mem
License: Other
Python bindings to bwa mem
License: Other
A fresh build of bwapy
on Python 3.6 produces no alignments in trivial cases. The index seems to be loaded just fine and I do not now if there is a possible version mismatch between the index format and what bwapy
expects.
Create a reference
(align) $ cat test.fa
>REF
AAACCCGGGGGGGGGGAAACGC
Index it
(align) $ bwa index test.fa
[bwa_index] Pack FASTA... 0.00 sec
[bwa_index] Construct BWT for the packed sequence...
[bwa_index] 0.00 seconds elapse.
[bwa_index] Update BWT... 0.00 sec
[bwa_index] Pack forward-only FASTA... 0.00 sec
[bwa_index] Construct SA from BWT and Occ... 0.00 sec
[main] Version: 0.7.17-r1188
[main] CMD: bwa index test.fa
[main] Real time: 0.015 sec; CPU: 0.004 sec
Create a test read
(align) $ cat test.fq
@testread
AAACCC
+
222222
Try to align with bwapy
:
(align) $ python3 -c 'import bwapy; print(bwapy.BwaAligner("test.fa").align_seq("AAACCC"))'
()
(align) $ python3 -c 'import bwapy; print(bwapy.__version__)'
0.1.4
Try to align with bwa mem
(align) $ bwa mem test.fa test.fq
[M::bwa_idx_load_from_disk] read 0 ALT contigs
@SQ SN:REF LN:22
@PG ID:bwa PN:bwa VN:0.7.17-r1188 CL:bwa mem test.fa test.fq
[M::process] read 1 sequences (6 bp)...
[M::mem_process_seqs] Processed 1 reads in 0.001 CPU sec, 0.001 real sec
testread 4 * 0 0 * * 0 0 AAACCC 222222 AS:i:0 XS:i:0
[main] Version: 0.7.17-r1188
[main] CMD: bwa mem test.fa test.fq
[main] Real time: 0.002 sec; CPU: 0.004 sec
The current version on github is further than the one on bioconda (0.1.4), for example it uses bwa mem
flag -a
. Can you please update bioconda version?
Does this package work with python3? I'm getting this error:
AttributeError: type object 'Cython.Compiler.Scanning.Method' has no attribute '__reduce_cython__'
when I run:
python3 setup.py install --user
Any idea how to make it work for python3?
I get this error on importing bwapy
. Looks like '-lz' flag needs to be passed to the linker somewhere.
I think it would be preferable to have an option to build and distribute bwa
itself together with bwapy
. There are two advantages:
bwapy
gets installed (+ for reproducible environments managed via conda, virualenv or similar).Thank you for sharing this very useful code.
I have found that the function 'free_mem_aln_v' does not free memory allocated to alns->aln in the function 'new_mem_aln_v'. This causes a memory issue when calling the align_seq function repeatedly. Adding the line 'free(alns->aln)' to the function fixes this problem.
This is a nice project, but it would be really cool if mappy/minimap2 and bwapy happened to share the same python api.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.