GithubHelp home page GithubHelp logo

bwapy's People

Contributors

1pakch avatar cjw85 avatar rasto2211 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bwapy's Issues

memory deallocation in libbwapy.c

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.

Building and distribute bwa together with bwapy

I think it would be preferable to have an option to build and distribute bwa itself together with bwapy. There are two advantages:

  • A possibility to get exactly the same version of the aligner itself in the $PATH when bwapy gets installed (+ for reproducible environments managed via conda, virualenv or similar).
  • A possibility to create self-contained tests for the package

Update bioconda version

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?

No alignments in a toy example

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

Unify API with mappy?

This is a nice project, but it would be really cool if mappy/minimap2 and bwapy happened to share the same python api.

Python3

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.