Last data update: 2014.03.03

R: Format SinFun outputs from lists to matrix
FormatSineOutR Documentation

Format SinFun outputs from lists to matrix

Description

Format SinFun outputs from lists to matrix

Usage

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

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)

Results


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(Oscope)
Loading required package: EBSeq
Loading required package: blockmodeling
Loading required package: gplots

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

Loading required package: testthat
Loading required package: cluster
Loading required package: BiocParallel
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Oscope/FormatSineOut.Rd_%03d_medium.png", width=480, height=480)
> ### Name: FormatSineOut
> ### Title: Format SinFun outputs from lists to matrix
> ### Aliases: FormatSineOut
> 
> ### ** Examples
> 
> 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)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>