Question: How to get the consensus sequence region from a BAM alignment, with ref genome coordinates
0
gravatar for valopes
2.2 years ago by
valopes30
valopes30 wrote:

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.

sequence • 1.3k views
ADD COMMENTlink written 2.2 years ago by valopes30

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.

ADD REPLYlink written 2.2 years ago by Sej Modha4.1k

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

ADD REPLYlink written 2.2 years ago by valopes30

Yes, that should be the fasta header of the chromosome of interest followed by a : and the coordinates separated by -

ADD REPLYlink written 2.2 years ago by Sej Modha4.1k
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: 815 users visited in the last hour