InputMatrixFormatted: InputMatrixFormatted: make the input data meet the format...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function is used to make the input PET clusters meet the format requirements of MICC model

Usage

1

Arguments

data

PET clusters. The input PET clusters should have 9 columns as: chromosome; start; end; chromosome; start; end; PET-count between two anchor regions; total PET-count in left anchor region; total PET-count in right anchor region

Value

cAB

PET-count between two anchor regions

cA

Total PET-count in left anchor region

cB

Total PET-count in right anchor region

distance

genomic distance between two anchor regions, unit: kb; for inter-chromosomal PET clusters, distance="inf"

Author(s)

Chao He

See Also

MICC_1.0-package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(MICC)

## Import data
data(TestData)

# format the data
data_formatted <- InputMatrixFormatted(TestData)

## The function is currently defined as
function (data) 
{
    x <- data
    cAB <- x[, 7]
    cA <- x[, 8]
    cB <- x[, 9]
    intra <- as.character(x[, 1]) == as.character(x[, 4])
    inter <- as.character(x[, 1]) != as.character(x[, 4])
    distance <- (x[, 5] + x[, 6] - x[, 3] - x[, 2])/2/1000
    distance[inter] <- Inf
    data_formatted <- list(cAB = cAB, cA = cA, cB = cB, distance = distance)
  }

rakarnik/MICC documentation built on May 31, 2019, 10:36 a.m.