Entering edit mode
7.3 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.
Have a look here.