binary.cnr: build binary CNR from integer copy number data

View source: R/binary.cnr.R

binary.cnrR Documentation

build binary CNR from integer copy number data

Description

This function builds a binary, incidence, matrix from the cnr$X. It was designed as a helper function to generate the input for infSCITE.

Usage

binary.cnr(cnr, base.ploidy = 2)

Arguments

cnr

a copy number matrix to convert to an incidence matrix

base.ploidy

expected cell ploidy, e.g. 2N = 2, 4N = 4.

Details

Because infSCITE was developed for mutation data, this function creates a precense/absence matrix of the data

By default, anything not diploid is 1.

Value

Returns an incidence matrix for X as part of the cnr object

  • Z incidence matrix from X, copy number != 2 is 1, all 2 are 0

Examples


data(cnr)

Z <- binary.cnr(cnr)
 

SingerLab/gac documentation built on March 23, 2024, 5:15 a.m.