= bio-samtools The original project samtools-ruby belongs to Ricardo H. Ramirez @ https://github.com/homonecloco/samtools-ruby == Introduction Documentation and code come from that project and we'll adapt it for a better integration in BioRuby. Binder of samtools for ruby, on the top of FFI. This project was born from the need to add support of BAM files to the gee_fu genome browser (http://github.com/danmaclean/gee_fu). == Installation At the moment, the only way to "install" the module is to copy it to copy the content of the lib folder on any lib folder you have. You must also copy your libbam.a (linux) or libbam.dll (windows) from samtools. If you have a Mac, add the following variable to the makefile of samtools DYFLAGS = -dynamiclib -lz and the following target: dylib: libbam.dylib libbam.dylib:$(LOBJS) $(CC) $(CFLAGS) $(DYFLAGS) -o libbam.dylib $(LOBJS) Then, run make dylib Finally, you copy the .dylib file to your lib folder. == Usage The easiest way to see in "action" samtools-ruby to call rake test. == Dependencies: -FFI (http://github.com/ffi/ffi) -libbam This can be obtained from samtools. (http://samtools.sourceforge.net/ ) == FAQ. I´m getting a segmentation Fault, what did I do wrong? There are two known segmentation faults at the moment -When you try to load a text file as binary file -When you try to lad a binary file as a text file If this is not the problem, or you have any other question, don´t hesitate on dropping a line to Ricardo dot Ramirez-Gonzalez at bbsrc dot ac dot uk == TODO -Write a gem to install it -Filter to the fetching algorithm (give a condition that has to be satisfied to add the alignment to the list) -Examples of how to use it, besides the test folder -Operating system independent, DONE ( test needed) == IMPORTANT NOTE -Libraries are downloaded, compiled and installed inside the gem at install time on the host system -Library .a, I didn't check if it works on linux (test needed) $ openssl dgst libbam.so.1 MD5(libbam.so.1)= c45cfccfb41ffeb2730ee4b227d244c4 == Contributing to bio-samtools * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it * Fork the project * Start a feature/bugfix branch * Commit and push until you are happy with your contribution * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. === Important Notes for developers Remember that you must compile and install the right libbam library for you host system. In order to do that there are three possible solutions: * download, compile and install the library in bioruby-samtools-your_clone/lib/bio/db/sam/external/libbam.xxxxx by yourself * install the gem and then grab the compiled library cp `locate libbam.1.dylib` bioruby-samtools-your_clone/lib/bio/db/sam/external (library name is an example) * in your bioruby-samtools-your_clone create the Rakefile typing "cd ext; ruby mkrf_conf.rb; rake -f Rakefile" The latest I think is the easiest way, cause you are replicating the automatic process. For testing just run `rake test`. Tests must be improved. == Copyright Copyright (c) 2011 Raoul J.P. Bonnal. See LICENSE.txt for further details.