Extract consensus sequence from alignment
0
1
Entering edit mode
6.7 years ago
bird77 ▴ 80

I have a newly sequenced bacterial genome which is quite close to a reference genome. After the assembly, I wanted to check if I can obtain better results or longer contigs by performing an alignment on the reference genome.

I performed an alignment with bwa mem and created a sorted bam with samtools to visualize in Tablet.

bwa-0.7.12 mem -t 8 ref.fna read1.fq read2.fq > aln.sam
samtools-1.3.1 view -b aln.sam -t ref.fna -o aln.bam 
samtools-1.3.1 sort aln.bam -o aln.sorted.bam
samtools-1.3.1 index aln.sorted.bam

How can I extract the consensus sequence? My reference genome is a draft genome with around 20 contigs, so the extracted sequences should also be a multi fasta fie.

Thank you.

alignment • 2.9k views
ADD COMMENT
2
Entering edit mode

Have a look here.

ADD REPLY

Login before adding your answer.

Traffic: 2646 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6