RIABIO 2022 Workshop: Analysis of biological and biomedical transcriptomic data using Artificial Intelligence (AI) and Machine Learning methods (ML) methods with R
Lets look at igraph funtions/tools.
setwd("/Users/solouli/Desktop/")
library(igraph) # Network analysis library
set.seed(25032022)
g <- sample_gnp(15, 0.2, directed = FALSE, loops = FALSE)
plot(g)
plot(g,
vertex.color="darkorchid", # nodes colors
vertex.size=20, # size of nodes
edge.color="black") # edges colors
Definition of the metrics can be foun in Network Science from Albert-László Barabási
V(g)
E(g)
degree(g)
distances(g)
is_connected(g)
count_components(g)
components(g)
all_shortest_paths(g, 1, to = 5)
average.path.length(g, directed=FALSE, unconnected=TRUE)
diameter(g)
edge_density(g)
betweenness(g)
write.graph(g,"/Users/solouli/Desktop/yeast_protein_interaction.graphml", format="graphml")
png("random_network.png", width = 300*10, height = 300*8,
res = 300, units = "px")
set.seed(25032022)
plot(g,
vertex.size=2*sqrt(V(g)$degree),
vertex.color=V(g)$color,
vertex.label=NA,
layout=layout_nicely,
edge.color="gray80") # color de las aristas
dev.off()
We are going to work in teams of 4 with a subsaet of intronless genes.
You can find the published paper here: Deciphering the Tissue-Specific Regulatory Role of Intronless Genes Across Cancers.
Lets look at igraph funtions/tools.
- Rsources
https://igraph.org/r/html/latest/ http://networksciencebook.com/chapter/1
https://kateto.net/2016/05/network-datasets/
https://kateto.net/wp-content/uploads/2016/01/NetSciX_2016_Workshop.pdf https://github.com/elaragon/R-igraph-Network-Workshop/blob/master/NetSciX%202016%20Workshop.R
- Data Bases
https://snap.stanford.edu/data/
https://networkrepository.com/
https://icon.colorado.edu/#!/networks
- Create a dataset
https://string-db.org/cgi/input?sessionId=bvevnhF1MzII&input_page_show_search=on