美文网首页
工具合集

工具合集

作者: F_U_N | 来源:发表于2019-12-10 09:45 被阅读0次

    1.热图 

    r package ComplexHeatmap 

    https://github.com/jokergoo/ComplexHeatmap

    install

    if(!requireNamespace("BiocManager",quietly=TRUE)) 

    install.packages("BiocManager")BiocManager::install("ComplexHeatmap")

    library(devtools)996

    install_github("jokergoo/ComplexHeatmap")

    usage

    Make a single heatmap:

    Heatmap(mat,...)

    A single Heatmap with column annotations:

    ha=HeatmapAnnotation(df=anno1,anno_fun=anno2,...)Heatmap(mat,...,top_annotation=ha)

    Make a list of heatmaps:

    Heatmap(mat1,...)+Heatmap(mat2,...)

    Make a list of heatmaps and row annotations:

    ha=HeatmapAnnotation(df=anno1,anno_fun=anno2,...,which="row")Heatmap(mat1,...)+Heatmap(mat2,...)+ha

    R package superheat

    install

    install.packages("devtools")

    devtools::install_github("rlbarter/superheat")

    usage

    superheat(mtcars,

              # normalize variables

              scale = T,

              # order rows/cols based on heirarchical clustering

              pretty.order.rows = TRUE,

              pretty.order.cols = TRUE,

              # plot miles per gallon next to the rows

              yr = mtcars$mpg,

              yr.axis.name = "miles per gallon",

              # plot correlation with mpg above columns

              yt = cor(mtcars)[, "mpg"],

              yt.plot.type = "bar",

              yt.axis.name = "correlation with mpg",

              # increase size of left labels

              left.label.size = 0.45)

    相关文章

      网友评论

          本文标题:工具合集

          本文链接:https://www.haomeiwen.com/subject/wcpwgctx.html