Question: How to extract genome from iontorent bam file?
0
gravatar for Shaminur
7 months ago by
Shaminur90
Dhaka University
Shaminur90 wrote:

Hi, I hope everything is fine. I have a bam file with the COVID-19 genome from the ion torrent sequencing platform. I want to assemble them and tried with spades, But there is not enough read to form a contig. In that case, I want to assemble them with having gap (NNN). Is there any tools or pipeline?

Thanks In Advance

alignment assembly genome • 240 views
ADD COMMENTlink modified 7 months ago • written 7 months ago by Shaminur90
3
gravatar for 5heikki
7 months ago by
5heikki9.2k
Finland
5heikki9.2k wrote:

No need to assemble, just map the reads on to a reference genome and extract the consensus sequence. If everyone did like this the gisaid dataset would be of much higher quality..

ADD COMMENTlink modified 7 months ago • written 7 months ago by 5heikki9.2k

Thank you, can you please share the code, like align with bwa and then?

ADD REPLYlink written 7 months ago by Shaminur90
3
gravatar for Shaminur
7 months ago by
Shaminur90
Dhaka University
Shaminur90 wrote:

This works for me

bwa mem ref.fa output.fq.gz > alignment.sam
samtools view -bS alignment.sam > aln.bam
samtools sort -m 2G aln.bam -o aln.sorted.bam
samtools mpileup -uf ref.fa aln.sorted.bam | bcftools call -c | vcfutils.pl vcf2fq -d 2 > cons.fa

Thank you

ADD COMMENTlink written 7 months ago by Shaminur90
1

Shaminur : You should accept @5heikki's answer as well since that gave you the original clue for how to do this. You are able to accept more than one answer if they work.

ADD REPLYlink written 7 months ago by GenoMax94k
1

Unless you are using a very old version of samtools, you can sort the .sam file, no need to convert it. You really should pipe the output of bwa meme into samtools sort, making a .sam file is usually wasteful.

ADD REPLYlink written 7 months ago by swbarnes29.4k

Thank you very much for your valuable succession.

ADD REPLYlink written 7 months ago by Shaminur90
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: 1431 users visited in the last hour
_