我想在Rcircus上绘制以下数据并将其链接。
srcTName srcTStart srcTEnd SeqNames Start End
1 Hchr18 657287 658525 Mchr5 30072897 30073562
2 Hchr18 830267 830721 Mchr5 32594399 32594708
3 Hchr18 903627 905104 Mchr17 93198252 93199733
4 Hchr18 2571338 2571954 Mchr17 71526682 71527049
5 Hchr18 2654877 2655933 Mchr17 71475296 71476291
6 Hchr18 2654877 2655933 Mchr1 18058862 18059032
H代表人类染色体,而M代表小鼠染色体。我想绘制每行元素之间的链接,例如Hchr18 657287到Mchr5 30072897之间的链接。
我总是会收到此错误:
RCircos.Validate.Genomic.Data(genomic.data,“ link”, genomic.columns):在地块数据中一个或多个基因组位置是 Mchr5的染色体长度之外。
我使用pslMap获得了映射的坐标,我也手动检查了坐标,它们很好,所以我不知道为什么会收到此错误。
这是我正在使用的代码:
data(UCSC.Mouse.GRCm38.CytoBandIdeogram);
data(UCSC.HG38.Human.CytoBandIdeogram);
# Generate link data from the two datasets.
mouse.data <- mouse.bed;
human.data <- input.bed;
link.data <- data.frame(human.data[,1:3], mouse.data[,1:3]);
human=UCSC.HG38.Human.CytoBandIdeogram;
mouse= UCSC.Mouse.GRCm38.CytoBandIdeogram;
# Assign H and M to humans and mouse
species.list <- c("H", "M");
cyto.list <- list(human, mouse);
RCircos.Multiple.Species.Core.Components(cyto.list,species.list, NULL, 5, 5);
data.list <- list(human.data,mouse.data);
link.data[,1] <- paste(species.list[1], link.data[,1], sep="");
link.data[,4] <- paste(species.list[2], link.data[,4], sep="");
# Set up the parameters
params <- RCircos.Get.Plot.Parameters();
params$chrom.width<-0.3;
params$chrom.paddings=2000;
params$base.per.unit <- 30000;
RCircos.Reset.Plot.Parameters(params);
# Create the plotting space
pdf(file="MousevsHuman.pdf", 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));
# Plot chromosome ideogram and link lines
RCircos.Chromosome.Ideogram.Plot();
data(RCircos.Gene.Label.Data);
track.num<-1;
RCircos.Link.Plot(link.data, track.num, FALSE);
title(" Mouse and Human Gene Expression");
legend(1, 2, legend=c("Right: Human","Left: Mouse"), cex=0.8);
dev.off();
message("done ...\n\n");