The ClustDist summaries algorithm information, from
running the clustDist function, such as the number
of k's tested for the kmeans, and mean and normalised
pairwise (Euclidean) distances per numer of component
clusters tested.
Objects from the Class
Object of this class are created with the clustDist
function.
Slots
k:
Object of class "numeric" storing
the number of k clusters tested.
dist:
Object of class "list" storing
the list of distance matrices.
term:
Object of class "character" describing
GO term name.
id:
Object of class "character" describing
the GO term ID.
nrow:
Object of class "numeric" showing
the number of instances in the set
clustsz:
Object of class "list" describing
the number of instances for each cluster for each k tested
components:
Object of class "vector" storing
the class membership of each protein for each k tested.
fcol:
Object of class "character" showing
the feature column name in the corresponding MSnSet
where the protein set information is stored.
Methods
plot
Plots the kmeans clustering results.
show
Shows the object.
Author(s)
Lisa M Breckels <lms79@cam.ac.uk>
Examples
showClass("ClustDist")
library('pRolocdata')
data(dunkley2006)
par <- setAnnotationParams(inputs =
c("Arabidopsis thaliana genes",
"TAIR locus ID"))
## add protein set/annotation information
xx <- addGoAnnotations(dunkley2006, par)
## filter
xx <- filterMinMarkers(xx, n = 50)
xx <- filterMaxMarkers(xx, p = .25)
## get distances for protein sets
dd <- clustDist(xx)
## plot clusters for first 'ClustDist' object
## in the 'ClustDistList'
plot(dd[[1]], xx)
## plot distances for all protein sets
plot(dd)
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(pRoloc)
Loading required package: MSnbase
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: 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: mzR
Loading required package: Rcpp
Loading required package: BiocParallel
Loading required package: ProtGenerics
This is MSnbase version 1.20.7
Read '?MSnbase' and references therein for information
about the package and how to get started.
Attaching package: 'MSnbase'
The following object is masked from 'package:stats':
smooth
The following object is masked from 'package:base':
trimws
Loading required package: MLInterfaces
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: XML
Loading required package: cluster
This is pRoloc version 1.12.4
Read '?pRoloc' and references therein for information
about the package and how to get started.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/pRoloc/ClustDist-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ClustDist-class
> ### Title: Class '"ClustDist"'
> ### Aliases: ClustDist class:ClustDist ClustDist-class
> ### plot,ClustDist,MSnSet-method show,ClustDist-method
> ### Keywords: classes
>
> ### ** Examples
>
> showClass("ClustDist")
Class "ClustDist" [package "pRoloc"]
Slots:
Name: k dist term id nrow clustsz
Class: numeric list character character numeric list
Name: components fcol
Class: vector character
>
> library('pRolocdata')
This is pRolocdata version 1.10.0.
Use 'pRolocdata()' to list available data sets.
> data(dunkley2006)
> par <- setAnnotationParams(inputs =
+ c("Arabidopsis thaliana genes",
+ "TAIR locus ID"))
Using species Arabidopsis thaliana genes (TAIR10 (2010-09-TAIR10))
Using feature type TAIR locus ID(s)
Connecting to Biomart...
>
> ## add protein set/annotation information
> xx <- addGoAnnotations(dunkley2006, par)
Loading required namespace: GO.db
Loading required package: GO.db
>
> ## filter
> xx <- filterMinMarkers(xx, n = 50)
Retaining 16 out of 153 in GOAnnotations
> xx <- filterMaxMarkers(xx, p = .25)
Retaining 11 out of 16 in GOAnnotations
>
> ## get distances for protein sets
> dd <- clustDist(xx)
| | | 0% | |====== | 9% | |============= | 18% | |=================== | 27% | |========================= | 36% | |================================ | 45% | |====================================== | 55% | |============================================= | 64% | |=================================================== | 73% | |========================================================= | 82% | |================================================================ | 91% | |======================================================================| 100%
>
> ## plot clusters for first 'ClustDist' object
> ## in the 'ClustDistList'
> plot(dd[[1]], xx)
>
> ## plot distances for all protein sets
> plot(dd)
>
>
>
>
>
> dev.off()
null device
1
>