compare_partitions-ConsensusPartition-method.Rd
Compare two partitionings
# S4 method for ConsensusPartition
compare_partitions(object, object2, output_file, k1 = 2, k2 = 2,
dimension_reduction_method = "UMAP",
id_mapping = guess_id_mapping(rownames(object), "org.Hs.eg.db", FALSE),
row_km1 = ifelse(k1 == 2, 2, 1),
row_km2 = ifelse(k1 ==2 && k2 == 2, 2, 1),
row_km3 = ifelse(k2 == 2, 2, 1))
A ConsensusPartition
object.
A ConsensusPartition
object.
The path of the output HTML file. If it is not specified, the report will be opened in the web browser.
Number of subgroups in object
.
Number of subgroups in object2
.
Which dimension reduction method to use.
Number of k-means groups, see Details.
Number of k-means groups, see Details.
Number of k-means groups, see Details.
The function produces a HTML report which includes comparisons between two partitioning results.
In the report, there are three heatmaps which visualize A) the signature genes specific in the first partition, B) the signature genes
both in the two partitionings and C) the signatures genes specific in the second partition. Argument row_km1
, row_km2
and
row_km3
control how many k-means groups should be applied on the three heatmaps.
# \dontrun{
data(golub_cola)
require(hu6800.db)
#> Loading required package: hu6800.db
#> Loading required package: AnnotationDbi
#> Loading required package: stats4
#> Loading required package: BiocGenerics
#>
#> Attaching package: ‘BiocGenerics’
#> The following objects are masked from ‘package:stats’:
#>
#> IQR, mad, sd, var, xtabs
#> The following objects are masked from ‘package:base’:
#>
#> Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
#> as.data.frame, basename, cbind, colnames, dirname, do.call,
#> duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
#> lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
#> pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
#> tapply, union, unique, unsplit, which.max, which.min
#> Loading required package: Biobase
#> Welcome to Bioconductor
#>
#> Vignettes contain introductory material; view with
#> 'browseVignettes()'. To cite Bioconductor, see
#> 'citation("Biobase")', and for packages 'citation("pkgname")'.
#> Loading required package: IRanges
#> Loading required package: S4Vectors
#> Warning: package ‘S4Vectors’ was built under R version 4.3.2
#>
#> Attaching package: ‘S4Vectors’
#> The following object is masked from ‘package:utils’:
#>
#> findMatches
#> The following objects are masked from ‘package:base’:
#>
#> I, expand.grid, unname
#> Loading required package: org.Hs.eg.db
#>
#>
x = hu6800ENTREZID
mapped_probes = mappedkeys(x)
id_mapping = unlist(as.list(x[mapped_probes]))
compare_partitions(golub_cola["ATC:skmeans"], golub_cola["SD:kmeans"],
id_mapping = id_mapping)
# }