Difference between revisions of "CSB Assignment Week 3"
m (→Pre-reading) |
m |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<div id="CSB"> | <div id="CSB"> | ||
<div class="b1"> | <div class="b1"> | ||
− | Assignments for Week 3 | + | Assignments for Week 3<br/> |
+ | <span style="font-size: 70%">Workflow design, R data subsetting</span> | ||
</div> | </div> | ||
+ | <table style="width:100%;"><tr> | ||
+ | <td style="height:30px; vertical-align:middle; text-align:left; font-size:80%;">[[CSB_Assignment_Week_2|< Assignment 2]]</td> | ||
+ | <td style="height:30px; vertical-align:middle; text-align:right; font-size:80%;">[[CSB_Assignment_Week_4|Assignment 4 >]]</td> | ||
+ | </tr></table> | ||
{{Active}} | {{Active}} | ||
+ | Assigned material - concepts, exercises and reading - will be reflected in next week's evaluation and feedback session. Please remember to contribute to [http://steipe.biochemistry.utoronto.ca/abc/students/index.php/BCB420_self-evaluation_questions '''self-evaluation questions'''] by Tuesday at noon. | ||
− | + | {{Vspace}} | |
− | |||
− | |||
+ | __TOC__ | ||
+ | |||
+ | {{Vspace}} | ||
+ | |||
+ | ==Warm up== | ||
+ | <section begin=warm-up /> | ||
+ | <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-01" style="border:solid 1px #000000;padding:10px;background-color:#F9F9FF"> | ||
+ | In many London Underground tube stations there are two escalators going up but only one going down. | ||
+ | |||
+ | |||
+ | '''Why?''' <span class="mw-customtoggle-01" style="background:#F2F2FF;padding:5px;font-size:80%;margin-left:50px">[''I don't know...'']</span> | ||
+ | |||
+ | <div class="mw-collapsible-content" style="padding:10px;"> | ||
+ | |||
+ | <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-02" style="border:solid 1px #000000;padding:10px;background-color:#F2F2FF"> | ||
+ | Seriously?<br /> | ||
+ | Could it have something to do with the required capacity?<br /> | ||
+ | Then just model the expected flow. Is it symmetric?<br /> | ||
+ | If you think so, you might need a hint... <span class="mw-customtoggle-02" style="background:#EAEAFF;padding:5px;font-size:80%;margin-left:50px">[''Ok. A hint please...'']</span> | ||
+ | |||
+ | <div class="mw-collapsible-content" style="padding:10px;"> | ||
+ | |||
+ | <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-03" style="border:solid 1px #000000;padding:10px;background-color:#EAEAFF"> | ||
+ | When do people arrive at the escalator?<span class="mw-customtoggle-03" style="background:#E2E2FF;padding:5px;font-size:80%;margin-left:50px">[''Sorry. I still don't get it: aren't there as many going down as coming up?'']</span> | ||
+ | |||
+ | <div class="mw-collapsible-content" style="padding:5px;border:solid 1px #000000;background-color:#E2E2FF"> | ||
− | + | We'll we'd hope that the number of people going down is the same as coming up. If there were twice as many people coming up, they must have been produced in the underground - an army of tube zombies, bred in the tunnels, spreading through town to do their evil deeds...<br/> | |
+ | No: the answer has to do with how the streams of passengers distribute over time. Passengers trickle into the station at more or less a constant rate, but when a train arrives, there's a mad scramble by an impatient horde to exit the station, and for that rush the escalators need greater capacity. | ||
+ | |||
+ | |||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | </div> | ||
+ | </div> | ||
+ | <section end=warm-up /> | ||
+ | |||
+ | ==Workflow design== | ||
+ | |||
+ | In class, we have discussed a number of data sources and methods as we went through the exemplar workflow of the term project. | ||
+ | |||
+ | {{task| | ||
+ | |||
+ | In this task I would like you to develop your understanding of the project workflow as a conceptual diagram - integrating structural '''and''' behavioural aspects of the workflow. | ||
+ | |||
+ | * Review '''[[SPN]]''' conventions for an idea of how to go about designing such diagrams. | ||
+ | * Draw your own. | ||
+ | ** Break down the process into distinct steps (activity). A useful scope for an activity is as much as you would want to put into a single script file, or what could be worked on by a single collaborator. Typically, an activity consumes some input and produces some output. | ||
+ | ** Make sure your input / output items are well defined. This is the basis for a {{WP|Design_by_contract|''Design by Contract''}} approach which is exceptionally well suited for the distributed development of workflow. | ||
+ | * '''Bring your own workflow sketches with you to class'''. Your sketch does not have to be electronically formatted. Hand-drawn sketches are fine, but the diagrams should show that you understand (i) how to break up the workflow into modules, and (ii) where open questions and unsolved problems are. | ||
+ | |||
+ | }} | ||
+ | |||
+ | |||
+ | {{Vspace}} | ||
+ | |||
+ | ==Advancing your '''R''' skills== | ||
+ | |||
+ | {{task|1= | ||
+ | |||
+ | A significant portion of your efforts in any project will be spent on '''preparing data''' for analysis. This includes reading data from various sources, preprocessing it, and extracting subsets of interest. R has powerful functions that support these tasks. I would like you to practice subsetting of data objects: load the following tutorial with its associated file as an RStudio project from github. | ||
+ | |||
+ | |||
+ | * Open RStudio | ||
+ | * Select '''File → New Project ...''' | ||
+ | * Choose '''Version control → Git ''' | ||
+ | * Enter the repository URL for the tutorial: https://github.com/hyginn/R_Exercise-Subsetting | ||
+ | * Click on '''Create Project'''. | ||
+ | |||
+ | If the R script source-code does not appear in the left-hand pane, click on the file name R_Exercise-Subsetting.R in the lower-right hand pane. | ||
+ | }} | ||
− | |||
− | |||
− | + | {{Vspace}} | |
− | + | {{#lst:CSB_Assignment_Week_1|assignment_footer}} | |
+ | <table style="width:100%;"><tr> | ||
+ | <td style="height:30px; vertical-align:middle; text-align:left; font-size:80%;">[[CSB_Assignment_Week_2|< Assignment 2]]</td> | ||
+ | <td style="height:30px; vertical-align:middle; text-align:right; font-size:80%;">[[CSB_Assignment_Week_4|Assignment 4 >]]</td> | ||
+ | </tr></table> | ||
[[Category:Computational_Systems_Biology]] | [[Category:Computational_Systems_Biology]] | ||
</div> | </div> |
Latest revision as of 18:43, 25 February 2016
Assignments for Week 3
Workflow design, R data subsetting
< Assignment 2 | Assignment 4 > |
Note! This assignment is currently active. All significant changes will be announced on the mailing list.
Assigned material - concepts, exercises and reading - will be reflected in next week's evaluation and feedback session. Please remember to contribute to self-evaluation questions by Tuesday at noon.
Warm up
In many London Underground tube stations there are two escalators going up but only one going down.
Why? [I don't know...]
Seriously?
Could it have something to do with the required capacity?
Then just model the expected flow. Is it symmetric?
If you think so, you might need a hint... [Ok. A hint please...]
When do people arrive at the escalator?[Sorry. I still don't get it: aren't there as many going down as coming up?]
We'll we'd hope that the number of people going down is the same as coming up. If there were twice as many people coming up, they must have been produced in the underground - an army of tube zombies, bred in the tunnels, spreading through town to do their evil deeds...
No: the answer has to do with how the streams of passengers distribute over time. Passengers trickle into the station at more or less a constant rate, but when a train arrives, there's a mad scramble by an impatient horde to exit the station, and for that rush the escalators need greater capacity.
Workflow design
In class, we have discussed a number of data sources and methods as we went through the exemplar workflow of the term project.
Task:
In this task I would like you to develop your understanding of the project workflow as a conceptual diagram - integrating structural and behavioural aspects of the workflow.
- Review SPN conventions for an idea of how to go about designing such diagrams.
- Draw your own.
- Break down the process into distinct steps (activity). A useful scope for an activity is as much as you would want to put into a single script file, or what could be worked on by a single collaborator. Typically, an activity consumes some input and produces some output.
- Make sure your input / output items are well defined. This is the basis for a Design by Contract approach which is exceptionally well suited for the distributed development of workflow.
- Bring your own workflow sketches with you to class. Your sketch does not have to be electronically formatted. Hand-drawn sketches are fine, but the diagrams should show that you understand (i) how to break up the workflow into modules, and (ii) where open questions and unsolved problems are.
Advancing your R skills
Task:
A significant portion of your efforts in any project will be spent on preparing data for analysis. This includes reading data from various sources, preprocessing it, and extracting subsets of interest. R has powerful functions that support these tasks. I would like you to practice subsetting of data objects: load the following tutorial with its associated file as an RStudio project from github.
- Open RStudio
- Select File → New Project ...
- Choose Version control → Git
- Enter the repository URL for the tutorial: https://github.com/hyginn/R_Exercise-Subsetting
- Click on Create Project.
If the R script source-code does not appear in the left-hand pane, click on the file name R_Exercise-Subsetting.R in the lower-right hand pane.
- That is all.
Footnotes and references
- Ask, if things don't work for you!
- If anything about the assignment is not clear to you, please ask on the mailing list. You can be certain that others will have had similar problems. Success comes from joining the conversation.
- Do consider how to ask your questions so that a meaningful answer is possible. the following two links:
- How to create a Minimal, Complete, and Verifiable example on stackoverflow and ...
- How to make a great R reproducible example
- ... are required reading.
< Assignment 2 | Assignment 4 > |