bacsnp.plot: SNP frequency plot

Description Usage Arguments Value Examples

View source: R/snp_plot.R

Description

Function to draw a SNP frequency plot. Requires ggplot2.

Usage

1
2
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

1
2
3
4
5
6
## 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 July 13, 2020, 1:19 p.m.