chapmanb/bcbio-nextgen — pull request #649 by lpantano (2014-10-23 17:25:28+00:00)
Title: add script to merge FASTQ and BAM files

Hi,

I tried to do it the best way to use bcbio functions and ipython cluster helper (I used some code I saw from other project of @roryk). It is working in local and cluster, and with fastq and bam files.

I add a function into `fastq.py` to merge: for now using `cat` (don't know if there is a better solution). As well, I had to modified `is_fastq` function to recognize `fastq.gz` (didn't work how it was, maybe you wanna look at that line).

As well, I modified `merge` inside `bam/__init__.py`. Some times the bam files are a mess ( like the ones I had it) and samtools will die with bad header or other errors. `bamtools` seems to work with these cases, so I added that incase the other two tools fail. If you think I should do another function, happy to re-write code.

And finally some documentation. Feel free to re-write any sentence that doesn't make sense.