R: cluster assembled transcripts and plot the results
plotLatentTranscripts
R Documentation
cluster assembled transcripts and plot the results
Description
This is an experimental, first-pass function that clusters assembled
transcripts based on their overlap percentage, then plots and colors the
transcript clusters.
string, name of gene whose transcripts should be clustered
(e.g., "XLOC_000001")
gown
object of class ballgown being used for analysis
method
clustering method to use. Currently can choose from
hierarchical clustering (hclust) or K-means (kmeans). More
methods are in development.
k
number of transcripts clusters to use. By default, k is
NULL and thus is chosen using a rule of thumb, but providing
k overrides those rules of thumb.
choosek
if k is not provided, how should the number of clusters
be chosen? Must be one of "var90" (choose a k that explains 90
percent of the observed variation) or "thumb" (k is set to be
approximately sqrt(n), where n is the total number of transcripts
for gene)
returncluster
if TRUE (as it is by default), return the results of the
call to clusterTrancsripts so the data is available for later use.
Nothing is returned if FALSE.
labelTranscripts
if TRUE (as it is by default), print transcript IDs
on the y-axis
...
other arguments to pass to plotTranscripts
Value
if returncluster is TRUE, the transcript clusters are returned
as described in clusterTranscripts. A plot of the transcript
clusters is also produced, in the style of plotTranscripts.
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(ballgown)
Attaching package: 'ballgown'
The following object is masked from 'package:base':
structure
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ballgown/plotLatentTranscripts.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotLatentTranscripts
> ### Title: cluster assembled transcripts and plot the results
> ### Aliases: plotLatentTranscripts
>
> ### ** Examples
>
> ## No test:
> data(bg)
> plotLatentTranscripts('XLOC_000454', bg, method='kmeans', k=2)
$clusters
cluster t_id
1 1 1294
2 2 1297
3 1 1301
$pctvar
[1] 0.9117737
> ## End(No test)
>
>
>
>
>
> dev.off()
null device
1
>