Skip to content

Commit

Permalink
DF Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dosorio committed Jan 7, 2020
1 parent d7c9224 commit 1d59cb7
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 53 deletions.
23 changes: 12 additions & 11 deletions inst/manuscript/dermalFibroblasts-netDifferences.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,20 @@ sY <- assignDirectionNetworK(igraphNetwork = sY, countMatrix = mY, bootR = 100)
sO <- assignDirectionNetworK(igraphNetwork = sO, countMatrix = mO, bootR = 100)

uNet <- igraph::union(sY,sO)
set.seed(3)
lNet <- igraph::layout.graphopt(uNet, charge = 1e-3)
set.seed(1)
lNet <- igraph::layout.graphopt(uNet, charge = 1e-2)
plot(uNet, layout = lNet)
rownames(lNet) <- names(V(uNet))
lNet[names(V(sO)),] <- lNet[names(V(sO)),]*4
mCoord <- tkplot(uNet, layout= lNet)

lNet <- tk_coords(mCoord)
write.table(lNet, 'figures/coordinatesDFplot.tsv')
#lNet[names(V(sO)),] <- lNet[names(V(sO)),]*4
#mCoord <- tkplot(uNet, layout= lNet)

#lNet <- tk_coords(mCoord)
#write.table(lNet, 'figures/coordinatesDFplot.tsv')
lNet <- read.table('figures/coordinatesDFplot.tsv')
lNet <- t(t(lNet)/apply(abs(lNet),2,max))
rownames(lNet) <- names(V(uNet))
plot(uNet, layout = lNet)
lNet[,1] <- lNet[,1]*3.5
lNet[,2] <- lNet[,2]*1.3
lNet[,] <- lNet[,] * -1.5
gY <- names(V(sY))
gO <- names(V(sO))

