From Genome Analysis Wiki
Jump to navigationJump to search
1,590 bytes added
, 09:12, 22 May 2018
Line 1: |
Line 1: |
| The sav application is a command line Interface for manipulating [[SAV File Format | sav]] genotype files. | | The sav application is a command line Interface for manipulating [[SAV File Format | sav]] genotype files. |
| + | |
| + | ==Usage== |
| + | Running <code>sav --help</code> will list available subcommands. Each subcommand also has its own help page. When installed into systems paths, <code>man sav</code> will also bring up documentation. |
| + | |
| + | ===import=== |
| + | The <code>import</code> 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 <code>-d HDS</code>. |
| + | |
| + | <syntaxhighlight lang="shell"> |
| + | # imports BCF file and indexes output. |
| + | sav import --index file.bcf file.sav |
| + | </syntaxhighlight> |
| + | |
| + | ===export=== |
| + | The <code>export</code> 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. |
| + | <syntaxhighlight lang="shell"> |
| + | # exports region and sample subset to stdout |
| + | sav export file.sav \ |
| + | --regions chr1,chr2:10000-20000 \ |
| + | --sample-ids ID1,ID2,ID3 | less -S |
| + | </syntaxhighlight> |
| + | |
| + | <syntaxhighlight lang="shell"> |
| + | # 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 |
| + | </syntaxhighlight> |
| + | |
| + | ===stat-index=== |
| + | The <code>stat-index</code> subcommand can be used to quickly pull metrics about the call set (eg. number of variants) via the S1R index. |
| + | |
| + | <syntaxhighlight lang="shell"> |
| + | sav stat-index file.sav.s1r |
| + | > chromosome 18 20 |
| + | > block count 4813 3421 |
| + | > marker count 9855090 8835691 |
| + | > tree height 2 2 |
| + | </syntaxhighlight> |
| | | |
| [https://github.com/statgen/savvy| Github repo] | | [https://github.com/statgen/savvy| Github repo] |