geneWeight: Calculate gene weight

Description Usage Arguments Value Author(s) References Examples

View source: R/geneWeight.R

Description

This function is the core function to calculate weight score for a gene.

Usage

1
geneWeight(queryIndex, Nref, topIndex, seedList, Pfcutoff)

Arguments

queryIndex

The index of query gene.

Nref

Total number of genes in the database.

topIndex

Top indexes that are associated with queryIndex gene

seedList

A list of intger vectors, each of which represents indexes of seed genes.

Pfcutoff

Percentage of top genes considered, should be less than 0.1.

Value

A vector with 2 variables, Nseeds and Cg.

Author(s)

Jiantao Shi

References

Jiantao Shi: NetGPA, a package for network-based gene prioritization analysis.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# load package and data
library("NetGPA")
data("Example_NetGPA")

# load data base
data(text_2006_12_NetGPA)

# Compare FGF pathway and a random gene set
exampleSeedFGFR <- Example_NetGPA$Cancer_GeneSet[["SIGNALING_BY_FGFR"]]

pGenes <- intersect(exampleSeedFGFR, colnames(text_2006_12_NetGPA))
rGenes <- sample(colnames(text_2006_12_NetGPA), length(pGenes)) 

res    <- NetGPA(as.list(pGenes), pGenes, text_2006_12_NetGPA, progressBar = FALSE)
pTable <- res$queryTable
pTable$group <- "Pathway"

res    <- NetGPA(as.list(rGenes), rGenes, text_2006_12_NetGPA, progressBar = FALSE)
rTable <- res$queryTable
rTable$group <- "Random"

mT <- rbind(pTable, rTable)

boxplot(-log10(queryP)~group, data = mT, ylab = "-log10(p-value)")

JiantaoShi/NetGPA documentation built on Jan. 1, 2021, 9:14 p.m.