Expand Down Expand Up @@ -146,8 +147,8 @@ myCircle <- function(coords, v=NULL, params) {

add.vertex.shape("fcircle", clip=igraph.shape.noclip,plot=myCircle, parameters=list(vertex.frame.color=1, vertex.frame.width=1))

png('figures/dfDiffNetworks.png', width = 6000, height = 3000, res = 300)
par(mfrow=c(1,2))
png('figures/dfDiffNetworks.png', width = 6000, height = 3000, res = 300, pointsize = 20, bg = NA)
par(mfrow=c(1,2), mar=c(1,1,1,1))
fColor <- ifelse(gY %in% gO, 'darkgoldenrod', NA)
fColor[(gY %in% dC) & fColor == 'darkgoldenrod'] <- 'forestgreen'
plot(sY, layout = lNet[names(V(sY)),], vertex.shape="fcircle", vertex.frame.color=fColor, vertex.frame.width=12, vertex.label = NA, edge.width = NA, edge.arrow.size = 0, rescale = FALSE, xlim = c(min(lNet[,1]), max(lNet[,1])), ylim=c(min(lNet[,2]), max(lNet[,2])), mark.groups = which(gY %in% gO), mark.col="#C5E5E7", mark.border=NA)
Expand Down
84 changes: 42 additions & 42 deletions inst/manuscript/figures/coordinatesDFplot.tsv
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
"V1" "V2"
"S100A11" 1.82424242424242 1.11543209876543
"ANXA5" 1.93030303030303 0.533641975308642
"RPS18" 2.55818181818182 0.886728395061729
"RPS12" 2.57515151515152 1.07932098765432
"ANXA1" 2.27818181818182 0.90679012345679
"LDHA" 1.61212121212121 0.878703703703704
"CFL1" 2.15090909090909 0.625925925925926
"TPI1" 2.21454545454545 1.3
"CD63" 2.00242424242424 0.958950617283951
"MYL6" 2.20181818181818 1.07932098765432
"LGALS3" 1.71393939393939 0.690123456790124
"B2M" 2.1169696969697 0.425308641975309
"ANXA2" 1.97272727272727 0.746296296296296
"RPLP1" 2.57515151515152 1.27993827160494
"ALDOA" 2.01939393939394 1.27191358024691
"RPL13" 2.47333333333333 0.71820987654321
"UBB" 1.73515151515152 0.958950617283951
"RPL11" 2.67484848484848 0
"RPS8" 3.35363636363636 0.545679012345679
"RPL15" 3.29636363636364 0.710185185185185
"RPS3A" 3.04181818181818 0.870679012345679
"RPS14" 2.79575757575758 0.890740740740741
"RPL10A" 2.37630417140533 0.508833489644248
"RPS4X" 2.75757575757576 1.07530864197531
"RPL10" 2.88484848484848 1.22376543209877
"RPL8" 2.61426584072527 0.20867815994969
"RPS6" 3.11393939393939 0.58179012345679
"RPL12" 3.27515151515152 1.2037037037037
"RPS3" 3.24969696969697 0.413271604938272
"RPL6" 2.28315022668098 0.266458293080652
"RPLP0" 3.02909090909091 0.381172839506173
"RPS2" 2.75414173735312 0.345510006272274
"TNFRSF12A" 3.5 0.898765432098765
"H3F3B" 2.91030303030303 0.710185185185185
"OAZ1" 2.93787878787879 0.140432098765432
"RPL13A" 2.98878787878788 1.04722222222222
"RPS9" 3.22 0.975
"RPL3" 2.69606060606061 0.730246913580247
"MT-ND1" 2.54545454545455 0.349074074074074
"MT-CO1" 2.63878787878788 0.525617283950617
"MT-CO3" 3.15424242424242 0.228703703703704
"MT-ND4" 2.85727272727273 0.509567901234568
"S100A11" -1.11965134706815 -0.183807439824945
"ANXA5" -1.40966719492868 -0.393873085339168
"RPS18" -0.914025356576862 -0.705689277899344
"RPS12" -0.752377179080824 -0.413566739606127
"ANXA1" -0.955625990491284 -0.210065645514223
"LDHA" -1.22424722662441 0
"CFL1" -1.16006339144216 -0.62363238512035
"TPI1" -1.03882725832013 -0.551422319474836
"CD63" -1.47147385103011 -0.567833698030635
"MYL6" -1.25277337559429 -0.777899343544858
"LGALS3" -1.28843106180666 -0.223194748358862
"B2M" -1.36450079239303 -0.682713347921225
"ANXA2" -1.2337559429477 -0.390590809628009
"RPLP1" -0.842709984152139 -0.557986870897155
"ALDOA" -1.5 -0.154266958424508
"RPL13" -1.01980982567353 -0.833698030634573
"UBB" -1.07210776545166 -0.390590809628009
"RPL11" -0.16877971473851 -1.17177242888403
"RPS8" -0.556259904912837 -0.919037199124726
"RPL15" -0.140253565768621 -0.515317286652079
"RPS3A" -0.539619651347068 -0.439824945295405
"RPS14" -0.282884310618067 -1.37855579868709
"RPL10A" -0.993660855784469 -1.03719912472648
"RPS4X" -0.344690966719493 -0.38074398249453
"RPL10" -0.872424722662441 -1.37855579868709
"RPL8" -0.765451664025357 -1.2144420131291
"RPS6" -0.323296354992076 -1.07002188183807
"RPL12" -0.594294770206022 -0.213347921225383
"RPS3" -0.102218700475436 -0.932166301969366
"RPL6" -0.972266244057052 -1.21772428884026
"RPLP0" -0.446909667194929 -1.2308533916849
"RPS2" -0.59904912836767 -1.14223194748359
"TNFRSF12A" -0.375594294770206 -0.164113785557987
"H3F3B" -0.758320126782884 -0.764770240700219
"OAZ1" -0.692947702060222 -1.41137855579869
"RPL13A" -0.86053882725832 -0.915754923413567
"RPS9" -0.656101426307448 -0.590809628008753
"RPL3" -0.698890649762282 -1.0109409190372
"MT-ND1" -0.292393026941363 -0.617067833698031
"MT-CO1" -0.527733755942948 -0.731947483588621
"MT-CO3" -0.465927099841521 -1.5
"MT-ND4" -0.337559429477021 -0.86980306345733
Binary file modified inst/manuscript/figures/dfDiffNetworks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1d59cb7

Please sign in to comment.