Difference between revisions of "Samtools"

From wiki
Jump to: navigation, search
Line 3: Line 3:
 
Samtools hardly needs an introduction, it is one of the cornerstones of bioinformatics processing and is at the heart of the business of sequence aligning.
 
Samtools hardly needs an introduction, it is one of the cornerstones of bioinformatics processing and is at the heart of the business of sequence aligning.
  
Despite that introduction, note that samtools actually does not actually carry out alignments itself. Rather it offers utilities attendant on aligners such as bwa and bowtie.
+
Despite that introduction, note that samtools does not actually carry out alignments itself. Rather it offers utilities attendant on real aligners such as '''bwa''' and '''bowtie'''.
  
 
Primarily this is due to its providing various tools (available as subcommands) centred on a well defined
 
Primarily this is due to its providing various tools (available as subcommands) centred on a well defined

Revision as of 21:41, 8 June 2016

Introduction

Samtools hardly needs an introduction, it is one of the cornerstones of bioinformatics processing and is at the heart of the business of sequence aligning.

Despite that introduction, note that samtools does not actually carry out alignments itself. Rather it offers utilities attendant on real aligners such as bwa and bowtie.

Primarily this is due to its providing various tools (available as subcommands) centred on a well defined sequence alignment format, sam, and its binary (and therefore compressed) equivalent, bam.

This wiki page just offers some tips on how to use it, as there is plenty documentation elsewhere, some of which is mentioned in the links.

Tips

  • samtools commands always start with samtools and then a subcommand
  • Two input files will commonly be needed, often a sam/bam file and also the reference file.
  • view is a commonly used subcommand, whose name refers to internal viewing, because user visuals is not samtools strong point

tview

While visualisation is not samtools' strong point, the tview subcommand does provide a raw view of the alignment that a bam files has. Sometimes a raw, and less pretty alignment can be useful. It is run like so:

samtools tview alignments/sim_reads_aligned.sorted.bam genomes/NC_008253.fna

Links