SAV Command Line Interface

From Genome Analysis Wiki
Jump to navigationJump to search

The sav application is a command line Interface for manipulating sav genotype files.

Usage

Running sav --help will list available subcommands. Each subcommand also has its own help page. When installed into systems paths, man sav will also bring up documentation.

import

The import subcommand imports from BCF or VCF to SAV file format. Indexing, sorting, subsetting, etc. can all be applied during import. GT is the default data format imported. HDS (haplotype dosages) can be enabled with -d HDS.

  # imports BCF file and indexes output.
  sav import --index file.bcf file.sav

export

The export subcommand will export a SAV file to either plain text or bgzipped VCF format. The exported data format can be GT, HDS, GP or DS.

  # exports region and sample subset to stdout
  sav export file.sav \
    --regions chr1,chr2:10000-20000 \
    --sample-ids ID1,ID2,ID3 | less -S
  # exports sample subset as dosages excluding monomorphic sites to bgzf file.
  sav export file.sav file.vcf.gz \
    --filter "AC>0;AC!=AN" \
    --data-format DS \
    --sample-ids ID1,ID2,ID3

stat-index

The stat-index subcommand can be used to quickly pull metrics about the call set (eg. number of variants) via the S1R index.

  sav stat-index file.sav.s1r
  > chromosome      18      20
  > block count     4813    3421
  > marker count    9855090 8835691
  > tree height     2       2

External links

Github repo (source code)