chmille4/bamstatsAlive — pull request #1 by yiq (2013-10-16 21:45:36+00:00)
Title: Factoring out BAMTOOLS from Makefile, and switching json handling to the library 'jansson'

Two things happened

1) I think it's not ideal to have to edit Makefile everytime you need to compile on a system with bamtools somewhere else. So I removed BAMTOOLS variable from the Makefile, and taking it from the shell environment. Now when you need to compile the source, you issue the following command:

$ BAMTOOLS=/some/where/bamtools/dwells make

This is only needed for compiling the source code. It's not needed for running the test targets

2) As we throw more things to the output (which I think we should refrain ourselves from going to far on this. You want the result to be small and fast), it becomes more and more difficult to handle the output of json. A misplaced comma could throw the entire output off. Thus I switched to using a json manipulation library 'jansson' to handle the json generation. I haven't removed the old code, but a new version of 'printStats', namingly 'printStatsJansson' is now being called.