---
name: "QTLtools-extract"
section: "1"
platform: "linux"
package: "qtltools"
version: "1.3.1+dfsg-4+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/QTLtools-extract"
---

# QTLtools-extract(1)

Data extraction mode.

## NAME

QTLtools extract - Data extraction mode.

## SYNOPSIS

**QTLtools extract \[--vcf --bed --cov\]** *relevant\_file* **--out** *output\_prefix* *\[OPTIONS\]*

## DESCRIPTION

Extract all the data from the provided files into one flat file. This will also impute all the missing data.

## OPTIONS

- **--vcf \[*in.vcf*\|*in.bcf*\|*in.vcf.gz*\]**

  Genotypes in VCF/BCF format. At least one of **--vcf --bed --cov** is REQUIRED.

- **--bed *quantifications.bed.gz***

  Molecular phenotype quantifications in BED format. At least one of **--vcf --bed --cov** is REQUIRED.

- **--cov *covariates.txt***

  Covariates data. At least one of **--vcf --bed --cov** is REQUIRED.

- **--out *filename\_prefix***

  Output file name prefix. REQUIRED.

- **--region *chr:start-end***

  Genomic region to be processed. E.g. chr4:12334456-16334456, or chr5.

## OUTPUT FILES

- **.content.txt.gz**

  Flat file with samples in rows and all the extracted variables in columns.

- **.header.txt**

  Genomic locations of the extracted variables.

## EXAMPLE

- o

  Extract genotypes, gene quantifications, and covariates from a certain region:

-

  QTLtools extract --vcf genotypes.chr22.vcf.gz --bed genes.50percent.chr22.bed.gz --cov genes.covariates.pc50.txt.gz --region chr22:17000000-18000000 --out extract\_output

## SEE ALSO

[*QTLtools*(1)](/QTLtools/1.md)

QTLtools website: \<https://qtltools.github.io/qtltools\>

## BUGS

- o

  Versions up to and including 1.2, suffer from a bug in reading missing genotypes in VCF/BCF files.  This bug affects variants with a DS field in their genotype's FORMAT and have a missing genotype (DS field is .) in one of the samples, in which case genotypes for all the samples are set to missing, effectively removing this variant from the analyses.

Please submit bugs to \<https://github.com/qtltools/qtltools\>

## CITATION

Delaneau, O., Ongen, H., Brown, A. et al. A complete tool set for molecular QTL discovery and analysis. *Nat Commun* **8**, 15452 (2017).  \<https://doi.org/10.1038/ncomms15452\>

## AUTHORS

Olivier Delaneau (olivier.delaneau@gmail.com), Halit Ongen (halitongen@gmail.com)
