genotype_plot: Genotype Plotting

Description Usage Arguments Value

View source: R/genotype_plot.R

Description

Visualises genotypes within a VCF file located somewhere on the system, or loaded as a vcfR object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
genotype_plot(
  vcf = NULL,
  chr = NULL,
  start = 0,
  end = NULL,
  popmap = NULL,
  cluster = FALSE,
  snp_label_size = 1e+05,
  colour_scheme = c("#FCD225", "#C92D59", "#300060"),
  vcf_object = NULL,
  invariant_filter = TRUE,
  is.multi_allelic = FALSE,
  is.haploid = FALSE,
  polarise_genotypes = NULL,
  plot_allele_frequency = FALSE,
  plot_phased = FALSE,
  missingness = 0.5
)

Arguments

vcf

Path to a bgzipped vcf as a character string.

chr

Chr of scaf ID as a character string.

start

Start of region as numeric/integer.

end

End of region as numeric/integer.

popmap

Two column data frame with column 1 for individual IDs as they appear in the VCF and column 2 for pop labels.

cluster

Logical TRUE/FALSE whether to organise haplotypes by hclust clustering.

snp_label_size

Physical distance between snp label markers as numeric/integer.

colour_scheme

Character vector of colour values, must be length 3.

vcf_object

A vcfR object to plot, specified as an alternative to vcf, chr, start and end.

invariant_filter

Logical TRUE/FALSE to remove invariants.

is.multi_allelic

Logical TRUE/FALSE to handle multi-allelic VCFs.

is.haploid

Logical TRUE/FALSE to handle haploid genotypes.

polarise_genotypes

Character string that matches a population in the popmap, genotypes are polarised to the major allele in this population.

plot_allele_frequency

Logical TRUE/FALSE to switch on/off plotting per-population allele frequencies.

plot_phased

Logical TRUE/FALSE to determine whether we plot genotypes or phased haplotypes.

missingness

Numeric between 0-1 to filter for missing genotypes.

Value

A list of plottable objects including genotypes, SNP labels, dendrogram


JimWhiting91/genotype_plot documentation built on Feb. 1, 2022, 9:22 p.m.