gravatar for marvel479

3 hours ago by

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);



Source link