---
name: "vcf-subset"
section: "1"
platform: "linux"
package: "vcftools"
version: "0.1.16-3+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/vcf-subset"
---

# vcf-subset(1)

create subset of VCF file

## NAME

vcf-subset - create subset of VCF file

## SYNOPSIS

**vcf-subset** \[*OPTIONS*\] *in.vcf.gz \> out.vcf*

## OPTIONS

- **-c**, **--columns** \<string\>

  File or comma-separated list of columns to keep in the vcf file. If file, one column per row

- **-e**, **--exclude-ref**

  Exclude rows not containing variants.

- **-p**, **--private**

  Print only rows where only the subset columns carry an alternate allele.

- **-r**, **--replace-with-ref**

  Replace the excluded types with reference allele instead of dot.

- **-t**, **--type** \<list\>

  Comma-separated list of variant types to include: SNPs,indels.

- **-u**, **--keep-uncalled**

  Do not exclude rows without calls.

- **-h**, -?, **--help**

  This help message.

## EXAMPLES

-

  cat in.vcf \| vcf-subset **-r** **-t** indels **-e** **-c** SAMPLE1 \> out.vcf
