This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Best way of Merging Multiple Lanes generated by HiSeq 2000, index BAM or VCF?

Hi Folks, I just want to make sure I am on the right track. I have paired reads coming from three Lanes per each sample. Following is what I did so far; I mapped reads to reference genome using BWA in SAM tools.

Now I have indexed BAM files (3 per each sample).

I am thinking of merging bam files using Sam tools and then go for Variant calling.

I read that alternatively, variants can be called for each indexed bam file and then merge vcf files.

What is the more logical approach? Looking forward to get your suggestions. Thank you! 🙂

wgs illumina hiseq sam mapping

1 answer

Given that these are lane replicates and variation between lanes is typically low, I would have merged already at the fastq level. Anyway, now you could merge them at the BAM level and then perform variant calling. Calling variants on the three technical replicates separately is probably not too informative as each of the three would have lower power to detect events than the merged file.

Thank You!

I am going to use merge in SAMtools for merging index bam files. Do I need to keep bai files (this case 3) in the same folder as well? After merging do i need to index it again?

Merging does not require an index. Yes, you'll need to index the new file again, but you can do this in one command like:

samtools merge - file1.bam file2.bam file3.bam | tee merged.bam | samtools index - merged.bam.bai

Awesome! Thank you so much! Have a Great Day!

Venura

Log in to answer this question.