Learn R Programming

genphen (version 1.0.0)

plotSpecificGenotype: Visualizing specific genotypes

Description

This procedure visualizes the phenotypic distribution linked to each of the genetic states of a specific genotype.

Usage

plotSpecificGenotype(genotype, phenotype, index)

Arguments

genotype
Character matrix or data frame, containing SNPs/SAAPs as columns or alternatively as a DNAMultipleAlignment/AAMultipleAlignment Biostrings object.
phenotype
Numerical vector whose elements correspond to the genotype.
index
Index (number) of the specific genotype column within the genotype data which is to be plotted.

Value

plot
ggplot object

Details

This procedure allows the user to inspect a specific genotype with respect to the the phenotype. It uses a boxplot notation to plot the phenotypes as a function of the states of that genotype. The resulting boxplot will visualize whether the different states of the specific genotype are linked to different and disjoint phenotypic distributions, which is a signature of a strong association between the genotype and the phenotype.

See Also

runGenphenSaap, runGenphenSnp, plotGenphenResults, plotManhattan

Examples

Run this code
#Example 1:
data(genotype.snp) #or data(genotype.snp.msa)
data(phenotype.snp)
specific.genotype.plot <- plotSpecificGenotype(genotype = genotype.snp,
phenotype = phenotype.snp, index = 1)

#Example 2:
data(genotype.saap) #or ata(genotype.saap.msa)
data(phenotype.saap)
specific.genotype.plot <- plotSpecificGenotype(genotype = genotype.saap,
phenotype = phenotype.saap, index = 3)

Run the code above in your browser using DataLab