首次上传

This commit is contained in:
freefire 2025-01-12 00:52:51 +08:00
parent 9c6c133d4c
commit 8b0f368c7e
8527 changed files with 1043695 additions and 0 deletions

8
default.aproj Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<project ver="10" name="CircosHeatmap-aardio" libEmbed="true" icon="..." ui="win" output="CircosHeatmap-aardio.exe" CompanyName="单位名称" FileDescription="CircosHeatmap-aardio" LegalCopyright="Copyright (C) 作者 2025" ProductName="CircosHeatmap-aardio" InternalName="CircosHeatmap-aardio" FileVersion="0.0.0.7" ProductVersion="0.0.0.7" publishDir="/dist/" dstrip="true">
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
<folder name="资源文件" path="res" embed="true" local="false" ignored="false">
<file name="heatmap_script.R" path="res\heatmap_script.R" comment="res\heatmap_script.R"/>
</folder>
<folder name="窗体文件" path="dlg" comment="目录" embed="true"/>
</project>

BIN
dist/CircosHeatmap-aardio.exe vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,14 @@
citEntry(entry="Article",
author = "Huber, W. and Carey, V. J. and Gentleman, R. and Anders, S. and Carlson, M. and Carvalho, B. S. and Bravo, H. C. and Davis, S. and Gatto, L. and Girke, T. and Gottardo, R. and Hahne, F. and Hansen, K. D. and Irizarry, R. A. and Lawrence, M. and Love, M. I. and MacDonald, J. and Obenchain, V. and {Ole\'s}, A. K. and {Pag\`es}, H. and Reyes, A. and Shannon, P. and Smyth, G. K. and Tenenbaum, D. and Waldron, L. and Morgan, M. ",
title = "{O}rchestrating high-throughput genomic analysis with {B}ioconductor",
journal = "Nature Methods",
year = "2015",
volume = "12",
number = "2",
pages = "115--121",
url = "http://www.nature.com/nmeth/journal/v12/n2/full/nmeth.3252.html",
textVersion = paste(
"Orchestrating high-throughput genomic analysis with Bioconductor.",
"W. Huber, V.J. Carey, R. Gentleman, ..., M. Morgan",
"Nature Methods, 2015:12, 115.")
)

View File

@ -0,0 +1,39 @@
Package: BiocGenerics
Title: S4 generic functions used in Bioconductor
Description: The package defines many S4 generic functions used in Bioconductor.
biocViews: Infrastructure
URL: https://bioconductor.org/packages/BiocGenerics
BugReports: https://github.com/Bioconductor/BiocGenerics/issues
Version: 0.52.0
License: Artistic-2.0
Encoding: UTF-8
Author: The Bioconductor Dev Team
Maintainer: Hervé Pagès <hpages.on.github@gmail.com>
Depends: R (>= 4.0.0), methods, utils, graphics, stats
Imports: methods, utils, graphics, stats
Suggests: Biobase, S4Vectors, IRanges, S4Arrays, SparseArray,
DelayedArray, HDF5Array, GenomicRanges, pwalign, Rsamtools,
AnnotationDbi, affy, affyPLM, DESeq2, flowClust, MSnbase,
annotate, RUnit
Collate: S3-classes-as-S4-classes.R utils.R normarg-utils.R
replaceSlots.R aperm.R append.R as.data.frame.R as.list.R
as.vector.R cbind.R do.call.R duplicated.R eval.R Extremes.R
format.R funprog.R get.R grep.R is.unsorted.R lapply.R mapply.R
match.R mean.R nrow.R order.R paste.R rank.R rep.R
row_colnames.R saveRDS.R sets.R sort.R start.R subset.R t.R
table.R tapply.R unique.R unlist.R unsplit.R relist.R var.R
which.R which.min.R boxplot.R image.R density.R IQR.R mad.R
residuals.R weights.R xtabs.R annotation.R combine.R
containsOutOfMemoryData.R dbconn.R dge.R dims.R fileName.R
normalize.R Ontology.R organism_species.R path.R plotMA.R
plotPCA.R score.R strand.R toTable.R type.R updateObject.R
testPackage.R zzz.R
git_url: https://git.bioconductor.org/packages/BiocGenerics
git_branch: RELEASE_3_20
git_last_commit: 1422115
git_last_commit_date: 2024-10-29
Repository: Bioconductor 3.20
Date/Publication: 2024-10-29
NeedsCompilation: no
Packaged: 2024-10-30 01:20:48 UTC; biocbuild
Built: R 4.4.1; ; 2024-10-30 15:29:27 UTC; windows

View File

@ -0,0 +1,84 @@
BiocGenerics-package S4 generic functions for Bioconductor
Extremes Maxima and minima
IQR The Interquartile Range
Ontology Generic Ontology getter
S3-classes-as-S4-classes
S3 classes as S4 classes
annotation Accessing annotation information
aperm Transposing an array-like object
append Append elements to a vector-like object
as.data.frame Coerce to a data frame
as.list Coerce to a list
as.vector Coerce an object into a vector
boxplot Box plots
cbind Combine objects by rows or columns
combine Combining or merging different Bioconductor
data structures
containsOutOfMemoryData
Does an object contain out-of-memory data?
dbconn Accessing SQLite DB information
density Kernel density estimation
dge Accessors and generic functions used in the
context of count datasets
dims Get the dimensions of each element of a
list-like object
do.call Execute a function call
duplicated Determine duplicate elements
eval Evaluate an (unevaluated) expression
evalq Evaluate an (unevaluated) expression
fileName Accessing the file name of an object
format Format an R object for pretty printing
funprog Common higher-order functions in functional
programming languages
get Return the value of a named object
grep Pattern Matching and Replacement
image Display a color image
is.unsorted Test if a vector-like object is not sorted
lapply Apply a function over a list-like or
vector-like object
mad Median Absolute Deviation
mapply Apply a function to multiple list-like or
vector-like arguments
match Value matching
mean Arithmetic Mean
normalize Normalize an object
nrow The number of rows/columns of an array-like
object
order Ordering permutation
organism_species Organism and species accessors
paste Concatenate strings
path Accessing the path of an object
plotMA MA-plot: plot differences versus averages for
high-throughput data
plotPCA PCA-plot: Principal Component Analysis plot
rank Ranks the values in a vector-like object
relist Re-listing an unlist()ed object
rep.int Replicate elements of a vector-like object
residuals Extract model residuals
row+colnames Row and column names
saveRDS The saveRDS() S4 generic and default method
score Score accessor
sets Set operations
sort Sorting a vector-like object
start The start(), end(), width(), and pos() generic
getters and setters
strand Accessing strand information
subset Subsetting vector-like, matrix-like and
data-frame-like objects
t Matrix Transpose
table Cross tabulation and table creation
tapply Apply a function over a ragged array
testPackage Run RUnit package unit tests
toTable An alternative to as.data.frame()
type Accessing the type of an object
unique Extract unique elements
unlist Flatten list-like objects
unsplit Unsplit a list-like object
updateObject Update an object to its current class
definition
var Variance and Standard Deviation
weights Extract model weights
which Which values in an object are considered TRUE?
which.min What's the index of the first min or max value
in an object?
xtabs Cross tabulation

View File

@ -0,0 +1,28 @@
ca8bf9c853be62cedb466264331554a5 *CITATION
f43f4a38aed5dd4cf59e120fe8375991 *DESCRIPTION
a179930d147dd3a32f883069cb2883c5 *INDEX
7779408c04a62030e33e537216e04610 *Meta/Rd.rds
6e92f4cce1a21912f8cb6b1ee6c329b7 *Meta/features.rds
733f82437ddf135e5a4d65fa343caf73 *Meta/hsearch.rds
d044fbc97e3c3b168a39cdd26fc56205 *Meta/links.rds
e29ad65f34ebed50a5b302836545e73e *Meta/nsInfo.rds
eb8de8194a0979e1e1d16c2ff88987a8 *Meta/package.rds
69505178e22f755a5677b1a4a46da0f8 *NAMESPACE
08fc38a5bf918070beea9088ee38564d *NEWS
d6c68f1fe41ced6e98a766a3757313da *R/BiocGenerics
34cf26a643606807b2fc262b78f29345 *R/BiocGenerics.rdb
515bcf28b7c9c3aeee94a87dc197d227 *R/BiocGenerics.rdx
3a603d73c45bc6bd1f745c0b71e7abb9 *help/AnIndex
a7d8984d0750ea87885f2203a6acd8e8 *help/BiocGenerics.rdb
cb0b532ae9998f2896542bd803ef357b *help/BiocGenerics.rdx
4d6058b2b5851de87746f458159a92a6 *help/aliases.rds
30dccd129bc2b9a6e8c7b3b9ecd600be *help/paths.rds
ab9f25a980dfc1bc18298ec03599ab40 *html/00Index.html
8b9362669af13540a86a3ac6cf22f99d *html/R.css
aab5482e54dd36b75d53bc2adedb6636 *unitTests/test_Extremes.R
f94f6eff0c46ad6027d81048db34c342 *unitTests/test_combine.R
d78e06196029cdf5e81f17da1b4e176f *unitTests/test_format.R
293648c4c0692f827ff0848220ac7a34 *unitTests/test_mapply.R
d0b33c463b1210735c2d38d6af418352 *unitTests/test_order.R
49782f19fb56a2571f51bf136cd08392 *unitTests/test_paste.R
48eb62f3e70c10d67ac2c06f6367d46e *unitTests/test_updateObject.R

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,295 @@
import(methods)
import(utils)
import(graphics)
import(stats)
exportClasses(
## from R/S3-classes-as-S4-classes.R:
connection,
file, url, gzfile, bzfile, unz, pipe,
fifo, sockconn, terminal, textConnection,
gzcon,
character_OR_connection,
AsIs,
#table, xtabs,
dist,
## from R/containsOutOfMemoryData.R:
OutOfMemoryObject
)
### ==========================================================================
### Export functions defined in base R and explicitly promoted to generics in
### the BiocGenerics package
### --------------------------------------------------------------------------
### Generics for functions defined in package base:
export(
## from R/aperm.R:
aperm,
## from R/append.R:
append,
## from R/as.data.frame.R:
as.data.frame,
## from R/as.list.R:
as.list,
## from R/as.vector.R:
as.vector,
## from R/cbind.R:
rbind, cbind,
## from R/do.call.R:
do.call,
## from R/duplicated.R:
duplicated, anyDuplicated,
## from R/eval.R:
eval, evalq,
## from R/Extremes.R:
pmax, pmin, pmax.int, pmin.int,
## from R/format.R:
format,
## from R/funprog.R:
Reduce, Filter, Find, Map, Position,
## from R/get.R:
get, mget,
## from R/grepl.R:
grep, grepl,
## from R/is.unsorted.R:
is.unsorted,
## from R/lapply.R:
lapply, sapply,
## from R/mapply.R:
mapply,
## from R/match.R:
match, "%in%",
## from R/mean.R:
mean,
## from R/nrow.R:
nrow, ncol, NROW, NCOL,
## from R/order.R:
order,
## from R/paste.R:
paste,
## from R/rank.R:
rank,
## from R/rep.R:
rep.int,
## from R/row_colnames.R:
rownames, "rownames<-", colnames, "colnames<-",
## from R/saveRDS.R:
saveRDS,
## from R/sets.R:
union, intersect, setdiff,
## from R/sort.R:
sort,
## from R/start.R:
start, "start<-",
end, "end<-",
width, "width<-",
pos,
## from R/subset.R:
subset,
## from R/t.R:
t,
## from R/table.R:
table,
## from R/tapply.R:
tapply,
## from R/unique.R:
unique,
## from R/unlist.R:
unlist,
## from R/unsplit.R:
unsplit,
## from R/which.R:
which,
## from R/which.min.R:
which.min, which.max
)
S3method(format, list)
export(format.list)
### Generics for functions defined in package utils:
export(
## from R/relist.R:
relist
)
### Generics for functions defined in package graphics:
export(
## from R/boxplot.R:
boxplot,
## from R/image.R:
image
)
### Generics for functions defined in package stats:
export(
## from R/density.R:
density,
## from R/IQR.R:
IQR,
## from R/mad.R:
mad,
## from R/residuals.R:
residuals,
## from R/var.R:
var, sd,
## from R/weights.R:
weights,
## from R/xtabs.R:
xtabs
)
### ==========================================================================
### Export Bioconductor specific generics and their methods
### --------------------------------------------------------------------------
export(
## from R/annotation.R:
annotation, "annotation<-",
## from R/combine.R:
combine,
## from R/containsOutOfMemoryData.R:
containsOutOfMemoryData,
## from R/dbconn.R:
dbconn, dbfile,
## from R/dge.R:
counts, "counts<-",
design, "design<-",
dispTable, "dispTable<-",
sizeFactors, "sizeFactors<-",
conditions, "conditions<-",
estimateSizeFactors,
estimateDispersions,
plotDispEsts,
## from R/dims.R:
dims, nrows, ncols,
## from R/fileName.R:
fileName,
## from R/normalize.R:
normalize,
## from R/Ontology.R:
Ontology,
## from R/organism_species.R:
organism, "organism<-",
species, "species<-",
## from R/path.R:
path, "path<-",
basename, "basename<-",
dirname, "dirname<-",
## from R/plotMA.R:
plotMA,
## from R/plotPCA.R:
plotPCA,
## from R/score.R:
score, "score<-",
## from R/strand.R:
strand, "strand<-", invertStrand,
## from R/toTable.R:
toTable,
## from R/type.R:
type, "type<-",
## from R/updateObject.R:
updateObject,
updateObjectFromSlots,
getObjectSlots
)
exportMethods(
## from R/combine.R:
combine,
## from R/containsOutOfMemoryData.R:
containsOutOfMemoryData,
## from R/path.R:
basename, "basename<-",
dirname, "dirname<-",
## from R/plotMA.R:
plotMA,
## from R/strand.R:
invertStrand,
## from R/type.R:
type, "type<-",
## from R/updateObject.R:
updateObject
)
### ==========================================================================
### Export non-generic functions
### --------------------------------------------------------------------------
export(
## from R/strand.R:
unstrand
)

View File

@ -0,0 +1,14 @@
CHANGES IN VERSION 0.52.0
-------------------------
NEW FEATURES
o Define the OutOfMemoryObject class (VIRTUAL class with no slots).
o Add S4 generic containsOutOfMemoryData() and implement various methods.
See '?containsOutOfMemoryData' for the details.
o Add S4 generic saveRDS() and a default method that is just a thin wrapper
around base::saveRDS() that issues a warning if the object to serialize
contains out-of-memory data.

View File

