twoWayTable: Generate two-way table for genetic interaction data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/twoWayTable.R

Description

Generate two-way table from a vector of genetic interaction status and a vector of the pairs that share a functional domain.

Usage

1
twoWayTable(var1, var2idx)

Arguments

var1

Vector of the status of the first property.

var2idx

Vector of the index in var1 that have the second property.

Details

Calculates the count numbers from the given vectors. Then put them into a matrix format.

Value

A two-way contingency table of genetic interaction and whether sharing a functional domain.

Author(s)

Z. Jiang

See Also

sharedBy, getUniquePairs

Examples

1
2
3
4
5
6
7
8
var1 <- c(0,1,1,0,0,0,1,0,1,1)
var2idx <- c(3,5,7)
twoWayTable(var1,var2idx)

data("AtongFnDomain")
pf <- Biobase::reverseSplit(AtongFnDomain$SharedPfam)
idx <- which(rownames(AtongFnDomain$pairs) %in% pf$PF00478)
twoWayTable(AtongFnDomain$pairs[,"interact"],idx)

SLGI documentation built on Nov. 8, 2020, 11 p.m.