Learn R Programming

geneNR (version 2.0.1)

plot_SNP: Plot SNP Distribution on Chromosome Map

Description

Plots SNP positions across chromosomes with centromere markers using given chromosome details and SNP data.

Usage

plot_SNP(
  chromosome_details,
  data,
  chromosome_color = "steelblue",
  title = "Chromosome map with SNPs",
  label_color = "black",
  image_width = 10,
  image_height = 10
)

Value

A ggplot object for the SNP distribution plot.

Arguments

chromosome_details

A data frame containing chromosome details with columns Chr, start and stop

data

A data frame containing SNP data with columns Chr, Pos, and SNP.

chromosome_color

Color of the chromosome bars (default: "skyblue").

title

Title of the chromosome plot depicting the identified SNPs

label_color

Color of the SNP labels (default: "black").

image_width

width of the chromosome plot

image_height

height of the chromosome plot

Examples

Run this code
# \donttest{
chromosome_details <- read.csv(system.file("extdata", "chromosome_details.csv", package = "geneNR"))
data <- read.csv(system.file("extdata", "identified_SNP.csv", package = "geneNR"))
chromosome_plot <- plot_SNP(chromosome_details = chromosome_details, data = data,
chromosome_color = "steelblue" ,title = "Chromosome map with SNPs", label_color = "black",
image_width = 15, image_height = 10)
print(chromosome_plot)
# }

Run the code above in your browser using DataLab