RWR_LOE | R Documentation |
RWR_LOE
perform RWR lines-of-evidence. RWR_LOE has two possible functions.
Given one geneset of seeds, rankings for all other genes in the network will
be returned. Given a second geneset of genes to be queried, ranking for just
the genes in that geneset will be returned. This can be used to build
multiple lines of evidence from the various input networks to relate the two
gene sets.
RWR_LOE(
data = NULL,
seed_geneset = NULL,
query_geneset = NULL,
restart = 0.7,
tau = "1.0",
outdir = "./",
numranked = 1,
plot = FALSE,
modname = "default",
cyto = 0,
verbose = FALSE
)
data |
The path to the Rdata object generated from RWR_make_multiplex |
seed_geneset |
The path to the gene set file. It must have the following first two columns with no headers tab-delimited: <setid> <gene> <weight> |
query_geneset |
The path to the optional second gene set file. It must have the following first two columns with no headers tab-delimited: <setid> <gene> <weight> |
restart |
Sets the restart parameter [0,1). Higher value means the walker will jump back to a seed node more often. Defaulted to 0.7 |
tau |
Comma-separated list of values between that MUST add up to the number of network layers in the .Rdata file. One value per network layer that determines the probability that the random walker will restart in that layer. e.g. if there are three layers (A,B,C) in your multiplex network, then –tau '0.2,1.3,1.5' will mean that layer A is less likely to be walked on after a restart than layers B or C. Default 1.0 |
outdir |
Full path to the output file directory |
numranked |
Proprtion of ranked genes to return [0,1]. e.g. 0.1 will return the top 10%. Default 1.0 |
plot |
Output PNG plot of ROC and PRC of the query geneset with respect the seed geneset. |
modname |
String to include in output file name. Default "default" |
cyto |
Specify a number N > 0 if you wish to see a network of the seeds and top N ranked genes (cytoscape must already be running) |
verbose |
Verbose mode (Default False) |
Returns a list of: (1) a dataframe of results (scores for genes) and (2) the seed genes.
# An example of a default RWR LOE with one geneset which will
# return a ranked list
extdata.dir <- system.file("example_data", package = "RWRtoolkit")
multiplex_object_filepath <- paste(
extdata.dir,
"/string_interactions.Rdata",
sep = ""
)
geneset1_filepath <- paste(extdata.dir, "/geneset1.tsv", sep = "")
geneset2_filepath <- paste(extdata.dir, "/geneset2.tsv", sep = "")
outdir <- "./rwr_loe"
# for all other genes in the network
loe_gene_seed_list <- RWR_LOE(
data = multiplex_object_filepath,
seed_geneset = geneset1_filepath,
tau = "1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0",
outdir = outdir
)
# An example of an RWR LOE with two genesets, the first defines the seeds
# and the output will be rankings for the genes in the second geneset
loe_gene_seed_list2 <- RWR_LOE(
data = multiplex_object_filepath,
seed_geneset = geneset1_filepath,
query_geneset = geneset2_filepath,
tau = "1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0",
outdir = outdir
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.