Hi everyone:
I try to use samtools mpileup/depth for specified regions in BED files. Following the document I try the command:
samtools mpileup -f hg19.fa -l ucsc_exon_intervals.bed in.bam|less
and got the output:
chr1 13211 T 1 . I chr1 13212 C 1 . A chr1 13213 C 1 . H
but these positions are not on my bed file. However, if I do not use the -l option, the output is different: chr1 10005 c 1 ^F. A chr1 10006 c 1 . C chr1 10007 t 2 .^@. DB chr1 10008 a 2 .. FB chr1 10009 a 2 .. HB
and also for the depth option:
samtools depth -r ucsc_exon_intervals.bed in.bam
The -r doesnt work. The bed file looks like:
chr1 66999814 67000061 NM_032291_exon_0_10_chr1_66999825_f 0 +
chr1 67091519 67091603 NM_032291_exon_1_10_chr1_67091530_f 0 +
chr1 67098742 67098787 NM_032291_exon_2_10_chr1_67098753_f 0 +
Could anyone help me on this?
Thanks.
My mistake. The options work. I could see it after I sort the bed file.
If you answer your own question you should add it as an answer rather than a comment. You may also accept your own answer.