FormatSineOut: Format SinFun outputs from lists to matrix

Description Usage Arguments Value Author(s) Examples

View source: R/FormatSineOut.R

Description

Format SinFun outputs from lists to matrix

Usage

1
FormatSineOut(result, DataInSc, ShiftRg=pi/4)

Arguments

result

Output from SineFun

DataInSc

a gene-by-sample (isoform-by-sample) matrix indicating the rescaled expression of two genes/isoforms. all values should be bettwen [-1, 1].

ShiftRg

phase shift cutoff.

Value

Output is a list with 4 sublists, each shows a N-by-N matrix, in which#' N is the total number of genes (isoforms). SimiMat: similarity matrix (sine scores); the sine scores are calculated by -log10(epsilon^2). DiffMat: dissimilarity matrix; shown are epsilon^2 for each gene pair. ShiftMat: optimal phase shift estimate for each pair of genes.

Author(s)

Ning Leng

Examples

1
2
3
4
5
6
7
aa <- sin(seq(0,1,.1))
bb <- sin(seq(0.5,1.5,.1))
cc <- sin(seq(0.9,1.9,.1))
DataInSc <- rbind(aa,bb,cc)
NumGene <- nrow(DataInSc)
Res <- sapply(1:(NumGene-1),function(i)SineFun(DataInSc, i),simplify=FALSE)
Out <- FormatSineOut(Res, DataInSc)

Oscope documentation built on Nov. 8, 2020, 7:12 p.m.