# CCC on Mitya's Data

YP & & VL & DS & MT & NL & CEP & …
Department of Applied Mathematics and Statistics
Johns Hopkins University

Fri Mar 6 08:18:19 2015

## Cleaning the data

#fname <- url("http://www.cis.jhu.edu/~parky/Data/drosophila_retina_1.graphml")
fname <- "drosophila_retina.Rbin"
summary(g)

# IGRAPH DN-- 1781 33641 --
# + attr: source (g/c), info (g/c), name (v/c), x (v/n), y (v/n), z
# | (v/n), M (v/n), pre.x (e/n), post.x (e/n), pre.y (e/n), post.y
# | (e/n), pre.z (e/n), post.z (e/n), Proofreading.Details (e/c)


g <- simplify(g)      # make g unweighted & hollow
g <- as.undirected(g) # make g undirected (symmetric)

# IGRAPH UN-- 1781 8911 --
# + attr: source (g/c), info (g/c), name (v/c), x (v/n), y (v/n), z
# | (v/n), M (v/n)


## remove the argmax(deg)
maxdv <- which.max(degree(g))
g <- delete.vertices(g,maxdv)

## find the largest connected component (lcc)
cc <- clusters(g)
table(cc$memb)  # # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # 1748 1 1 1 1 1 1 1 3 2 1 1 1 1 1 # 16 17 18 19 20 21 22 23 24 25 26 # 2 2 2 1 1 1 1 2 1 1 1  g <- induced.subgraph(g, which(cc$memb == which.max(cc\$csize)))
A <- g[]
summary(g)

# IGRAPH UN-- 1748 7977 --
# + attr: source (g/c), info (g/c), name (v/c), x (v/n), y (v/n), z
# | (v/n), M (v/n)