qctool v2
A tool for quality control and analysis of gwas datasets.

Using qctool in a pipeline

Outputting data to stdout
Using "-" as an output file specifier will output data to standard output, that can then be redirected or piped into other commands. For example:
$ qctool -g example.bgen -og -
This outputs genotype data to stdout. (By default output is in VCF format; use the -ofiletype option to alter this).
$ qctool -g example.bgen -snp-stats -osnp -
This outputs SNP summary statistics to standard output.
Inputting data from stdin
QCTOOL has limited support for reading data from stdin. To do this, specify "-" as the argument to -g, and specify the format of the input data using the -filetype option, e.g.:
$ cat file.bgen | qctool -g - -filetype bgen [other options]

This functionality is currently limited to input data in BGEN format (-filetype bgen) or in VCF format (-filetype vcf). VCF format data should be streamed uncompressed, e.g.:

$ cat file.vcf.gz | gunzip -c | qctool -g - -filetype vcf [other options]
Pipelining QCTOOL with other tools
As an example, the following command uses bgenix with QCTOOL to compute snp summary statistics from a subset of a BGEN file, and view the result on the fly using less.
$ bgenix -g file.bgen -range 11:3500000-6500000 | qctool -g - -filetype bgen -snp-stats -osnp - | less -S