Last data update: 2014.03.03

R: csCluster
csClusterR Documentation

csCluster

Description

Returns a ggplot2 plot object with geom_line layer plotting FPKM values over conditions faceted by k-means clustering clusters. (Euclidean). This is very crude at this point. This does not return any of the clustering information directly, but if you want it, you can retrieve it from the ggplot object returned.

Usage

## S4 method for signature 'CuffFeatureSet'
csCluster(object,k,logMode=T,method = "none",pseudocount=1,...)

Arguments

object

An object of class CuffFeatureSet.

k

Number of pre-defined clusters to attempt to find.

logMode

A logical value whether or not to log-transform the FPKM values prior to clustering.

method

Distance function to use when computing cluster solution. Default "none" will use the Jensen-Shannon distance (JSdist). Provide a function that returns a dist object on rows.

pseudocount

Value added to FPKM to avoid log-transform issues.

...

Additional arguments to pam.

Details

Uses 'kmeans' function.

Author(s)

Loyal A. Goff

Source

None

References

None.

Examples

	data(sampleData)
	csCluster(sampleGeneSet,4)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(cummeRbund)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: RSQLite
Loading required package: DBI
Loading required package: ggplot2
Loading required package: reshape2
Loading required package: fastcluster

Attaching package: 'fastcluster'

The following object is masked from 'package:stats':

    hclust

Loading required package: rtracklayer
Loading required package: GenomicRanges
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: Gviz
Loading required package: grid

Attaching package: 'cummeRbund'

The following object is masked from 'package:GenomicRanges':

    promoters

The following object is masked from 'package:IRanges':

    promoters

The following object is masked from 'package:BiocGenerics':

    conditions

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/cummeRbund/csCluster.Rd_%03d_medium.png", width=480, height=480)
> ### Name: csCluster
> ### Title: csCluster
> ### Aliases: csCluster csCluster,CuffFeatureSet-method
> ### Keywords: datasets
> 
> ### ** Examples
> 
> 	data(sampleData)
> 	csCluster(sampleGeneSet,4)
Loading required package: cluster
Using tracking_id, sample_name as id variables
$medoids
[1] "XLOC_000069" "XLOC_001240" "XLOC_001363" "XLOC_001297"

$id.med
[1]  1  9 17 13

$clustering
XLOC_000069 XLOC_000089 XLOC_000105 XLOC_000115 XLOC_000132 XLOC_000151 
          1           2           2           3           2           1 
XLOC_000158 XLOC_000170 XLOC_001240 XLOC_001262 XLOC_001263 XLOC_001265 
          1           1           2           2           2           2 
XLOC_001297 XLOC_001339 XLOC_001348 XLOC_001359 XLOC_001363 XLOC_001369 
          4           2           3           2           3           2 
XLOC_001370 XLOC_001411 
          2           2 

$objective
     build       swap 
0.07574595 0.06963156 

$isolation
 1  2  3  4 
no L* L* no 
Levels: no L L*

$clusinfo
     size   max_diss    av_diss  diameter separation
[1,]    4 0.25250896 0.16757295 0.4047109  0.1983526
[2,]   12 0.09380676 0.03586007 0.1126603  0.1983526
[3,]    3 0.29201860 0.09733953 0.2920186  0.4406555
[4,]    1 0.00000000 0.00000000 0.0000000  0.4068274

$silinfo
$silinfo$widths
            cluster neighbor   sil_width
XLOC_000069       1        2  0.43604264
XLOC_000158       1        2  0.41221268
XLOC_000151       1        2 -0.07949384
XLOC_000170       1        2 -0.10758345
XLOC_001240       2        1  0.89741482
XLOC_000105       2        1  0.89694646
XLOC_000089       2        1  0.88990827
XLOC_001263       2        1  0.88731877
XLOC_001359       2        1  0.88659051
XLOC_000132       2        1  0.87975982
XLOC_001370       2        1  0.87873681
XLOC_001262       2        1  0.86202878
XLOC_001369       2        1  0.85723142
XLOC_001339       2        1  0.81502052
XLOC_001265       2        1  0.74168270
XLOC_001411       2        1  0.71712926
XLOC_000115       3        1  0.78456223
XLOC_001363       3        1  0.78456223
XLOC_001348       3        2  0.46098099
XLOC_001297       4        2  0.00000000

$silinfo$clus.avg.widths
[1] 0.1652945 0.8508140 0.6767018 0.0000000

$silinfo$avg.width
[1] 0.6450526


$diss
NULL

$call
pam(x = n, k = k)

$fpkm
                  iPS      hESC Fibroblasts
XLOC_000069 1.3010300 2.2520905  0.08101696
XLOC_000089 3.1516456 3.8563899  4.14523060
XLOC_000105 2.8116273 2.9745421  3.45826155
XLOC_000115 0.3180299 0.0000000  0.00000000
XLOC_000132 2.5208162 2.6717318  3.34202769
XLOC_000151 1.2184987 0.7095345  0.18010924
XLOC_000158 0.3744551 1.2791283  0.00000000
XLOC_000170 0.4735891 1.6186139  0.40663895
XLOC_001240 2.6980649 2.8546843  3.29945718
XLOC_001262 1.1512687 1.5387496  1.44910643
XLOC_001263 2.6309463 3.2731217  3.45475647
XLOC_001265 1.7427181 2.9608531  2.25194954
XLOC_001297 0.0000000 0.1329650  0.23685053
XLOC_001339 1.8439139 1.7730049  1.61263342
XLOC_001348 0.3530753 0.0000000  0.06747408
XLOC_001359 3.1942201 3.1901832  3.73025160
XLOC_001363 0.1878486 0.0000000  0.00000000
XLOC_001369 1.2345654 1.2608462  1.21094422
XLOC_001370 2.5613602 2.8429685  3.50780057
XLOC_001411 0.8833906 0.9035897  0.66073745

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>