Learn R Programming

ballgown (version 2.4.2)

clusterTranscripts: group a gene's assembled transcripts into clusters

Description

group a gene's assembled transcripts into clusters

Usage

clusterTranscripts(gene, gown, k = NULL, method = c("hclust", "kmeans"))

Arguments

gene
name of gene whose transcripts will be clustered. When using Cufflinks output, usually of the form "XLOC_######"
gown
ballgown object containing experimental data
k
number of clusters to use
method
clustering method to use. Must be one of "hclust", for hierarchical clustering, or "kmeans", for k-means clustering.

Value

list with elements clusters and pctvar. clusters contains columns "cluster" and "t_id", and denotes which transcripts belong to which clusters. pctvar is only non-NULL when using k-means clustering and is the percentage of variation explained by these clusters, defined as the ratio of the between-cluster sum of squares to the total sum of squares.

See Also

hclust, kmeans, plotLatentTranscripts for visualizing the transcript clusters

Examples

Run this code
data(bg)
clusterTranscripts('XLOC_000454', bg, k=2, method='kmeans')
# transcripts 1294 and 1301 cluster together, 91% variation explained.

Run the code above in your browser using DataLab