Entering edit mode
7.8 years ago
valopes
▴
30
I am trying to get the consensus sequence region from a .bam file.
I've tried:
samtools mpileup -C50 -gf ref.fa -r Chr13:1,000-2,000 aln.bam
and I got
[bam_parse_region] fail to determine the sequence name.
[mpileup] malformatted region or wrong seqname for US-18.bam
Please, waht am I doing wrong? I really need to figure out but I have no experience with it
Tks.
Hi @valopes, I think I helped you with this question yesterday - C: Get part of a sequence from a .bam file, considering the reference genome positi , I am not sure what is your region of interest from the genome but clearly you did not read or understand the manual properly. -r parameter is used to specify the region of interest in the reference genome.
Yes, I know that you answer me yesterday. Thank you. However, It looks like my problem now is to determine the sequence name.
The reference genome is Gm13 and .bam file Chr:13, do you think that this is the problem?
Thanks
Yes, that should be the fasta header of the chromosome of interest followed by a : and the coordinates separated by -