singleNode.getPtBSbyK: Generate patient-specific bitstrings from the fixed,...

Description Usage Arguments Value Examples

View source: R/singleNode.getPtBSbyK.r

Description

This function calculates the bitstrings (1 is a hit; 0 is a miss) associated with the fixed, single-node network walker trying to find the variables in the encoded subset, given the background knowledge graph.

Usage

1
singleNode.getPtBSbyK(S, ranks, num.misses = NULL)

Arguments

S

- A character vector of node names describing the node subset to be encoded.

ranks

- The list of node ranks calculated over all possible nodes, starting with each node in subset of interest.

num.misses

- The number of misses tolerated by the network walker before path truncation occurs.

Value

pt.byK - a list of bitstrings, with the names of the list elements the node names of the encoded nodes

Examples

1
2
3
4
5
6
7
8
9
# Load in your profiling data (rows are compounds, columns are samples)
data_mx = read.table("your_profiling_data.txt", sep="\t", header=TRUE)
# Get bitstrings associated with each patient's top kmx variable subsets
kmx = 15
ptBSbyK = list()
for (pt in 1:ncol(data_mx)) {
  S = data_mx[order(abs(data_mx[,pt]), decreasing=TRUE),pt][1:kmx]
  ptBSbyK[[ptID]] = singleNode.getPtBSbyK(S, ranks)
}

BRL-BCM/CTD documentation built on March 21, 2020, 8:39 a.m.