Hi everyone, I've been trying making a Circos plot for my genomic data using RCircos package. I am new in R environment and especially with this package. If anyone is familiar with this package please share your knowledge.
This is the code I have used:
> library(RCircos) > data("UCSC.HG19.Human.CytoBandIdeogram") > my_data <-read.csv("data.csv", header = T) > cyto.info <-UCSC.HG19.Human.CytoBandIdeogram > chr.exclude <-NULL > tracks.inside <-10 > tracks.outside <-0 > RCircos.Set.Core.Componentscyto.info, chr.exclude, tracks.inside, > tracks.outside) > RCircos.Reset.Plot.Parameters() > pdf("Rcircos.pdf", height = 8, width = 8, compress = T) > RCircos.Set.Plot.Area() > RCircos.Chromosome.Ideogram.Plot() > dev.off() > name.col <-4 > side <-"in" > track.num <-1 > RCircos.Gene.Connector.Plot(genomic.data = my_data, name.col, > track.num, side, inside.pos = NULL, outside.pos = NULL, > genomic.columns = 3, is.sorted = T) > > track.num <-2 > > RCircos.Gene.Name.Plot(gene.data = my_data, name.col, track.num, side, > inside.pos = NULL, outside.pos = NULL, genomic.columns = 3, is.sorted > = T)
I have created a dataframe for my data with 4 columns, Chromosome name, Start position, End position and Gene name:
head(my_data) Chr Start End Gene chr1 801943 801943 LOC643837(dist=12203),FAM41C(dist=1508) chr1 802289 802289 LOC643837(dist=12549),FAM41C(dist=1162) chr1 802300 802300 LOC643837(dist=12560),FAM41C(dist=1151) chr1 802320 802320 LOC643837(dist=12580),FAM41C(dist=1131) chr1 802338 802338 LOC643837(dist=12598),FAM41C(dist=1113) chr1 802381 802381 LOC643837(dist=12641),FAM41C(dist=1070)
My ideogram is plotted but when I try to connect my data and link the gene names in the plot it gives this error: "Error in RCircos.Validate.Genomic.Data(genomic.data = my_data, plot.type = c("plot"), : Some chromosomes in plot data is not in ideogram."
I have tried changing the cytoband ideogram and use the hg38 still nothing, I checked my data and has all the chromosomes in and the start and end positions are withing the range of the cytoband info found in UCSC cytoband info. I have read most of the documentation that there is for this package but still nothing, there is a simple solution I am sure of it but I cannot figure this out. I would much appreciate if anyone could explain to me where the error is and what should I try.
Thank you in advance