@ -0,0 +1,27 @@
# File share/R/nspackloader.R
# Part of the R package, https://www.R-project.org
#
# Copyright (C) 1995-2012 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# A copy of the GNU General Public License is available at
# https://www.r-project.org/Licenses/
local({
info <- loadingNamespaceInfo()
pkg <- info$pkgname
ns <- .getNamespace(as.name(pkg))
if (is.null(ns))
stop("cannot find namespace environment for ", pkg, domain = NA);
dbbase <- file.path(info$libname, pkg, "R", pkg)
lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
})

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,183 @@
BiocGenerics-package BiocGenerics-package
%in% match
annotation annotation
annotation<- annotation
anyDuplicated duplicated
aperm aperm
append append
as.data.frame as.data.frame
as.list as.list
as.vector as.vector
AsIs-class S3-classes-as-S4-classes
basename path
basename,ANY-method path
basename<- path
basename<-,ANY-method path
basename<-,character-method path
BiocGenerics BiocGenerics-package
boxplot boxplot
bzfile-class S3-classes-as-S4-classes
cbind cbind
character_OR_connection-class S3-classes-as-S4-classes
class:OutOfMemoryObject containsOutOfMemoryData
colnames row_colnames
colnames<- row_colnames
combine combine
combine,ANY,missing-method combine
combine,data.frame,data.frame-method combine
combine,matrix,matrix-method combine
conditions dge
conditions<- dge
connection-class S3-classes-as-S4-classes
containsOutOfMemoryData containsOutOfMemoryData
containsOutOfMemoryData,ANY-method containsOutOfMemoryData
containsOutOfMemoryData,environment-method containsOutOfMemoryData
containsOutOfMemoryData,list-method containsOutOfMemoryData
containsOutOfMemoryData,OutOfMemoryObject-method containsOutOfMemoryData
counts dge
counts<- dge
dbconn dbconn
dbfile dbconn
density density
design dge
design<- dge
dge dge
dims dims
dirname path
dirname,ANY-method path
dirname<- path
dirname<-,ANY-method path
dirname<-,character-method path
dispTable dge
dispTable<- dge
dist-class S3-classes-as-S4-classes
do.call do.call
duplicated duplicated
end start
end<- start
estimateDispersions dge
estimateSizeFactors dge
eval eval
evalq evalq
Extremes Extremes
fifo-class S3-classes-as-S4-classes
file-class S3-classes-as-S4-classes
fileName fileName
Filter funprog
Find funprog
format format
format.list format
funprog funprog
get get
getObjectSlots updateObject
grep grep
grepl grep
gzcon-class S3-classes-as-S4-classes
gzfile-class S3-classes-as-S4-classes
image image
intersect sets
invertStrand strand
invertStrand,ANY-method strand
IQR IQR
is.unsorted is.unsorted
lapply lapply
mad mad
Map funprog
mapply mapply
match match
mean mean
mget get
NCOL nrow
ncol nrow
ncols dims
normalize normalize
NROW nrow
nrow nrow
nrows dims
Ontology Ontology
order order
organism organism_species
organism<- organism_species
organism_species organism_species
OutOfMemoryObject containsOutOfMemoryData
OutOfMemoryObject-class containsOutOfMemoryData
paste paste
path path
path<- path
pipe-class S3-classes-as-S4-classes
plotDispEsts dge
plotMA plotMA
plotMA,ANY-method plotMA
plotPCA plotPCA
pmax Extremes
pmax.int Extremes
pmin Extremes
pmin.int Extremes
pos start
Position funprog
rank rank
rbind cbind
Reduce funprog
relist relist
rep.int rep
residuals residuals
row+colnames row_colnames
rownames row_colnames
rownames<- row_colnames
S3-classes-as-S4-classes S3-classes-as-S4-classes
sapply lapply
saveRDS saveRDS
saveRDS,ANY-method saveRDS
score score
score<- score
sd var
setdiff sets
sets sets
sizeFactors dge
sizeFactors<- dge
sockconn-class S3-classes-as-S4-classes
sort sort
species organism_species
species<- organism_species
start start
start<- start
strand strand
strand<- strand
subset subset
t t
table table
tapply tapply
terminal-class S3-classes-as-S4-classes
testPackage testPackage
textConnection-class S3-classes-as-S4-classes
toTable toTable
type type
type,array-method type
type,data.frame-method type
type,factor-method type
type,vector-method type
type<- type
type<-,array-method type
type<-,vector-method type
union sets
unique unique
unlist unlist
unsplit unsplit
unstrand strand
unz-class S3-classes-as-S4-classes
updateObject updateObject
updateObject,ANY-method updateObject
updateObject,environment-method updateObject
updateObject,envRefClass-method updateObject
updateObject,formula-method updateObject
updateObject,list-method updateObject
updateObjectFromSlots updateObject
url-class S3-classes-as-S4-classes
var var
weights weights
which which
which.max which.min
which.min which.min
width start
width<- start
xtabs xtabs

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,492 @@
<!DOCTYPE html>
<html>
<head><title>R: S4 generic functions used in Bioconductor</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body><div class="container">
<h1> S4 generic functions used in Bioconductor
<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
</h1>
<hr/>
<div style="text-align: center;">
<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
</div><h2>Documentation for package &lsquo;BiocGenerics&rsquo; version 0.52.0</h2>
<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
<li><a href="../NEWS">Package NEWS</a>.</li>
</ul>
<h2>Help Pages</h2>
<p style="text-align: center;">
<a href="# "> </a>
<a href="#A">A</a>
<a href="#B">B</a>
<a href="#C">C</a>
<a href="#D">D</a>
<a href="#E">E</a>
<a href="#F">F</a>
<a href="#G">G</a>
<a href="#I">I</a>
<a href="#L">L</a>
<a href="#M">M</a>
<a href="#N">N</a>
<a href="#O">O</a>
<a href="#P">P</a>
<a href="#R">R</a>
<a href="#S">S</a>
<a href="#T">T</a>
<a href="#U">U</a>
<a href="#V">V</a>
<a href="#W">W</a>
<a href="#X">X</a>
<a href="#misc">misc</a>
</p>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="BiocGenerics-package.html">BiocGenerics-package</a></td>
<td>S4 generic functions for Bioconductor</td></tr>
</table>
<h2><a id="A">-- A --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="annotation.html">annotation</a></td>
<td>Accessing annotation information</td></tr>
<tr><td style="width: 25%;"><a href="annotation.html">annotation&lt;-</a></td>
<td>Accessing annotation information</td></tr>
<tr><td style="width: 25%;"><a href="duplicated.html">anyDuplicated</a></td>
<td>Determine duplicate elements</td></tr>
<tr><td style="width: 25%;"><a href="aperm.html">aperm</a></td>
<td>Transposing an array-like object</td></tr>
<tr><td style="width: 25%;"><a href="append.html">append</a></td>
<td>Append elements to a vector-like object</td></tr>
<tr><td style="width: 25%;"><a href="as.data.frame.html">as.data.frame</a></td>
<td>Coerce to a data frame</td></tr>
<tr><td style="width: 25%;"><a href="as.list.html">as.list</a></td>
<td>Coerce to a list</td></tr>
<tr><td style="width: 25%;"><a href="as.vector.html">as.vector</a></td>
<td>Coerce an object into a vector</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">AsIs-class</a></td>
<td>S3 classes as S4 classes</td></tr>
</table>
<h2><a id="B">-- B --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="path.html">basename</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="path.html">basename-method</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="path.html">basename&lt;-</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="path.html">basename&lt;--method</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="BiocGenerics-package.html">BiocGenerics</a></td>
<td>S4 generic functions for Bioconductor</td></tr>
<tr><td style="width: 25%;"><a href="boxplot.html">boxplot</a></td>
<td>Box plots</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">bzfile-class</a></td>
<td>S3 classes as S4 classes</td></tr>
</table>
<h2><a id="C">-- C --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="cbind.html">cbind</a></td>
<td>Combine objects by rows or columns</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">character_OR_connection-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="containsOutOfMemoryData.html">class:OutOfMemoryObject</a></td>
<td>Does an object contain out-of-memory data?</td></tr>
<tr><td style="width: 25%;"><a href="row_colnames.html">colnames</a></td>
<td>Row and column names</td></tr>
<tr><td style="width: 25%;"><a href="row_colnames.html">colnames&lt;-</a></td>
<td>Row and column names</td></tr>
<tr><td style="width: 25%;"><a href="combine.html">combine</a></td>
<td>Combining or merging different Bioconductor data structures</td></tr>
<tr><td style="width: 25%;"><a href="combine.html">combine-method</a></td>
<td>Combining or merging different Bioconductor data structures</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">conditions</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">conditions&lt;-</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">connection-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="containsOutOfMemoryData.html">containsOutOfMemoryData</a></td>
<td>Does an object contain out-of-memory data?</td></tr>
<tr><td style="width: 25%;"><a href="containsOutOfMemoryData.html">containsOutOfMemoryData-method</a></td>
<td>Does an object contain out-of-memory data?</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">counts</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">counts&lt;-</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
</table>
<h2><a id="D">-- D --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="dbconn.html">dbconn</a></td>
<td>Accessing SQLite DB information</td></tr>
<tr><td style="width: 25%;"><a href="dbconn.html">dbfile</a></td>
<td>Accessing SQLite DB information</td></tr>
<tr><td style="width: 25%;"><a href="density.html">density</a></td>
<td>Kernel density estimation</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">design</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">design&lt;-</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">dge</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="dims.html">dims</a></td>
<td>Get the dimensions of each element of a list-like object</td></tr>
<tr><td style="width: 25%;"><a href="path.html">dirname</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="path.html">dirname-method</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="path.html">dirname&lt;-</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="path.html">dirname&lt;--method</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">dispTable</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">dispTable&lt;-</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">dist-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="do.call.html">do.call</a></td>
<td>Execute a function call</td></tr>
<tr><td style="width: 25%;"><a href="duplicated.html">duplicated</a></td>
<td>Determine duplicate elements</td></tr>
</table>
<h2><a id="E">-- E --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="start.html">end</a></td>
<td>The start(), end(), width(), and pos() generic getters and setters</td></tr>
<tr><td style="width: 25%;"><a href="start.html">end&lt;-</a></td>
<td>The start(), end(), width(), and pos() generic getters and setters</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">estimateDispersions</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">estimateSizeFactors</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="eval.html">eval</a></td>
<td>Evaluate an (unevaluated) expression</td></tr>
<tr><td style="width: 25%;"><a href="evalq.html">evalq</a></td>
<td>Evaluate an (unevaluated) expression</td></tr>
<tr><td style="width: 25%;"><a href="Extremes.html">Extremes</a></td>
<td>Maxima and minima</td></tr>
</table>
<h2><a id="F">-- F --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">fifo-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">file-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="fileName.html">fileName</a></td>
<td>Accessing the file name of an object</td></tr>
<tr><td style="width: 25%;"><a href="funprog.html">Filter</a></td>
<td>Common higher-order functions in functional programming languages</td></tr>
<tr><td style="width: 25%;"><a href="funprog.html">Find</a></td>
<td>Common higher-order functions in functional programming languages</td></tr>
<tr><td style="width: 25%;"><a href="format.html">format</a></td>
<td>Format an R object for pretty printing</td></tr>
<tr><td style="width: 25%;"><a href="format.html">format.list</a></td>
<td>Format an R object for pretty printing</td></tr>
<tr><td style="width: 25%;"><a href="funprog.html">funprog</a></td>
<td>Common higher-order functions in functional programming languages</td></tr>
</table>
<h2><a id="G">-- G --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="get.html">get</a></td>
<td>Return the value of a named object</td></tr>
<tr><td style="width: 25%;"><a href="updateObject.html">getObjectSlots</a></td>
<td>Update an object to its current class definition</td></tr>
<tr><td style="width: 25%;"><a href="grep.html">grep</a></td>
<td>Pattern Matching and Replacement</td></tr>
<tr><td style="width: 25%;"><a href="grep.html">grepl</a></td>
<td>Pattern Matching and Replacement</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">gzcon-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">gzfile-class</a></td>
<td>S3 classes as S4 classes</td></tr>
</table>
<h2><a id="I">-- I --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="image.html">image</a></td>
<td>Display a color image</td></tr>
<tr><td style="width: 25%;"><a href="sets.html">intersect</a></td>
<td>Set operations</td></tr>
<tr><td style="width: 25%;"><a href="strand.html">invertStrand</a></td>
<td>Accessing strand information</td></tr>
<tr><td style="width: 25%;"><a href="strand.html">invertStrand-method</a></td>
<td>Accessing strand information</td></tr>
<tr><td style="width: 25%;"><a href="IQR.html">IQR</a></td>
<td>The Interquartile Range</td></tr>
<tr><td style="width: 25%;"><a href="is.unsorted.html">is.unsorted</a></td>
<td>Test if a vector-like object is not sorted</td></tr>
</table>
<h2><a id="L">-- L --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="lapply.html">lapply</a></td>
<td>Apply a function over a list-like or vector-like object</td></tr>
</table>
<h2><a id="M">-- M --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="mad.html">mad</a></td>
<td>Median Absolute Deviation</td></tr>
<tr><td style="width: 25%;"><a href="funprog.html">Map</a></td>
<td>Common higher-order functions in functional programming languages</td></tr>
<tr><td style="width: 25%;"><a href="mapply.html">mapply</a></td>
<td>Apply a function to multiple list-like or vector-like arguments</td></tr>
<tr><td style="width: 25%;"><a href="match.html">match</a></td>
<td>Value matching</td></tr>
<tr><td style="width: 25%;"><a href="mean.html">mean</a></td>
<td>Arithmetic Mean</td></tr>
<tr><td style="width: 25%;"><a href="get.html">mget</a></td>
<td>Return the value of a named object</td></tr>
</table>
<h2><a id="N">-- N --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="nrow.html">NCOL</a></td>
<td>The number of rows/columns of an array-like object</td></tr>
<tr><td style="width: 25%;"><a href="nrow.html">ncol</a></td>
<td>The number of rows/columns of an array-like object</td></tr>
<tr><td style="width: 25%;"><a href="dims.html">ncols</a></td>
<td>Get the dimensions of each element of a list-like object</td></tr>
<tr><td style="width: 25%;"><a href="normalize.html">normalize</a></td>
<td>Normalize an object</td></tr>
<tr><td style="width: 25%;"><a href="nrow.html">NROW</a></td>
<td>The number of rows/columns of an array-like object</td></tr>
<tr><td style="width: 25%;"><a href="nrow.html">nrow</a></td>
<td>The number of rows/columns of an array-like object</td></tr>
<tr><td style="width: 25%;"><a href="dims.html">nrows</a></td>
<td>Get the dimensions of each element of a list-like object</td></tr>
</table>
<h2><a id="O">-- O --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="Ontology.html">Ontology</a></td>
<td>Generic Ontology getter</td></tr>
<tr><td style="width: 25%;"><a href="order.html">order</a></td>
<td>Ordering permutation</td></tr>
<tr><td style="width: 25%;"><a href="organism_species.html">organism</a></td>
<td>Organism and species accessors</td></tr>
<tr><td style="width: 25%;"><a href="organism_species.html">organism&lt;-</a></td>
<td>Organism and species accessors</td></tr>
<tr><td style="width: 25%;"><a href="organism_species.html">organism_species</a></td>
<td>Organism and species accessors</td></tr>
<tr><td style="width: 25%;"><a href="containsOutOfMemoryData.html">OutOfMemoryObject</a></td>
<td>Does an object contain out-of-memory data?</td></tr>
<tr><td style="width: 25%;"><a href="containsOutOfMemoryData.html">OutOfMemoryObject-class</a></td>
<td>Does an object contain out-of-memory data?</td></tr>
</table>
<h2><a id="P">-- P --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="paste.html">paste</a></td>
<td>Concatenate strings</td></tr>
<tr><td style="width: 25%;"><a href="path.html">path</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="path.html">path&lt;-</a></td>
<td>Accessing the path of an object</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">pipe-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">plotDispEsts</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="plotMA.html">plotMA</a></td>
<td>MA-plot: plot differences versus averages for high-throughput data</td></tr>
<tr><td style="width: 25%;"><a href="plotMA.html">plotMA-method</a></td>
<td>MA-plot: plot differences versus averages for high-throughput data</td></tr>
<tr><td style="width: 25%;"><a href="plotPCA.html">plotPCA</a></td>
<td>PCA-plot: Principal Component Analysis plot</td></tr>
<tr><td style="width: 25%;"><a href="Extremes.html">pmax</a></td>
<td>Maxima and minima</td></tr>
<tr><td style="width: 25%;"><a href="Extremes.html">pmax.int</a></td>
<td>Maxima and minima</td></tr>
<tr><td style="width: 25%;"><a href="Extremes.html">pmin</a></td>
<td>Maxima and minima</td></tr>
<tr><td style="width: 25%;"><a href="Extremes.html">pmin.int</a></td>
<td>Maxima and minima</td></tr>
<tr><td style="width: 25%;"><a href="start.html">pos</a></td>
<td>The start(), end(), width(), and pos() generic getters and setters</td></tr>
<tr><td style="width: 25%;"><a href="funprog.html">Position</a></td>
<td>Common higher-order functions in functional programming languages</td></tr>
</table>
<h2><a id="R">-- R --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="rank.html">rank</a></td>
<td>Ranks the values in a vector-like object</td></tr>
<tr><td style="width: 25%;"><a href="cbind.html">rbind</a></td>
<td>Combine objects by rows or columns</td></tr>
<tr><td style="width: 25%;"><a href="funprog.html">Reduce</a></td>
<td>Common higher-order functions in functional programming languages</td></tr>
<tr><td style="width: 25%;"><a href="relist.html">relist</a></td>
<td>Re-listing an unlist()ed object</td></tr>
<tr><td style="width: 25%;"><a href="rep.html">rep.int</a></td>
<td>Replicate elements of a vector-like object</td></tr>
<tr><td style="width: 25%;"><a href="residuals.html">residuals</a></td>
<td>Extract model residuals</td></tr>
<tr><td style="width: 25%;"><a href="row_colnames.html">row+colnames</a></td>
<td>Row and column names</td></tr>
<tr><td style="width: 25%;"><a href="row_colnames.html">rownames</a></td>
<td>Row and column names</td></tr>
<tr><td style="width: 25%;"><a href="row_colnames.html">rownames&lt;-</a></td>
<td>Row and column names</td></tr>
</table>
<h2><a id="S">-- S --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">S3-classes-as-S4-classes</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="lapply.html">sapply</a></td>
<td>Apply a function over a list-like or vector-like object</td></tr>
<tr><td style="width: 25%;"><a href="saveRDS.html">saveRDS</a></td>
<td>The saveRDS() S4 generic and default method</td></tr>
<tr><td style="width: 25%;"><a href="saveRDS.html">saveRDS-method</a></td>
<td>The saveRDS() S4 generic and default method</td></tr>
<tr><td style="width: 25%;"><a href="score.html">score</a></td>
<td>Score accessor</td></tr>
<tr><td style="width: 25%;"><a href="score.html">score&lt;-</a></td>
<td>Score accessor</td></tr>
<tr><td style="width: 25%;"><a href="var.html">sd</a></td>
<td>Variance and Standard Deviation</td></tr>
<tr><td style="width: 25%;"><a href="sets.html">setdiff</a></td>
<td>Set operations</td></tr>
<tr><td style="width: 25%;"><a href="sets.html">sets</a></td>
<td>Set operations</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">sizeFactors</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="dge.html">sizeFactors&lt;-</a></td>
<td>Accessors and generic functions used in the context of count datasets</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">sockconn-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="sort.html">sort</a></td>
<td>Sorting a vector-like object</td></tr>
<tr><td style="width: 25%;"><a href="organism_species.html">species</a></td>
<td>Organism and species accessors</td></tr>
<tr><td style="width: 25%;"><a href="organism_species.html">species&lt;-</a></td>
<td>Organism and species accessors</td></tr>
<tr><td style="width: 25%;"><a href="start.html">start</a></td>
<td>The start(), end(), width(), and pos() generic getters and setters</td></tr>
<tr><td style="width: 25%;"><a href="start.html">start&lt;-</a></td>
<td>The start(), end(), width(), and pos() generic getters and setters</td></tr>
<tr><td style="width: 25%;"><a href="strand.html">strand</a></td>
<td>Accessing strand information</td></tr>
<tr><td style="width: 25%;"><a href="strand.html">strand&lt;-</a></td>
<td>Accessing strand information</td></tr>
<tr><td style="width: 25%;"><a href="subset.html">subset</a></td>
<td>Subsetting vector-like, matrix-like and data-frame-like objects</td></tr>
</table>
<h2><a id="T">-- T --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="t.html">t</a></td>
<td>Matrix Transpose</td></tr>
<tr><td style="width: 25%;"><a href="table.html">table</a></td>
<td>Cross tabulation and table creation</td></tr>
<tr><td style="width: 25%;"><a href="tapply.html">tapply</a></td>
<td>Apply a function over a ragged array</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">terminal-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="testPackage.html">testPackage</a></td>
<td>Run RUnit package unit tests</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">textConnection-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="toTable.html">toTable</a></td>
<td>An alternative to as.data.frame()</td></tr>
<tr><td style="width: 25%;"><a href="type.html">type</a></td>
<td>Accessing the type of an object</td></tr>
<tr><td style="width: 25%;"><a href="type.html">type-method</a></td>
<td>Accessing the type of an object</td></tr>
<tr><td style="width: 25%;"><a href="type.html">type&lt;-</a></td>
<td>Accessing the type of an object</td></tr>
<tr><td style="width: 25%;"><a href="type.html">type&lt;--method</a></td>
<td>Accessing the type of an object</td></tr>
</table>
<h2><a id="U">-- U --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="sets.html">union</a></td>
<td>Set operations</td></tr>
<tr><td style="width: 25%;"><a href="unique.html">unique</a></td>
<td>Extract unique elements</td></tr>
<tr><td style="width: 25%;"><a href="unlist.html">unlist</a></td>
<td>Flatten list-like objects</td></tr>
<tr><td style="width: 25%;"><a href="unsplit.html">unsplit</a></td>
<td>Unsplit a list-like object</td></tr>
<tr><td style="width: 25%;"><a href="strand.html">unstrand</a></td>
<td>Accessing strand information</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">unz-class</a></td>
<td>S3 classes as S4 classes</td></tr>
<tr><td style="width: 25%;"><a href="updateObject.html">updateObject</a></td>
<td>Update an object to its current class definition</td></tr>
<tr><td style="width: 25%;"><a href="updateObject.html">updateObject-method</a></td>
<td>Update an object to its current class definition</td></tr>
<tr><td style="width: 25%;"><a href="updateObject.html">updateObjectFromSlots</a></td>
<td>Update an object to its current class definition</td></tr>
<tr><td style="width: 25%;"><a href="S3-classes-as-S4-classes.html">url-class</a></td>
<td>S3 classes as S4 classes</td></tr>
</table>
<h2><a id="V">-- V --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="var.html">var</a></td>
<td>Variance and Standard Deviation</td></tr>
</table>
<h2><a id="W">-- W --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="weights.html">weights</a></td>
<td>Extract model weights</td></tr>
<tr><td style="width: 25%;"><a href="which.html">which</a></td>
<td>Which values in an object are considered TRUE?</td></tr>
<tr><td style="width: 25%;"><a href="which.min.html">which.max</a></td>
<td>What's the index of the first min or max value in an object?</td></tr>
<tr><td style="width: 25%;"><a href="which.min.html">which.min</a></td>
<td>What's the index of the first min or max value in an object?</td></tr>
<tr><td style="width: 25%;"><a href="start.html">width</a></td>
<td>The start(), end(), width(), and pos() generic getters and setters</td></tr>
<tr><td style="width: 25%;"><a href="start.html">width&lt;-</a></td>
<td>The start(), end(), width(), and pos() generic getters and setters</td></tr>
</table>
<h2><a id="X">-- X --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="xtabs.html">xtabs</a></td>
<td>Cross tabulation</td></tr>
</table>
<h2><a id="misc">-- misc --</a></h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="match.html">%in%</a></td>
<td>Value matching</td></tr>
</table>
</div></body></html>

View File

@ -0,0 +1,130 @@
@media screen {
.container {
padding-right: 10px;
padding-left: 10px;
margin-right: auto;
margin-left: auto;
max-width: 900px;
}
}
.rimage img { /* from knitr - for examples and demos */
width: 96%;
margin-left: 2%;
}
.katex { font-size: 1.1em; }
code {
color: inherit;
background: inherit;
}
body {
line-height: 1.4;
background: white;
color: black;
}
a:link {
background: white;
color: blue;
}
a:visited {
background: white;
color: rgb(50%, 0%, 50%);
}
h1 {
background: white;
color: rgb(55%, 55%, 55%);
font-family: monospace;
font-size: 1.4em; /* x-large; */
text-align: center;
}
h2 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-size: 1.2em; /* large; */
text-align: center;
}
h3 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-size: 1.2em; /* large; */
}
h4 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-style: italic;
font-size: 1.2em; /* large; */
}
h5 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
}
h6 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-style: italic;
}
img.toplogo {
width: 4em;
vertical-align: middle;
}
img.arrow {
width: 30px;
height: 30px;
border: 0;
}
span.acronym {
font-size: small;
}
span.env {
font-family: monospace;
}
span.file {
font-family: monospace;
}
span.option{
font-family: monospace;
}
span.pkg {
font-weight: bold;
}
span.samp{
font-family: monospace;
}
div.vignettes a:hover {
background: rgb(85%, 85%, 85%);
}
tr {
vertical-align: top;
}
span.rlang {
font-family: Courier New, Courier;
color: #666666;
}

View File

@ -0,0 +1,14 @@
test_ellipsis_forwarding_for_Extremes <- function()
{
for (FUN in c("pmax", "pmin", "pmax.int", "pmin.int")) {
FUN <- match.fun(FUN)
FUN_wrapper <- function(x, ...) FUN(x, ...)
x <- c(1:3, NA)
y <- c(NA, 3:1)
checkIdentical(FUN(x, y), FUN_wrapper(x, y))
checkIdentical(FUN(x, y, na.rm=FALSE), FUN_wrapper(x, y, na.rm=FALSE))
checkIdentical(FUN(x, y, na.rm=TRUE), FUN_wrapper(x, y, na.rm=TRUE))
}
}

View File

@ -0,0 +1,235 @@
###
checkDataFramesEqual <- function(obj1, obj2)
{
checkTrue(identical(row.names(obj1), row.names(obj2)))
checkTrue(identical(colnames(obj1), colnames(obj2)))
checkTrue(all(sapply(colnames(obj1), function(nm) identical(obj1[[nm]], obj2[[nm]]))))
}
test_combine_df <- function()
{
## no warnings
x <- data.frame(x=1:5,y=letters[1:5], row.names=letters[1:5])
y <- data.frame(z=3:7,y=letters[c(3:5,1:2)], row.names=letters[3:7])
z <- combine(x,y)
checkDataFramesEqual(x, z[1:5, colnames(x)])
checkDataFramesEqual(y, z[3:7, colnames(y)])
x <- data.frame(x=1:2, y=letters[1:2], row.names=letters[1:2])
y <- data.frame(z=2:3, y=letters[2:3], row.names=letters[2:3])
z <- combine(x,y)
checkDataFramesEqual(x, z[1:2, colnames(x)])
checkDataFramesEqual(y, z[2:3, colnames(y)])
## an error -- content mismatch
x <- data.frame(x=1:3, y=letters[1:3], row.names=letters[1:3])
y <- data.frame(z=2:4, y=letters[1:3], row.names=letters[2:4])
checkException(suppressWarnings(combine(x,y)), silent=TRUE)
## a warning -- level coercion
oldw <- options("warn")
options(warn=2)
on.exit(options(oldw))
x <- data.frame(x=1:2, y=letters[1:2], row.names=letters[1:2],
stringsAsFactors=TRUE)
y <- data.frame(z=2:3, y=letters[2:3], row.names=letters[2:3],
stringsAsFactors=TRUE)
checkException(combine(x,y), silent=TRUE)
options(oldw)
checkDataFramesEqual(suppressWarnings(combine(x,y)),
data.frame(x=c(1:2, NA),
y=letters[1:3],
z=c(NA, 2:3),
row.names=letters[1:3], stringsAsFactors=TRUE))
}
test_combine_df_preserveNumericRows <- function()
{
dfA <- data.frame(label=rep("x", 2), row.names=1:2)
dfB <- data.frame(label=rep("x", 3), row.names=3:5)
dfAB <- combine(dfA, dfB)
## preserve integer row names if possible
checkEquals(1:5, attr(dfAB, "row.names"))
## silently coerce row.names to character
dfC <- data.frame(label=rep("x", 2), row.names=as.character(3:4))
dfAC <- combine(dfA, dfC)
checkEquals(as.character(1:4), attr(dfAC, "row.names"))
}
test_combine_df_NoRow <- function()
{
x <- data.frame(x=1,y=letters[1])[FALSE,]
y <- data.frame(z=1,y=letters[1])[FALSE,]
z <- combine(x,x)
checkTrue(identical(dim(z), as.integer(c(0,2))))
x <- data.frame(x=1,y=letters[1])[FALSE,]
y <- data.frame(z=1,y=letters[1])
z <- combine(x,y)
checkTrue(identical(dim(z), as.integer(c(1,3))))
checkTrue(is.na(z$x))
z <- combine(y,x)
checkTrue(identical(dim(z), as.integer(c(1,3))))
checkTrue(is.na(z$x))
}
test_combine_df_OneRow <- function()
{
x <- data.frame(x=1,y=letters[1], row.names=letters[1])
y <- data.frame(z=3,y=letters[1], row.names=letters[2])
z <- combine(x,y)
checkTrue(identical(dim(z), as.integer(c(2,3))))
checkTrue(z$x[[1]]==1)
checkTrue(all(is.na(z$x[[2]]), is.na(z$z[[1]])))
z <- combine(x,data.frame())
checkTrue(identical(dim(z), as.integer(c(1,2))))
checkTrue(all(z[,1:2]==x[,1:2]))
z <- combine(data.frame(),x)
checkTrue(identical(dim(z), as.integer(c(1,2))))
checkTrue(all(z[,1:2]==x[,1:2]))
}
test_combine_df_NoCol <- function()
{
## row.names
obj1 <- data.frame(numeric(20), row.names=letters[1:20])[,FALSE]
obj <- combine(obj1, obj1)
checkTrue(identical(obj, obj1))
## no row.names -- fails because row.names not recoverable from data.frame?
obj1 <- data.frame(numeric(20))[,FALSE]
obj <- combine(obj1, obj1)
checkTrue(all(dim(obj)==dim(obj1)))
}
test_combine_df_NoCommonCols <- function()
{
x <- data.frame(x=1:5, row.names=letters[1:5])
y <- data.frame(y=3:7, row.names=letters[3:7])
z <- combine(x,y)
checkTrue(all(dim(z)==as.integer(c(7,2))))
checkTrue(all(z[1:5,"x"]==x[,"x"]))
checkTrue(all(z[3:7,"y"]==y[,"y"]))
checkTrue(all(which(is.na(z))==6:9))
}
test_combine_df_Empty <- function()
{
z <- combine(data.frame(), data.frame())
checkTrue(identical(dim(z), as.integer(c(0,0))))
x <- data.frame(x=1,y=letters[1], row.names=letters[1])
z <- combine(x,data.frame())
checkTrue(identical(dim(z), as.integer(c(1,2))))
checkTrue(identical(z["a",1:2], x["a",1:2]))
z <- combine(data.frame(), x)
checkTrue(identical(dim(z), as.integer(c(1,2))))
checkTrue(identical(z["a",1:2], x["a",1:2]))
}
test_combine_df_AsIs <- function()
{
x <- data.frame(x=I(1:5),y=I(letters[1:5]), row.names=letters[1:5])
y <- data.frame(z=I(3:7),y=I(letters[3:7]), row.names=letters[3:7])
z <- combine(x,y)
checkTrue(all(sapply(z, class)=="AsIs"))
}
test_combine_df_ColNamesSuffix <- function()
{
obj1 <- data.frame(a=1:5, a.x=letters[1:5])
obj2 <- data.frame(a=1:5, a.y=LETTERS[1:5], b=5:1)
obj <- combine(obj1, obj2)
checkDataFramesEqual(obj,
data.frame(a=1:5, a.x=letters[1:5], a.y=LETTERS[1:5], b=5:1))
}
test_combine_3df <- function()
{
## data.frame's are tricky, because c(df, list(...)) unlists df
x <- data.frame(x=1:5,
y=factor(letters[1:5], levels=letters[1:8]),
row.names=letters[1:5])
y <- data.frame(z=3:7,
y=factor(letters[3:7], levels=letters[1:8]),
row.names=letters[3:7])
w <- data.frame(w=4:8,
y=factor(letters[4:8], levels=letters[1:8]),
row.names=letters[4:8])
res <- combine(w, x, y)
e <- data.frame(w=c(4:8, rep(NA, 3)),
y=factor(c(letters[c(4:8, 1:3)])),
x=c(4:5, rep(NA, 3), 1:3),
z=as.integer(c(4:7, rep(NA, 3), 3)),
row.names=letters[c(4:8, 1:3)])
checkIdentical(e, res)
}
test_combine_df_POSIXct <- function()
{
## class(x) can have length > 1 as in Sys.time()
t0 <- Sys.time()
df1 <- data.frame(i = 1:3, t = rep(t0, 3), row.names=letters[1:3])
df2 <- data.frame(i = 1:3, t = c(t0, t0 + 500, t0 + 1000),
row.names=c("a", "d", "e"))
e <- data.frame(i = c(1L, 2L, 3L, 2L, 3L),
t = c(t0, t0, t0, t0 + 500, t0 + 1000),
row.names=c("a", "b", "c", "d", "e"))
res <- combine(df1, df2)
checkIdentical(e, res)
}
test_combine_df_WithNamedArgs <- function() {
x <- data.frame(x=1:5,
y=factor(letters[1:5], levels=letters[1:8]),
row.names=letters[1:5])
y <- data.frame(z=3:7,
y=factor(letters[3:7], levels=letters[1:8]),
row.names=letters[3:7])
w <- data.frame(w=4:8,
y=factor(letters[4:8], levels=letters[1:8]),
row.names=letters[4:8])
checkIdentical(combine(w, y, x), combine(w, x, y=y))
checkIdentical(combine(w, y, x), combine(w, y=y, x))
checkIdentical(combine(x, y, w), combine(w, y=y, x=x))
checkIdentical(combine(x, y, w), combine(y=y, x=x, w))
}
test_combine_mat <- function()
{
## dimnames
m <- matrix(1:20, nrow=5, dimnames=list(LETTERS[1:5], letters[1:4]))
checkEquals(m, combine(m, m))
checkEquals(m, combine(m[1:3,], m[4:5,]))
checkEquals(m, combine(m[,1:3], m[,4, drop=FALSE]))
## overlap
checkEquals(m, combine(m[1:3,], m[3:5,]))
checkEquals(m, combine(m[,1:3], m[,3:4]))
checkEquals(matrix(c(1:3, NA, NA, 6:8, NA, NA, 11:15, NA, NA, 18:20),
nrow=5,
dimnames=list(LETTERS[1:5], letters[1:4])),
combine(m[1:3,1:3], m[3:5, 3:4]))
## row reordering
checkEquals(m[c(1,3,5,2,4),], combine(m[c(1,3,5),], m[c(2,4),]))
## Exceptions
checkException(combine(m, matrix(0, nrow=5, ncol=4)),
silent=TRUE) # types differ
checkException(combine(m, matrix(0L, nrow=5, ncol=4)),
silent=TRUE) # attributes differ
m1 <- matrix(1:20, nrow=5)
checkException(combine(m, m1), silent=TRUE) # dimnames required
}
test_combine_mat_DifferentModes <- function()
{
m <- matrix(1:20, nrow=5, dimnames=list(LETTERS[1:5], letters[1:4]))
n <- matrix(as.numeric(1:20),
nrow=5, dimnames=list(LETTERS[1:5], letters[1:4]))
res <- combine(m, n) # modes coerced to same
checkEquals("numeric", mode(res))
n <- matrix(as.character(1:20),
nrow=5, dimnames=list(LETTERS[1:5], letters[1:4]))
checkException(combine(m, n)) # modes differ
}

