Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Create consensus sequences from mapping reads onto multifasta reference. For background see:
bwa index database.fasta
bwa aln -t #num_threads database.fasta reads.fastq > reads.sai
bwa samse database.fasta reads.sai reads.fastq > aln.sam
samtools view -b -o aln.bam aln.sam
samtools sort aln.bam aln.sorted
samtools index aln.sorted.bam
samtools mpileup -uf database.fasta aln.sorted.bam |bcftools view -cg - | vcf2fq >aln.fastq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment