Plot allele frequencies in VCF files
This is a tool to plot allele frequencies in VCF files.
The two main subcommands that are available are: * regions: Plot single regions or regions from a bed file, optionally with a margin. * whole-genome: Create a single image for every chromosome on the genome.
Both subcommands have three modes:
By default, colors correspond to call type (hom_alt/ref/hom_ref).
Multiple VCF files can be supplied simultaneously for the whole-genome subcommand, in which case they can be grouped by label. When multiple VCF files are supplied, plots will be colored on label per VCF file.
Only one sample per VCF file can be plotted.
We currently assume the presence of an AD column in the FORMAT field. This column should contain the depth per allele, with the reference allele being first.
All VCFs should be indexed with tabix, and should contain contigs in the header.
afplot is available through pypi with: pip install afplot
Usage: afplot [OPTIONS] COMMAND [ARGS]... Plot allele frequencies in VCF files. Two basic modes exist: - regions: Plot histogram, scatter or distance plots per user-specified region. - whole-genome: Plot histogram, scatter or distance plots over the entire genome. Options: --help Show this message and exit. Commands: regions Region plots whole-genome Whole-genome plots
Grouping samples can be achieved by supplying identical labels to samples. E.g.
In certain cases, you may not want to plot all contigs. For instance, when your vcf header contains many small unplaced contigs. This can be achieved by supplying a regex pattern to the -e flag. For instance, all contigs containing “gl” can be filtered out by doing:
The entire command line interface was changed to use click, instead of regular argparse. This allows a more complex CLI. In stead of having flags for plot mode, afplot now uses subcommands.
While the CLI has changed, and the internals of afplot have been refactored, the old-style (version 0.1) API remains in place for now. This may be deprecated in the future.
Support for plotting regions was added. Region plotting outputs on a directory, rather than on a single file.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|afplot-0.2.1-py3-none-any.whl (15.3 kB) Copy SHA256 Checksum SHA256||py3||Wheel||Jul 11, 2017|
|afplot-0.2.1.tar.gz (12.3 kB) Copy SHA256 Checksum SHA256||–||Source||Jul 11, 2017|