View File

@ -0,0 +1,29 @@
test_format <- function()
{
## On a list.
x1 <- list(1:5, NULL, 1:2)
target1 <- c("1, 2, 3,....", " ", " 1, 2")
checkIdentical(target1, format(x1))
## On a list where some list elements are S4 objects.
library(IRanges)
x2 <- list(IRanges(), IRanges(1, 8:9), IRanges(2, 23:21))
target2 <- c(" ", " 1-8, 1-9", "2-23, 2-....")
checkIdentical(target2, format(x2))
## On a data.frame.
x <- data.frame(x1=I(x1), x2=I(x2))
current <- format(x)
checkTrue(is.data.frame(current))
checkIdentical(c(3L, 2L), dim(current))
checkIdentical(I(target1), current$x1)
checkIdentical(I(target2), current$x2)
## Getting rid of the silly AsIs wrapper around the columns should
## make no difference.
x[[1]] <- unclass(x[[1]])
x[[2]] <- unclass(x[[2]])
checkIdentical(current, format(x))
}

View File

@ -0,0 +1,21 @@
test_ellipsis_forwarding_for_mapply <- function()
{
mapply_wrapper <- function(FUN, x, ...) mapply(FUN, x, ...)
x <- list(a=1:3, 1:2)
y <- list(104:105, B=103)
target <- mapply(append, x, y)
checkIdentical(target, mapply_wrapper(append, x, y))
MoreArgs <- list(after=0)
target <- mapply(append, x, y, MoreArgs=MoreArgs)
current <- mapply_wrapper(append, x, y, MoreArgs=MoreArgs)
checkIdentical(target, current)
MoreArgs <- list(after=2)
target <- mapply(append, x, y, MoreArgs=MoreArgs, USE.NAMES=FALSE)
current <- mapply_wrapper(append, x, y, MoreArgs=MoreArgs, USE.NAMES=FALSE)
checkIdentical(target, current)
}

View File

@ -0,0 +1,18 @@
test_ellipsis_forwarding_for_order <- function()
{
x <- list(c(NA,11:13), c(21:22,NA))
target <- lapply(x, base::order)
checkIdentical(target, lapply(x, order))
target <- lapply(x, base::order, na.last=TRUE)
checkIdentical(target, lapply(x, order, na.last=TRUE))
target <- lapply(x, base::order, na.last=FALSE)
checkIdentical(target, lapply(x, order, na.last=FALSE))
target <- lapply(x, base::order, na.last=NA)
checkIdentical(target, lapply(x, order, na.last=NA))
}

View File

@ -0,0 +1,12 @@
test_ellipsis_forwarding_for_paste <- function()
{
x <- list(letters, LETTERS)
target <- sapply(x, base::paste)
checkIdentical(target, sapply(x, paste))
target <- sapply(x, base::paste, collapse="")
checkIdentical(target, sapply(x, paste, collapse=""))
}

View File

@ -0,0 +1,121 @@
###
test_updateObject_list <- function()
{
setClass("A",
representation(x="numeric"), prototype(x=1:10),
where=.GlobalEnv)
a <- new("A")
l <- list(a,a)
checkTrue(identical(l, updateObject(l)))
setMethod("updateObject", "A",
function(object, ..., verbose=FALSE) {
if (verbose) message("updateObject object = 'A'")
object@x <- -object@x
object
},
where=.GlobalEnv)
obj <- updateObject(l)
checkTrue(identical(lapply(l, function(elt) { elt@x <- -elt@x; elt }),
obj))
removeMethod("updateObject", "A", where=.GlobalEnv)
removeClass("A", where=.GlobalEnv)
}
test_updateObject_env <- function()
{
opts <- options()
options(warn=-1)
e <- new.env()
e$x=1
e$.x=1
obj <- updateObject(e)
checkTrue(identical(e,obj)) # modifies environment
lockEnvironment(e)
obj <- updateObject(e) # copies environment
checkTrue(identical(lapply(ls(e, all=TRUE), function(x) x),
lapply(ls(obj, all=TRUE), function(x) x)))
checkTrue(!identical(e, obj)) # different environments
e <- new.env()
e$x=1
e$.x=1
lockBinding("x", e)
checkException(updateObject(e), silent=TRUE)
lockEnvironment(e)
obj <- updateObject(e)
checkTrue(TRUE==bindingIsLocked("x", obj)) # R bug, 14 May, 2006, fixed
checkTrue(FALSE==bindingIsLocked(".x", obj))
options(opts)
}
test_updateObject_defaults <- function()
{
x <- 1:10
checkTrue(identical(x, updateObject(x)))
}
test_updateObject_S4 <- function()
{
setClass("A",
representation=representation(
x="numeric"),
prototype=list(x=1:5),
where=.GlobalEnv)
.__a__ <- new("A")
setClass("A",
representation=representation(
x="numeric",
y="character"),
where=.GlobalEnv)
checkException(validObject(.__a__), silent=TRUE) # now out-of-date
.__a__@x <- 1:5
a <- updateObject(.__a__)
checkTrue(validObject(a))
checkIdentical(1:5, a@x)
removeClass("A", where=.GlobalEnv)
}
test_updateObject_setClass <- function()
{
setClass("A",
representation(x="numeric"),
prototype=prototype(x=1:10),
where=.GlobalEnv)
a <- new("A")
checkTrue(identical(a,updateObject(a)))
removeClass("A", where=.GlobalEnv)
}
test_updateObject_refClass <- function()
{
cls <- ".__test_updateObject_refClassA"
.A <- setRefClass(cls, fields=list(x="numeric", y="numeric"),
where=.GlobalEnv)
a <- .A()
checkTrue(all.equal(a, updateObject(a)))
a <- .A(x=1:5, y=5:1)
checkTrue(all.equal(a, updateObject(a)))
.A <- setRefClass(cls, fields=list(x="numeric", y="numeric", z="numeric"),
where=.GlobalEnv)
checkTrue(all.equal(.A(x=1:5, y=5:1, z=numeric()), updateObject(a)))
.A <- setRefClass(cls, fields=list(x="numeric"))
warn <- FALSE
value <- withCallingHandlers(updateObject(a), warning=function(w) {
txt <- "dropping fields(s) 'y' from object = '.__test_updateObject_refClassA'"
warn <<- identical(txt, conditionMessage(w))
invokeRestart("muffleWarning")
})
checkTrue(warn)
checkTrue(all.equal(.A(x=1:5), value))
removeClass(cls, where=.GlobalEnv)
}

View File

