Learn R Programming

RaceID (version 0.3.9)

plotTrProbs: Function for plotting transition probabilities between clusters

Description

This function plots the transitions probabilities in a dimensional reduction representation of a RaceID SCseq object updates with the updateSC function. in order to utilize RaceID functions for visualization.

Usage

plotTrProbs(
  object,
  probs,
  tp = 0.5,
  prthr = 0,
  cthr = 0,
  fr = FALSE,
  um = FALSE,
  cex = 0.5
)

Value

None

Arguments

object

RaceID SCseq object, updated with the updateSC function.

probs

Matrix of transition probabilities between clusters, returned by the transitionProbs function.

tp

Positive real number between 0 and 1. Transparency of the data points in the dimensional reduction map. Default is 0.5.

prthr

Positive real number between 0 and 1. Threshold of transition probabilities. Only transitions with probability >prthr are displayed in the map. Default is 0.

cthr

Integer number greater or equal 0 defining the minimum clusters size for inclusion into the map. Default is 0.

fr

Logical. If TRUE, then a Fruchterman-Rheingold graph layout is shown (in case it has been computed for the RaceID bject), otherwise a t-SNE map is shown. Default is FALSE.

um

Logical. If TRUE then plot umap dimensional reduction representation. Default is FALSE.

cex

Real positive number. Size of data points. Default is 0.5.

Examples

Run this code
sc <- SCseq(intestinalDataSmall)
sc <- filterdata(sc)
sc <- compdist(sc)
d <- getExpData(sc)
res <- pruneKnn(d,distM=sc@distances,knn=10,alpha=1,no_cores=1,FSelect=FALSE)
cl <- graphCluster(res,pvalue=0.01)
sc <- updateSC(sc,res=res,cl=cl)
sc <- comptsne(sc)
probs <-transitionProbs(res,cl,pvalue=0.01)
plotTrProbs(sc,probs,tp=.5,prthr=0,cthr=0,fr=FALSE)

Run the code above in your browser using DataLab