1 / 38

Amazon EC2 Cloud and Using R in EC2 instance

Amazon EC2 Cloud and Using R in EC2 instance. Ishwor Thapa. Log in to: . https://uno-biocloud.signin.aws.amazon.com/ console username and password provided to you. EC2Page. Selecting Instance (A). Selecting Instance (B). Instance Details. Instance Details. Create KEY PAIR (PASSWORD FILE).

gayle
Download Presentation

Amazon EC2 Cloud and Using R in EC2 instance

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Amazon EC2 Cloud and Using R in EC2 instance Ishwor Thapa

  2. Log in to: • https://uno-biocloud.signin.aws.amazon.com/console • username and password provided to you.

  3. EC2Page

  4. Selecting Instance (A)

  5. Selecting Instance (B)

  6. Instance Details

  7. Instance Details

  8. Create KEY PAIR (PASSWORD FILE)

  9. Save the pem file

  10. Security Definitions

  11. Review Page

  12. Launching……

  13. What to see on EC2 console page

  14. EC2 console page (right click on instance!!)

  15. Instance is up and running • Now how to connect to the machine and work in the ubuntu instance in cloud? • Linux/ mac -> ssh (already installed) • Windows -> putty (need to install) For Windows Users: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Scroll Down to Binaries and download putty.zip and extract the files.

  16. Instance Information from EC2 console Copy the public DNS value: ec2-50-17-17-23.compute-1.amazonaws.com

  17. Connecting to ec2 instance using ssh (linux/ mac) • chmod 700 ithapa.pem • ssh-v -iithapa.pem ubuntu@ec2-50-16-181-117.compute-1.amazonaws.com • Linux ip-10-117-89-77 2.6.35-24-virtual #42-Ubuntu SMP Thu Dec 2 05:15:26 UTC 2010 x86_64 GNU/Linux • Ubuntu 10.10 • Welcome to Ubuntu!

  18. Connecting to ec2 instance using putty (Windows)

  19. Connecting to ec2 instance using putty (Windows)

  20. Connectingto ec2 instance using putty (Windows)

  21. Connecting to ec2 instance using putty (Windows)

  22. Connecting to ec2 instance using putty (Windows)

  23. Connecting to ec2 instance using putty (Windows)

  24. Connecting to ec2 instance using putty (Windows)

  25. Connecting to ec2 instance using putty (Windows)

  26. Connecting to ec2 instance using putty (Windows) Login Name:ubuntu Linux ip-10-117-89-77 2.6.35-24-virtual #42-Ubuntu SMP Thu Dec 2 05:15:26 UTC 2010 x86_64 GNU/Linux Ubuntu 10.10 Welcome to Ubuntu!

  27. Installing / Using R ubuntu@ip-10-117-89-77:~$ R The program 'R' is currently not installed. You can install it by typing: sudo apt-get install r-base-core ubuntu@ip-10-117-89-77:~$ sudo apt-get update ubuntu@ip-10-117-89-77:~$ sudo apt-get install r-base-core

  28. Installing iGraph in R R > install.packages("igraph") Warning in install.packages("igraph") : argument 'lib' is missing: using '/usr/local/lib/R/site-library' Warning in install.packages("igraph") : 'lib = "/usr/local/lib/R/site-library"' is not writable Would you like to create a personal library '~/R/x86_64-pc-linux-gnu-library/2.11' to install packages into? (y/n) y 69: USA (AZ) 70: USA (CA 1) 71: USA (CA 2) 72: USA (IA) 73: USA (MA) 74: USA (MI) 75: USA (MO) 76: USA (OH) 77: USA (OR) 78: USA (PA 1) 79: USA (PA 2) 80: USA (TX 1) 81: USA (TX 2) 82: USA (WA 1) 83: USA (WA 2) Selection: 72

  29. Graph Basic Concepts • Graph is defined by nodes/vertices and the connection between the nodes, called edges. • directed/ undirected • Weighted/ Unweighted • library(“igraph”) • G<-graph(c(0,1, 1,2, 3,4, 5,6)) Definition of the Graph: • G

  30. iGraph Data model Vertices • V(G) Edges • E(G) Undirected Graph • G<-graph(c(0,1, 1,2, 3,4, 5,6), directed=F)

  31. Network Structure • Star • Ring • Lattice • Tree

  32. Network Structure • s<-graph.star(n=3) • s<-graph.star(n=4,mode=“in”, center=1) • r<-graph.ring(n=4) • Other parameters: directed, mutual, circular • l<-graph.lattice(c(5,5)) • e<-graph.empty() • e<-graph.empty(n=5) • f<-graph.full(n=3)

  33. Read network from a file • g<-read.graph(“sample.txt”, format=“ncol”) • g Big graphs • g<-read.graph(“ppi.mouse.uniprot”, format=“ncol”) • summary(g) • V(g)$[0] • E(g)$[2]

  34. Sample and PPI network • PPI : EBI intact page with mouse search key word. • sample network

  35. Analyzing a network • Network Centrality ( the most central node in the network) • PPI : proteins having many interactions with other proteins • Degree Centrality, Closeness Centrality and Betweenness Centrality • Degree: The number of edges coming to/from a vertex • d<-degree(g) • which.max(d) • V(g)[which.max(d) -1]

  36. Closeness/ Betweenness Centrality • Average Number of steps needed to travel to reach other vertices. • cl<-closeness(g) • V(g)[which.max(cl)-1] Betweenness: to which extent a vertex is “in between” other vertices • be<-betweenness(g) • V(g)[which.max(be)-1]

  37. Community Detection • Densely connected subgraphs • wtc<-walktrap.community(g) • through random walks (short random walks tend to stay in the same community) • memb<-community.to.membership(g, wtc$merges, steps=4)

  38. References • http://igraph.sourceforge.net/igraphbook/index.html • http://igraph.sourceforge.net/doc/html/index.html • http://geza.kzoo.edu/bionet/bioinf.pdf

More Related