plotMGSQuality | R Documentation |
This function visualizes the quality of Multi-Genome Scoring (MGS) for a dataset. It generates multiple plots, including barcode plots and individual signal metric plots for the first 50 genes (or fewer, depending on the dataset size). The function also computes and visualizes various signal metrics, with results displayed in color-coded plots based on the values of the computed metrics.
plotMGSQuality(dat, main = "mgs", return.scores = TRUE)
dat |
A data frame or matrix of gene data. Rows represent genes and columns represent individuals. |
main |
A string for the title of the plots. Default is '"mgs"'. |
return.scores |
A logical value ('TRUE' or 'FALSE'). If 'TRUE', the function returns the computed signal scores for the genes. Default is 'TRUE'. |
The function generates a series of plots to assess the quality of MGS for a dataset. The process includes: - Creating a barcode plot for the first 50 genes. - Generating individual plots for each of the computed signal metrics, with the colors of the points indicating the magnitude of the signal (from black to red).
The function calls 'plotBarcode' for visualizing the dataset and 'computeSignalMetrics' for calculating the signal metrics.
If the dataset contains fewer than 50 genes, all available genes are used instead. The signal metrics are calculated and displayed in individual plots, with color gradients indicating the score value.
If 'return.scores = TRUE', the function returns a data frame containing the computed signal metrics for the dataset.
Edi Prifti (IRD)
# Assuming `dat` is a data frame of gene data
plotMGSQuality(dat)
# To get the computed signal metrics
scores <- plotMGSQuality(dat, return.scores = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.