R 语言heatmap2 说明书Word文档格式.docx
- 文档编号:20879276
- 上传时间:2023-01-26
- 格式:DOCX
- 页数:17
- 大小:396.08KB
R 语言heatmap2 说明书Word文档格式.docx
《R 语言heatmap2 说明书Word文档格式.docx》由会员分享,可在线阅读,更多相关《R 语言heatmap2 说明书Word文档格式.docx(17页珍藏版)》请在冰豆网上搜索。
symbreaks=min(x<
0,na.rm=TRUE)||scale!
="
#colors
col="
heat.colors"
#blocksepration
colsep,
rowsep,
sepcolor="
white"
sepwidth=c(0.05,0.05),
#celllabeling
cellnote,
notecex=1.0,
notecol="
cyan"
na.color=par("
bg"
#leveltrace
trace=c("
tracecol="
hline=median(breaks),
vline=median(breaks),
linecol=tracecol,
#Row/ColumnLabeling
margins=c(5,5),
ColSideColors,
RowSideColors,
cexRow=0.2+1/log10(nr),
cexCol=0.2+1/log10(nc),
labRow=NULL,
labCol=NULL,
#colorkey+densityinfo
key=TRUE,
keysize=1.5,
density.info=c("
histogram"
density"
denscol=tracecol,
symkey=min(x<
0,na.rm=TRUE)||symbreaks,
densadj=0.25,
#plotlabels
main=NULL,
xlab=NULL,
ylab=NULL,
#plotlayout
lmat=NULL,
lhei=NULL,
lwid=NULL,
#extras
...
)
Arguments
x
numericmatrixofthevaluestobeplotted.
Rowv
determinesifandhowthe
row
dendrogramshouldbereordered.Bydefault,itisTRUE,whichimpliesdendrogramiscomputedandreorderedbasedonrowmeans.IfNULLorFALSE,thennodendrogramiscomputedandnoreorderingisdone.Ifa
dendrogram,thenitisused"
as-is"
iewithoutanyreordering.Ifavectorofintegers,thendendrogramiscomputedandreorderedbasedontheorderofthevector.
Colv
column
dendrogramshouldbereordered.Hastheoptionsasthe
Rowv
argumentaboveand
additionally
when
x
isasquarematrix,
Colv="
meansthatcolumnsshouldbetreatedidenticallytotherows.
distfun
functionusedtocomputethedistance(dissimilarity)betweenbothrowsandcolumns.Defaultsto
dist.
hclustfun
functionusedtocomputethehierarchicalclusteringwhen
or
Colv
arenotdendrograms.Defaultsto
hclust.
dendrogram
characterstringindicatingwhethertodraw'
none'
'
row'
column'
or'
both'
dendrograms.Defaultsto'
.However,ifRowv(orColv)isFALSEorNULLanddendrogramis'
thenawarningisissuedandRowv(orColv)argumentsarehonoured.
symm
logicalindicatingif
shouldbetreated
symmetrically;
canonlybetruewhen
isasquarematrix.
scale
characterindicatingifthevaluesshouldbecenteredandscaledineithertherowdirectionorthecolumndirection,ornone.Thedefaultis
"
if
symm
false,and
otherwise.
na.rm
logicalindicatingwhether
NA'
sshouldberemoved.
revC
logicalindicatingifthecolumnordershouldbe
reversedforplotting,suchthate.g.,forthesymmetriccase,thesymmetryaxisisasusual.
add.expr
expressionthatwillbeevaluatedafterthecallto
image.Canbeusedtoaddcomponentstotheplot.
breaks
(optional)Eitheranumericvectorindicatingthesplittingpointsforbinning
intocolors,oraintegernumberofbreakpointstobeused,inwhichcasethebreakpointswillbespacedequallybetween
min(x)
and
max(x).
symbreaks
Booleanindicatingwhetherbreaksshouldbemadesymmetricabout0.Defaultsto
TRUE
ifthedataincludesnegativevalues,andto
FALSE
col
colorsusedfortheimage.Defaultstoheatcolors(heat.colors).
colsep,rowsep,sepcolor
(optional)vectorofintegersindicatingwhichcolumnsorrowsshouldbeseparatedfromtheprecedingcolumnsorrowsbyanarrowspaceofcolorsepcolor.
sepwidth
(optional)Vectoroflength2givingthewidth(colsep)orheight(rowsep)theseparatorboxdrawnbycolsepandrowsepasafunctionofthewidth(colsep)orheight(rowsep)ofacell.Defaultsto
c(0.05,0.05)
cellnote
(optional)matrixofcharacterstringswhichwillbeplacedwithineachcolorcell,e.g.p-valuesymbols.
notecex
(optional)numericscalingfactorfor
cellnote
items.
notecol
(optional)characterstringspecifyingthecolorfor
text.Defaultsto"
green"
.
na.color
Colortouseformissingvalue(NA).Defaultstotheplotbackgroundcolor.
trace
characterstringindicatingwhetherasolid"
trace"
lineshouldbedrawnacross'
sordown'
s,'
.Thedistanceofthelinefromthecenterofeachcolor-cellisproportionaltothesizeofthemeasurement.Defaultsto'
tracecol
characterstringgivingthecolorfor"
line.Defaultsto"
hline,vline,linecol
Vectorofvalueswithincellswhereahorizontalorverticaldottedlineshouldbedrawn.Thecolorofthelineiscontrolledby
linecol.Horizontallinesareonlyplottedif
trace
is'
.Verticallinesareonlydrawnif
'
.
hline
vline
defaulttothemedianofthebreaks,
linecol
defaultstothevalueof
tracecol.
margins
numericvectoroflength2containingthemargins(see
par(mar=*))forcolumnandrownames,respectively.
ColSideColors
(optional)charactervectoroflength
ncol(x)
containingthecolornamesforahorizontalsidebarthatmaybeusedtoannotatethecolumnsof
x.
RowSideColors
nrow(x)
containingthecolornamesforaverticalsidebarthatmaybeusedtoannotatetherowsof
cexRow,cexCol
positivenumbers,usedas
cex.axis
infortheroworcolumnaxislabeling.Thedefaultscurrentlyonlyusenumberofrowsorcolumns,respectively.
labRow,labCol
charactervectorswithrowandcolumnlabelstouse;
thesedefaultto
rownames(x)
colnames(x),respectively.
key
logicalindicatingwhetheracolor-keyshouldbeshown.
keysize
numericvalueindicatingthesizeofthekey
density.info
characterstringindicatingwhethertosuperimposea'
histogram'
a'
density'
plot,ornoplot('
)onthecolor-key.
denscol
characterstringgivingthecolorforthedensitydisplayspecifiedby
density.info,defaultstothesamevalueas
symkey
Booleanindicatingwhetherthecolorkeyshouldbemadesymmetricabout0.Defaultsto
FALSEotherwise.
densadj
Numericscalingvaluefortuningthekernelwidthwhenadensityplotisdrawnonthecolorkey.(Seethe
adjust
parameterforthe
density
functionfordetails.)Defaultsto0.25.
main,xlab,ylab
main,x-andy-axistitles;
defaultstonone.
lmat,lhei,lwid
visuallayout:
positionmatrix,columnheight,columnwidth.Seebelowfordetails
...
additionalargumentspassedonto
image
Details
Ifeither
aredendrogramstheyarehonored(andnotreordered).Otherwise,dendrogramsarecomputedas
dd<
-as.dendrogram(hclustfun(distfun(X)))
where
Xiseither
t(x).
Ifeitherisavector(of“weights”)thentheappropriatedendrogramisreorderedaccordingtothesuppliedvaluessubjecttotheconstraintsimposedbythedendrogram,by
reorder(dd,Rowv),intherowcase.Ifeitherismissing,asbydefault,thentheorderingofthecorrespondingdendrogramisbythemeanvalueoftherows/columns,i.e.,inthecaseofrows,
Rowv<
-rowMeans(x,na.rm=na.rm).Ifeitheris
NULL,
noreordering
willbedoneforthecorrespondingside.
If
scale="
therowsarescaledtohavemeanzeroandstandarddeviationone.Thereissomeempiricalevidencefromgenomicplottingthatthisisuseful.
Thedefaultcolorsrangefromredtowhite(heat.colors)andarenotpretty.Considerusingenhancementssuchasthe
RColorBrewer
package,
http:
//cran.r-project.org/src/contrib/PACKAGES.html#RColorBrewer
toselectbettercolors.
Bydefaultfourcomponentswillbedisplayedintheplot.Atthetopleftisthecolorkey,toprightisthecolumndendogram,bottomleftistherowdendogram,bottomrightistheimageplot.WhenRowSideColororColSideColorareprovided,anadditionalroworcolumnisinsertedintheappropriatelocation.Thislayoutcanbeoverridenbyspecifiyingappropriatevaluesfor
lmat,
lwid,and
lhei.
lmat
controlstherelativepostitionofeachelement,while
lwid
controlsthecolumnwidth,and
lhei
controlstherowheight.Seethehelppagefor
layout
fordetailsonhowtousethesearguments.
Value
Invisibly,alistwithcomponents
rowInd
rowindexpermutationvectorasreturnedby
order.dendrogram.
colInd
columnindexpermutationvector.
call
thematchedcall
rowMeans,rowSDs
meanandstandarddeviationofeachrow:
onlypresentif
colMeans,colSDs
meanandstandarddeviationofeachcolumn:
carpet
reorderedandscaled'
x'
valuesusedgeneratethemain'
carpet'
rowDendrogram
rowdendrogram,ifpresent
colDendrogram
columndendrogram,ifpresent
valuesusedforcolorbreakpoints
colorsused
vline
center-linevalueusedforcolumntrace,presentonlyif
trace="
hline
center-linevalueusedforrowtrace,presentonlyif
colorTable
Athree-columndataframeprovidingthelowerandupperboundandcolorforeachbin
Note
Theoriginalrowsandcolumnsarereordered
inanycase
tomatchthedendrogram,e.g.,therowsby
order.dendrogram(Rowv)
isthe(possibly
reorder()ed)rowdendrogram.
heatmap.2()
uses
anddrawsthe
image
inthelowerrightcornerofa2x2layout.Consequentially,itcan
not
beused
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 语言heatmap2 说明书 语言 heatmap2
![提示](https://static.bdocx.com/images/bang_tan.gif)