Difference between revisions of "Test"

From "A B C"
Jump to navigation Jump to search
m
m (Replaced content with "Test: timestamp is 2020-09-16 04:19:42")
Tag: Replaced
 
Line 1: Line 1:
<!-- HTML comments will not be rendered by the wiki. -->
+
Test: timestamp is 2020-09-16 04:19:42
 
 
<div class="b1">
 
Sample Journal
 
</div>
 
 
 
{{Vspace}}
 
 
 
<!-- A table of contents will replace the __TOC__ "magic text" -->
 
 
 
__TOC__
 
 
 
{{Vspace}}
 
 
 
<!-- =================== BEGIN of template for one entry =================== -->
 
== <my activity> ==
 
 
 
;Objective
 
: text ...
 
 
 
<div class="time-estimate">
 
Time estimated: XXX h; taken XXX h;<br/>
 
Date started: 2020-MM-DD; completed: 2020-MM-DD
 
</div>
 
 
 
'''Progress'''
 
----
 
 
 
;Activity 1
 
: Notes ...
 
 
 
;Activity 2
 
: Notes ...
 
 
 
'''Conclusion and outlook'''
 
----
 
Describe ...
 
 
 
{{Vspace}}
 
 
 
<!-- ==================== END of template for one entry ==================== -->
 
 
 
 
 
<!-- ========================== BEGIN sample entry ========================= -->
 
 
 
== (Example Journal Entry) Explore Cytoscape ==
 
 
 
;Objective
 
: Write R code to generate a random network. Explore it with Cytoscape.
 
 
 
<div class="time-estimate">
 
Time estimated: 2 h; taken 4 h;<br/>
 
Date started: 2017-09-16; completed: 2017-09-18
 
</div>
 
 
 
'''Progress'''
 
----
 
 
 
;R code for a random network.
 
: Cytoscape can read networks in [http://wiki.cytoscape.org/Cytoscape_User_Manual/Network_Formats#SIF_format SIF format]. Wrote the following code to generate N random nodes with random interactions and write them to file.
 
 
 
<div class="toccolours mw-collapsible mw-collapsed" style="width:800px">
 
My R code below ...
 
<div class="mw-collapsible-content">
 
 
 
N <- 15  # number of nodes
 
nMin <- 1 # minimum number of edges
 
nMax <- 5 # maximum number of edges
 
OUT <- "myRandomSIF.txt"
 
 
 
# Create N random strings from three uppercase characters
 
# First make more than we need, because some might not be unique ...
 
nodes <- character(2*N)
 
 
 
set.seed(161803)
 
for (i in 1:(2*N)) {
 
  nodes[i] <- paste0(sample(LETTERS, 1),
 
                      sample(LETTERS, 1),
 
                      sample(LETTERS, 1))
 
}
 
set.seed(NULL)
 
 
 
nodes <- unique(nodes) # throw away duplicates ...
 
nodes <- nodes[1:N]    # ... and keep only N
 
 
 
# Create SIF output
 
mySIF <- character()
 
 
 
set.seed(112358)
 
for (myA in nodes) {  # for each node
 
  for (i in 1:sample(nMin:nMax, 1)) { # for a random number of interactors ...
 
    myB <- sample(nodes, 1)          # ... randomly choose interactor ...
 
                                      # ... create record and apend to mySIF
 
    mySIF <- c(mySIF, sprintf("%s\tpp\t%s", myA, myB)) # myA, "pp", myB
 
                                                        # separated by tabs
 
  }
 
}
 
set.seed(NULL)
 
 
 
# write mySIF to file
 
writeLines(mySIF, OUT)
 
 
 
</div>
 
</div>
 
 
 
;Install Cytoscape
 
: Straightforward installation of <b>Cytoscape 3.5.1</b> from http://www.cytoscape.org
 
 
 
;Visualize and explore options
 
*:Worked through an introductory tutorial from http://opentutorials.cgl.ucsf.edu/index.php/Tutorial:Introduction_to_Cytoscape_3.1-part2 Noteworthy: nodes can be coloured by attribute values.
 
*:Loaded my own SIF file with the File → Import → Network → File option. Explored various layout options and visualization styles. Manually added nodes and edges with the options one gets when ctrl-clicking on the canvas.
 
 
 
{{Vspace}}
 
 
 
'''Conclusion and outlook'''
 
----
 
 
 
* Creating layouts, applying styles, adding nodes and edges with Cytoscape seems straightforward and creates evocative images.
 
* Analyzing and interpreting the network needs more thought. Need to explore ideas and tools for network analysis next - e.g. clustering tools, enrichment tools, motif discovery ...
 
* Next: write some code to create attribute values for nodes, import the values, and have Cytoscape style the nodes accordingly.
 
 
 
<!-- =========================== END sample entry ========================== -->
 
 
 
{{Vspace}}
 
 
 
----
 
 
 
<!-- Footnotes -->
 
==Notes and References==
 
<references />
 
 
 
{{Vspace}}
 
 
 
<!-- Category and Footer -->
 
[[Category:BCH441-2020_Journal]]
 
 
 
----
 
 
 
{{CC-BY}}
 
 
 
<!-- END -->
 

Latest revision as of 09:29, 25 September 2020

Test: timestamp is 2020-09-16 04:19:42