length(FGS) x length(AGS) (see "Value"). Each of the first three parameters can be submitted as either a text file or as a list which has been preloaded with import.gs and import.net. The latter scenario could save much (see Details).
nea.render(AGS, FGS, NET, Lowercase = 1, ags.gene.col = 2, ags.group.col = 3, fgs.gene.col = 2, fgs.group.col = 3, net.gene1.col = 1, net.gene2.col = 2, echo = 1, graph = FALSE, na.replace = 0, Parallelize = 1)ags.group.col and gene IDs should be found in ags.gene.col. As a special option, an AGS list for can also be pre-created from raw data matrices of the format "genes X samples". Such matrices can contain information on gene copy number, gene/protein expression, gene methylation etc. (samples2ags) or point mutation data (mutations2ags). These two functions return AGS lists of length=ncol(Nsamples).fgs.group.col and gene IDs would be found in fgs.gene.col. As an alternative, this function can use single-node FGSs from the network nodes, which should be pre-created with as_genes_fgs). In this case each network node X becomes an FGS on its own. Respective names in the FGS list equal 'X' and the content becomes c('X'). The total length of the FGS list then equals no. of nodes in the network. If fewer nodes are needed for such single-node analysis, then one can submit a text file with fgs.gene.col and fgs.group.col contain identical gene IDs. This option uses as_genes_fgs.n.actual, n.expected, chi, z, p, q, each of which is a matrix of size length(FGS) x length(AGS). The two former ones contain the numbers of network edges between any nodes of AGS and any nodes of FGS, respectively those observed in the actual network and expected by chance. chi are the original chi-squared network enrichment statistic values. z are respective z-scores which are normally distributed under null and are thus suitable as input to regression modelling and other parametric methods. p and q are p-values and respective FDR estimates from p.adjust(p, method="BH").
import.gs. The TAB-delimited file "text_file.groups" should contain pre-compiled gene sets, so that gene set IDs will be found in column ags.group.col / fgs.group.col and gene IDs will be found in ags.gene.col / fgs.gene.col. Option (1) is much more efficient than (2) when nea.render has to be run multiple times. Similarly to AGS and FGS, NET could be submitted as either a list, pre-loaded with import.net, or a text TAB-delimited file where two columns net.gene1.col and net.gene2.col represent nodes of respective edges.
samples2ags
ags.list <- samples2ags(fantom5.43samples, Ntop=20, method="topnorm")
data(can.sig.go)
fpath <- can.sig.go
fgs.list <- import.gs(fpath)
summary(fgs.list)
data(net.kegg)
netpath <- net.kegg
net <- import.net(netpath)
n1 <- nea.render(AGS=ags.list[1:10], FGS=fgs.list[1:10], NET=net, graph=FALSE)
hist(n1$chi, breaks=100)
hist(n1$z, breaks=100)
hist(n1$p, breaks=100)
hist(n1$q, breaks=100)
Run the code above in your browser using DataLab