make_STRING_igraph: this function takes an input matrix having one column named...

Description Usage Arguments Value Examples

View source: R/make_STRING_igraph.R

Description

this function takes an input matrix having one column named "gene" containing genes of interest and a stringDB object it returns an igraph graph of the STRING network containing those genes the node attributes are "name" (STRING id) and "geneName" (original gene names from input matrix) genes that do not have STRING annotation are omitted Phu T. Van, FHCRC 2017, w/ substantial help and input from C.Murie & V.Voillet

Usage

1
make_STRING_igraph(inputMatrix, STRINGdbObj)

Arguments

inputMatrix

a matrix of gene expression values

STRINGdbObj

a STRINGdbObj generated by connecting via STRINGdb

Value

table of genes' mean expression values for each group

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# DEGout <- topTable(fitBayes, number=nrow(vDat), coef="pttype", sort="P")
DEGout$gene <- rownames(DEGout)
string_db <- STRINGdb$new(version="10"
                          , species=9606
                          , score_threshold=0
                          , input_directory="/STRINGdb/HomoSapiens/")
n <- make_STRING_igraph(DEGout, string_db)
plot(n, vertex.label=V(n)$geneName)

## End(Not run)

ptvan/Pmisc documentation built on Nov. 19, 2020, 10:27 p.m.