Hi, I would like to generate a mpileup file from 2 bam files in some regions instead of the whole chromosomes:
samtools -b bam_list_file -r regions_to_be_parsed.bed > mpileup_from_two_bam_files.pileup
The content in the bam_list_file is
~/1.bam
~/2.bam
but an error was given:
[E::mpileup] fail to parse region 'regions_to_be_parsed.bed' with 1.bam.
I do not think there is something wrong with the bam files or the bed file, because it works when I ran with the following command:
samtools -r regions_to_be_parsed.bed ~/1.bam > mpile1.pileup
samtools -r regions_to_be_parsed.bed ~/2.bam > mpile2.pileup
samtools -b bam_list_file > mpileup_from_two_bam_files.pileup
Is there some way to generate a mpileup file from two bam files with regions in bed file? Thanks for your time!
Hello jing.mengrabbit,
Please use the formatting bar (especially the
code
option) to present your post better.For example:
Besides, I believe your command is:
Thanks for your advice.