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

Hi,

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

Thanks

Regards

sequencing next-gen genome • 596 views
ADD COMMENTlink modified 3 months ago • written 3 months ago by rse50

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 3 months ago by rse50

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

ADD REPLYlink written 3 months ago by lieven.sterck1.7k

Yes, i want to get one concatenated sequence.

ADD REPLYlink written 3 months ago by rse50

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

ADD REPLYlink written 3 months ago by rse50
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 3 months ago • written 3 months ago by genomax50k

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 3 months ago by rse50

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 3 months ago by finswimmer2.8k

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 3 months ago by rse50
1
gravatar for finswimmer
3 months ago by
finswimmer2.8k
Germany
finswimmer2.8k 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 3 months ago by finswimmer2.8k
0
gravatar for Vijay Lakhujani
3 months ago by
Vijay Lakhujani2.5k
India
Vijay Lakhujani2.5k 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 3 months ago by Vijay Lakhujani2.5k
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: 1068 users visited in the last hour