Question: Merge BAM files without retaining sample information
1
gravatar for yampolsk
2.0 years ago by
yampolsk10
yampolsk10 wrote:

I want to merge several groups of BAM files in such a way that when I then create an mpileup from the resulting merged files, reads in each group are treated as if they are coming from the same population. Should I do

samtools merge -r 1.bam 1.1.bam 1.2.bam 1.3.bam

samtools merge -r 2.bam 2.1.bam 2.2.bam 2.3.bam

etc.

and then

samtools mpileup -R -o 123.mpileup 1.bam 2.bam etc.

OR

should I simply not use -r in samtools merge or -R in samtools mpileup?

Is there a difference?

Thank you!

samtools • 745 views
ADD COMMENTlink modified 2.0 years ago by Matt Miossec320 • written 2.0 years ago by yampolsk10
1
gravatar for Matt Miossec
2.0 years ago by
Matt Miossec320
Universidad Andrés Bello
Matt Miossec320 wrote:

You could use the 'AddOrReplaceReadGroups' command in Picard (https://sourceforge.net/projects/picard/) to set the read group to what you want them to be in each BAM file after merging.

ADD COMMENTlink modified 2.0 years ago • written 2.0 years ago by Matt Miossec320
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 640 users visited in the last hour