polygonChrom(ecolitk)
polygonChrom()所属R语言包:ecolitk
Functions to plot circular chromosomes informations
函数绘制环状染色体信息
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Functions to plot circular chromosomes informations
函数绘制环状染色体信息
用法----------Usage----------
cPlotCircle(radius=1, xlim=c(-2, 2), ylim=xlim, edges=300, main=NULL,
main.inside, ...)
chromPos2angle(pos, len.chrom, rot=pi/2, clockwise=TRUE)
polygonChrom(begin, end, len.chrom, radius.in, radius.out,
total.edges = 300,
edges = max(round(abs(end - begin)/len.chrom *
total.edges), 2, na.rm = TRUE),
rot = pi/2, clockwise = TRUE, ...)
linesChrom(begin, end, len.chrom, radius,
total.edges = 300,
edges = max(round(abs(end - begin)/len.chrom *
total.edges), 2, na.rm = TRUE),
rot = pi/2, clockwise = TRUE, ...)
ecoli.len
参数----------Arguments----------
参数:radius
radius
半径
参数:xlim, ylim
range for the plot. Can be used to zoom-in a particular region.
图的范围。可用于在某一特定区域放大。
参数:pos
position (nucleic base coordinate)
位置(核酸的基本坐标)
参数:begin
begining of the segment (nucleic base number).
段begining(核酸基数)。
参数:end
end of the segment (nucleic base number).
段年底(核酸基数)。
参数:len.chrom
length of the chromosome in base pairs
染色体碱基长度
参数:radius.in
inner radius
内径
参数:radius.out
outer radius
外半径
参数:total.edges
total number of edges for the chromosome
染色体边总数
参数:edges
number of edges for the specific segment(s)
特定段的边数(S)
参数:rot
rotation (default is pi / 2, bringing the angle zero at 12 o'clock)
旋转(默认是pi / 2,使角零12点钟)
参数:clockwise
rotate clockwise. Default to TRUE.
顺时针旋转。默认TRUE。
参数:main, main.inside
main titles for the plot
图的主标题
参数:...
optional graphical parameters
可选的图形参数
Details
详情----------Details----------
The function chromPos2angle is a convenience function. The variable ecoli.len contains the size of the Escheria coli genome considered (K12).
功能chromPos2angle是一个方便的功能。变量ecoli.len包含大小认为Escheria大肠杆菌基因组(K12的)。
值----------Value----------
Except chromPos2angle, the function are solely used for their border effects.
除了chromPos2angle,功能仅用于为他们的边界效应。
作者(S)----------Author(s)----------
laurent <laurent@cbs.dtu.dk>
举例----------Examples----------
data(ecoligenomeSYMBOL2AFFY)
data(ecoligenomeCHRLOC)
## find the operon lactose ("lac*" genes)[乳糖操纵子(“LAC *”基因)]
lac.i <- grep("^lac", ls(ecoligenomeSYMBOL2AFFY))
lac.symbol <- ls(ecoligenomeSYMBOL2AFFY)[lac.i]
lac.affy <- unlist(lapply(lac.symbol, get, envir=ecoligenomeSYMBOL2AFFY))
beg.end <- lapply(lac.affy, get, envir=ecoligenomeCHRLOC)
beg.end <- matrix(unlist(beg.end), nc=2, byrow=TRUE)
lac.o <- order(beg.end[, 1])
lac.i <- lac.i[lac.o]
lac.symbol <- lac.symbol[lac.o]
lac.affy <- lac.affy[lac.o]
beg.end <- beg.end[lac.o, ]
lac.col <- rainbow(length(lac.affy))
par(mfrow=c(2,2))
## plot[#积]
cPlotCircle(main="lac genes")
polygonChrom(beg.end[, 1], beg.end[, 2], ecoli.len, 1, 1.2, col=lac.col)
rect(0, 0, 1.1, 1.1, border="red")
cPlotCircle(xlim=c(0, 1.2), ylim=c(0, 1.1))
polygonChrom(beg.end[, 1], beg.end[, 2], ecoli.len, 1, 1.1, col=lac.col)
rect(0.4, 0.8, 0.7, 1.1, border="red")
cPlotCircle(xlim=c(.45, .5), ylim=c(.85, 1.0))
polygonChrom(beg.end[, 1], beg.end[, 2], ecoli.len, 1, 1.03, col=lac.col)
mid.genes <- apply(beg.end, 1, mean)
mid.angles <- chromPos2angle(mid.genes, ecoli.len)
xy <- polar2xy(1.03, mid.angles)
xy.labels <- data.frame(x = seq(0.45, 0.5, length=4), y = seq(0.95, 1.0, length=4))
segments(xy$x, xy$y, xy.labels$x, xy.labels$y, col=lac.col)
text(xy.labels$x, xy.labels$y, lac.symbol, col=lac.col)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|