Question: How to extract genome from iontorent bam file?
1
gravatar for Shaminur
14 days ago by
Shaminur40
Dhaka University
Shaminur40 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 • 105 views
ADD COMMENTlink modified 14 days ago • written 14 days ago by Shaminur40
4
gravatar for Shaminur
14 days ago by
Shaminur40
Dhaka University
Shaminur40 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 14 days ago by Shaminur40
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 14 days ago by genomax85k
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 14 days ago by swbarnes27.9k

Thank you very much for your valuable succession.

ADD REPLYlink written 13 days ago by Shaminur40
3
gravatar for 5heikki
14 days ago by
5heikki8.9k
Finland
5heikki8.9k 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 14 days ago • written 14 days ago by 5heikki8.9k

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

ADD REPLYlink written 14 days ago by Shaminur40
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: 1712 users visited in the last hour