R package for drawing lollipop plots of proteins using genetic variant data.
Lolliplots show sites of amino acid changes, given a VCF file and a gene symbol.
All variants to be plotted should be in one VCF file. If variants across multiple VCFs should be plotted, merge them first. This can be done using the ./extdata/merged.sh
file.
plot_lolliprot(vcf_path, gene_symbol, remove_mnv = TRUE, to_pdf = FALSE, width = 16, height = 6)
- vcf_path: Path to the VCF file containing variants to be plotted.
- gene_symbol: Gene symbol of the gene to be plotted.
- remove_mnv: If multinucleotide variants should be omitted when plotting. Defaults to TRUE.
- to_pdf: If a PDF of the plot should be created instead in
./lolliprot_output
. Defaults to FALSE. - width: Width of the PDF. Defaults to 16.
- height: Height of the PDF. Defaults to 6.
The canonical transcript is used for plotting. Protein domains are represented as grey boxes. The GRCh38 assembly is used for reference.
example_path <- system.file("extdata", "example.vcf", package="lolliprot")
# Plot with the multinucleotide variant
plot_lolliprot(vcf_path = example_path, gene_symbol = "DNMT3A", remove_mnv = FALSE)
# Plot without the multinucleotide variant
plot_lolliprot(vcf_path = example_path, gene_symbol = "DNMT3A")
# Create a PDF
plot_lolliprot(vcf_path = example_path, gene_symbol = "DNMT3A", to_pdf = TRUE, width = 15, height = 5)
devtools::install_github("vaporised/lolliprot")