createList: createList

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Take a subset of the input data frame or matrix corresponding to the required Sankey values.

Usage

1
2
3
createList(inputList, inputFC = NULL, node = "genes", fc = "foldChange",
  source = "source", target = "target", description = "description",
  value = "value", sourcefc = "sourcefc", targetfc = "targetfc")

Arguments

inputList

Data frame or matrix containing the necessary parameters described below.

inputFC

Data frame or matrix containing node names (source and target) and corresponding quantitative values. If this input is defined, then input-specific parameters 'node' and 'fc' should be defined. Inputs 'source', 'target', 'description' and 'value' are still referenced from inputList.

node

Column name of inputFC containing names to display of source and target nodes. Paths defined in inputList identify which nodes are sources and which are targets.

fc

Column name of inputFC containing quantitative values representing the nodes.

source

Column name of inputList containing names to display of starting nodes. Paths are drawn from these points to their corresponding target nodes.

target

Column name of inputList containing names to display of destination nodes. Paths are drawn to these point from their corresponding source nodes.

description

Optional column name of inputList containing additional information about connection, e.g. the gene name of a transcript target node, or family name of related target genes.

value

Column name of inputList containing quantitative values representing the relationship between sources and targets.

sourcefc

Column name of inputList containing quantitative values representing the sources.

targetfc

Column name of inputList containing quantitative values representing the targets.

Value

a data.frame List

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
nodevals <- runif(5,-2,2)
tempList <- data.frame(source=c("A","B","C","D"),
    target=c("C","D","E","E"),
    addedInfo=c("c","d","vowel","vowel"),
    relationValue=runif(4,-1,1),
    sourceValue=nodevals[1:4],
    targetValue=nodevals[c(3,4,5,5)])
tempFC <- data.frame(genes=c("A","B","C","D","E"), foldChange=runif(5,-2,2))
# inputList only
createList(tempList, description="addedInfo", value="relationValue", 
sourcefc="sourceValue", targetfc="targetValue")
# inputList and inputFC
createList(tempList, tempFC, value="relationValue",sourcefc="sourceValue",
targetfc="targetValue")

Director documentation built on Nov. 8, 2020, 5:55 p.m.