Description Usage Arguments Details Value Author(s) Examples
Distances of all gene pairs obtained by the function PASCCA, then the distance matrix is further used for clustering by the function PASCCluster. We adopted the widely-used clustering method, hierarchical clustering, to cluster genes, which was implemented by the R function using hclust default parameters.
1 | PASCCluster(dist,nc,plot)
|
dist |
a dissimilarity matrix as produced by the function PASCCA. |
nc |
umeric scalar (OR a vector) with the number of clusters the tree should be cut into. |
plot |
plot clustering tree of a hierarchical clustering if the value is TRUE (default: FALSE) |
This function PASCCluster has three parameters, dist nc and plot. Based on hierarchical clustering, dist is a distance matrix, nc is the number of clusters and plot is used to plot a cluster denfrogram.
PASCCluster returns a list, including an object of class [stats::hclust] which describes the tree produced by the clustering process and a vector with group memberships by [stats::cutree]. Besides, when the parameter plot is TRUE, it will generate the a dendrogram.
Yuqi Long, Wenbin Ye
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ##Loading example data
data(polyA_example_data2)
##Data preprocessing
pre_data <- PAprocess(data2,log=TRUE)
##Getting information of the samples
sample_name <- colnames(pre_data)[3:ncol(pre_data)]
sample_name <- strsplit(sample_name,"\\d$")
sample_name <- paste("",lapply(sample_name,"[[",1),sep="");
table(sample_name)
##Getting the number of repetitions per sample
sample_replicates <- as.numeric(table(sample_name))
sample_replicates <- sample_replicates[order(sample_replicates,decreasing = TRUE)]
##Calculationg PASCCA distance matrix
gene_dist <- PASCCA(pre_data, alpha = 0.05,
repli=sample_replicates,
tissues=length(unique(sample_name)),
tiss=sum(sample_replicates==sample_replicates[1]))
##Hierarchical clustering
gene_cluster <- PASCCluster(gene_dist,nc=5,plot = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.