R/omics_network.R
geneNeighborhood-omics_network-method.Rd
Find the neighborhood of a set of nodes.
# S4 method for omics_network
geneNeighborhood(
net,
targets,
nv = 0,
order = length(net@time_pt) - 1,
label_v = NULL,
ini = NULL,
frame.color = "white",
label.hub = FALSE,
graph = TRUE,
names = F
)
a omics_network object
a vector containing the set of nodes
the level of cutoff. Defaut to 0.
of the neighborhood. Defaut to `length(net@time_pt)-1`.
vector defining the vertex labels.
using the ``position'' function, you can fix the position of the nodes.
color of the frames.
logical ; if TRUE only the hubs are labeled.
plot graph of the network. Defaults to `TRUE`.
return names of the neighbors. Defaults to `FALSE`.
The neighborhood of the targeted genes.
data(Selection)
data(infos)
#Find probesets for EGR1
pbst_EGR1 = infos[infos$hgnc_symbol=="EGR1", "affy_hg_u133_plus_2"]
gene_IDs = infos[match(Selection@name, infos$affy_hg_u133_plus_), "hgnc_symbol"]
data(network)
#A nv value can chosen using the cutoff function
nv=.11
EGR1<-which(is.element(Selection@name,pbst_EGR1))
P<-position(network,nv=nv)
geneNeighborhood(network,targets=EGR1,nv=nv,ini=P,
label_v=gene_IDs)
#> [[1]]
#> [[1]][[1]]
#> + 1/102 vertex, from 95e976f:
#> [1] 25
#>
#> [[1]][[2]]
#> + 1/102 vertex, from 95e976f:
#> [1] 26
#>
#>
#> [[2]]
#> [[2]][[1]]
#> + 1/102 vertex, from 95e976f:
#> [1] 25
#>
#> [[2]][[2]]
#> + 1/102 vertex, from 95e976f:
#> [1] 26
#>
#>
#> [[3]]
#> [[3]][[1]]
#> + 1/102 vertex, from 95e976f:
#> [1] 25
#>
#> [[3]][[2]]
#> + 1/102 vertex, from 95e976f:
#> [1] 26
#>
#>