Description Usage Arguments Details Value Examples
View source: R/plotProbabilities.R
Plot genetic composition across the genome
1 | plotProbabilities(inputObject, positions, alleles, chromosomes)
|
inputObject |
An object of class |
positions |
The genetic positions at which to plot the composition |
alleles |
The founder alleles which we are interested in. |
chromosomes |
The chromosomes of to plot the composition. |
Plot genetic composition of a population, across the genome. Composition is determined by using the IBD genotype probabilities, as computed by computeGenotypeProbabilities
. The plot is produced by taking the average IBD genotype probability, for each founder allele and each genotpe position. Deviations from the expected proprotions (determined by the experimental design) may indicate non-standard genetic inheritance or selective pressure.
A ggplot object, suitable for display.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data(simulatedFourParentData)
part1 <- subset(simulatedFourParentData, lines =
names(which(finals(simulatedFourParentData)[, 50] == 1)))
part2 <- subset(simulatedFourParentData, lines =
names(which(finals(simulatedFourParentData)[, 50] != 1)))
distorted <- subset(part1, lines = sample(nLines(part1), 100)) + part2
distortedMapped <- mpcrossMapped(distorted, map = simulatedFourParentMap)
probabilities <- computeGenotypeProbabilities(distortedMapped)
#Here the composition of the population reflects the fact that we have less of founder 1 than
# expected, at a specific point on the genome
plotProbabilities(probabilities)
#Go back to the undistorted data
undistortedMapped <- mpcrossMapped(simulatedFourParentData, map = simulatedFourParentMap)
probabilities <- computeGenotypeProbabilities(distortedMapped)
#Here the composition of the population reflects the expected inheritance; the trace
# corresponding to every founder is flat
plotProbabilities(probabilities)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.