Applications/Samtools

From HPC
Revision as of 08:32, 6 April 2017 by Pysdlb (talk | contribs)

Jump to: navigation , search

Application Details

  • Description: The OBITools package is a set of programs specifically designed for analysing NGS data in a DNA meta-barcoding context, taking into account taxonomic information
  • Version: 1.3.1.
  • Module: module samtools/gcc/1.3.1.
  • Licence: BSD License, MIT License


Usage Areas

Samtools is a suite of programs for interacting with high-throughput sequencing data. It consists of three separate repositories:

  • Samtools - Reading/writing/editing/indexing/viewing SAM/BAM/CRAM format
  • BCFtools - Reading/writing BCF2/VCF/gVCF files and calling/filtering/summarising SNP and short indel sequence variants
  • HTSlib - A C library for reading/writing high-throughput sequencing data


With linkages to the following modules too:




Usage Examples

Some usage examples of Samtools are listed below:

Index the reference FASTA.

[username@login01 ~]$  samtools faidx ex1.fa

Convert the (headerless) SAM file to BAM. Note if we had used "samtools view -h" above to create the ex1.sam.gz then we could omit the "-t ex1.fa.fai" option here.

[username@login01 ~]$  samtools view -S -b -t ex1.fa.fai -o ex1.bam ex1.sam.gz

Build an index for the BAM file:

[username@login01 ~]$  samtools index ex1.bam

View a portion of the BAM file:

[username@login01 ~]$  samtools view ex1.bam seq2:450-550

Visually inspect the alignments at the same location:

[username@login01 ~]$  samtools tview -p seq2:450 ex1.bam ex1.fa

View the data in pileup format:

[username@login01 ~]$  samtools mpileup -f ex1.fa ex1.bam

Generate an uncompressed VCF file of variants:

[username@login01 ~]$  samtools mpileup -vu -f ex1.fa ex1.bam > ex1.vcf

Generate a compressed VCF file of variants:

[username@login01 ~]$ samtools mpileup -g -f ex1.fa ex1.bam > ex1.bcf


Module

[username@login01 ~]$ module samtools/gcc/1.3.1


Further Information

Icon home.png