Hi everyone,
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?
Thanks
Is pointing to directory with your data correct? Not the name of the dataframe as written.
Thanks for formatting the code part (I have no idea how to do it). Yes it is just the path.
Thanks for your answer