Learn R Programming

apmsWAPP (version 1.0)

int_mat: Format transformation of spectral counts

Description

Transformation of a count matrix into an interaction table (format required for SAINT) and vice versa.

Usage

int2mat(IntSaint)
mat2int(mat, baittab)

Arguments

IntSaint
a data.frame. The interaction table as required for SAINT (including zero counts).
mat
matrix of spectral counts, proteins in rows and samples in columns.
baittab
a data.frame. The baittable as required for SAINT, classifying control and bait samples.

Value

Either a matrix of spectral counts or a data.frame representing the interaction table is returned.

Details

The interaction table consists of four columns: IP name, bait or control name, protein name, spectral count (note: a protein which was not detected in one of the samples receives a zero count). int2mat transfers the interaction table into a matrix form. mat2int transfers a matrix of spectral counts into the interaction table format defined by SAINT.

Examples

Run this code
intfile <- system.file("extdata", "inttable.txt", package="apmsWAPP")
interactiontable <- read.table(intfile)
count.mat <- int2mat(interactiontable)
class(count.mat)
dim(count.mat)

Run the code above in your browser using DataLab