bacsnp.plot: SNP frequency plot

View source: R/snp_plot.R

bacsnp.plotR Documentation

SNP frequency plot

Description

Function to draw a SNP frequency plot. Requires ggplot2.

Usage

bacsnp.plot(x, col = "SPEC", genome.length = NULL,
  mark.repeats = NULL, mark.lowGQ = NULL, mark.lowQUAL = NULL)

Arguments

x

A VCF dataframe that contains the SNP data from a single isolate only. vcf_transformation.

col

Column of the dataframe which is used to colorize each SNP position.

genome.length

The length of the reference genome. If set to default the last SNP position is used.

mark.repeats

Dataframe that contains the repeat regions of the genome.

mark.lowGQ

Numeric value >= 0

mark.lowQUAL

Numeric value >= 0

Value

A list of two elements. First element is the input dataframe with SNP specificities added. The second element is a counting talbe with all SNP specificity combinations.

Examples

## Not run: 
iso1 <- bac[bac$ISO == "iIsolate1",]
bacsnp.plot(iso1, col = "SPEC")
bacsnp.plot(iso1, col = "SPEC", genome.length = 125000)

## End(Not run)


wennj/bacsnp documentation built on Oct. 20, 2022, 11:17 p.m.