Preparing short read alignments

The best format to present short read alignments to GenomeView is the SAM/BAM format, which is emerging as the standard.

There are a number of tools available to convert the output from numerous aligners to SAM on the SAMtools website.

Once you have a SAM file you need to convert it to BAM and index it. Let us suppose you have a reference sequence called 'reference.fasta' and a read alignment in SAM format called 'alignment.sam'.

Steps to get from the various aligner formats to the SAM format are available on the SAMtools website.

Steps to go from SAM to indexed BAM.

samtools faidx reference.fasta
(will create reference.fasta.fai for the next step)

samtools view -bS -t reference.fasta.fai alignment.sam -o alignment.bam


samtools sort alignment.bam sorted
(will create sorted.bam)

samtools index sorted.bam
(will create sorted.bam.bai, which is read by GenomeView together with the bam file)