RCircos errors: Warning message: In data(file) data set file not found & non-numeric argument to binary operator
0
0
Entering edit mode
4.1 years ago
marvel479 • 0

Here is the code I have been using. I am getting two different errors with it. Being new to R, I am sure I am making some obvious mistake, I just for the life of me cannot figure out where. I intend to add 2 tracks to the mouse ideogram using my .csv files that have chr#, chrstart, chrstop, name, no. of reads and strand info as columns. I am trying to construct a histogram using no. of reads at each genomic position. My .csv files are visible in the environment and properly appear when I do a head(). I also tried to Import them, that did not work either.

In addition, I get the following error:

> data(nohc_control)
**Warning message:
In data(nohc_control) : data set ‘nohc_control’ not found**
> data.col <- 5;
> track.num <- 1;
> side <- "in";
> RCircos.Histogram.Plot(nohc_control, track.num, side);
**Error in track.num - 1 : non-numeric argument to binary operator**
**In addition: Warning message:
In if (side == "in") { :
  the condition has length > 1 and only the first element will be used**

Here is the full code. Any help is appreciated.

install.packages("RCircos")
library(RCircos)

nohc_control <- read.table("A:/A/circRNAs/nohc_control.csv", header = FALSE, sep = ",", stringsAsFactors = FALSE)
nohc_gen <- read.table("A:/A/circRNAs/nohc_gen.csv", header = FALSE, stringsAsFactors = FALSE)

data(UCSC.Mouse.GRCm38.CytoBandIdeogram)

chr.exclude <- NULL;
cyto.info <- UCSC.Mouse.GRCm38.CytoBandIdeogram;
tracks.inside <- 2;
tracks.outside <- 0;
RCircos.Set.Core.Componentscyto.info, chr.exclude,tracks.inside, tracks.outside);

out.file <- "haircell_circ_mm3.pdf";
pdf(file=out.file, height=8, width=8);
RCircos.Set.Plot.Area();

par(mai=c(0.25, 0.25, 0.25, 0.25));
plot.new();
plot.window(c(-2.5,2.5), c(-2.5, 2.5));

RCircos.Chromosome.Ideogram.Plot();

data(nohc_control)
data.col <- 5;
track.num <- 1;
side <- "in";
RCircos.Histogram.Plot(nohc_control, track.num, side);

data(nohc_gen)
data.col <- 5
track.num <- 2;
side <- "in";
RCircos.Histogram.Plot(nohc_gen, track.num, side);
genome R RStudio RCircos plots • 1.6k views
ADD COMMENT
0
Entering edit mode

Hi there, this is not exactly helpful, but I ran a few years back into comparable issues using Rcircos. I found the documentation was sort of fragmentary, I never understood what I needed to do to avoid all the errors...

Eventually I was much better off using the circlize package. The documentation is way better and more exhaustive, making error tracing so much simpler. In addition the graphics have superior quality.

ADD REPLY
0
Entering edit mode

Hi @Carambakaracho, thanks for the suggestion. I did try circlize and it is much better. I am confused about my usage of it though. I want to draw a histogram for one of its tracks and would like to use my read counts for Y-axis, and the x should be the genomic position, however wide or narrow. The syntax however is:

circos.trackHist(factors, x, ....)

I am assuming I can write : circos.trackHist(factors = mydataframe$reads, x = x) that doesn't work though. How should I imply that my x should have chromosome no., start and stop position information?

ADD REPLY
0
Entering edit mode

What is x? did you initialize the plot before?

circos.genomicInitialize()

or

circos.initializeWithIdeogram()

initialze with ideogram is handy when working with a model species (though I vaguely remember I used it with a non model species), the other option lets you customize everything. Your reads, I fear must be a per base count (depth), so you x should be a vector seq(1, end_of_chromosome)

ADD REPLY
0
Entering edit mode

I have done

circos.initializeWithIdeogram()

I am working with a model species, and have an Ideogram for it, but I am working with circular RNAs, and so I wanted to use raw reads represented, as depth may not be appropriate here. The plan for using library normalization and RPMs was for the circular:linear ratio data. I do not understand for circos.trackHist(factors, x, ....), what the x should be. The whole idea is that I clearly see some genomic positions having circRNA (non-coding) with really high read raw counts, in one sample and really few in another. Using tracks and histograms, I wanted to show this difference in sample outputs. If you have suggestions other than using a histogram, I am open to those as well.

ADD REPLY
0
Entering edit mode

both need to be vectors of the same lengths, but trackHist seems to work raw data and compute the frequency. I'm also not sure how coverage counts need to be formatted there. Since you ask e me, I would calculate the coverage (bedtools/deeptols/samtools, you name it), smooth it to a sensible resolution with a rolling average and the use a line plot.

ADD REPLY

Login before adding your answer.

Traffic: 2362 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6