orderscore: orderscore

View source: R/orderscore.R

orderscoreR Documentation

orderscore

Description

Calculate pseudotemporal ordering scores for orders

Usage

orderscore(subpopulation, orders)

Arguments

subpopulation

Data frame with two columns. First column: cell names. Second column: sub-population codes.

orders

A list with various length containing pseudotime orderings.

Details

This function calculates pseudotemporal ordering scores (POS) based on the sub-population information and order information given by users. Cells should come from at least two cell sub-populations. These sub-population should be coded as 0,1,2,...

Value

a numeric vector of calculated POS.

Author(s)

Zhicheng Ji, Hongkai Ji <zji4@zji4.edu>

Examples

data(lpsdata)
procdata <- preprocess(lpsdata)
subpopulation <- data.frame(cell = colnames(procdata), sub = ifelse(grepl("Unstimulated",colnames(procdata)),0,1), stringsAsFactors = FALSE)
lpsmclust <- exprmclust(procdata)
#Comparing default TSCAN ordering and tuned TSCAN ordering
order1 <- TSCANorder(lpsmclust,orderonly = T)
order2 <- TSCANorder(lpsmclust, c(1,2,3),orderonly = T)
orders <- list(order1,order2)
orderscore(subpopulation, orders)

zji90/TSCAN documentation built on Sept. 14, 2022, 10:56 a.m.