Hi
I am trying to call SNPs and indels from some bam files and I tried the following commands as given in the samtools/bcftools manual:
samtools mpileup -uf reference.fa aln1.bam | bcftools view -bvcg - > var.raw.bcf
bcftools view var.raw.bcf | vcfutils.pl varFilter -D100 > var.flt.vcf
However after running the commands I see that var.raw.bcf and var.flt.vcf files have results from only the first chromsome that is present in the bam file. I also get the following message:
[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
[afs] 0:16349.158 1:6949.156 2:48149.686
In my bam file Chr10 appears first followed by Chr11, 12, ...19, 1, 20, 21..., 2 etc. The reads, however, are sorted within the chromosomes. Just to make sure that the problem is not due to such arrangement of the chromsomes, I extracted Chr1, 2 and 3 and created a new bam file and sorted it using following commands.
samtools view -bh aln1.bam Chr1 Chr2 Chr3 -o Chr1to3.bam
samtools sort Chr1to3.bam Chr1to3sorted
Then ran the same command as before for SNP/Indel analysis. But the problem exists.
Can any of you please suggest what might be the possible problems/solutions?
Thanks in advance
ALM
I am trying to call SNPs and indels from some bam files and I tried the following commands as given in the samtools/bcftools manual:
samtools mpileup -uf reference.fa aln1.bam | bcftools view -bvcg - > var.raw.bcf
bcftools view var.raw.bcf | vcfutils.pl varFilter -D100 > var.flt.vcf
However after running the commands I see that var.raw.bcf and var.flt.vcf files have results from only the first chromsome that is present in the bam file. I also get the following message:
[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
[afs] 0:16349.158 1:6949.156 2:48149.686
In my bam file Chr10 appears first followed by Chr11, 12, ...19, 1, 20, 21..., 2 etc. The reads, however, are sorted within the chromosomes. Just to make sure that the problem is not due to such arrangement of the chromsomes, I extracted Chr1, 2 and 3 and created a new bam file and sorted it using following commands.
samtools view -bh aln1.bam Chr1 Chr2 Chr3 -o Chr1to3.bam
samtools sort Chr1to3.bam Chr1to3sorted
Then ran the same command as before for SNP/Indel analysis. But the problem exists.
Can any of you please suggest what might be the possible problems/solutions?
Thanks in advance
ALM
Comment