visualize: Reconstruction vizualization

Description Usage Arguments Value Examples

View source: R/visualize.R

Description

This function allows to plot reconstructed chromatin conformation X and corresponding contact matrix approximation XX'.

Usage

1
visualize(X, type = "projection", index = 1:nrow(X), title = NULL)

Arguments

X

a matrix representing spatial coordinates of resulting chromatin reconstruction.

type

the type of plot returned. Set type = 'projection' and type = '3D' to output the projection and 3D model of chromatin conformation reconstruction, respectively.

index

points where spline basis is evaluated; each corresponds to a particular genomic loci.

title

optional, adds title to the plot. Default value title = NULL.

Value

Reconstruction plots.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(C)

#transform contact counts to distances
Z = 1/(C+1)

#create spline basis matrix
H = splines::bs(1:ncol(C), df = 5)

#orthogonalize H using QR decomposition
H = qr.Q(qr(H))

#run WPCMS with equal weights 
wpcms = WPCMS(Z, H)

#plot projection of reconstructed chromatin conformation
visualize(wpcms$X, type = 'projection')

#plot 3D model of reconstructed chromatin conformation
visualize(wpcms$X, type = '3D')

ElenaTuzhilina/PoisMS documentation built on Dec. 11, 2020, 1:29 a.m.