Description Usage Arguments Value Examples
Create labels for a classifier for protein pairs in the same order as in a dataset that will be used as input to a classifier, in a memory-friendly way.
1 2 | make_labels(gold_standard, dat, node_columns = c(1, 2),
protein_groups = NULL)
|
gold_standard |
an adjacency matrix of gold-standard interactions |
dat |
a data frame with interacting proteins in the first two columns |
node_columns |
a vector of length two, denoting either the indices
(integer vector) or column names (character vector) of the columns within
the data frame containing the nodes participating in pairwise interactions;
defaults to the first two columns of the data frame ( |
protein_groups |
optionally, specify a list linking each protein in the first two columns of the input data frame to a protein group |
a vector of the same length as the input dataset, containing
NA
s for protein pairs not in the gold standard and ones or zeroes
based on the content of the adjacency matrix
1 2 3 4 5 6 | data(gold_standard)
adj <- adjacency_matrix_from_list(gold_standard)
proteins <- unique(unlist(gold_standard))
dat <- data.frame(protein_A = sample(proteins, 10),
protein_B = sample(proteins, 10))
labels <- make_labels(adj, dat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.