I am trying to plot genomic regions using KaryoplotR. I have been following the tutorial page, I converted my data frame into Granges object, however the tool does not work with my data. My data frame is simply a list of genomic location ['chr', 'start', 'end']
The following script doesn't give any warning or error message and only plots the chromosomes but not the genomic regions:
library(karyoploteR) library(GenomicRanges) library(data.table) setwd("/path/to/dataframe") df <- fread("for_ideogram.csv", header = T) gr <- makeGRangesFromDataFrame(df, start.field="start", end.field= "end") kp <- plotKaryotype(genome = "hg19", chromosomes="autosomal", plot.type = 1) kpPlotRegions(kp, data=gr)
Does anyone know how to get this to work?