Skip to content

A small utility that transfers INFO tags into the FORMAT in a single-sample VCF

License

Notifications You must be signed in to change notification settings

Evotec-Bioinformatics/vcf-info2format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vcf-info2format

A small utility to move INFO fields in a single-sample VCF into FORMAT fields

Example Usage

If you have pre-existing single-sample VCF files or from a per-sample variant calling workflow, you may want to copy some INFO fields to FORMAT before merging to retain the information for later use. In such cases, you can use this utility for move info-fields to format-fields and retain them like this:

bcftools call sampleA.bam \
	| vcf-info2format --fields FS --qual \
	> sampleA.vcf
bcftools call sampleB.bam \
	| vcf-info2format --fields FS --qual \
	> sampleB.vcf

bcftools merge sampleA.vcf sampleB.vcf > multi-sample.vcf

Options

Usage: vcf-info2format [OPTIONS] --input <INPUT> --output <OUTPUT>

Options:
  -i, --input <INPUT>
          Path to the input VCF or "-" to read from STDIN
  -o, --output <OUTPUT>
          Path to the output VCF or "-" to write to STDOUT
  -f, --fields <FIELDS>
          The INFO fields to copy over to FORMAT tag
  -q, --qual
          Transfer also the QUAL tag into FORMAT
  -v, --verbose...
          Show verbose output (sets log-level to debug or trace)
      --verbose-report <VERBOSE_REPORT>
          Indicates how often the tool should report the progress if verbose output is enabled [default: 10000]
  -h, --help
          Print help
  -V, --version
          Print version

Installation

Install the Rust toolchain, e.g. using rustup, conda, or docker, in version 1.67.0 or higher. Then run:

cargo install --git https://github.com/Evotec-Bioinformatics/vcf-info2format.git

License

GNU General Public License v3.0

About

A small utility that transfers INFO tags into the FORMAT in a single-sample VCF

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages