clusterTranscripts: group a gene's assembled transcripts into clusters

Description Usage Arguments Value Author(s) See Also Examples

View source: R/clusterTranscripts.R

Description

group a gene's assembled transcripts into clusters

Usage

1
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.

Author(s)

Alyssa Frazee

See Also

hclust, kmeans, plotLatentTranscripts for visualizing the transcript clusters

Examples

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

alyssafrazee/ballgown documentation built on Sept. 3, 2021, 7:15 p.m.