@ -0,0 +1,26 @@
Package: BiocManager
Title: Access the Bioconductor Project Package Repository
Description: A convenient tool to install and update Bioconductor packages.
Version: 1.30.25
Authors@R: c(
person("Martin", "Morgan", email = "martin.morgan@roswellpark.org",
role = "aut", comment = c(ORCID = "0000-0002-5874-8148")),
person("Marcel", "Ramos", email = "marcel.ramos@sph.cuny.edu",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3242-0582")))
Imports: utils
Suggests: BiocVersion, BiocStyle, remotes, rmarkdown, testthat, withr,
curl, knitr
URL: https://bioconductor.github.io/BiocManager/
BugReports: https://github.com/Bioconductor/BiocManager/issues
VignetteBuilder: knitr
License: Artistic-2.0
Encoding: UTF-8
RoxygenNote: 7.3.1
NeedsCompilation: no
Packaged: 2024-08-27 21:44:40 UTC; mr148
Author: Martin Morgan [aut] (<https://orcid.org/0000-0002-5874-8148>),
Marcel Ramos [aut, cre] (<https://orcid.org/0000-0002-3242-0582>)
Maintainer: Marcel Ramos <marcel.ramos@sph.cuny.edu>
Repository: CRAN
Date/Publication: 2024-08-28 14:20:02 UTC
Built: R 4.4.2; ; 2025-01-09 01:43:55 UTC; windows

View File

@ -0,0 +1,10 @@
BiocManager-package Install or update Bioconductor, CRAN, or GitHub
packages
available Discover packages available for installation.
install Install or update Bioconductor, CRAN, and
GitHub packages
repositories Display current Bioconductor and CRAN
repositories.
valid Validate installed package versions against
correct versions.
version Version of Bioconductor currently in use.

25
dist/lib/r/site-library/BiocManager/MD5 vendored Normal file
View File

@ -0,0 +1,25 @@
d5cb98be9f74a0eec84d6fd81bfbbaf9 *DESCRIPTION
0ca668f6662f9e01563202a35b2057d9 *INDEX
bc49a78ce4871cdbe68370a024c9b934 *Meta/Rd.rds
cafa9c5a405f88a5d247e638c4e76607 *Meta/features.rds
397055b756470c9661a75788d50354ad *Meta/hsearch.rds
678180f93c39d5807b118c56c4841ca4 *Meta/links.rds
6b8457a1e08e1dac505a050fbe67a534 *Meta/nsInfo.rds
c1737e4e43ffd3db4b3642e20cb34412 *Meta/package.rds
2796852dd8ac758b652687f3f92e7647 *Meta/vignette.rds
2bf9e76392eb34c409c623e79b3acf3c *NAMESPACE
c85092b7c70fa3bb34dafa19e6edf03d *NEWS
d6c68f1fe41ced6e98a766a3757313da *R/BiocManager
0ed99320cd9eef4234c68c2560ee4bb2 *R/BiocManager.rdb
461bcaa22bb5bd5602003cd3e28048ef *R/BiocManager.rdx
29bea53ddc1f2ba8e1f7a48cba5e20df *doc/BiocManager.R
01c80f5dd0768a8993edb62fbfc6cb06 *doc/BiocManager.Rmd
f00cd29a887324c915102acb9cdb8eda *doc/BiocManager.html
e3dc742d4108c808ec29e6e358dbb078 *doc/index.html
094d5705eb22a5722038c96812d7b306 *help/AnIndex
be58d920425d8021236c356722c6ffee *help/BiocManager.rdb
118a0655e9b9294624dcffe41997d98d *help/BiocManager.rdx
72d31460bea4a4000a692a400c0cb3cf *help/aliases.rds
67096c7820d3bdee0d89efd56fa0ae31 *help/paths.rds
cb7c5003a593ac1f2b4bac020f9b8627 *html/00Index.html
8b9362669af13540a86a3ac6cf22f99d *html/R.css

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,22 @@
# Generated by roxygen2: do not edit by hand
S3method(format,version_sentinel)
S3method(print,biocValid)
S3method(print,version_sentinel)
export(available)
export(containerRepository)
export(install)
export(repositories)
export(valid)
export(version)
importFrom(stats,setNames)
importFrom(utils,available.packages)
importFrom(utils,contrib.url)
importFrom(utils,head)
importFrom(utils,install.packages)
importFrom(utils,installed.packages)
importFrom(utils,old.packages)
importFrom(utils,packageVersion)
importFrom(utils,sessionInfo)
importFrom(utils,tail)
importFrom(utils,update.packages)

429
dist/lib/r/site-library/BiocManager/NEWS vendored Normal file
View File

@ -0,0 +1,429 @@
CHANGES IN VERSION 1.30.25
-------------------------
MINOR CHANGES
o Maintainer email change.
CHANGES IN VERSION 1.30.24
-------------------------
NEW FEATURES
o Force BiocManager to use unsupported version of R with `R_BIOC_VERSION`
environment variable (@mtmorgan, #193)
CHANGES IN VERSION 1.30.23
-------------------------
NEW FEATURES
o Ensure compatibility with `package_version` changes in R 4.4.0
(@kurthornik)
MINOR CHANGES
o Added "Updating old packages" and "Archived CRAN packages" sections in
the vignette
o Use `BiocStyle` formatting in the vignette
o Update Posit links in the vignette
CHANGES IN VERSION 1.30.22
-------------------------
NEW FEATURES
o Enable site_repository environment variable or option for install, valid
MINOR CHANGES
o Ensure character input to package_version function (@kurthornik)
CHANGES IN VERSION 1.30.21
-------------------------
NEW FEATURES
o Enable the use of the Bioc-devel branch on R-devel during the 'summer'
release cycle (@mtmorgan, #166)
o Allow `BIOCMANAGER_SITE_REPOSITORY` environment variable and
`BiocManager.site_repository` option as a more permanent option for
`site_repository` users (@LiNk-NY).
o Support for "time machine" CRAN installations has moved to BiocArchive
and has been removed from the package (#151, @LiNk-NY)
MINOR CHANGES
o Correct links on help pages. See
<https://github.com/Bioconductor/BiocManager/pull/160>; thanks
@aitap
o Additional documentation provided for offline use of BiocManager in
`?install` and in the main vignette (#165, @mtmorgan).
CHANGES IN VERSION 1.30.20
-------------------------
NEW FEATURES
o Add `BIOCMANAGER_CHECK_REPOSITORIES` environment variable for
non-interactive sessions as an alternative to the
`BiocManager.check_repositories` option (#144, @HenrikBengtsson)
MINOR CHANGES
o Re-use and translate `update` and `ask` arguments when installing via
`install_github` (#126, @Jiefei-Wang)
o Allow `type` argument during package installation to opt out of binary
installations (#103, @lshep)
o Check `BiocVersion` installation with `system.file` rather than with
`packageVersion` (K. Hornik)
CHANGES IN VERSION 1.30.19
-------------------------
MINOR CHANGES
o Updated warning message for clarity when packages are installed of the
same version or greater.
o The `ask` argument is passed through to the `remotes::install_github`
o Update unit tests which did not include the full scenario of options
o Catch zero length outputs when timeouts occur (#140, @hpages)
CHANGES IN VERSION 1.30.18
-------------------------
MINOR CHANGES
o Increase robustness of code when loading and working with the
version map
o Add internal checks to version tags in map and update unit tests
o Include a 'troubleshooting' section in the vignette
CHANGES IN VERSION 1.30.17
-------------------------
NEW FEATURES
o `containerRepository` reports the location of binary packages for
containerized images of Bioconductor, if available.
BUG FIXES
o `install` appropriately returns a warning from `install.packages` instead
of a character vector (#112, @mtmorgan).
CHANGES IN VERSION 1.30.16
-------------------------
BUG FIXES
o Ensure that the `force` argument is passed along after installation of
`BiocVersion` (#105, @lshep, @jwokaty)
o Fix typo in `.VERSION_MAP_SENTINEL` (`RSPM` column name).
CHANGES IN VERSION 1.30.15
-------------------------
BUG FIXES
o `.skip_if_misconfigured` function should work with
`_R_CHECK_DEPENDS_ONLY=true`
o Switch to `interactive()` only examples for `available()`
CHANGES IN VERSION 1.30.14
-------------------------
BUG FIXES
o `install` now passes the `force` argument to `install_github`
(#101, @lgeistlinger)
o Treat warnings as warnings internally in `install.packages()`
(#100, @biobenkj)
o Check version validity `.onAttach` rather than `.onLoad`
CHANGES IN VERSION 1.30.13
-------------------------
NEW FEATURES
o Downloading the same version of a remote package already installed will
be avoided unless the user supplies `force=TRUE` to `install`.
USER VISIBLE CHANGES
o Devel users on a newer version of R will not get an error when the minor
version of R is +1 of the recommended
BUG FIXES
o Added a warning and informative message when a package is 'not available'
(#85, @LTLA).
o `BIOCONDUCTOR_CONFIG_FILE` now included in the documentation for
`install` (#93, @glin).
CHANGES IN VERSION 1.30.12
-------------------------
NEW FEATURES
o 'BIOCONDUCTOR_CONFIG_FILE' option allows users to provide an offline
and local configuration file (config.yaml) for version validation.
o Bioconductor 'BioCbooks' repository now available in Bioconductor
versions >= "3.12"
USER VISIBLE CHANGES
o Enable use of historical snapshots ('MRAN' or 'RSPM' via
`options(BiocManager.snapshots=)`) to install CRAN packages for
out-of-date Bioconductor versions.
o Respect `options(repos = c(CRAN = "..."))`. See
https://github.com/Bioconductor/BiocManager/issues/69
BUG FIXES
o Increase timeout from 1 to 5 minutes (300 seconds) to make
download of large packages more robust.
CHANGES IN VERSION 1.30.10
-------------------------
MINOR CHANGES
o Restore startup message with recommended version
o Update mis-configuration skip in tests
CHANGES IN VERSION 1.30.9
-------------------------
MINOR CHANGES
o Use `packageStartupMessage()` in .onLoad
o Tests are robust to missing Suggests: BiocVersion
CHANGES IN VERSION 1.30.8
-------------------------
MINOR CHANGES
o Tests are skipped if is there is a misconfiguration or the CRAN
builder has no internet access.
CHANGES IN VERSION 1.30.7
-------------------------
NEW FEATURES
o Support R-4.0
MINOR CHANGES
o Conform to CRAN policy to fail with messages rather than
warnings or errors when internet access fails; internet access
failures continue to generate warnings or errors during regular
use.
CHANGES IN VERSION 1.30.6
-------------------------
MINOR CHANGES
o Improve unit tests under Bioconductor versions 3.8, 3.9, 3.10.
o Improve error message when non-interactive version update fails.
BUG FIXES
o BiocManager loads when off-line.
CHANGES IN VERSION 1.30.5
-------------------------
NEW FEATURES
o Allow users to specify `checkBuilt` when invoking `valid()` or
`install()`. Set default `FALSE`.
MINOR CHANGES
o Allow use of BiocInstaller for R < 3.5, pointing to biocLite()
when appropriate.
o Improve performance of version checking (issue #42 @HenrikBengtsson).
o Document off-line installation best practices.
o Warn about out-of-date packages on load (in addition to on
attach) (issue #29)
CHANGES IN VERSION 1.30.4
-------------------------
NEW FEATURES
o Provide an 'http' fallback when 'https' fails for accessing the version
map hosted on Bioconductor.org
MINOR CHANGES
o Conform tests to devel and release R versions
o Add tests for the 'http' fallback scenarios
BUG FIXES
o Fixed issue with multiple error version messages for Bioc version `3.9`
'devel' and 'future'
o Return a warning message instead of an error when unable to validate
a given version
CHANGES IN VERSION 1.30.3
-------------------------
NEW FEATURES
o 'BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS' option allows users to skip
online version map validation. Local installation of 'BiocVersion' will be
used when this option is enabled.
MINOR CHANGES
o Removed extra prompts when switching versions and updating packages
o Clarified 'See Also' documentation (@lwaldron #16)
o Added several unit tests to increase robustness (@mtmorgan)
BUG FIXES
o Obtain CRAN 'repos' option independent of name (@kasperdanielhansen #17)
o Fixed a bug when switching to 'devel' version of Bioconductor
(@kasperdanielhansen #25)
o When installation is valid, return zero invalid packages rather than
accessing non-existent list structure
CHANGES IN VERSION 1.30.2
-------------------------
USER VISIBLE CHANGES
o install() only allows Bioconductor version upgrades and downgrades with
an empty 'pkgs' argument. Otherwise, it gives the user an informative error.
o 'ask' argument is respected when in non-interactive mode (@lshep #9)
o valid() returns TRUE for valid Bioconductor installations otherwise,
it prints a report of out-of-date and/or too new packages
MINOR CHANGES
o updated unit tests for install()
o when changing versions via 'install(version = "x.x")', Bioconductor
packages to be up or down-graded are now enumerated
BUG FIXES
o Remove tests that were dependent on system configuration rather
than the package itself
CHANGES IN VERSION 1.30.1
-------------------------
USER VISIBLE CHANGES
o install() '...' arguments must be named.
CHANGES IN VERSION 1.30.0
-------------------------
NEW FEATURES
o package renamed to BiocManager
o install() supports github repositories using the remotes
package, rather than devtools. This change should be transparent
to end users. (@PeteHaitch, #4)
o functions renamed to the following: biocLite > install;
biocInstallRepos > repositories; biocValid > valid;
biocVersion > version
o functions removed: biocases_group, biocUpdatePackages, isDevel,
useDevel, *_group
o available() enables package discovery via grep()
o Removed support for MRAN (Microsoft R) archives.
CHANGES IN VERSION 1.28.0
-------------------------
NEW FEATURES
o biocLite() supports full URLs, e.g., to archived Bioconductor
packages.
o Support MRAN (Microsoft R) archives.
CHANGES IN VERSION 1.24.0
-------------------------
NEW FEATURES
o biocLite() uses lib.loc= to find devtools, reports more
informatively why devtools fails to load
o biocLite() only offers to update non-masked packages
o biocLite() reports when packages in unwriteable directories are
out-of-date, but does not try (and fail) to update them.
o isDevel() returns TRUE if the version of BiocInstaller
corresponds to the development version of Bioconductor.
CHANGES IN VERSION 1.20.0
-------------------------
BUG FIXES
o biocLite() uses lib.loc when calling update.packages
CHANGES IN VERSION 1.18.0
-------------------------
NEW FEATURES
o biocLite() supports github repositories (implicitly, 'packages'
following the 'maintainer/package' convention)
CHANGES IN VERSION 1.14.0
-------------------------
NEW FEATURES
o biocUpdatePackages updates installed packages and their
dependencies.
CHANGES IN VERSION 1.10.0
-------------------------
NEW FEATURES
o biocValid() checks that installed packages are consistent with
those available via biocLite().
o biocVersion() returns the version of Bioconductor expected with
this version of the BiocInstaller package.
USER-VISIBLE CHANGES
o biocLite() invoked with no arguments updates currently installed
packages to their most-recent version.

View File

@ -0,0 +1,27 @@
# File share/R/nspackloader.R
# Part of the R package, https://www.R-project.org
#
# Copyright (C) 1995-2012 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# A copy of the GNU General Public License is available at
# https://www.r-project.org/Licenses/
local({
info <- loadingNamespaceInfo()
pkg <- info$pkgname
ns <- .getNamespace(as.name(pkg))
if (is.null(ns))
stop("cannot find namespace environment for ", pkg, domain = NA);
dbbase <- file.path(info$libname, pkg, "R", pkg)
lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
})

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,72 @@
## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(echo = TRUE, eval = interactive())
## ----eval = FALSE-------------------------------------------------------------
# install.packages("BiocManager", repos = "https://cloud.r-project.org")
## ----eval = FALSE-------------------------------------------------------------
# BiocManager::install(c("GenomicRanges", "Organism.dplyr"))
## ----eval = FALSE-------------------------------------------------------------
# BiocManager::install()
## -----------------------------------------------------------------------------
# BiocManager::version()
## -----------------------------------------------------------------------------
# BiocManager::valid()
## -----------------------------------------------------------------------------
# avail <- BiocManager::available()
# length(avail) # all CRAN & Bioconductor packages
# BiocManager::available("BSgenome.Hsapiens") # BSgenome.Hsapiens.* packages
## ----eval=FALSE---------------------------------------------------------------
# options(
# repos = c(
# getOption("repos"),
# CRANhaven = "https://cranhaven.r-universe.dev"
# )
# )
# BiocManager::install('archivedPackage')
## ----eval = FALSE-------------------------------------------------------------
# BiocManager::install(version="3.7")
## ----eval = FALSE-------------------------------------------------------------
# .libPaths()
## ----eval = FALSE-------------------------------------------------------------
# options(
# repos = c(CRAN_mirror = "file:///path/to/CRAN-mirror"),
# BioC_mirror = "file:///path/to/Bioc-mirror"
# )
## ----eval = FALSE-------------------------------------------------------------
# options(
# BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS = FALSE
# )
## ----eval = FALSE-------------------------------------------------------------
# install.package(c("BiocManager", "BiocVersion"))
## ----eval = FALSE-------------------------------------------------------------
# options(
# BIOCONDUCTOR_CONFIG_FILE = "file:///path/to/config.yaml"
# )
## ----out.width = '100%', echo = FALSE, eval = TRUE----------------------------
knitr::include_graphics("img/badges.png")
## ----out.width = '100%', echo = FALSE, eval = TRUE----------------------------
knitr::include_graphics("img/archives.png")
## ----eval = FALSE-------------------------------------------------------------
# BiocManager::install()
## ----eval = FALSE-------------------------------------------------------------
# BiocManager::valid()
## ----eval = TRUE--------------------------------------------------------------
sessionInfo()

View File

@ -0,0 +1,717 @@
---
title: "Installing and Managing _Bioconductor_ Packages"
author:
- name: Marcel Ramos
affiliation: Roswell Park Comprehensive Cancer Center, Buffalo, NY
- name: Martin Morgan
affiliation: Roswell Park Comprehensive Cancer Center, Buffalo, NY
output:
BiocStyle::html_document:
toc: true
vignette: |
%\VignetteIndexEntry{Installing and Managing Bioconductor Packages}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, eval = interactive())
```
# Introduction
Use the [BiocManager][1] package to install and manage packages from the
_[Bioconductor][2]_ project for the statistical analysis and comprehension of
high-throughput genomic data.
Current _Bioconductor_ packages are available on a 'release' version intended
for every-day use, and a 'devel' version where new features are introduced. A
new release version is created every six months. Using the [BiocManager][1]
package helps users install packages from the same release.
# Basic use
## Installing _R_
We recommend using the current 'release' version of _R_. [Follow
instructions][6] for installing _R_.
## Installing _BiocManager_
Use standard _R_ installation procedures to install the
[BiocManager][1] package. This command is requried only once per _R_
installation.
```{r, eval = FALSE}
install.packages("BiocManager", repos = "https://cloud.r-project.org")
```
## Installing _Bioconductor_, _CRAN_, or GitHub packages
Install _Bioconductor_ (or CRAN) packages with
```{r, eval = FALSE}
BiocManager::install(c("GenomicRanges", "Organism.dplyr"))
```
Installed packages can be updated to their current version with
```{r, eval = FALSE}
BiocManager::install()
```
## Previous releases
To install CRAN package versions consistent with previous releases of
Bioconductor, use the [BiocArchive][BiocArchive] package. BiocArchive enables
contemporary installations of CRAN packages with out-of-date _Bioconductor_
releases using [Posit Public Package Manager][P3M].
[BiocArchive]: https://github.com/Bioconductor/BiocArchive
[P3M]: https://packagemanager.posit.co/
## Version and validity of installations
Use `version()` to discover the version of _Bioconductor_ currently in
use.
```{r}
BiocManager::version()
```
_Bioconductor_ packages work best when they are all from the same release. Use
`valid()` to identify packages that are out-of-date or from unexpected
versions.
```{r}
BiocManager::valid()
```
`valid()` returns an object that can be queried for detailed
information about invalid packages, as illustrated in the following
screen capture
```
> v <- valid()
Warning message:
6 packages out-of-date; 0 packages too new
> names(v)
[1] "out_of_date" "too_new"
> head(v$out_of_date, 2)
Package LibPath
bit "bit" "/home/mtmorgan/R/x86_64-pc-linux-gnu-library/3.5-Bioc-3.8"
ff "ff" "/home/mtmorgan/R/x86_64-pc-linux-gnu-library/3.5-Bioc-3.8"
Installed Built ReposVer Repository
bit "1.1-12" "3.5.0" "1.1-13" "https://cloud.r-project.org/src/contrib"
ff "2.2-13" "3.5.0" "2.2-14" "https://cloud.r-project.org/src/contrib"
>
```
## Available packages
Packages available for your version of _Bioconductor_ can be
discovered with `available()`; the first argument can be used to
filter package names based on a regular expression, e.g., 'BSgenome'
package available for _Homo sapiens_
```{r}
avail <- BiocManager::available()
length(avail) # all CRAN & Bioconductor packages
BiocManager::available("BSgenome.Hsapiens") # BSgenome.Hsapiens.* packages
```
Questions about installing and managing _Bioconductor_ packages should
be addressed to the [_Bioconductor_ support site][3].
## Updating old packages
The user can often get an update packages prompt similar to:
```
> BiocManager::install("AnVIL")
Bioconductor version 3.18 (BiocManager 1.30.22), R 4.3.1 (2023-06-16)
Old packages: 'AnnotationDbi', 'arrow', 'basilisk.utils', 'beachmat',
'BiocParallel', 'BiocSingular', 'biocthis', 'Biostrings', 'bluster',
'DelayedArray', 'downlit', 'edgeR', 'GenomeInfoDb', 'GenomicFeatures',
'IRanges', 'limma', 'pkgbuild', 'pkgload', 'processx', 'RcppSpdlog', 'rhdf5',
'rstudioapi', 'SingleR', 'testthat', 'usethis', 'xml2', 'KernSmooth',
'Matrix', 'mgcv'
Update all/some/none? [a/s/n]:
```
A decision should be made regarding updating packages. In the following section
we will detail the rationale, pros, and cons of updating packages.
(An initial draft of this section was produced by ChatGPT on 28 August 2023)
### Rationale
Package updates often include bug fixes, improvements in functionality, and
optimizations. By updating, the user can ensure that they are benefiting from
the latest enhancements and fixes in the packages they use.
### Pros of updating
* **Bug Fixes**: Updating packages can resolve known issues and bugs present in
older versions. This can lead to more accurate and reliable analyses.
* **Performance**: Package updates might come with performance optimizations
that can lead to faster execution of code and analyses.
* **New Features**: Updated packages might introduce new features, functions,
and capabilities that can enhance your workflow and analysis options.
* **Compatibility**: Newer packages are often developed with compatibility in
mind. Using outdated packages might lead to compatibility issues with other
packages or R itself.
* **Security**: In some cases, package updates address security
vulnerabilities. Keeping packages up to date can help maintain the security of
the computational environment.
* **Documentation**: Newer versions of packages might come with updated
documentation that reflects recent changes and improvements in package
functionality.
### Cons of updating
* **Code Breakage**: Updates can introduce changes in package behavior,
function signatures, or syntax. This can potentially break existing code if it
relies on the previous behavior.
* **Version Conflicts**: Updates to one package might trigger dependencies on
updated versions of other packages. This can lead to conflicts if those updated
versions are not compatible with other parts of your workflow.
* **Workflow Disruption**: When you update packages, you might need to retest
and validate your analyses to ensure that the changes in package behavior don't
affect your results.
* **Learning Curve**: New features and changes introduced in updated packages
might require you to invest time in understanding how to use them effectively.
* **Temporary Instability**: Right after a major update, the new version might
not be as stable as the previous one, leading to unexpected behavior.
### Balancing the Decision
* Consider how critical the package is to your analysis. If a package is central
to your workflow, updating might be more important.
* Read the release notes of the package to understand what changes are
introduced in the update.
* Consider using a separate environment (e.g., Docker container) for testing
updates before applying them to the main analysis environment.
* Make sure to backup code and data before performing updates.
* Check if there are any compatibility issues with other packages you are using.
## Archived CRAN packages
In the event that a package is no longer available on CRAN, it may be
desirable to install an archived package, especially if it is assumed that the
package will return to an unarchived state at a later date. Users who wish to
protect their systems from the consequences of these state changes can
install archived packages by using the [CRANhaven][] repository. This repository
contains archived versions of CRAN packages for up to five weeks or until
they are unarchived on CRAN. To enable archived CRAN package installations, the
user can run the following command:
```{r,eval=FALSE}
options(
repos = c(
getOption("repos"),
CRANhaven = "https://cranhaven.r-universe.dev"
)
)
BiocManager::install('archivedPackage')
```
[CRANhaven]: https://www.cranhaven.org/
# Advanced use
## Changing version
Use the `version=` argument to update all packages to a specific _Bioconductor_
version
```{r, eval = FALSE}
BiocManager::install(version="3.7")
```
_Bioconductor_ versions are associated with specific _R_ versions, as
summarized [here][5]. Attempting to install a version of
_Bioconductor_ that is not supported by the version of _R_ in use
leads to an error; using the most recent version of _Bioconductor_ may
require installing a new version of _R_.
```
> BiocManager::install(version="3.9")
Error: Bioconductor version '3.9' requires R version '3.6'; see
https://bioconductor.org/install
```
A special version, `version="devel"`, allows use of _Bioconductor_
packages that are under development.
## Unsupported *R* / *Bioconductor* versions
The main purpose of BiocManager is to ensure that users install the
version of *Bioconductor* appropriate for their version of *R*. Use
the environment variable `R_BIOC_VERSION` to install any version of
*Bioconductor* on any version of *R*. Thus *R* version 4.3.0 and
*Bioconductor* version 3.19 are not compatible...
```
> BiocManager::install(version = "3.19")
Error: Bioconductor version '3.19' requires R version '4.4'; use
`version = '3.18'` with R version 4.3; see
https://bioconductor.org/install
```
...but the version can be forced with
```
> Sys.setenv(R_BIOC_VERSION="3.19")
> BiocManager::install(version = "3.19")
...
Bioconductor version 3.19 (BiocManager 1.30.23), R 4.3.0 (2023-04-21)
```
**Note**. Compatibility of Bioconductor with a mismatched version of R
is not guaranteed and support is not provided for such installations.
## Managing multiple versions {#multiple-versions}
It is possible to have multiple versions of _Bioconductor_ installed on the
same computer. A best practice is to [create an initial _R_ installation][6].
Then create and use a library for each version of _Bioconductor_. The library
will contain all _Bioconductor_, CRAN, and other packages for that version of
_Bioconductor_. We illustrate the process assuming use of _Bioconductor_
version 3.7, available using _R_ version 3.5
Create a directory to contain the library (replace `USER_NAME` with your user
name on Windows)
- Linux: `~/R/3.5-Bioc-3.7`
- macOS: `~/Library/R/3.5-Bioc-3.7/library`
- Windows: `C:\Users\USER_NAME\Documents\R\3.5-Bioc-3.7`
Set the environment variable `R_LIBS_USER` to this directory, and invoke _R_.
Command line examples for Linux are
- Linux: `R_LIBS_USER=~/R/3.5-Bioc-3.7 R`
- macOS: `R_LIBS_USER=~/Library/R/3.5-Bioc-3.7/library R`
- Windows: `cmd /C "set R_LIBS_USER=C:\Users\USER_NAME\Documents\R\3.5-Bioc-3.7 && R"`
Once in _R_, confirm that the version-specific library path has been set
```{r, eval = FALSE}
.libPaths()
```
On Linux and macOS, create a bash alias to save typing, e.g.,
- Linux: `alias Bioc3.7='R_LIBS_USER=~/R/3.5-Bioc-3.7 R'`
- macOS: `alias Bioc3.7='R_LIBS_USER=~/Library/R/3.5-Bioc-3.7/library R'`
Invoke these from the command line as `Bioc3.7`.
On Windows, create a shortcut. Go to My Computer and navigate to a directory
that is in your PATH. Then right-click and choose New->Shortcut.
In the "type the location of the item" box, put:
```
cmd /C "set R_LIBS_USER=C:\Users\USER_NAME\Documents\R\3.5-Bioc-3.7 && R"
```
Click "Next". In the "Type a name for this shortcut" box, type `Bioc-3.7`.
## Offline use
Offline use of _BiocManager_ is possible for organizations and users that would
like to provide access to internal repositories of _Bioconductor_ packages
while enforcing appropriate version checks between Bioconductor and R.
For offline use, organizations and users require the following steps:
1. Use `rsync` to create local repositories of [CRAN][8] and
[Bioconductor][7]. Tell _R_ about these repositories using (e.g.,
in a site-wide `.Rprofile`, see `?.Rprofile`).
```{r, eval = FALSE}
options(
repos = c(CRAN_mirror = "file:///path/to/CRAN-mirror"),
BioC_mirror = "file:///path/to/Bioc-mirror"
)
```
Validate repository setting by reviewing the output of `repositories()`.
2. Create an environment variable or option, e.g.,
```{r, eval = FALSE}
options(
BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS = FALSE
)
```
3. Use `install.packages()` to bootstrap the BiocManager installation.
```{r, eval = FALSE}
install.package(c("BiocManager", "BiocVersion"))
```
BiocManager can then be used for subsequent installations, e.g.,
`BiocManager::install(c("ggplot2", "GenomicRanges"))`.
### Offline config.yaml
_BiocManager_ also expects to reference an online configuration yaml
file for _Bioconductor_ version validation at
https://bioconductor.org/config.yaml. With offline use, users are
expected to either host this file locally or provide their
`config.yaml` version. The package allows either an environment
variable or R-specific option to locate this file, e.g.,
```{r, eval = FALSE}
options(
BIOCONDUCTOR_CONFIG_FILE = "file:///path/to/config.yaml"
)
```
# How it works
BiocManager's job is to make sure that all packages are installed from
the same _Bioconductor_ version, using compatible _R_ and _CRAN_
packages. However, _R_ has an annual release cycle, whereas
_Bioconductor_ has a twice-yearly release cycle. Also, _Bioconductor_
has a 'devel' branch where new packages and features are introduced,
and a 'release' branch where bug fixes and relative stability are
important; _CRAN_ packages do not distinguish between devel and
release branches.
In the past, one would install a _Bioconductor_ package by evaluating
the command `source("https://.../biocLite.R")` to read a file from the
web. The file contained an installation script that was smart enough
to figure out what version of _R_ and _Bioconductor_ were in use or
appropriate for the person invoking the script. Sourcing an executable
script from the web is an obvious security problem.
Our solution is to use a CRAN package BiocManager, so that users
install from pre-configured CRAN mirrors rather than typing in a URL
and sourcing from the web.
But how does a CRAN package know what version of _Bioconductor_ is in
use? Can we use BiocManager? No, because we don't have enough control
over the version of BiocManager available on CRAN, e.g., everyone using
the same version of _R_ would get the same version of BiocManager and
hence of _Bioconductor_. But there are two _Bioconductor_ versions per R
version, so that does not work!
BiocManager could write information to a cache on the user disk, but
this is not a robust solution for a number of reasons. Is there any
other way that _R_ could keep track of version information? Yes, by
installing a _Bioconductor_ package (BiocVersion) whose sole purpose is
to indicate the version of _Bioconductor_ in use.
By default, BiocManager installs the BiocVersion package corresponding
to the most recent released version of _Bioconductor_ for the version
of _R_ in use. At the time this section was written, the most recent
version of R is R-3.6.1, associated with _Bioconductor_ release
version 3.9. Hence on first use of `BiocManager::install()` we see
BiocVersion version 3.9.0 being installed.
```
> BiocManager::install()
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.1 Patched (2019-07-06
r76792)
Installing package(s) 'BiocVersion'
trying URL 'https://bioconductor.org/packages/3.9/bioc/src/contrib/\
BiocVersion_3.9.0.tar.gz'
...
```
Requesting a specific version of _Bioconductor_ updates, if possible,
the BiocVersion package.
```
> ## 3.10 is available for R-3.6
> BiocManager::install(version="3.10")
Upgrade 3 packages to Bioconductor version '3.10'? [y/n]: y
Bioconductor version 3.10 (BiocManager 1.30.4), R 3.6.1 Patched (2019-07-06
r76792)
Installing package(s) 'BiocVersion'
trying URL 'https://bioconductor.org/packages/3.10/bioc/src/contrib/\
BiocVersion_3.10.1.tar.gz'
...
> ## back down again...
> BiocManager::install(version="3.9")
Downgrade 3 packages to Bioconductor version '3.9'? [y/n]: y
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.1 Patched (2019-07-06
r76792)
Installing package(s) 'BiocVersion'
trying URL 'https://bioconductor.org/packages/3.9/bioc/src/contrib/\
BiocVersion_3.9.0.tar.gz'
...
```
Answering `n` to the prompt to up- or downgrade packages leaves the
installation unchanged, since this would immediately create an
inconsistent installation.
# Troubleshooting
## Package not available
(An initial draft of this section was produced by ChatGPT on 25 May 2023)
A user failed to install the 'celldex' package on 25 May 2023. A
transcript of the _R_ session is as follows:
```
> BiocManager::version()
[1] '3.18'
> BiocManager::install("celldex")
Bioconductor version 3.18 (BiocManager 1.30.20), R 4.3.0 Patched (2023-05-01
r84362)
Installing package(s) 'celldex'
Warning message:
package 'celldex' is not available for Bioconductor version '3.18'
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
```
The availability of specific packages within _Bioconductor_ can depend
on various factors, including simple errors in entering the package
name, the package's development status, maintenance, and compatibility
with the latest version of _Bioconductor_, as well as the availability
of CRAN packages that the _Bioconductor_ package depends on.
Package Name: _R_ package names are case sensitive and must be spelt
correctly, so using `BiocManager::install("Celldex")` (with a capital
`C`) or `BiocManager::install("celdex")` (with only one `l`) would
both fail to install `celldex`; _R_ will sometimes suggest the correct
name.
_CRAN_ Packages: `BiocManager::install()` tries to install packages
from CRAN and from _Bioconductor_. Check that the package is not a CRAN
package by trying to visit the CRAN 'landing page'
- `https://cran.R-project.org/package=celldex`
If this page is found, then the package is a CRAN package; see the
[R-admin][9] manual section on troubleshooting CRAN package
installations.
Check also that the package is not a CRAN package that has been
'archived' and no longer available by trying to visit
- `https://cran.R-project.org/src/contrib/Archive/celldex/`
If this page exists but the 'landing page' does not, this means that
the package has been removed from CRAN. While it is possible to
install archived packages, usually the best course of action is to
identify alternative packages to accomplish the task you are
interested in. This is especially true if the 'Last modified' date of
the most recent archived package is more than several months ago.
Compatibility: A _Bioconductor_ package must be available for the
specific version of _Bioconductor_ you are using. Try visiting the
'landing page' of the package for your version of _Bioconductor_,
e.g., for _Bioconductor_ version 3.18 and package celldex
- https://bioconductor.org/packages/3.18/celldex
If this landing page does not exist, then the package is not available
for your version of _Bioconductor_.
Users may sometimes have an out-of-date version of _R_ or
_Bioconductor_ installed; this may be intentional (e.g., to ensure
reproducibility of existing analyses) or simply because _Bioconductor_
has not yet been updated. Try visiting the current release landing
page
- https://bioconductor.org/packages/release/celldex
If the release landing page exists, and it is not important that you
continue using the out-of-date version of _Bioconductor_, consider
updating _R_ (if necessary) and _Bioconductor_ to the current release
versions using instructions at the top of this document.
Packages recently contributed to _Bioconductor_ are added to the
'devel' branch, whereas most users are configured to use the 'release'
branch. Try visiting the 'devel' landing page
- https://bioconductor.org/packages/devel/celldex
If only the devel landing page exists, then consider updating your
installation to use the development version of _Bioconductor_. Note
that the development version is not as stable as the release version,
so should not be used for time-critical or 'production' analysis.
It may be that the package you are interested in has been removed from
_Bioconductor_. Check this by visiting
- https://bioconductor.org/about/removed-packages/
If the package has been removed, the best course of action is to
identify alternative packages to accomplish the task you are
interested in.
Maintenance and Operating System Availability: A package may be
included in the release or devel version of _Bioconductor_, but
currently unavailable because it requires maintenance. This might be
indicated by a red 'build' badge as in the image below (details of the
build problem are available by clicking on the badge). The build error
usually requires that the package maintainer correct an issue with
their package; the maintainer and email address are listed on the
package landing page.
```{r out.width = '100%', echo = FALSE, eval = TRUE}
knitr::include_graphics("img/badges.png")
```
A small number of _Bioconductor_ packages are not available on all
operating systems. An orange 'platforms' badge indicates this. Click
on the badge to be taken to the 'Package Archives' section of the
landing page; BGmix is not supported on Windows, and not available on
'Intel' macOS because of build-related errors. Consider using an
alternative operating system if the package is essential to your work
```{r out.width = '100%', echo = FALSE, eval = TRUE}
knitr::include_graphics("img/archives.png")
```
Packages with landing pages from older releases but not available for
your operating system cannot be updated by the maintainer. If the
package is available in the current release and for your operating
system, consider updating to the current release of _Bioconductor_.
## Cannot load _BiocManager_
After updating _R_ (e.g., from _R_ version 3.5.x to _R_ version 3.6.x
at the time of writing this) and trying to load `BiocManager`, _R_
replies
```
Error: .onLoad failed in loadNamespace() for 'BiocManager', details:
call: NULL
error: Bioconductor version '3.8' requires R version '3.5'; see
https://bioconductor.org/install
```
This problem arises because `BiocManager` uses a second package,
`BiocVersion`, to indicate the version of _Bioconductor_ in use. In
the original installation, `BiocManager` had installed `BiocVersion`
appropriate for _R_ version 3.5. With the update, the version of
_Bioconductor_ indicated by `BiocVersion` is no longer valid -- you'll
need to update `BiocVersion` and all _Bioconductor_ packages to the
most recent version available for your new version of _R_.
The recommended practice is to maintain a separate library for each
_R_ and _Bioconductor_ version. So instead of installing packages into
_R_'s system library (e.g., as 'administrator'), install only base _R_
into the system location. Then use aliases or other approaches to
create _R_ / _Bioconductor_ version-specific installations. This is
described in the section on [maintaining multiple
versions](#multiple-versions) of _R_ and _Bioconductor_.
Alternatively, one could update all _Bioconductor_ packages in the
previous installation directory. The problem with this is that the
previous version of _Bioconductor_ is removed, compromising the
ability to reproduce earlier results. Update all _Bioconductor_
packages in the previous installation directory by removing _all_
versions of `BiocVersion`
```
remove.packages("BiocVersion") # repeat until all instances removed
```
Then install the updated `BiocVersion`, and update all _Bioconductor_
packages; answer 'yes' when you are asked to update a potentially
large number of _Bioconductor_ packages.
```{r, eval = FALSE}
BiocManager::install()
```
Confirm that the updated _Bioconductor_ is valid for your version of
_R_
```{r, eval = FALSE}
BiocManager::valid()
```
## Timeout during package download
Large packages can take a long time to downloaded over poor internet
connects. The BiocManager package sets the time limit to 300 seconds,
using `options(timeout = 300)`. Only part of a package may download,
e.g., only 15.1 of 79.4 MB in the example below
```
trying URL 'https://bioconductor.org/packages/3.12/data/annotation/src/contrib/org.Hs.eg.db_3.12.0.tar.gz'
Content type 'application/x-gzip' length 83225518 bytes (79.4 MB)
=========
downloaded 15.1 MB
```
or perhaps with a warning (often difficult to see in the output)
```
Error in download.file(url, destfile, method, mode = "wb", ...) :
...
...: Timeout of 300 seconds was reached
...
```
Try increasing the download timeout, e.g, `options(timeout = 600)`.
## Multiple `BiocVersion` installations
One potential problem occurs when there are two or more `.libPaths()`,
with more than one BiocVersion package installed. This might occur for
instance if a 'system administrator' installed BiocVersion, and then a
user installed their own version. In this circumstance, it seems
appropriate to standardize the installation by repeatedly calling
`remove.packages("BiocVersion")` until all versions are removed, and
then installing the desired version.
## Errors determining _Bioconductor_ version
An essential task for _BiocManager_ is to determine that the version
of _Bioconductor_ is appropriate for the version of _R_. Several
errors can occur when this task fails.
- Bioconductor version cannot be determined; no internet connection?
When the _Bioconductor_ version cannot be obtained from the version
map hosted at https://bioconductor.org/config.yaml, this error will
occur. It may be a result of poor internet connectivity or offline
use. See the [offline config.yaml](#offline-config.yaml) section
above.
- Bioconductor version cannot be validated; no internet connection?
Usually occurs when the map is unable to be downloaded possibly due
to a missing `BIOCONDUCTOR_CONFIG_FILE`. For offline use, a copy of
the configuration file should be downloaded and its address set to
the environment variable or option.
- Bioconductor version map cannot be validated; is it misconfigured?
On _rare_ occasion, the version map hosted at
https://bioconductor.org/config.yaml may be misconfigured. The check
ensures that all the version name tags, i.e., out-of-date, release,
devel, and future are in the map.
- Bioconductor version cannot be validated; is type input
mis-specified? The type input refers to the version name inputs,
mainly release and devel. This error is chiefly due to internal
logic and is not due to user error. Please open a [GitHub
issue][10].
# Session information
```{r, eval = TRUE}
sessionInfo()
```
[1]: https://cran.r-project.org/package=BiocManager
[2]: https://bioconductor.org
[3]: https://support.bioconductor.org
[5]: https://bioconductor.org/about/release-announcements/
[6]: https://cran.R-project.org/
[7]: https://bioconductor.org/about/mirrors/mirror-how-to/
[8]: https://cran.r-project.org/mirror-howto.html
[9]: https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
[10]: https://github.com/Bioconductor/BiocManager/issues

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head><title>R: Vignettes and other documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
</head><body><div class="container">
<h1> Vignettes and other documentation
<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
</h1>
<hr/>
<div style="text-align: center;">
<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
</div>
<h2>Vignettes from package 'BiocManager'</h2>
<table style="width: 100%;">
<col style="width: 22%;" />
<col style="width: 2%;" />
<col style="width: 50%;" />
<col style="width: 8%;" />
<col style="width: 8%;" />
<col style="width: 8%;" />
<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/BiocManager/doc/BiocManager.html">BiocManager::BiocManager</a></td>
<td></td><td style="vertical-align: top;">Installing and Managing Bioconductor Packages</td>
<td style="vertical-align: top;"><a href="../../../library/BiocManager/doc/BiocManager.html">HTML</a></td>
<td style="vertical-align: top;"><a href="../../../library/BiocManager/doc/BiocManager.Rmd">source</a></td>
<td style="vertical-align: top; white-space: nowrap"><a href="../../../library/BiocManager/doc/BiocManager.R">R code</a></td></tr>
</table>
</div></body></html>

View File

@ -0,0 +1,14 @@
BiocManager-package BiocManager-package
available available
BINARY_BASE_URL repositories
BiocManager BiocManager-package
BiocManager.check_repositories repositories
BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS install
containerRepository repositories
install install
print.biocValid valid
print.version_sentinel version
repositories repositories
R_BIOC_VERSION BiocManager-package
valid valid
version version

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head><title>R: Access the Bioconductor Project Package Repository</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body><div class="container">
<h1> Access the Bioconductor Project Package Repository
<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
</h1>
<hr/>
<div style="text-align: center;">
<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
</div><h2>Documentation for package &lsquo;BiocManager&rsquo; version 1.30.25</h2>
<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>
<li><a href="../NEWS">Package NEWS</a>.</li>
</ul>
<h2>Help Pages</h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="BiocManager-package.html">BiocManager-package</a></td>
<td>Install or update Bioconductor, CRAN, or GitHub packages</td></tr>
<tr><td style="width: 25%;"><a href="available.html">available</a></td>
<td>Discover packages available for installation.</td></tr>
<tr><td style="width: 25%;"><a href="repositories.html">BINARY_BASE_URL</a></td>
<td>Display current Bioconductor and CRAN repositories.</td></tr>
<tr><td style="width: 25%;"><a href="BiocManager-package.html">BiocManager</a></td>
<td>Install or update Bioconductor, CRAN, or GitHub packages</td></tr>
<tr><td style="width: 25%;"><a href="repositories.html">BiocManager.check_repositories</a></td>
<td>Display current Bioconductor and CRAN repositories.</td></tr>
<tr><td style="width: 25%;"><a href="install.html">BIOCONDUCTOR_ONLINE_VERSION_DIAGNOSIS</a></td>
<td>Install or update Bioconductor, CRAN, and GitHub packages</td></tr>
<tr><td style="width: 25%;"><a href="repositories.html">containerRepository</a></td>
<td>Display current Bioconductor and CRAN repositories.</td></tr>
<tr><td style="width: 25%;"><a href="install.html">install</a></td>
<td>Install or update Bioconductor, CRAN, and GitHub packages</td></tr>
<tr><td style="width: 25%;"><a href="valid.html">print.biocValid</a></td>
<td>Validate installed package versions against correct versions.</td></tr>
<tr><td style="width: 25%;"><a href="version.html">print.version_sentinel</a></td>
<td>Version of Bioconductor currently in use.</td></tr>
<tr><td style="width: 25%;"><a href="repositories.html">repositories</a></td>
<td>Display current Bioconductor and CRAN repositories.</td></tr>
<tr><td style="width: 25%;"><a href="BiocManager-package.html">R_BIOC_VERSION</a></td>
<td>Install or update Bioconductor, CRAN, or GitHub packages</td></tr>
<tr><td style="width: 25%;"><a href="valid.html">valid</a></td>
<td>Validate installed package versions against correct versions.</td></tr>
<tr><td style="width: 25%;"><a href="version.html">version</a></td>
<td>Version of Bioconductor currently in use.</td></tr>
</table>
</div></body></html>

View File

@ -0,0 +1,130 @@
@media screen {
.container {
padding-right: 10px;
padding-left: 10px;
margin-right: auto;
margin-left: auto;
max-width: 900px;
}
}
.rimage img { /* from knitr - for examples and demos */
width: 96%;
margin-left: 2%;
}
.katex { font-size: 1.1em; }
code {
color: inherit;
background: inherit;
}
body {
line-height: 1.4;
background: white;
color: black;
}
a:link {
background: white;
color: blue;
}
a:visited {
background: white;
color: rgb(50%, 0%, 50%);
}
h1 {
background: white;
color: rgb(55%, 55%, 55%);
font-family: monospace;
font-size: 1.4em; /* x-large; */
text-align: center;
}
h2 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-size: 1.2em; /* large; */
text-align: center;
}
h3 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-size: 1.2em; /* large; */
}
h4 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-style: italic;
font-size: 1.2em; /* large; */
}
h5 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
}
h6 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-style: italic;
}
img.toplogo {
width: 4em;
vertical-align: middle;
}
img.arrow {
width: 30px;
height: 30px;
border: 0;
}
span.acronym {
font-size: small;
}
span.env {
font-family: monospace;
}
span.file {
font-family: monospace;
}
span.option{
font-family: monospace;
}
span.pkg {
font-weight: bold;
}
span.samp{
font-family: monospace;
}
div.vignettes a:hover {
background: rgb(85%, 85%, 85%);
}
tr {
vertical-align: top;
}
span.rlang {
font-family: Courier New, Courier;
color: #666666;
}

View File

@ -0,0 +1,31 @@
Package: BiocVersion
Version: 3.20.0
Title: Set the appropriate version of Bioconductor packages
Description: This package provides repository information for the appropriate
version of Bioconductor.
Authors@R: c(
person("Martin", "Morgan", email = "martin.morgan@roswellpark.org",
role = "aut"),
person("Marcel", "Ramos", email = "marcel.ramos@roswellpark.org",
role = "ctb"),
person("Bioconductor", "Package Maintainer",
email = "maintainer@bioconductor.org",
role = c("ctb", "cre")))
biocViews: Infrastructure
Depends: R (>= 4.4.0)
License: Artistic-2.0
Encoding: UTF-8
RoxygenNote: 6.0.1
git_url: https://git.bioconductor.org/packages/BiocVersion
git_branch: devel
git_last_commit: 43c716a
git_last_commit_date: 2024-04-30
Repository: Bioconductor 3.20
Date/Publication: 2024-10-21
NeedsCompilation: no
Packaged: 2024-10-21 21:15:31 UTC; biocbuild
Author: Martin Morgan [aut],
Marcel Ramos [ctb],
Bioconductor Package Maintainer [ctb, cre]
Maintainer: Bioconductor Package Maintainer <maintainer@bioconductor.org>
Built: R 4.4.1; ; 2024-10-22 11:00:14 UTC; windows

View File

@ -0,0 +1 @@
BiocVersion Determine Bioconductor version in use

16
dist/lib/r/site-library/BiocVersion/MD5 vendored Normal file
View File

@ -0,0 +1,16 @@
af67d8223461cf2d1d9470f335c2c797 *DESCRIPTION
1674d337a2a454f7416a8f7963598642 *INDEX
9f935536cab4229743d5e753f071db94 *Meta/Rd.rds
6e92f4cce1a21912f8cb6b1ee6c329b7 *Meta/features.rds
760ae3daa40f8717a4836baa4546e25e *Meta/hsearch.rds
8e211286e8e2cc2c13589afe6ccdad16 *Meta/links.rds
3b096f0b670ec99678a209f635e74469 *Meta/nsInfo.rds
fa3fdb125abcb65713810e638cacb032 *Meta/package.rds
2c48270d9ac4a7d01cd11a3307e91c32 *NAMESPACE
b394781dd962f33e3b84d1e99d356f86 *help/AnIndex
dea60a327930ce953f24f657ee8c840f *help/BiocVersion.rdb
f68f301f887afea9f4d111d1cfb00898 *help/BiocVersion.rdx
50b7295432829e777ed1d73032e7272c *help/aliases.rds
4d797f31f7ae53e0d66697b037af1752 *help/paths.rds
86c5fa962a606660050f051e1c7b06b2 *html/00Index.html
8b9362669af13540a86a3ac6cf22f99d *html/R.css

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
# Default NAMESPACE created by R
# Remove the previous line if you edit this file
# Export all names
exportPattern("^[^.]")

View File

@ -0,0 +1 @@
BiocVersion BiocVersion-pkg

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head><title>R: Set the appropriate version of Bioconductor packages</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body><div class="container">
<h1> Set the appropriate version of Bioconductor packages
<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
</h1>
<hr/>
<div style="text-align: center;">
<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
</div><h2>Documentation for package &lsquo;BiocVersion&rsquo; version 3.20.0</h2>
<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
</ul>
<h2>Help Pages</h2>
<table style="width: 100%;">
<tr><td style="width: 25%;"><a href="BiocVersion-pkg.html">BiocVersion</a></td>
<td>Determine Bioconductor version in use</td></tr>
</table>
</div></body></html>

View File

@ -0,0 +1,130 @@
@media screen {
.container {
padding-right: 10px;
padding-left: 10px;
margin-right: auto;
margin-left: auto;
max-width: 900px;
}
}
.rimage img { /* from knitr - for examples and demos */
width: 96%;
margin-left: 2%;
}
.katex { font-size: 1.1em; }
code {
color: inherit;
background: inherit;
}
body {
line-height: 1.4;
background: white;
color: black;
}
a:link {
background: white;
color: blue;
}
a:visited {
background: white;
color: rgb(50%, 0%, 50%);
}
h1 {
background: white;
color: rgb(55%, 55%, 55%);
font-family: monospace;
font-size: 1.4em; /* x-large; */
text-align: center;
}
h2 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-size: 1.2em; /* large; */
text-align: center;
}
h3 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-size: 1.2em; /* large; */
}
h4 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-style: italic;
font-size: 1.2em; /* large; */
}
h5 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
}
h6 {
background: white;
color: rgb(40%, 40%, 40%);
font-family: monospace;
font-style: italic;
}
img.toplogo {
width: 4em;
vertical-align: middle;
}
img.arrow {
width: 30px;
height: 30px;
border: 0;
}
span.acronym {
font-size: small;
}
span.env {
font-family: monospace;
}
span.file {
font-family: monospace;
}
span.option{
font-family: monospace;
}
span.pkg {
font-weight: bold;
}
span.samp{
font-family: monospace;
}
div.vignettes a:hover {
background: rgb(85%, 85%, 85%);
}
tr {
vertical-align: top;
}
span.rlang {
font-family: Courier New, Courier;
color: #666666;
}

View File

@ -0,0 +1,31 @@
citHeader("The methods within the code package can be cited as:")
citEntry(
entry="article",
title = "Complex heatmaps reveal patterns and correlations in multidimensional genomic data",
author = personList(as.person("Zuguang Gu"),
as.person("Roland Eils"),
as.person("Matthias Schlesner")),
journal = "Bioinformatics",
doi = "10.1093/bioinformatics/btw313",
year = 2016,
textVersion = "Gu, Z. (2016) Complex heatmaps reveal patterns and correlations in multidimensional genomic data. Bioinformatics."
)
citEntry(
entry="article",
title = "Complex Heatmap Visualization",
author = personList(as.person("Zuguang Gu")),
doi = "10.1002/imt2.43",
journal = "iMeta",
year = 2022,
textVersion = "Gu, Z. (2022) Complex Heatmap Visualization. iMeta."
)
citFooter("This free open-source software implements academic
research by the authors and co-workers. If you use it,
please support the project by citing the appropriate
journal articles.")

View File

@ -0,0 +1,35 @@
Package: ComplexHeatmap
Type: Package
Title: Make Complex Heatmaps
Version: 2.22.0
Date: 2024-09-24
Authors@R: person("Zuguang", "Gu", email = "z.gu@dkfz.de", role = c("aut", "cre"),
comment = c('ORCID'="0000-0002-7395-8709"))
Depends: R (>= 3.5.0), methods, grid, graphics, stats, grDevices
Imports: circlize (>= 0.4.14), GetoptLong, colorspace, clue,
RColorBrewer, GlobalOptions (>= 0.1.0), png, digest, IRanges,
matrixStats, foreach, doParallel, codetools
Suggests: testthat (>= 1.0.0), knitr, markdown, dendsort, jpeg, tiff,
fastcluster, EnrichedHeatmap, dendextend (>= 1.0.1), grImport,
grImport2, glue, GenomicRanges, gridtext, pheatmap (>= 1.0.12),
gridGraphics, gplots, rmarkdown, Cairo, magick
VignetteBuilder: knitr
Description: Complex heatmaps are efficient to visualize associations
between different sources of data sets and reveal potential patterns.
Here the ComplexHeatmap package provides a highly flexible way to arrange
multiple heatmaps and supports various annotation graphics.
biocViews: Software, Visualization, Sequencing
URL: https://github.com/jokergoo/ComplexHeatmap,
https://jokergoo.github.io/ComplexHeatmap-reference/book/
License: MIT + file LICENSE
git_url: https://git.bioconductor.org/packages/ComplexHeatmap
git_branch: RELEASE_3_20
git_last_commit: bf351d6
git_last_commit_date: 2024-10-29
Repository: Bioconductor 3.20
Date/Publication: 2024-10-29
NeedsCompilation: no
Packaged: 2024-10-30 01:53:44 UTC; biocbuild
Author: Zuguang Gu [aut, cre] (<https://orcid.org/0000-0002-7395-8709>)
Maintainer: Zuguang Gu <z.gu@dkfz.de>
Built: R 4.4.1; ; 2024-10-30 15:39:55 UTC; windows

View File

@ -0,0 +1,359 @@
%v% Vertically Add Heatmaps or Annotations to a
Heatmap List
+.AdditiveUnit Horizontally Add Heatmaps or Annotations to a
Heatmap List
AdditiveUnit Constructor Method for AdditiveUnit Class
AdditiveUnit-class Class for Concatenating Heatmaps and
Annotations
AnnotationFunction Constructor of AnnotationFunction Class
AnnotationFunction-class
The AnnotationFunction Class
ColorMapping Constructor Method for ColorMapping Class
ColorMapping-class Class for Color Mapping
ComplexHeatmap-package
Make complex heatmaps
Heatmap Constructor method for Heatmap class
Heatmap-class Class for a Single Heatmap
Heatmap3D 3D Heatmap
HeatmapAnnotation Constructor Method for HeatmapAnnotation class
HeatmapAnnotation-class
Class for Heatmap Annotations
HeatmapList Constructor method for HeatmapList class
HeatmapList-class Class for a list of heatmaps
Legend Make a Single Legend
Legends Constructor method for Legends class
Legends-class The Class for Legends
SingleAnnotation Constructor Method for SingleAnnotation Class
SingleAnnotation-class
Class for a Single Annotation
UpSet Make the UpSet plot
[.AnnotationFunction Subset an AnnotationFunction Object
[.Heatmap Subset a Heatmap
[.HeatmapAnnotation Subset the HeatmapAnnotation object
[.HeatmapList Subset a HeatmapList object
[.SingleAnnotation Subset an SingleAnnotation Object
[.comb_mat Subset the Combination Matrix
[.gridtext Subset method of gridtext class
add_heatmap Method dispatch page for add_heatmap
add_heatmap,Heatmap-method
Add Heatmap to the Heatmap List
add_heatmap,HeatmapAnnotation-method
Add Annotations or Heatmaps as a Heatmap List
add_heatmap,HeatmapList-method
Add heatmaps and row annotations to the heatmap
list
adjust_dend_by_x Adjust the Positions of nodes/leaves in the
Dendrogram
adjust_heatmap_list,HeatmapList-method
Adjust Heatmap List
alter_graphic Automatically generate alter_fun
anno_barplot Barplot Annotation
anno_block Block annotation
anno_boxplot Boxplot Annotation
anno_customize Customized annotation
anno_density Density Annotation
anno_empty Empty Annotation
anno_histogram Histogram Annotation
anno_horizon Horizon chart Annotation
anno_image Image Annotation
anno_joyplot Joyplot Annotation
anno_lines Lines Annotation
anno_link Link Annotation
anno_mark Link annotation with labels
anno_numeric Numeric labels annotation
anno_oncoprint_barplot
Barplot Annotation for oncoPrint
anno_points Points Annotation
anno_simple Simple Annotation
anno_summary Summary Annotation
anno_text Text Annotation
anno_textbox Text box annotations
anno_zoom Zoom annotation
annotation_axis_grob Grob for Annotation Axis
annotation_legend_size,HeatmapList-method
Size of the Annotation Legends
attach_annotation,Heatmap-method
Attach heatmap annotations to the heatmap
bar3D Draw 3D bars
bin_genome Bin the genome
c.ColorMapping Concatenate A List of ColorMapping objects
c.HeatmapAnnotation Concatenate Heatmap Annotations
cluster_between_groups
Cluster only between Groups
cluster_within_group Cluster within and between Groups
color_mapping_legend,ColorMapping-method
Draw Legend Based on Color Mapping
columnAnnotation Construct Column Annotations
column_dend Method dispatch page for column_dend
column_dend,Heatmap-method
Get Column Dendrograms from a Heatmap
column_dend,HeatmapList-method
Get Column Dendrograms from a hHeatmap List
column_order Method dispatch page for column_order
column_order,Heatmap-method
Get Column Order from a Aeatmap List
column_order,HeatmapList-method
Get Column Order from a Heatmap List
comb_degree Degrees of the Combination sets
comb_name Names of the Combination sets
comb_size Sizes of the Combination sets
compare_heatmap Compare heatmaps between stats::heatmap() and
ComplexHeatmap::heatmap()
compare_heatmap.2 Compare heatmaps between gplots::heatmap.2()
and ComplexHeatmap::heatmap()
compare_pheatmap Compare heatmaps between pheatmap::pheatmap()
and ComplexHeatmap::pheatmap()
complement_size Complement Set Size
component_height Method dispatch page for component_height
component_height,Heatmap-method
Heights of Heatmap Components
component_height,HeatmapList-method
Height of Heatmap List Components
component_width Method dispatch page for component_width
component_width,Heatmap-method
Widths of Heatmap Components
component_width,HeatmapList-method
Width of Heatmap List Components
copy_all Method dispatch page for copy_all
copy_all,AnnotationFunction-method
Copy the AnnotationFunction Object
copy_all,SingleAnnotation-method
Copy the SingleAnnotation object
decorate_annotation Decorate Heatmap Annotation
decorate_column_dend Decorate Heatmap Column Dendrograms
decorate_column_names Decorate Heatmap Column Names
decorate_column_title Decorate Heatmap Column Titles
decorate_dend Decorate Heatmap Dendrograms
decorate_dimnames Decorate Heatmap Dimension Names
decorate_heatmap_body Decorate Heatmap Bodies
decorate_row_dend Decorate Heatmap Row Dendrograms
decorate_row_names Decorate Heatmap Row Names
decorate_row_title Decorate Heatmap Row Titles
decorate_title Decorate Heatmap Titles
default_axis_param The Default Parameters for Annotation Axis
default_get_type Default get_type for oncoPrint()
dend_heights Height of the Dendrograms
dend_xy Coordinates of the Dendrogram
dendrogramGrob Grob for Dendrogram
densityHeatmap Visualize Density Distribution by Heatmap
dim.Heatmap Dimension of the Heatmap
dist2 Calculate Pairwise Distance from a Matrix
draw Method dispatch page for draw
draw,AnnotationFunction-method
Draw the AnnotationFunction Object
draw,Heatmap-method Draw a Single Heatmap
draw,HeatmapAnnotation-method
Draw the Heatmap Annotations
draw,HeatmapList-method
Draw a list of heatmaps
draw,Legends-method Draw the Legends
draw,SingleAnnotation-method
Draw the Single Annotation
draw_annotation,Heatmap-method
Draw Heatmap Annotations on the Heatmap
draw_annotation_legend,HeatmapList-method
Draw legends for All Annotations
draw_dend,Heatmap-method
Draw Heatmap Dendrograms
draw_dimnames,Heatmap-method
Draw row names or column names
draw_heatmap_body,Heatmap-method
Draw Heatmap Body
draw_heatmap_legend,HeatmapList-method
Draw legends for All Heatmaps
draw_heatmap_list,HeatmapList-method
Draw the List of Heatmaps
draw_title Method dispatch page for draw_title
draw_title,Heatmap-method
Draw Heatmap Title
draw_title,HeatmapList-method
Draw Heatmap List Title
extract_comb Extract Elements in a Combination set
frequencyHeatmap Visualize Frequency Distribution by Heatmap
full_comb_code Full set of code of combination sets
getXY_in_parent_vp Convert XY in a Parent Viewport
get_color_mapping_list,HeatmapAnnotation-method
Get a List of ColorMapping objects
get_legend_param_list,HeatmapAnnotation-method
Get a List of Annotation Legend Parameters
grid.annotation_axis Draw Annotation Axis
grid.boxplot Draw a Single Boxplot
grid.dendrogram Draw the Dendrogram
grid.draw.Legends Draw the Legends
grid.textbox Draw multiple texts in a box
gt_render Mark the text for the rendering by gridtext
package
heatmap_legend_size,HeatmapList-method
Size of the Heatmap Legends
height.AnnotationFunction
Height of the AnnotationFunction Object
height.Heatmap Height of the Heatmap
height.HeatmapAnnotation
Height of the HeatmapAnnotation Object
height.HeatmapList Height of the Heatmap List
height.Legends Height of the Legends
height.SingleAnnotation
Height of the SingleAnnotation object
heightAssign.AnnotationFunction
Assign the Height to the AnnotationFunction
Object
heightAssign.HeatmapAnnotation
Assign the Height to the HeatmapAnnotation
Object
heightAssign.SingleAnnotation
Assign the Height to the SingleAnnotation
Object
heightDetails.annotation_axis
Height for annotation_axis Grob
heightDetails.legend Grob height for packed_legends
heightDetails.legend_body
Grob height for legend_body
heightDetails.packed_legends
Grob height for packed_legends
heightDetails.textbox Height for textbox grob
ht_global_opt Global Options for Heatmaps
ht_opt Global Options for Heatmaps
ht_size Calculate the width and height of the heatmaps
is_abs_unit Test Whether it is an Absolute Unit
length.HeatmapAnnotation
Number of Annotations
length.HeatmapList Length of the HeatmapList object
list_components List All Heatmap Components
list_to_matrix Convert a List of Sets to a Binary Matrix
make_column_cluster,Heatmap-method
Make Cluster on Columns
make_comb_mat Make a Combination Matrix for UpSet Plot
make_layout Method dispatch page for make_layout
make_layout,Heatmap-method
Make the Layout of a Single Heatmap
make_layout,HeatmapList-method
Make Layout for the Heatmap List
make_row_cluster,Heatmap-method
Make Cluster on Rows
map_to_colors,ColorMapping-method
Map Values to Colors
max_text_height Maximum Height of Text
max_text_width Maximum Width of Text
merge_dendrogram Merge Dendrograms
names.HeatmapAnnotation
Annotation Names
names.HeatmapList Names of the heatmaps/annotations
namesAssign.HeatmapAnnotation
Assign Annotation Names
ncol.Heatmap Number of Columns in the Heatmap
nobs.AnnotationFunction
Number of Observations
nobs.HeatmapAnnotation
Number of Observations
nobs.SingleAnnotation Number of Observations
normalize_comb_mat Normalize a list of combination matrice
normalize_genomic_signals_to_bins
Overlap genomic signals to the genomic bins
nrow.Heatmap Number of Rows in the Heatmap
oncoPrint Make oncoPrint
order.comb_mat Order of the Combination Sets
packLegend Pack Legends
pheatmap Translate pheatmap::pheatmap to
ComplexHeatmap::Heatmap
pindex Get Values in a Matrix by Pair-wise Indices
plot.Heatmap Draw heatmap
plot.HeatmapAnnotation
Draw heatmap annotations
plot.HeatmapList Draw heatmap
prepare,Heatmap-method
Prepare the Heatmap
print.comb_mat Print the comb_mat Object
re_size,HeatmapAnnotation-method
Resize the Width or Height of Heatmap
Annotations
restore_matrix Restore the index vector to index matrix in
layer_fun
rowAnnotation Construct Row Annotations
row_anno_barplot Barplots as Row Annotation
row_anno_boxplot Boxplots as Row Annotation
row_anno_density Density as Row Annotation
row_anno_histogram Histograms as Row Annotation
row_anno_points Points as Row Annotation
row_anno_text Text as Row Annotation
row_dend Method dispatch page for row_dend
row_dend,Heatmap-method
Get Row Dendrograms from a Heatmap
row_dend,HeatmapList-method
Get Row Dendrograms from a Heatmap List
row_order Method dispatch page for row_order
row_order,Heatmap-method
Get Row Order from a Heatmap
row_order,HeatmapList-method
Get Row Order from a Heatmap List
set_component_height,Heatmap-method
Set Height of Heatmap Component
set_component_width,Heatmap-method
Set Width of Heatmap Component
set_name Set Names
set_nameAssign Modify Set Names
set_size Set Sizes
show Method dispatch page for show
show,AnnotationFunction-method
Print the AnnotationFunction Object
show,ColorMapping-method
Print the ColorMapping Object
show,Heatmap-method Draw the Single Heatmap with Defaults
show,HeatmapAnnotation-method
Print the HeatmapAnnotation object
show,HeatmapList-method
Draw a list of heatmaps with default parameters
show,SingleAnnotation-method
Print the SingleAnnotation object
size.AnnotationFunction
Size of the AnnotationFunction Object
size.HeatmapAnnotation
Size of the HeatmapAnnotation Object
size.SingleAnnotation Size of the SingleAnnotation Object
sizeAssign.AnnotationFunction
Assign the Size to the AnnotationFunction
Object
sizeAssign.HeatmapAnnotation
Assign the Size to the HeatmapAnnotation Object
sizeAssign.SingleAnnotation
Assign the Size to the SingleAnnotation Object
smartAlign2 Adjust positions of rectanglar shapes
str.comb_mat str method
subset_gp Subset a gpar Object
subset_matrix_by_row Subset the Matrix by Rows
subset_no Do not do subseting
subset_vector Subset the vector
summary.Heatmap Print the Summary of a Heatmap
summary.HeatmapList Summary of a Heatmap List
t.comb_mat Transpost the Combination Matrix
test_alter_fun Test alter_fun for oncoPrint()
textbox_grob A simple grob for the word cloud
unify_mat_list Unify a List of Matrix
upset_left_annotation UpSet Left Annotation
upset_right_annotation
Default UpSet Right Annotation
upset_top_annotation Default UpSet Top Annotation
width.AnnotationFunction
Width of the AnnotationFunction Object
width.Heatmap Width of the Heatmap
width.HeatmapAnnotation
Width of the HeatmapAnnotation Object
width.HeatmapList Width of the Heatmap List
width.Legends Width of the Legends
width.SingleAnnotation
Width of the SingleAnnotation Object
widthAssign.AnnotationFunction
Assign the Width to the AnnotationFunction
Object
widthAssign.HeatmapAnnotation
Assign the Width to the HeatmapAnnotation
Object
widthAssign.SingleAnnotation
Assign the Width to the SingleAnnotation Object
widthDetails.annotation_axis
Width for annotation_axis Grob
widthDetails.legend Grob width for packed_legends
widthDetails.legend_body
Grob width for legend_body
widthDetails.packed_legends
Grob width for packed_legends
widthDetails.textbox Width for textbox grob

View File

@ -0,0 +1,3 @@
YEAR: 2020
COPYRIGHT HOLDER: Zuguang Gu

View File

@ -0,0 +1,40 @@
d3a79ec987ef933b7bacd0c995c43c4b *CITATION
98c8697be146b114fc8af278724b48d9 *DESCRIPTION
0c067870e44376082e663296070353bf *INDEX
65eb2611f49c090b2355137c15fda35f *LICENSE
448b6ec974998802dbbf94c29638aabe *Meta/Rd.rds
6e92f4cce1a21912f8cb6b1ee6c329b7 *Meta/features.rds
e13a468913f09354154e1c2d56b2f2ba *Meta/hsearch.rds
06d55655f7b0376d205a6cf9f150faa4 *Meta/links.rds
bafc00ed78e0f3515d33374d4890d890 *Meta/nsInfo.rds
94ce9bf84d30bf02f20f42f3aa17a7b1 *Meta/package.rds
6c3b3978db22f99f0f6deb1f8e26cf1b *Meta/vignette.rds
54028454636ce983d6e7dbc15b584360 *NAMESPACE
12f33cbf02e435b2bc3b6de11f82a4e4 *NEWS
d6c68f1fe41ced6e98a766a3757313da *R/ComplexHeatmap
6eec7bb7a6b31ba259c81e2badbcd83a *R/ComplexHeatmap.rdb
6f98f430e66371a6420210b7c26cbe46 *R/ComplexHeatmap.rdx
71859b8570fac60f1627998b19a60865 *doc/complex_heatmap.html
c55ada46255a2e25ab024ef1b0c29521 *doc/complex_heatmap.rmd
103ab6ebd171871889355c351fbbfb71 *doc/index.html
0c7021081c128dba1fcaa3ab4e41cef9 *doc/most_probably_asked_questions.R
e1693b7b510b62e3266a7010d4a3adf0 *doc/most_probably_asked_questions.Rmd
7adc9f27d3128ab03800b13ea64d6c32 *doc/most_probably_asked_questions.html
fab971ea6c0825b577fcdb96e82cf322 *extdata/dmr_summary.rds
0292270ada57289c6ed9e972dea7cfe1 *extdata/gene_expression.rds
f77ae2049d3d3416c2559a3a39d635d1 *extdata/generate_random_dataset.R
69d4cc4718435a7911ba984f83e4b1ef *extdata/gr.rds
a813a69858a7828be35f106218bf2604 *extdata/measles.rds
52a6f72fd8d813e2f2d14c561a3b1126 *extdata/meth.rds
71c5e25d67e810722274ba70b8477501 *extdata/rand_mat.rds
e9ce1d37ab2770b41597e7cc282bc900 *extdata/random_meth_expr_data.RData
ea14f550dad0e61ca314ce0acc3ac4fe *extdata/sample_order.txt
1566585acdaeb73af885f772219e37b2 *extdata/tcga_lung_adenocarcinoma_provisional_ras_raf_mek_jnk_signalling.rds
bd15f0d4e2868c9d0348d102ceb943f3 *extdata/tcga_lung_adenocarcinoma_provisional_ras_raf_mek_jnk_signalling.txt
fd29f52d896a7b4fdcfa4c8e953ea739 *help/AnIndex
59c9ca96f4ed80d6474eac32a610d9bc *help/ComplexHeatmap.rdb
a1f6e04aca40c03dc4486555e11dae2d *help/ComplexHeatmap.rdx
5c7b0ae40f5575af24f7f30b20703396 *help/aliases.rds
c7c4192b605f882dbda0dd3ff422558a *help/paths.rds
2367af9c422e961349b55d645a791df8 *html/00Index.html
8b9362669af13540a86a3ac6cf22f99d *html/R.css

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,327 @@
S3method("+", "AdditiveUnit")
export("+.AdditiveUnit")
S3method("[", "AnnotationFunction")
export("[.AnnotationFunction")
S3method("[", "Heatmap")
export("[.Heatmap")
S3method("[", "HeatmapAnnotation")
export("[.HeatmapAnnotation")
S3method("[", "HeatmapList")
export("[.HeatmapList")
S3method("[", "SingleAnnotation")
export("[.SingleAnnotation")
S3method("[", "comb_mat")
export("[.comb_mat")
S3method("[", "gridtext")
export("[.gridtext")
S3method("c", "ColorMapping")
export("c.ColorMapping")
S3method("c", "HeatmapAnnotation")
export("c.HeatmapAnnotation")
S3method("dim", "Heatmap")
export("dim.Heatmap")
S3method("grid.draw", "Legends")
export("grid.draw.Legends")
S3method("height", "AnnotationFunction")
export("height.AnnotationFunction")
S3method("height", "Heatmap")
export("height.Heatmap")
S3method("height", "HeatmapAnnotation")
export("height.HeatmapAnnotation")
S3method("height", "HeatmapList")
export("height.HeatmapList")
S3method("height", "Legends")
export("height.Legends")
S3method("height", "SingleAnnotation")
export("height.SingleAnnotation")
S3method("height<-", "AnnotationFunction")
export("height<-.AnnotationFunction")
S3method("height<-", "HeatmapAnnotation")
export("height<-.HeatmapAnnotation")
S3method("height<-", "SingleAnnotation")
export("height<-.SingleAnnotation")
S3method("heightDetails", "annotation_axis")
export("heightDetails.annotation_axis")
S3method("heightDetails", "legend")
export("heightDetails.legend")
S3method("heightDetails", "legend_body")
export("heightDetails.legend_body")
S3method("heightDetails", "packed_legends")
export("heightDetails.packed_legends")
S3method("heightDetails", "textbox")
export("heightDetails.textbox")
S3method("length", "HeatmapAnnotation")
export("length.HeatmapAnnotation")
S3method("length", "HeatmapList")
export("length.HeatmapList")
S3method("names", "HeatmapAnnotation")
export("names.HeatmapAnnotation")
S3method("names", "HeatmapList")
export("names.HeatmapList")
S3method("names<-", "HeatmapAnnotation")
export("names<-.HeatmapAnnotation")
S3method("ncol", "Heatmap")
export("ncol.Heatmap")
S3method("nobs", "AnnotationFunction")
export("nobs.AnnotationFunction")
S3method("nobs", "HeatmapAnnotation")
export("nobs.HeatmapAnnotation")
S3method("nobs", "SingleAnnotation")
export("nobs.SingleAnnotation")
S3method("nrow", "Heatmap")
export("nrow.Heatmap")
S3method("plot", "Heatmap")
export("plot.Heatmap")
S3method("plot", "HeatmapAnnotation")
export("plot.HeatmapAnnotation")
S3method("plot", "HeatmapList")
export("plot.HeatmapList")
S3method("print", "comb_mat")
export("print.comb_mat")
S3method("size", "AnnotationFunction")
export("size.AnnotationFunction")
S3method("size", "HeatmapAnnotation")
export("size.HeatmapAnnotation")
S3method("size", "SingleAnnotation")
export("size.SingleAnnotation")
S3method("size<-", "AnnotationFunction")
export("size<-.AnnotationFunction")
S3method("size<-", "HeatmapAnnotation")
export("size<-.HeatmapAnnotation")
S3method("size<-", "SingleAnnotation")
export("size<-.SingleAnnotation")
S3method("str", "comb_mat")
export("str.comb_mat")
S3method("summary", "Heatmap")
export("summary.Heatmap")
S3method("summary", "HeatmapList")
export("summary.HeatmapList")
S3method("t", "comb_mat")
export("t.comb_mat")
S3method("width", "AnnotationFunction")
export("width.AnnotationFunction")
S3method("width", "Heatmap")
export("width.Heatmap")
S3method("width", "HeatmapAnnotation")
export("width.HeatmapAnnotation")
S3method("width", "HeatmapList")
export("width.HeatmapList")
S3method("width", "Legends")
export("width.Legends")
S3method("width", "SingleAnnotation")
export("width.SingleAnnotation")
S3method("width<-", "AnnotationFunction")
export("width<-.AnnotationFunction")
S3method("width<-", "HeatmapAnnotation")
export("width<-.HeatmapAnnotation")
S3method("width<-", "SingleAnnotation")
export("width<-.SingleAnnotation")
S3method("widthDetails", "annotation_axis")
export("widthDetails.annotation_axis")
S3method("widthDetails", "legend")
export("widthDetails.legend")
S3method("widthDetails", "legend_body")
export("widthDetails.legend_body")
S3method("widthDetails", "packed_legends")
export("widthDetails.packed_legends")
S3method("widthDetails", "textbox")
export("widthDetails.textbox")
export("%v%")
export("AdditiveUnit")
export("AnnotationFunction")
export("ColorMapping")
export("Heatmap")
export("Heatmap3D")
export("HeatmapAnnotation")
export("HeatmapList")
export("Legend")
export("Legends")
export("SingleAnnotation")
export("UpSet")
export("adjust_dend_by_x")
export("alter_graphic")
export("anno_barplot")
export("anno_block")
export("anno_boxplot")
export("anno_customize")
export("anno_density")
export("anno_empty")
export("anno_histogram")
export("anno_horizon")
export("anno_image")
export("anno_joyplot")
export("anno_lines")
export("anno_link")
export("anno_mark")
export("anno_numeric")
export("anno_oncoprint_barplot")
export("anno_points")
export("anno_simple")
export("anno_summary")
export("anno_text")
export("anno_textbox")
export("anno_zoom")
export("annotation_axis_grob")
export("bar3D")
export("bin_genome")
export("cluster_between_groups")
export("cluster_within_group")
export("columnAnnotation")
export("comb_degree")
export("comb_name")
export("comb_size")
export("compare_heatmap")
export("compare_heatmap.2")
export("compare_pheatmap")
export("complement_size")
export("decorate_annotation")
export("decorate_column_dend")
export("decorate_column_names")
export("decorate_column_title")
export("decorate_dend")
export("decorate_dimnames")
export("decorate_heatmap_body")
export("decorate_row_dend")
export("decorate_row_names")
export("decorate_row_title")
export("decorate_title")
export("default_axis_param")
export("default_get_type")
export("dend_heights")
export("dend_xy")
export("dendrogramGrob")
export("densityHeatmap")
export("dist2")
export("extract_comb")
export("frequencyHeatmap")
export("full_comb_code")
export("getXY_in_parent_vp")
export("grid.annotation_axis")
export("grid.boxplot")
export("grid.dendrogram")
export("grid.textbox")
export("gt_render")
export("ht_global_opt")
export("ht_opt")
export("ht_size")
export("is_abs_unit")
export("list_components")
export("list_to_matrix")
export("make_comb_mat")
export("max_text_height")
export("max_text_width")
export("merge_dendrogram")
export("normalize_comb_mat")
export("normalize_genomic_signals_to_bins")
export("oncoPrint")
export("order.comb_mat")
export("packLegend")
export("pheatmap")
export("pindex")
export("restore_matrix")
export("rowAnnotation")
export("row_anno_barplot")
export("row_anno_boxplot")
export("row_anno_density")
export("row_anno_histogram")
export("row_anno_points")
export("row_anno_text")
export("set_name")
export("set_name<-")
export("set_size")
export("smartAlign2")
export("subset_gp")
export("subset_matrix_by_row")
export("subset_no")
export("subset_vector")
export("test_alter_fun")
export("textbox_grob")
export("unify_mat_list")
export("upset_left_annotation")
export("upset_right_annotation")
export("upset_top_annotation")
exportClasses("AdditiveUnit")
export("AdditiveUnit")
exportClasses("AnnotationFunction")
export("AnnotationFunction")
exportClasses("ColorMapping")
export("ColorMapping")
exportClasses("Heatmap")
export("Heatmap")
exportClasses("HeatmapAnnotation")
export("HeatmapAnnotation")
exportClasses("HeatmapList")
export("HeatmapList")
exportClasses("Legends")
export("Legends")
exportClasses("SingleAnnotation")
export("SingleAnnotation")
exportMethods("add_heatmap")
exportMethods("adjust_heatmap_list")
exportMethods("annotation_legend_size")
exportMethods("attach_annotation")
exportMethods("color_mapping_legend")
exportMethods("column_dend")
exportMethods("column_order")
exportMethods("component_height")
exportMethods("component_width")
exportMethods("copy_all")
exportMethods("draw")
exportMethods("draw_annotation")
exportMethods("draw_annotation_legend")
exportMethods("draw_dend")
exportMethods("draw_dimnames")
exportMethods("draw_heatmap_body")
exportMethods("draw_heatmap_legend")
exportMethods("draw_heatmap_list")
exportMethods("draw_title")
exportMethods("get_color_mapping_list")
exportMethods("get_legend_param_list")
exportMethods("heatmap_legend_size")
exportMethods("make_column_cluster")
exportMethods("make_layout")
exportMethods("make_row_cluster")
exportMethods("map_to_colors")
exportMethods("prepare")
exportMethods("re_size")
exportMethods("row_dend")
exportMethods("row_order")
exportMethods("set_component_height")
exportMethods("set_component_width")
import(digest)
import(doParallel)
import(foreach)
import(grDevices)
import(graphics)
import(grid)
import(matrixStats)
import(methods)
import(parallel)
import(png)
import(stats)
importFrom("GetoptLong", qq)
importFrom("GetoptLong", qq.options)
importFrom("GetoptLong", qqcat)
importFrom("GlobalOptions", setGlobalOptions)
importFrom("IRanges", "IntegerList")
importFrom("RColorBrewer", brewer.pal)
importFrom("circlize", add_transparency)
importFrom("circlize", colorRamp2)
importFrom("circlize", rand_color)
importFrom("circlize", smartAlign)
importFrom("clue", as.cl_hard_partition)
importFrom("clue", cl_class_ids)
importFrom("clue", cl_consensus)
importFrom("clue", cl_ensemble)
importFrom("codetools", "findGlobals")
importFrom("colorspace", RGB)
importFrom("colorspace", coords)
importFrom("colorspace", diverge_hcl)
importFrom("colorspace", rainbow_hcl)
importFrom("colorspace", sequential_hcl)
importFrom("utils", "combn")
importFrom("utils", "getFromNamespace")
importFrom("utils", "packageDescription")
importFrom("utils", "str")

View File

@ -0,0 +1,851 @@
CHANGES in VERSION 2.21.1
* `pheatmap()`: `na_col` is passed to `Heatmap()`.
=======================
CHANGES in VERSION 2.15.3
* `Legend()`: `legend_gp` also controls line color, width and style.
* `anno_mark()`: labels can be duplicated.
=======================
CHANGES in VERSION 2.15.1
* `Legend()`: allows `NA` in `pch`.
* `SingleAnnotation()`: correctly calculate the max width/height of a vector of texts.
* `to_unit()`: fixed a bug when the unit is negative.
* `Legend()`: add `tick_length` argument.
* `Legend()`: colors are correctly calculated when differences between `at` are not equal.
=======================
CHANGES in VERSION 2.13.4
* `anno_barplot()`: fixed a bug when split is set, the bars are wrongly plotted under besides = TRUE.
* `anno_boxplot()`: add two new argumetn: `add_points` and `pt_gp`.
* fixed a bug of size of column title wrongly calculated.
========================
CHANGES in VERSION 2.13.2
* `HeatmapAnnotation()`: fixed a bug where annotation legends are not all generated when `df` is set.
* `UpSet()`: now `bg_col` can be a vector of length more than two.
* `oncoPrint()`: Add `pct_include` argument.
* `anno_density()`: fixed a bug where `xlim` is ignored for "heatmap".
========================
CHANGES in VERSION 2.13.1
* `column_title_rot` can be set with any degree value.
* automatically recognize Jupyter environment.
* `UpSet()`: `comb_col` now is correctly assigned when the combination matrix is transposed.
========================
CHANGES in VERSION 2.11.2
* discrete color mapping: when heatmap_param_list$at is set, it is reduced accordingly
to `col`.
=======================
CHANGES in VERSION 2.11.1
* add a global option `ht_opt$COLOR` to control colors for continuous color mapping.
* `annotation_label` can be an `expression` object.
* `recycle_gp()`: now consider when n = 0.
* `anno_block()`: add `align_to` argument.
* add `anno_text_box()` and `grid.text_box()`.
* add `show_name` argument in `anno_empty()`.
* the validation of annotations in `HeatmapAnnotation()` is simplified.
* add `anno_numeric()`.
* when `rect_gp = gpar(type = "none")`, `use_raster` is enforced to be FALSE.
* "global variables" outside `cell_fun`/`layer_fun` are aotumatially identified and saved locally.
=========================
CHANGES in VERSION 2.9.4
* fixed a bug of missing right annotation legends for vertically concatenated heatmaps.
* `Legend()`: support `border` to be set to `asis`.
* Rasterization: the default maximal size for temporary image is set to 30000 px (both for width and height).
* add a new argument `beside` in `anno_barplot()` to position bars beside each other.
* add `plot()` method for `Heatmap` and `HeatmapList` classes.
* add `anno_customize()`.
========================
CHANGES in VERSION 2.9.3
* `pheatmap()`/`heatmap()`/`heatmap.2()`: set default of run_draw to FALSE.
* throw error when the heatmaps (list) are already initialized by draw() when adding them.
* set `wrap = TRUE` in `grid.grabExpr()` when capturing the legend objects.
* `make_comb_mat()`: support `GRangesList` object as input.
* legends: fixed a bug of the grid heights were not correctedly calculated.
* discrete annotations: neighbour grids are merged into one single grid if they have the
same values.
* `anno_barplot()`: allows to add numbers on top of bars.
* `UpSet()`: axis labels are automatically formated for genomic coordinates.
* `AnnotationFunction()`: add a new argument `cell_fun`.
* When the dendrogram height is zero, the corresponding viewport has scale (0, 1).
=========================
CHANGES in VERSION 2.9.2
* fixed a bug of `bg_col` for transposed matrix in `UpSet()`.
* print warnings if names of annotations have different orders from the matrix row/column names.
=========================
CHANGES in VERSION 2.9.1
* fixed a bug of editing gTree object where the list element "just" has been
changed to "justification" in recent R versions.
=========================
CHANGES in VERSION 2.7.10
* `anno_simple()`: text symbols can have nchar > 1.
* `anno_text()`: add `show_name` argument.
=========================
CHANGES in VERSION 2.7.9
* add `frequencyHeatmap()`.
* add `Heatmap3D()`.
=========================
CHANGES in VERSION 2.7.8
* add `cluster_between_groups()`.
* add `graphics` argument in `anno_block()`.
=========================
CHANGES in VERSION 2.7.7
* discrete numeric legend labels are in correct order now.
* parallel is implemented with foreach + doParallel
* expression is properly processed for discrete legends
* `adjust_dend_by_x()`: simplified the representation of units.
* number of split can be the same as number of matrix rows/columns.
==========================
CHANGES in VERSION 2.7.6
* `Legend()`: add a new argument `grob`.
==========================
CHANGES in VERSION 2.7.5
* `anno_block()`: add `labels_offset` and `labels_just`.
* `anno_lines()`: `show_points` can be a vector.
* `pheatmap()`: support `kmeans_k`.
==========================
CHANGES in VERSION 2.7.4
* add `save_last` option in `ht_opt()`.
==========================
CHANGES in VERSION 2.7.1
* `normalize_comb_mat()`: add `full_comb_sets` and `complement_set` arguments to control
full sets of combination sets.
* adjust the space of column title according to ggplot2.
* `Legend()`: for title_position == "lefttop", the title position is adjusted.
* Legends are automatically adjusted according to the device size when resizing the device.
* `Legend()`: add `interval_dist` to control the distance of two neighbouring breaks.
* Fixed a bug that it crashes Rstudio
* `make_comb_mat()`: print warning messages when there are NA values in the matrix.
* temporary solution for woking under retina display with Rstudio
* add `bin_genome()` and `normalize_genomic_signals_to_bins()`
* print messages if directly sending `anno_*()` functions to `top_annotation` or similar arguments.
* `pheatmap()`: set heatmap name to " " so that there is no legend title by default.
* also translate `stats::heatmap()` and `gplots::heatmap.2()`.
* move all code for interactive heatmap to InteractiveComplexHeatmap package.
========================
CHANGES in VERSION 2.5.6
* `ht_shiny()`: add argument `app`.
* `grid.dendrogram()`: change the recursive implementation with iterations.
* change default raster device to `CairoPNG`.
* `Heatmap()`: If the discrete `col` covers more than the levels in the matrix,
the full color set is still saved, which means, in `heatmap_legend_param` you
can set `at` that are not all in the matrix but are in the `col`.
* padding of the whole plot and spaces of column titles are adjusted to fit ggplot2
* add `row_gap` and `column_gap` in `Legend()`.
* `oncoPrint()`: now draw legends the same as `alter_fun`.
* add a new function `attach_annotation()`.
* legends for row annotations can be grouped with column annotation legends.
* annotation name allows rotations.
======================
CHANGES in VERSION 2.5.5
* still draw the legend when all values are NA in an annotation.
* add `show_fraction` argument in `anno_oncoprint_barplot()` function to show the fractions
of mutations instead of the counts.
* `pheatmap()`: improve the setting of `color` and `breaks`.
* `ht_opt$TITLE_PADDING` can be set with a unit of length two.
* `HeatmapAnnotation()`: remove colors that are not in the annotations.
* `pheatmap()`: fixed a bug when length(breaks) = length(color) + 1
* `pheatmap()`: legend breaks are centered to zero if the matrix is scaled.
* `pheatmap()`: color mapping is symmetric to zero when scale is set.
* support ragg package to write temporary png files
* `densityHeatmap()`: column dendrogram is reordered by column means for ks method.
======================
CHANGES in VERSION 2.5.4
* fixed a bug where slice clusters were wrongly reordered.
* `Heatmap()`: add `border_gp` argument.
* Legends are nicely placed.
* `anno_block()`: allows to set height and width.
* support better rasterization.
* support setting graphics on dendrogram nodes.
* Add a new vignette "interactive heatmap"
* `Legends()`: fixed a bug of mixtype "legend" to "Legend".
* now assign correct envir to `decorate_dend()`.
* `pheatmap()`: check `NA` in the matrix.
* `grid.dendrogram()`: consider branches with height zero.
* checking the dimension of the matrix and the nobs of annotations when adding them.
========================
CHANGES in VERSION 2.5.3
* add `selectArea()`/`selectPosition()` which allows interactively select a region from
the heatmaps.
* export the heatmap as a shiny app!!!
* `col` in `Heatmap()` accpets a `ColorMapping` object.
* `default_col()`: print a message if there are outliers in the matrix.
* `discrete_legend_body()`: adjust ncol and nrow if there are empty rows and columns in the layout.
* `anno_image()`: fixed a bug that images are not reordered.
* `anno_mark()`: now expression is correctly supported.
* `anno_zoom()`: order of index in `panel_fun` is adjusted to the order in the heatmap
* `list_to_matrix()`: convert elements to characters.
* print messages for `anno_mark()`, `anno_zoom()`, `draw_legend()` (if legends are wrapped)
if working under RStudio.
========================
CHANGES in VERSION 2.5.2
* translate pheatmap to Heatmap
* `upset_top_annotation()` and `upset_right_annotation()`: the names of the annotations
are changed to `intersection_size`, `set_size` and `union_size`.
* `list_components()`: adds `pattern` argument.
========================
CHANGES in VERSION 2.5.1
* A temporary solution of the sum of two complicated units (in temp.R).
========================
CHANGES in VERSION 2.3.4
* add `alter_graphic()` to automatically generate alteration graphic functions.
* add `label`/`annotation_label` argument in `SingleAnnotation()` and `HeatmapAnnotation()`.
* improved the subsetting methods for `comb_mat` class
* rewrite `smartAlign2()`
========================
CHANGES in VERSION 2.3.3
* support **gridtext** package
* fixed the bug of node stack overflow when there are many identical rows for drawing the dendrogram.
see (http://www.thinkingincrowd.me/2016/06/06/How-to-avoid-Stack-overflow-error-on-recursive/)
* support to set legend gaps
* print important messages, e.g. when number of rows are more than 2000, interanlly use_raster
is turned on and the message should be printed to users.
* UpSet plots: optimize the processing of many sets (current solution consumes huge memory)
* UpSet plots: the "intersect" and "union" modes are currectly calculated.
* `anno_block()`: add `show_name` argument.
========================
CHANGES in VERSION 2.3.2
* `anno_simple()`: fixed a bug when pch are all NA in a slice
* adjust code according to grid 4.0.
* move scripts in test_not_run/ to tests/ folder
* `Heatmap()`: `cluster_row_slice`/`cluster_column_slice` set to TRUE
by default for character matrix and when dendrogram is already provided.
* `smartAlign2()`: improved the code that positions are correctly calculated.
* row titles are in the correct order if they are set as "template".
========================
CHANGES in VERSION 2.3.1
* `anno_points()`: allows images as symbols.
* add `HEATMAP_LEGEND_PADDING` and `ANNOTATION_LEGEND_PADDING` options in `ht_opt`
* `oncoPrint()`: print messages if there are NA values in the input matrix
========================
CHANGES in VERSION 2.1.1
* `Heatmap()`: give error when heatmap has empty string as its name.
* `anno_mark()`: text positions are correctly calculated now with rotations.
* The order of legend labels are ordered by either `sort` or `levels`.
========================
CHANGES in VERSION 2.1.0
* check the length of the clustering objects and the matrix rows/columns
* `anno_oncoprint_barplot()`: add `ylim` argumnet
* `anno_mark()`: add `labels_rot` argument
* `draw_legend()`: legends for annotations with the same names are merged
* `densityHeatmap()`: `ylim` works as it is expected.
* add `cluster_row_slices` and `cluster_column_slices` to `draw,HeatmapList-method()`
* `densityHeatmap()`: `col` can be set as a function
* add `cluster_rows`/`cluster_columns` in `oncoPrint()`
* legend labels support symbols
* `Heatmap()`: add `jitter` argument to add tiny random shift to original matrix.
It is mainly to solve the problem of "Error: node stack overflow"
when there are too many identical rows/columns for plotting the dendrograms.
========================
CHANGES in VERSION 1.99.8
* add `title_gap` in `Legend()
* fixed a bug of wrong row title spaces when multiple heatmaps are vertically
concatenated.
* fixed a bug of *_sub_title_side when the heatmap annotation is the first/last
element in the heatmap list.
* zero-column/row heatmap is supported.
* improved calculation of axis breaks
========================
CHANGES in VERSION 1.99.7
* `UpSet()` supports adding complement sets.
* `make_comb_set()`: add `universal_set` and `complement_size` arguments.
* axes can be reversed in anno_* functions.
========================
CHANGES in VERSION 1.99.6
* adjust the size of heatmap annotations and add testing scripts.
* run multiple times k-means to get a consensus partition.
* `show_heatmap_legend` is set to FALSE if `rect_gp = gpar(type = "none")`.
* add `restore_matrix()`.
* add `row_names_centered`/`column_names_centered` arguments to `Heatmap()`.
* `gp` in `anno_text()` supports `fill` and `border`.
* `Legend` adds boxplot-style legend.
* adjustment according to annotation extension is improved.
========================
CHANGES in VERSION 1.99.5
* add `UpSet()` and some related functions to make Upset plots
* fixed bugs of drawing legends
* add `test_alter_fun()`
* `HeatmapAnnotation()`: fixed a bug for setting `height` when all annotations are simple annotations.
* `default_col()`: if the fraction of positive values in the matrix is in (0.3, 0.7), the color mapping
is symmetric to zero.
* check `NA` values in `anno_boxplot()` and `anno_density()`.
* add `mc.cores` in `densityHeatmap()`.
========================
CHANGES in VERSION 1.99.4
* anno_mark() is now calculated in multiple slices.
* oncoPrint(): automatically split the alteration type if the separator is one of ";:,|".
* add anno_zoom()
========================
CHANGES in VERSION 1.99.1
* add `cluster_row_slices` and `cluster_column_slices` arguments in `Heatmap()`.
* fixed a bug when annotation_height with only one annotation
* order of k-means slices are reordered by slice mean of `row_reorder`/`column_reorder`
if they are provided as vectors.
* remove **rsvg** from Suggests.
=======================
CHANGES in VERSION 1.99.0
This a major update of the package. The main changes are:
* support column split
* support align heatmaps vertically
* add a naive `AnnotationFunction` class to handle annotation functions
* add more annotation functions
=======================
CHANGES in VERSION 1.19.1
* `Heatmap()`: no column name added if the input matrix is a one-column matrix.
* `oncoPrint()`: scales the the row annotations are now the same if rows are split.
=======================
CHANGES in VERSION 1.17.1
* `Legend()`: add `by_row` argument to control the arrangement of legends
if they are put in more than one columns
* `Legend()`: use `textGrob()` if the point symbol is text
* `grid.dendrogram()`: fix a bug that the dendrogram is wrong when row/column
names have duplicated names.
* `anno_boxplot()`: axis rescaled when outline = FALSE
* `oncoPrint()`: rows are first ordered by total number of mutations and then
ordered by number of samples that have mutations
* correctly reorder rows
* add `row_gap` argument for list of heatmaps
* `oncoPrint()`: add `j` and `i` as optional argument for `alter_fun`
=======================
CHANGES in VERSION 1.15.1
* random colors are generated by new `rand_color()` function in circlize package.
* add `density_param` in `densityHeatmap()` function
* annotations with duplicated names have no legends any more
* re-implement `grid.xaxis()` to draw axis labels rotated 90 degrees
* grids in discrete legend are arranged by rows if ncol > 1
* raster image is generated in an independent R session
* empty string in annotation or heatmap is mapped to NA
* annotation and heatmap legends can be merged into one column.
* change the default value of `row_names_max_width` and `column_names_max_height`
* default legend style for continuous values is changed to "continuous"
* add `grid.dendrogram2()` which draws dendrograms with uneven position for leaves
* move **dendextend** to Suggests field because it depends/imports rlang indirectly
which has a `print.frame()` function and it will affect to print a `frame` object
returned by `frameGrob()`.
* `decorate_*()` functions return to the viewport where they are called.
* fixed a bug that annotation names are drawn for all row slices.
* construct a valid path under Windows
=======================
CHANGES in VERSION 1.13.2
* add `packLegend()`
========================
CHANGES in VERSION 1.13.1
* `Heatmap()`: add `km_title` to set the format of row title when `km` is set
* `anno_link()`: add `extend` to extend the regions for the labels
* `anno_boxplot()`: for row annotation, outliers are in the correct in y-axis.
Thanks @gtg602c for the fix
* `HeatmapAnnotation()`: gaps are included in the size of the annotations
* `anno_link()`: graphic parameters are correctly reordered
* `densityHeatmap()`: viewport is created with `clip = TRUE`
* `decorate_*()`: add `envir` option to control where to look for variables inside `code`
* `Legend()`: title supports expression
* `anno_*()`: if the input is a data frame, warn that users may convert it to matrix
========================
CHANGES in VERSION 1.11.8
* `anno_barplot()`: accept a matrix as input to plot stacked barplots
=========================
CHANGES in VERSION 1.11.7
* SingleAnnotation: if `col` is a vector with no names, it will be assigned
as `level(value)` or `unique(value)`
* HeatmapAnnotation: give warnings if color is defined while with no annotations
* HeatmapAnnotation: check `col`, if it is not valid, give warnings
* catch error when making annotation graphics
==========================
CHANGES in VERSION 1.11.6
* simply bump the verison number
* `gap` in `Heatmap()` now can be a vector
===========================
CHANGES in VERSION 1.11.5
* `gap` in `HeatmapAnnotation` has been adjusted
* annotations support drawing names of either sides
* `densityHeatmap()`: quantile lines are also reordered
* export `anno_oncoprint_barplot`
* `Heatmap()`: if `col` is a unnamed vector and the number of colors is same as
unique itemes in `mat`, the name of `col` vector is set to `sort(unique(mat))
* adjusted the order of annotation legends
* discreat legend: if a level is not in the data while defined by `col`, it will
be removed.
=============================
CHANGES in VERSION 1.11.2
* `grid.dendrogram()`: do not draw dendrogram if the height is zero
* `densityHeatmap()`: support clustering on columns and more controls on column settings
=============================
CHANGES in VERSION 1.11.1
* `draw,HeatmapList-method` can control row order and clustering of the main heatmap
=============================
CHANGES in VERSION 1.9.7
* add `Legend()` function which is more flexible to generate
different types of legends.
============================
CHANGES in VERSION 1.9.6
* `color_mapping_legend()`, there are ticks on continuous color bar
=============================
CHANGES in VERSION 1.9.5
* add a section in the vignette to show how to adjust positions
of column names when there are bottom annotations.
* fixed a bug that character NA values can not to assigned with na_col
* extra character 'at' and 'labels' in legends will be removed automatically
* all arguments which are passed to `make_layout()` are all explicitly put
in `draw()` instead of using ...
=============================
CHANGES in VERSION 1.9.4
* heatmap bodied can be set as raster images if number of rows are too huge
==============================
CHANGES in VERSION 1.9.3
* graphic parameters are correctly recycled in row annotations
* if there is only one row after splitting, there will be no dendrogram
* add `range` option in `densityHeatmap()`
* when `gap` is set for the main heatmap, other heatmps also adjust their `gap` values to it
* fixed a bug that when rownames/colnames are not complete, dendrograms are corrupted
* `alter_fun` now supports adding graphics grid by grid
* add `show_pct` option in `oncoPrint()`
* add `column_order` in `densityHeatmap()`
==============================
CHANGES in VERSION 1.9.2
* imporved example of `anno_link()`
==============================
CHANGES in VERSION 1.9.1
* width of the heatmap body are calculated correctly if it is set as a fixed unit
* there is no dendrogram is nrows in a row-slice is 1
* add `anno_link()` annotation function
* bottom annotations are attached to the bottom edge of the heatmap
if there are additional blank space
* colors for NA can be set by "_NA_" in annotations
* `row_dend_reorder` and `column_dend_reorder` are set to `TRUE` by default again -_-!!
* optimize the way to specify na_col in heatmap annotations
* correct wrong viewport names in decorate_* functions
===============================
CHANGES in VERSION 1.7.3
* `oncoPrint()`: add `barplot_ignore` option to remove alterations
that are not put on the barplot.
* `oncoPrint()`: delete extra alter_fun if they are not in the matrix
================================
CHANGES in VERSION 1.7.2
* for `anno_points()`, `anno_barplot()`, `anno_boxplot()`, the name is assigned
to the viewport with data ranges
* oncoPrint(): top_annotation is assigned with correct height
===============================
CHANGES in VERSION 1.7.1
* `x` and `y` are `unit` object now in `cell_fun`
* add an example to visualize GO game
* transparency is kept when making discreate color mappings
* `oncoPrint()`: barplots on top now are controlled by `top_annotation` argument
================================
CHANGES in VERSION 1.5.1
* `oncoPrint`: there are default graphics if type of alterations is
less than two.
* `anno_*`: get rid of lazy loading
=================================
CHANGES in VERSION 1.4.4
* NULL can be added to the heatmap list
* give message if users mess up with row and column annotations
* `oncoPrint`: columns are sorted by `memo sort` method to enhance
the mutual exclusivity.
==================================
CHANGES in VERSION 1.4.3
* `anno_boxplot`: outliers can correctly plotted
* add a new function `enhanced_basicplot`
* fix a bug that order of annotation height is reversed
===================================
CHANGES in VERSION 1.4.2
* order of annotations can be adjusted arbitrarily
* anno_barplot: scales are adjusted according to the baseline
===================================
CHANGES in VERSION 1.4.1
* revised the vignettes
===================================
CHANGES in VERSION 1.4.0
* returned value for `draw` method has been changes
* add `row_order`, `column_order`, `row_dend` and `column_dend`
to extract orders and dendrograms after heatmap clustering
* add `select` function to interactively select sub region in the heatmap
and retrieve row/column index in the selected sub region.
* renames all varialbes `*hclust*` to `*dend*`
====================================
CHANGES in VERSION 1.3.3
* set `row_reorder` and `column_reorder` to FALSE by default in `Heatmap()`
=====================================
CHANGES in VERSION 1.3.2
* fixed the error in the vignette header
======================================
CHANGES in VERSION 1.3.1
* padding of whole plot are correctly set now
=======================================
CHANGES in VERSION 1.3.0
* parameters for legend are specified by a list
* vignette was split into several vignettes which focus on specific topics
* ColorMapping class suppoorts `at` and `labels`
* add `row_anno_*` and `column_anno_*` functions
* `anno_barplot` add `baseline` option to define the baseline of bars
* change default colors for matrix
* allow heatmap with zero-row
* heatmap components can all have absolute units
* add `oncoPriint()`
=========================================
CHANGES in VERSION 1.2.8
* add decorate* functions
=========================================
CHANGES in VERSION 1.2.7
* add `rows_reorder_weight` and `columns_reorder_weight` in `Heatmap()`
* `draw,HeatmapList-method` returns a list of orders
* clustering is stored as dendrogram internally
=========================================
CHANGES in VERSION 1.2.6
* graphical parameters for row names can be set as same length
as row slices
* graphical parameters for annotation functions are consistent with
the matrix now
* insert `k = NULL` into anno_function if they are row annotations
* add a new vignette "quick examples"
* change style for continuous legend color bar
* label order of discrete legend has been adjusted (now it is from top to bottom)
=========================================
CHANGES in VERSION 1.2.5
* add dependency of base packages
=========================================
CHANGES in VERSION 1.2.4
* name for ColorMapping object has default value now.
* legend for continuous values can be set as continuous legends
* row title and column title as well as legend title support expression
* add `heatmap_legend_title` in `Heatmap` and `ColorMapping`
* fixed a bug in `plotDataFrame`
==========================================
CHANGES in VERSION 1.2.3
* `color_mapping_legend` can produce a continuous color legend
* `color_mapping_legend` now returns a grob object
===========================================
CHANGES in VERSION 1.2.2
* adjust positions for row titles
* rows can be split if `cluster_rows` are a clustering object
* `row_order` and `column_order` can be set by dimension names
===========================================
CHANGES in VERSION 1.2.1
* adjust orders of row slices
* support text rotation for heatmap titles
===========================================
CHANGES in VERSION 1.2.0
* correct row orders if km and row_order is set in `Heatmap`
===========================================
CHANGES in VERSION 1.1.9
* adjust names and size of each component
* add `densityHeatmap` function which visualizes column distribution
in a matrix
* add `plotDataFrame` function which provides a quick way to
visualize a data frame
============================================
CHANGES in VERSION 1.1.8
* dendrograms are implemented by `grid.segments`
* setting padding for each component
* adjust gaps between heatmaps/row annotations if the column of the
heatmap is zero.
============================================
CHANGES IN VERSION 1.1.7
* check consistency of matrix row names
=============================================
CHANGES IN VERSION 1.1.6
* improved generation of random colors
* order of heatmap annotation legends are same as the order of annotations
* support NA value in simple annotations
* add examples in the vignette
* simple row annotations now have the correct order
* `col` can be a vector of colors if matrix is continuous
* simple annotation can be logical
==============================================
CHANGES IN VERSION 1.1.5
* add gaps between heatmap components
===============================================
CHANGES IN VERSION 1.1.4
* support color mapping for NA values
===============================================
CHANGES IN VERSION 1.1.3
* Improved vignette to describe how to use row index in row annotation function
if row annotations are also splitted by rows.
===============================================
CHANGES IN VERSION 1.1.2
* `anno_density`: graphics are now in correct order
* add `anno_text`
* add new examples corresponding to new functions
================================================
CHANGES IN VERSION 1.1.1
* fixed a bug when setting `cluster_rows` to FALSE but still cluster
on rows.
* add `rowAnnotation` and `columnAnnotation` functions
* add examples in the vignette
* No error if the heatmap list only contains zero-column matrix
=================================================
CHANGES IN VERSION 0.99.2
* add two examples in vignette
* add chunk labels in the vignette
=================================================
CHANGES IN VERSION 0.99.1
* x and y in `cell_fun` are now `unit` objects.
=================================================
CHANGES IN VERSION 0.99.0
* First release

View File

@ -0,0 +1,27 @@
# File share/R/nspackloader.R
# Part of the R package, https://www.R-project.org
#
# Copyright (C) 1995-2012 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# A copy of the GNU General Public License is available at
# https://www.r-project.org/Licenses/
local({
info <- loadingNamespaceInfo()
pkg <- info$pkgname
ns <- .getNamespace(as.name(pkg))
if (is.null(ns))
stop("cannot find namespace environment for ", pkg, domain = NA);
dbbase <- file.path(info$libname, pkg, "R", pkg)
lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
})

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,91 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title></title>
<style type="text/css">
body {
font-family: sans-serif;
max-width: 800px;
margin: auto;
padding: 1em;
line-height: 1.5;
box-sizing: border-box;
}
body, .footnotes, code { font-size: .9em; }
li li { font-size: .95em; }
*, *:before, *:after {
box-sizing: inherit;
}
pre, img { max-width: 100%; }
pre, pre:hover {
white-space: pre-wrap;
word-break: break-all;
}
pre code {
display: block;
overflow-x: auto;
}
code { font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace; }
:not(pre) > code, code[class] { background-color: #F8F8F8; }
code.language-undefined, pre > code:not([class]) {
background-color: inherit;
border: 1px solid #eee;
}
table {
margin: auto;
border-top: 1px solid #666;
}
table thead th { border-bottom: 1px solid #ddd; }
th, td { padding: 5px; }
thead, tfoot, tr:nth-child(even) { background: #eee; }
blockquote {
color: #666;
margin: 0;
padding-left: 1em;
border-left: 0.5em solid #eee;
}
hr, .footnotes::before { border: 1px dashed #ddd; }
.frontmatter { text-align: center; }
#TOC .numbered li { list-style: none; }
#TOC .numbered { padding-left: 0; }
#TOC .numbered ul { padding-left: 1em; }
table, .body h2 { border-bottom: 1px solid #666; }
.body .appendix, .appendix ~ h2 { border-bottom-style: dashed; }
.footnote-ref a::before { content: "["; }
.footnote-ref a::after { content: "]"; }
section.footnotes::before {
content: "";
display: block;
max-width: 20em;
}
@media print {
body {
font-size: 12pt;
max-width: 100%;
}
tr, img { page-break-inside: avoid; }
}
@media only screen and (min-width: 992px) {
pre { white-space: pre; }
}
</style>
</head>
<body>
<div class="frontmatter">
<div class="title"><h1></h1></div>
<div class="author"><h2></h2></div>
<div class="date"><h3></h3></div>
</div>
<div class="body">
<!--
%\VignetteEngine{knitr}
%\VignetteIndexEntry{ComplexHeatmap vignette}
-->
<p>Please go to <a href="http://jokergoo.github.io/ComplexHeatmap-reference/book/">http://jokergoo.github.io/ComplexHeatmap-reference/book/</a> for the full vignette.</p>
<p><a href="http://jokergoo.github.io/ComplexHeatmap-reference/book/"><img src="https://jokergoo.github.io/ComplexHeatmap-reference/book/complexheatmap-cover.jpg" width='800' /></a></p>
</div>
</body>
</html>

View File

@ -0,0 +1,9 @@
<!--
%\VignetteEngine{knitr}
%\VignetteIndexEntry{ComplexHeatmap vignette}
-->
Please go to http://jokergoo.github.io/ComplexHeatmap-reference/book/ for the full vignette.
<p><a href="http://jokergoo.github.io/ComplexHeatmap-reference/book/"><img src="https://jokergoo.github.io/ComplexHeatmap-reference/book/complexheatmap-cover.jpg" width='800' /></a></p>

View File

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head><title>R: Vignettes and other documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
</head><body><div class="container">
<h1> Vignettes and other documentation
<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
</h1>
<hr/>
<div style="text-align: center;">
<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
</div>
<h2>Vignettes from package 'ComplexHeatmap'</h2>
<table style="width: 100%;">
<col style="width: 22%;" />
<col style="width: 2%;" />
<col style="width: 50%;" />
<col style="width: 8%;" />
<col style="width: 8%;" />
<col style="width: 8%;" />
<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/ComplexHeatmap/doc/complex_heatmap.html">ComplexHeatmap::complex_heatmap</a></td>
<td></td><td style="vertical-align: top;">ComplexHeatmap vignette</td>
<td style="vertical-align: top;"><a href="../../../library/ComplexHeatmap/doc/complex_heatmap.html">HTML</a></td>
<td style="vertical-align: top;"><a href="../../../library/ComplexHeatmap/doc/complex_heatmap.rmd">source</a></td>
<td style="vertical-align: top; white-space: nowrap"></td></tr>
<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/ComplexHeatmap/doc/most_probably_asked_questions.html">ComplexHeatmap::most_probably_asked_questions</a></td>
<td></td><td style="vertical-align: top;">Most probably asked questions</td>
<td style="vertical-align: top;"><a href="../../../library/ComplexHeatmap/doc/most_probably_asked_questions.html">HTML</a></td>
<td style="vertical-align: top;"><a href="../../../library/ComplexHeatmap/doc/most_probably_asked_questions.Rmd">source</a></td>
<td style="vertical-align: top; white-space: nowrap"><a href="../../../library/ComplexHeatmap/doc/most_probably_asked_questions.R">R code</a></td></tr>
</table>
</div></body></html>

View File

@ -0,0 +1,60 @@
## ----echo = FALSE, message = FALSE--------------------------------------------
library(markdown)
options(markdown.HTML.options = c(options('markdown.HTML.options')[[1]], "toc"))
## ----message = FALSE, echo = FALSE--------------------------------------------
library(ComplexHeatmap)
## ----eval = FALSE-------------------------------------------------------------
# default_axis_param("column")
# default_axis_param("row")
## ----eval = FALSE-------------------------------------------------------------
# pushViewport(viewport(layout = grid.layout(...)))
# pushViewport(viewport(layout.pos.row = ..., layout.pos.col = ...))
# draw(ht, newpage = FALSE) # or draw(ht_list, newpage = FALSE)
# popViewport()
# ...
## ----eval = FALSE-------------------------------------------------------------
# ht_grob = grid.grabExpr(draw(ht, ...))
#
# pushViewport(viewport(layout = grid.layout(...)))
# pushViewport(viewport(layout.pos.row = ..., layout.pos.col = ...))
# grid.draw(ht_grob)
# popViewport()
# ...
## -----------------------------------------------------------------------------
m = matrix(rnorm(1000*10), nr = 1000)
hc = hclust(dist(m))
group = cutree(hc, k = 6)
Heatmap(m, cluster_rows = cluster_within_group(t(m), group),
row_split = 6, border = TRUE) # it would be better if also set row_split
## -----------------------------------------------------------------------------
m = matrix(rnorm(100), 10)
ht = Heatmap(m, name = "foo",
row_dend_width = unit(4, "cm"),
column_dend_height = unit(4, "cm")
)
draw(ht, padding = unit(c(15, 2, 2, 2), "mm"))
decorate_column_dend("foo", {
grid.yaxis()
})
decorate_row_dend("foo", {
vp = current.viewport()
xscale = vp$xscale
grid.xaxis(at = xscale[2] - 0:5, label = 0:5)
})
## -----------------------------------------------------------------------------
hc = hclust(dist(matrix(rnorm(100), 10)))
Heatmap(matrix(nc = 0, nr = 10), cluster_rows = hc,
right_annotation = rowAnnotation(
foo = anno_points(1:10),
sth = 1:10,
bar = anno_barplot(1:10)),
row_split = 2)

View File

@ -0,0 +1,199 @@
<!--
%\VignetteEngine{knitr}
%\VignetteIndexEntry{Most probably asked questions}
-->
## Most probably asked questions
```{r, echo = FALSE, message = FALSE}
library(markdown)
options(markdown.HTML.options = c(options('markdown.HTML.options')[[1]], "toc"))
```
<style type="text/css">
h1, h2, h3, h4, h5 {
line-height: 120%;
}
</style>
```{r, message = FALSE, echo = FALSE}
library(ComplexHeatmap)
```
### There is no plot coming out after running Heatmap() function.
In this case, you need to use `draw()` function explicitly. See
https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html#plot-the-heatmap
and
https://jokergoo.github.io/ComplexHeatmap-reference/book/a-list-of-heatmaps.html#plot-the-heamtap-list.
### Retrieve orders and dendrograms.
For retrieving orders and dendrograms from a single heatmap. See
https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html#get-orders-and-dendrograms-from-heatmap.
For retrieving orders and dendrograms from a list of heatmaps. See
https://jokergoo.github.io/ComplexHeatmap-reference/book/a-list-of-heatmaps.html#get-orders-and-dendrograms-from-a-list-of-heatmaps.
### How should I control the height or width of the heatmap annotations?
For complex annotations generated by `anno_*()` functions, width or height
should be set inside the `anno_*()` function, such as `anno_points(..., height = ...)`. The size of simple annotations is controlled by `anno_simple_size`.
The `width`/`height` and `annotation_width`/`annotation_height` are used to
adjust the size for multiple annotations which are put in one
`HeatmapAnnotation` object. See
https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-annotations.html#multiple-annotations
### How should I control the axes of the annotations?
In the annotation functions `anno_*()`, the argument `axis_param` can be used
to set the axes. The value should be a list and the default settings for axis
can be get by:
```{r, eval = FALSE}
default_axis_param("column")
default_axis_param("row")
```
### How to control the style of legends?
The style of legends can be controlled by `heatmap_legend_param` in
`Heatmap()`, or `annotation_legend_param` in `HeatmapAnnotation()`. The
parameters for controlling legends are those arguments in `Legend()` function.
See
https://jokergoo.github.io/ComplexHeatmap-reference/book/legends.html#heatmap-and-annotation-legends.
### Some text are cut by the plotting region.
The layout of the **ComplexHeatmap** is not perfect that it is still possible
some of the text are drawn out of the plotting region. In this case, you can
set the `padding` argument in `draw()` function to increase the blank areas
around the final plot. See
https://jokergoo.github.io/ComplexHeatmap-reference/book/a-list-of-heatmaps.html#manually-increase-space-around-the-plot.
### Can the heatmaps be added vertically?
Yes, use `%v%` instead of `+`. See https://jokergoo.github.io/ComplexHeatmap-reference/book/a-list-of-heatmaps.html#vertical-concatenation.
### Does Heatmap title supports mathematical expression?
Yes, all the text-related elements (e.g. titles, row names, legend titles, legend labels, ...) allow
methematical expression.
### I have many heatmaps and I want to put them into different panels for a big figure for my paper.
You can set `newpage = FALSE` in `draw()` function and use `grid.layout()` to
manage the layout of your panels.
```{r, eval = FALSE}
pushViewport(viewport(layout = grid.layout(...)))
pushViewport(viewport(layout.pos.row = ..., layout.pos.col = ...))
draw(ht, newpage = FALSE) # or draw(ht_list, newpage = FALSE)
popViewport()
...
```
But I more suggest to use `grid.grabExpr()` to directly capture the output of
the heatmap and later draw the whole plot as a single graphic element by
`grid.draw()`.
```{r, eval = FALSE}
ht_grob = grid.grabExpr(draw(ht, ...))
pushViewport(viewport(layout = grid.layout(...)))
pushViewport(viewport(layout.pos.row = ..., layout.pos.col = ...))
grid.draw(ht_grob)
popViewport()
...
```
### I have a matrix with too many rows and I want to simplify the row dendrogram.
You can first group your rows into several groups and make a group-level
dendrogram on it. See following example:
```{r}
m = matrix(rnorm(1000*10), nr = 1000)
hc = hclust(dist(m))
group = cutree(hc, k = 6)
Heatmap(m, cluster_rows = cluster_within_group(t(m), group),
row_split = 6, border = TRUE) # it would be better if also set row_split
```
### I have a matrix with huge nunmber of rows or columns, what is the efficient way to visualize it?
Heatmap is used to visualize the global patterns of your matrix while not
every single row or column. I suggest to random sample rows or columns into a
reasonable small number, and the final heatmap should look the same as if you
still insist to use the full matrix.
### How to add axes for dendrograms?
You need to use `decorate_row_dend()` or `decorate_column_dend()` to manually
add the axes. See following examples:
```{r}
m = matrix(rnorm(100), 10)
ht = Heatmap(m, name = "foo",
row_dend_width = unit(4, "cm"),
column_dend_height = unit(4, "cm")
)
draw(ht, padding = unit(c(15, 2, 2, 2), "mm"))
decorate_column_dend("foo", {
grid.yaxis()
})
decorate_row_dend("foo", {
vp = current.viewport()
xscale = vp$xscale
grid.xaxis(at = xscale[2] - 0:5, label = 0:5)
})
```
Note for the left row dendrogram, the x-axis is from right to left, you need to self-define `at`
and `label` in `grid.xaxis()` function.
You can also check `annotation_axis_grob()` function (later use `grid.draw()` to draw the axes) to draw a nicer axis.
### I set row_km/column_km and it gives me different k-means clusterings for different runs.
Yes, this is what it should be expected because k-means uses random start points and it might give
different results for different runs. To solve this problem, you do either way as follows:
1. Always add `set.seed(...)` before making the heatmap. This makes sure the
random seed is always the same for different runs.
2. Set `row_km_repeats`/`column_km_repeats` to run k-means multiple times to get a
final consensus k-means clustering. Note you might still get different
results, but the chance is much smaller than just running k-means once.
### I only want to draw dendrograms plus a list of annotations.
You need to assign the dendrograms to a zero-row/column matrix:
```{r}
hc = hclust(dist(matrix(rnorm(100), 10)))
Heatmap(matrix(nc = 0, nr = 10), cluster_rows = hc,
right_annotation = rowAnnotation(
foo = anno_points(1:10),
sth = 1:10,
bar = anno_barplot(1:10)),
row_split = 2)
```
### I still have a problem with the package and I am lost in the ocean of the huge vignette.
The vignette (https://jokergoo.github.io/ComplexHeatmap-reference/book/)
contains huge number of examples and plots showing different usage of the
package. It is sometimes not easy to find the solution you are looking for. In
this case, don't hesitate to drop an issue on GitHub. I am glad to answer all of your
questions!
### Can I also add heatmaps produced by pheatmap()?
Yes, you can refer to https://jokergoo.github.io/2020/05/06/translate-from-pheatmap-to-complexheatmap/.
### Can I make an interactive heatmap?
Yes, please refer to [the **InteractiveComplexHeatmap** package](https://github.com/jokergoo/InteractiveComplexHeatmap).

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,126 @@
set.seed(888)
type = c(rep("Tumor", 10), rep("Control", 10))
gender = sample(c("F", "M"), 20, replace = TRUE)
gender[sample(1:20, 2)] = NA
age = runif(20, min = 30, max = 80)
mutation = data.frame(mut1 = sample(c(TRUE, FALSE), 20, p = c(0.2, 0.8), replace = TRUE),
mut2 = sample(c(TRUE, FALSE), 20, p = c(0.3, 0.7), replace = TRUE))
anno = data.frame(type = type, gender = gender, age = age, mutation, stringsAsFactors = FALSE)
anno_col = list(type = c("Tumor" = "red", "Control" = "blue"),
gender = c("F" = "pink", "M" = "darkgreen"),
mutation = c("TRUE" = "black", "FALSE" = "#EEEEEE"))
######################################
# generate methylation matrix
rand_meth = function(k, mean) {
(runif(k) - 0.5)*min(c(1-mean), mean) + mean
}
mean_meth = c(rand_meth(300, 0.3), rand_meth(700, 0.7))
mat_meth = as.data.frame(lapply(mean_meth, function(m) {
if(m < 0.3) {
c(rand_meth(10, m), rand_meth(10, m + 0.2))
} else if(m > 0.7) {
c(rand_meth(10, m), rand_meth(10, m - 0.2))
} else {
c(rand_meth(10, m), rand_meth(10, m + sample(c(1, -1), 1)*0.2))
}
}))
mat_meth = t(mat_meth)
rownames(mat_meth) = NULL
colnames(mat_meth) = paste0("sample", 1:20)
######################################
# generate directions for methylation
direction = rowMeans(mat_meth[, 1:10]) - rowMeans(mat_meth[, 11:20])
direction = ifelse(direction > 0, "hyper", "hypo")
library(circlize)
#######################################
# generate expression matrix
mat_expr = t(apply(mat_meth, 1, function(x) {
x = x + rnorm(length(x), sd = abs(runif(1)-0.5)*0.4 + 0.1)
-scale(x)
}))
dimnames(mat_expr) = dimnames(mat_meth)
#############################################################
# matrix for correlation between methylation and expression
cor_pvalue = sapply(seq_len(nrow(mat_meth)), function(i) {
cor.test(mat_meth[i, ], mat_expr[i, ])$p.value
})
#####################################################
# matrix for types of genes
gene_type = sample(c("protein_coding", "lincRNA", "microRNA", "psedo-gene", "others"),
nrow(mat_meth), replace = TRUE, prob = c(6, 1, 1, 1, 1))
#################################################
# annotation to genes
anno_gene = sapply(mean_meth, function(m) {
if(m > 0.6) {
if(runif(1) < 0.8) return("intragenic")
}
if(m < 0.4) {
if(runif(1) < 0.4) return("TSS")
}
return("intergenic")
})
anno_gene_col = c("intragenic" = "blue", "TSS" = "red", "intergenic" = "grey")
############################################
# distance to genes
tss_dist = sapply(mean_meth, function(m) {
if(m < 0.3) {
if(runif(1) < 0.5) {
return(round( (runif(1) - 0.5)*1000 + 500))
} else {
return(round( (runif(1) - 0.5)*10000 + 500))
}
} else if(m < 0.6) {
if(runif(1) < 0.8) {
return(round( (runif(1)-0.5)*100000 + 50000 ))
} else {
return(round( (runif(1)-0.5)*1000000 + 500000 ))
}
}
return(round( (runif(1) - 0.5)*1000000 + 500000))
})
#######################################
# annotation to enhancers
rand_tss = function(m) {
if(m < 0.4) {
if(runif(1) < 0.25) return(runif(1))
} else if (runif(1) < 0.1) {
return(runif(1))
}
return(0)
}
rand_enhancer = function(m) {
if(m < 0.4) {
if(runif(1) < 0.6) return(runif(1))
} else if (runif(1) < 0.1) {
return(runif(1))
}
return(0)
}
rand_repressive = function(m) {
if(m > 0.4) {
if(runif(1) < 0.8) return(runif(1))
}
return(0)
}
anno_states = data.frame(
tss = sapply(mean_meth, rand_tss),
enhancer = sapply(mean_meth, rand_enhancer),
repressive = sapply(mean_meth, rand_repressive))
save(mat_meth, mat_expr, anno, anno_col, anno_states, cor_pvalue, direction,
anno_gene, gene_type, tss_dist, file = "random_meth_expr_data.RData")

Some files were not shown because too many files have changed in this diff Show More