Combining BAM files from two separate tests on same person, from same company
Hello. I poked around a bit but didn't find the answer. It was recommended to me that picard was appropriate for the task I have, but I was hoping for confirmation, and perhaps comments.
My question stems from an odd situation, so let me quickly explain it. I purchased a 30x full genome test, and on getting the results found it was 20x. When I asked the testing company, they said they would make good on the offer by sending a new test kit and running it all over again, from scratch. Any week now I expect to get the new 30x coverage BAM (or rather, set of BAM files, as they deliver it as one BAM per chromosome).
It seems that it should be possible to combine all these data from the same company on the same person, and yield a 50x coverage data set (20x + 30x).
First off, does that seem like a reasonable goal? And if so, can I use picard to do it? Or is there a more appropriate tool? When I initially asked in igv-help forum, I got this suggestion:
Yes you should be able to combine the 2 bams. The best way to do this is to use an offline tool, such as the Picard tool MergeSamFiles
Use the "coordinate" SORT_ORDER option. See the bottom of this page for more help on Picard:
https://broadinstitute.github.io/picard/index.html#QuickStart. After merging you will need to create a new index (.bai file).
To simply view the 2 files you can load them both, they will appear in 2 separate panels but that might be an advantage, you can quickly see if the 2 runs were consistent. I assume you were supplied index (".bai") files with the bams.
That led me to ask/comment:
So the merge process, itself, would not create a new index even if I used the standard option CREATE_INDEX=true ...?
If not, after the merge, I gather I would use:
java -jar picard.jar BuildBamIndex \
I suppose it would be safest to take it in separate steps if there is no confirmation on using the Create_Index option during the merge.
The respondent hadn't used this tool, and wisely sent me here. Does the initial advice sound right? And what about the CREATE_INDEX question?
I am relatively new to this type of software, but am a pretty fast learner. I am hoping it won't get deep into complexities, but if that's how it has to be then so be it.
Thank you... !!!!!