Description Usage Arguments See Also Examples
plotIBDproportions()
plots the proportion of pairs IBD for each SNP across the genome.
1 2 3 4 5 6 7 | plotIBDproportions(ibd.proportions, interval = NULL,
annotation.genes = NULL, annotation.genes.color = NULL,
highlight.genes = NULL, highlight.genes.labels = TRUE,
highlight.genes.color = NULL, highlight.genes.alpha = 0.1,
line.color = NULL, add.rug = TRUE, plot.title = NULL,
add.legend = TRUE, facet.label = TRUE, facet.scales = "fixed",
subpop.facet = FALSE)
|
ibd.proportions |
A data frame containing the proportion of pairs IBD at each SNP.
See the returned |
interval |
A vector of length 3 containing the genomic locations of a specific region to plot. This vector should contain the
chromosome ID, the start of the interval in base-pairs and the end of the interval in base-pairs; in this order respectively.
The default is |
annotation.genes |
A data frame containing information on annotation genes to be included in the figure. This data frame must have at least 5 columns of information:
|
annotation.genes.color |
A vector of characters or numeric values containing the two colors representing gene stand (positive (+) or negative (-)) |
highlight.genes |
A data frame containing information of genes or regions to highlight. The data frame must have at least 4 columns of information:
|
highlight.genes.labels |
Logical. Whether to include gene names as labels in the figure. The default is |
highlight.genes.color |
Character string or numeric value. A single color that will be used to highlight a region/gene. The default is |
highlight.genes.alpha |
Numeric. A single value between 0 and 1 indicating the gene color transparency. The default is |
line.color |
A vector of characters or numeric values denoting the color of lines to be plotted.
If there are multiple populations/subpopulations then the number of colors specified should equal the number of
unique populations/subpopulations combinations.
The default is |
add.rug |
Logical. Whether to include SNP positions as a rug in the figure. The default is |
plot.title |
A character string of a title to be added to the figure The default is |
add.legend |
Logical. Whether a legend containing subpopulation information should be plotted. The default is |
facet.label |
Logical. Whether to include facet labels if multiple populations/subpopulations (column names "pop" and "subpop") are specified. |
facet.scales |
A character string of either |
subpop.facet |
Logical. Whether to plot subpopulations in separate facets. The default is |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | # generate a binary IBD matrix
my_matrix <- getIBDmatrix(ped.genotypes = png_genotypes,
ibd.segments = png_ibd)
# calculate the proportion of pairs IBD at each SNP
my_proportion <- getIBDproportion(ped.genotypes = png_genotypes,
ibd.matrix = my_matrix,
groups = NULL)
# plot the proportion of pairs IBD
plotIBDproportions(ibd.proportions = my_proportion,
interval = NULL,
annotation.genes = NULL,
annotation.genes.color = NULL,
highlight.genes = NULL,
highlight.genes.labels = TRUE,
highlight.genes.color = NULL,
highlight.genes.alpha = 0.1,
add.rug = FALSE,
plot.title = "Proportion of pairs IBD in PNG",
add.legend = FALSE,
line.color = NULL,
facet.label = TRUE,
facet.scales = "fixed",
subpop.facet = FALSE)
# creating a stratification dataset
my_groups <- png_genotypes[[1]][,1:3]
my_groups[1:10,"pid"] <- "a"
my_groups[11:25,"pid"] <- "b"
my_groups[26:38,"pid"] <- "c"
my_proportion <- getIBDproportion(ped.genotypes = png_genotypes,
ibd.matrix = my_matrix,
groups = my_groups)
# plot the proportion of pairs IBD
plotIBDproportions(ibd.proportions = my_proportion,
interval = NULL,
annotation.genes = NULL,
annotation.genes.color = NULL,
highlight.genes = NULL,
highlight.genes.labels = FALSE,
highlight.genes.color = NULL,
highlight.genes.alpha = 0.1,
line.color = NULL,
add.rug = FALSE,
plot.title = "Proportion of pairs IBD in PNG - with stratification",
add.legend = FALSE,
facet.label = TRUE,
facet.scales = "fixed",
subpop.facet = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.