Question: Fasta sequence from Bam file
0
gravatar for rse
21 months ago by
rse90
Singapore
rse90 wrote:

Hi,

Is there any way to retrieve the fasta sequence from the aligned bam file?

Thanks

Regards

sequencing next-gen genome • 2.1k views
ADD COMMENTlink modified 21 months ago • written 21 months ago by rse90

Thanks for your replies. I used the tools to convert my bam file to fastq format. Thereafter, i used seqtk to convert fastq to fasta format. But i am getting fasta sequence per read. If i want one sequence, how to do that?

ADD REPLYlink written 21 months ago by rse90

of course you are. What are you expecting otherwise? one long concatenated sequence?

ADD REPLYlink written 21 months ago by lieven.sterck6.4k

Yes, i want to get one concatenated sequence.

ADD REPLYlink written 21 months ago by rse90

Do i need my variant calls for that? Thanks in advance

ADD REPLYlink written 21 months ago by rse90
1

Yes you do. Here is a guide to do that.

BTW: You should have specified this in the original question since the answers you received are not what you are looking for.

ADD REPLYlink modified 21 months ago • written 21 months ago by genomax75k

Yes, i agree. Should have specified. However, the generation of the consensus sequence works for SNVs and Deletions only. It fails for Insertions and Duplications. Moreover, the consensus sequence is highly dependent on the variant caller used.

ADD REPLYlink written 21 months ago by rse90

Moreover, the consensus sequence is highly dependent on the variant caller used.

Yes, of course. So the question is why you are interested in a consensus sequence?

fin swimmer

ADD REPLYlink written 21 months ago by finswimmer13k

I am working on resolving insertions/ duplications/ translocations. I need to confirm the breakpoints by doing PCR and hence need the raw sequence to design the same. Is there a way that we can get the raw consensus FASTA that will act as a template for my PCR primer designing?

ADD REPLYlink written 21 months ago by rse90
1
gravatar for finswimmer
21 months ago by
finswimmer13k
Germany
finswimmer13k wrote:

Similar question?

Works if you realy want to convert reads into fasta. And the print command maybe have to get adapted to what you want as the identifier. Or are you looking for a way to get a consensus sequence from the bam file? Than go ahead reading the linked thread.

fin swimmer

ADD COMMENTlink written 21 months ago by finswimmer13k
0
gravatar for lakhujanivijay
21 months ago by
lakhujanivijay4.6k
India
lakhujanivijay4.6k wrote:

A lot of different tools are available for the same. Read the docs carefully before you proceed to get the desired output

ADD COMMENTlink written 21 months ago by lakhujanivijay4.6k
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: 2104 users visited in the last hour