plot_bayes: Visualizing Bayes scores

Description Usage Arguments Examples

View source: R/plot.R

Description

This function is used to visualize the Bayes scores of the dataset along the pseudo time series

Usage

1
2
3
4
5
6
7
plot_bayes(
  bayes_score,
  ordIndex,
  cls_result = NULL,
  cls_ord = NULL,
  colorbar = 0
)

Arguments

bayes_score

Obtained from get_score function

ordIndex

Obtained from get_ordIndex function

cls_result

The result obtained from HMM segmentation. If null, plot is produced without colorbar representing the segments. Defaults to NULL

colorbar

Whether to plot colorbar (=1) or not (=0). Defaults to 0

myord

= The determined start and direction of the time series. e.g. myord=c(4:1, 295:5) denotes that the starting cell is from 4, and orders backwards. Defaults to NULL

Examples

1
2
3
4
5
6
7
8
test_exp <- get_test_exp(data)
data_ordIndex <- get_ordIndex(test_exp, 2)
score_results <- get_score(t(test_exp))
myord = c(4:1, 295:5)
hmm_result <- get_hmm_order(bayes_score = score_results$bayes_score,
                           mean_score = score_results$mean_score,
                           ordIndex = data_ordIndex, cls_num = 3, myord = myord)
plot_bayes(score_results$bayes_score, data_ordIndex, cls_result = hmm_result, myord = myord, colorbar = 0)

tinglabs/reCAT documentation built on March 16, 2021, 12:08 a.m.