Learn R Programming

BiDAG (version 2.1.4)

string2mat: Deriving interactions matrix

Description

This transforms a list of possible interactions between proteins downloaded from STRING database into a matrix which can be used for blacklisting/penalization in BiDAG.

Usage

string2mat(curnames, int, mapping = NULL, type = c("int"), pf = 2)

Value

square matrix whose entries correspond to the list of interactions and parameter type

Arguments

curnames

character vector with gene names which will be used in BiDAG learning function

int

data frame, representing a interactions between genes/proteins downloaded from STRING (https://string-db.org/); two columns are necessary 'node1' and 'node2'

mapping

(optional) data frame, representing a mapping between 'curnames' (gene names, usually the column names of 'data') and gene names used in interactions downloaded from STRING (https://string-db.org/); two columns are necessary 'queryItem' and 'preferredName'

type

character, defines how interactions will be reflected in the output matrix; int will result in a matrix whose entries equal 1 if interaction is present in the list of interactions int and 0 otherwise; blacklist results in a matrix whose entries equal 0 when interaction is present in the list of interactions and 1 otherwise; pf results in a matrix results in a matrix whose entries equal 1 is interaction is present in the list of interactions int and pf otherwise$ "int" by default

pf

penalization factor for interactions, needed if type=pf

Examples

Run this code
curnames<-colnames(kirp)
intmat<-string2mat(curnames, mapping, interactions, type="pf")

Run the code above in your browser using DataLab