The x-axis is the counts of the non-reference allele,
and the y-axis is the counts of the reference allele.
Transparency is controlled by the maxpostprob
vector. These types of plots are used in Gerard et. al. (2018) and
Gerard and Ferr<U+00E3>o (2020).
plot_geno(
refvec,
sizevec,
ploidy,
p1ref = NULL,
p1size = NULL,
p2ref = NULL,
p2size = NULL,
geno = NULL,
seq = 0,
bias = 1,
maxpostprob = NULL,
p1geno = NULL,
p2geno = NULL,
use_colorblind = TRUE
)
A vector of non-negative integers. The number of reference reads observed in the individuals
A vector of positive integers. The total number of reads in the individuals.
A non-negative integer. The ploidy of the species.
A vector of non-negative integers. The number of reference reads observed in parent 1 (if the individuals are all siblings).
A vector of positive integers. The total number of reads in parent 1 (if the individuals are all siblings).
A vector of non-negative integers. The number of reference reads observed in parent 2 (if the individuals are all siblings).
A vector of positive integers. The total number of reads in parent 2 (if the individuals are all siblings).
The individual genotypes.
The sequencing error rate.
The bias parameter.
A vector of the posterior probabilities of being at the modal genotype.
Parent 1's genotype.
Parent 2's genotype.
A logical. Should we use a colorblind safe palette (TRUE
),
or not (FALSE
)? Only allowed if ploidy <= 6
.
A ggplot
object for the genotype plot.
If parental genotypes are provided (p1geno
and p2geno
) then
they will be colored the same as the offspring. Since they are often hard to see,
a small black dot will also indicate their position.
Gerard, D., Ferr<U+00E3>o, L. F. V., Garcia, A. A. F., & Stephens, M. (2018). Genotyping Polyploids from Messy Sequencing Data. Genetics, 210(3), 789-807. doi: 10.1534/genetics.118.301468.
Gerard, David, and Lu<U+00ED>s Felipe Ventorim Ferr<U+00E3>o. "Priors for genotyping polyploids." Bioinformatics 36, no. 6 (2020): 1795-1800. DOI:10.1093/bioinformatics/btz852.
# NOT RUN {
data("snpdat")
refvec <- snpdat$counts[snpdat$snp == "SNP1"]
sizevec <- snpdat$size[snpdat$snp == "SNP1"]
ploidy <- 6
plot_geno(refvec = refvec, sizevec = sizevec, ploidy = ploidy)
# }
Run the code above in your browser using DataLab