-
Notifications
You must be signed in to change notification settings - Fork 0
/
02-Lab-3.Rmd
282 lines (180 loc) · 22.8 KB
/
02-Lab-3.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# (PART\*) Lab 3 - BIOL 205 {-}
*Last updated `r Sys.Date()`*
# Lab 3 Welcome {-}
This labs has two components. The first involves getting acquainted with your organism. The second re-visits some core aspects of open science and has you prepare a draft protocol for your research project.
# Getting Acquainted with Your Organism {-}
As you will be working with this organism for the duration of the term it makes most sense to get to know your organism well. Thus far you have done some reading already and have likely learned a lot, however, there is nothing better than first-hand experience. This will help you in the design part of your experiment.
Based on your textbook and your previous knowledge from your primary papers research **please complete Getting Acquainted Assignment 2** on the next page.
# Assignment 2: Getting Acquainted {-}
Download a copy of the assignment here. [BIOL205_Assign-2_getting-acquainted.docx](https://osf.io/download/xz2rk)
<div class = "note">
As part of this assignment you are expected to draw a diagram of your organism. For more information on the guidelines for drawing organisms, and for some examples of poorly and properly formated sketches see [Sketches & Drawings](https://ubco-biology.github.io/Procedures-and-Guidelines/sketches-drawings.html){target="_blank"} in the UBCO Biology Procedures and Guidelines Document.
</div>
## Scientific Drawing Rubric {-}
**Total\ /18**
| <span style="display: inline-block; width:600px">Criteria</span> | Pts |
| :--- | :--- |
| **Caption**<br /> - No title present<br /> - Caption includes multiple sentences<br /> - Caption thoroughly described what the structure is | 3 |
| **Drawing**<br /> - Appropriate number of fine lines drawn <br /> - Dotted lines used to show depth <br /> - No shading on the drawing <br /> - Labels are organized in a column on one side of the drawing <br /> - Labels are found on the right side of the drawing <br /> - Label lines are straight <br /> - Label lines do not intersect with anything | 7 |
| **Organisms and Structures**<br /> - Drawing is oriented such that the anterior or oral aspect of organism is at the top of the page<br /> - Any structures removed or displaced have been indicated on this drawing<br /> - Genus and species are Italicized<br /> - Genus is capitalized<br /> - Specific epithet should be all lower case | 5 |
| **Microscope**<br /> - No circle is drawn around the organism<br /> - The scale (or magnification) of the drawing is at the bottom right of the drawing<br /> - Scale/magnification determination is accurate | 3 |
# Quiz 1: Getting Acquainted {-}
Complete Quiz 1: Getting Acquainted on [Canvas](https://canvas.ubc.ca/courses/113910)
# Open Science, R, & RMarkdown {-}
You were introduced to Open Science practices, RMarkdown, and RStudio when you completed a protocol and subsequent Recommendation Report in BIOL 125. We will be using a similar format and template for your 3rd and 4th assignments in BIOL 205.
Protocols are frequently not formally peer-reviewed. However, there is a specific publication type known as a Registered Report, in which peer-review of a protocol is an integral part. In a Registered Report, you submit a protocol with a detailed study design and plan, which is then reviewed by an editorial board, often suggestions for improvement are made, and if accepted on re-submission, the journal, within reason, commits to publishing your study irrespective of whether your findings are statistically significant.
Following on this model, Assignment 3 will be your detailed study design plan. Your TA will be your peer reviewer as they grade your submission. Assignment 4 will be your re-submission of your study design based on feedback from your TA. This will be followed by your final in class presentation of the results of your proposed study!
To prepare you for this, we'll start with a short review of materials related to Open Science, `R`, & RMarkdown from BIOL 125. After reviewing this material, you should be set to draft your protocol using an RMarkdown template.
## Overview {-}
### Open Science {-}
Open Science is a movement that tries to combat the <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Replication-crisis">replication crisis</a>, <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Questionable-research-practices">questionable research practices</a>, and flashy research trumping quality research in two ways. First, by providing different incentives and rewards for research. That is, changing what we measure as a success in research, shifting from a culture that emphasizes novel findings to one that also rewards the many other aspects of practicing good science. Second, by making all parts of the scientific research process <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Transparency">transparent</a> and accessible, allowing for a critical review of how a study was conducted, and ultimately enabling that study to be independently <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Replication">replicated</a>.
<div class = "advanced">
For an optional refresher of Open Science principles and core values, visit the [Open Science 101 Module](https://ubco-biology.github.io/OS-Introduction/principles-of-open-science.html) that was covered in BIOL 116.
</div>
### Registered Reports {-}
A <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Registered-report">Registered Report</a> involves submitting--in the form of a protocol--your research question, <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Hypothesis">hypotheses</a>, and planned methods, for <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Peer-review">peer review</a> prior to beginning data collection.
Using this format enhances research quality because it gives researchers a chance alter study design and methods before investing time into data collection. Just think of a time where you spent countless hours writing an essay thinking it was perfect, only to give it to a friend to read and receive a ton of editing comments. Often readers notice things the author doesn't! This approach also helps avoid questionable research practices like selective reporting of results and publication bias.
The protocol that you submit for peer review will include:
* Performing a <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Literature-review">literature review</a> on your research topic and documenting a list of consulted studies, how they were found, and the strengths, limitations, and weaknesses of each.
* Submitting a <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#A-priori-hypothesis">a priori hypothesis</a>, experimental design, and plan for presenting and analyzing your data. This will be marked before the experiment implementation phase and TA feedback incorporated into the project as needed. Creating a detailed, thorough plan for your research often takes as much time as running the experiment and collecting and analyzing your data. The more you plan, including anticipating potential problems, the easier the implementation!
* Implementing the study according to your plan, and noting any deviations from that plan (Note: deviations often happen, and that's OK! The key is to document them). These reflections will be submitted for marks.
* Submitting and presenting the details of your experiences implementing the research plan (including any changes recorded, justification for changes, <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Statistical-analysis">analysis</a> of the data, and your interpretation and conclusion).
<div class ="note">
It is expected throughout this process that you will be implementing best practices for research data management as articulate in the UBCO Procedures and Guidelines, including using appropriate <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Version-control">version control</a> on electronic documents and proper <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#File-and-data-management">file and data management</a> practices throughout your experiment. Need a refresher? Revisit the rules outlined in Chapters 1-5 [File and Data Management](https://ubco-biology.github.io/Procedures-and-Guidelines/file-and-data-management.html) in the Procedures & Guidelines.
</div>
### Why Use `R` & RMarkdown? {-}
While there are numerous programs that you can use to write lab reports, research manuscripts, and perform <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#Statistical-analysis">statistical analysis</a>, there are so many benefits to using <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#R">R</a> & RMarkdown!
First, `R` is both free and open source! Moreover, using `R` allows for computational reproducibility of your work. Computational reproducibility is the ability to document data and analyses so that others can understand and replicate the computations that led to the results and conclusions.
While you could use `R` to perform statistical analyses and write your report separately using a program like Microsoft Word. By using RMarkdown to write your lab report, you can include data analyses directly within the report which allows for everything to be stored in a single document. This makes it simple for readers to understand the computations used to conduct analyses as they read through your paper. For your Registered Report in BIOL 205 you won't be expected to have the code for your analyses directly embedded within your RMarkdown document but you will use pre-made `R` scripts to perform these analyses.
<div class = "note">
Accessibility is a key aspect of Open Science. And while digital accessibility has many connotations, one of these relates to cost. `R` has no associated financial costs with it and RStudio supports free distribution of their software for educational use. The same can't be said for many alternative authoring and statistical programs, for example products from Microsoft.
</div>
### Scientific Writing, Installation of `R` & RStudio {-}
For a refresher on scientific writing, the different sections of a lab report, and setting up `R` & RStudio, see the BIOL 125 Lab Manual here [https://ubco-biology.github.io/BIOL-125-Lab-Manual/recommendation-report.html](https://ubco-biology.github.io/BIOL-125-Lab-Manual/recommendation-report.html). **Read all of the subsections under the Recommendation Report.**
## Assignment Template {-}
You will use the following template for your protocol:
[BIOL205_Lab03_Assignment3.Rmd](https://osf.io/download/qhc2v)
Before starting your protocol, we'll spend some time reviewing the different parts of this template.
### Using the Template {-}
<div class = "note">
All the markdown syntax that you need for RMarkdown can be found in the [Markdown](https://ubco-biology.github.io/Procedures-and-Guidelines/markdown-1.html){target="_blank"} section of the BIOL Procedures and Guidelines.
</div>
### Directory Structure & File Naming {-}
It is expected that you will have a root project folder for your work associated with this lab. And that at the minimum you will have a folder for your report, your data, your figures, and your scripts. And that you will download this template into your `report/` directory. And that lastly, you will rename the template in accordance with the file naming conventions in the [Biology Procedures and Guidelines document](https://ubco-biology.github.io/Procedures-and-Guidelines/file-naming.html){target="_blank"}.
Lastly, we'll be working with an RProject file this round to help ensure our project's working directory is properly set up in `R`.
<div class = "takeAway">
It\'s important to load your project using the RProject file and not the RMarkdown file to ensure your working directory is properly set and that all the scripts and templates we'll be using work as intended!
</div>
Review the instruction [here](https://ubco-biology.github.io/Procedures-and-Guidelines/set-a-working-directory-in-rstudio.html){target="_blank"} in the Procedures and Guidelines Document, for setting up a working directory and RProject file.
Your project directory structure should look something like this once you've created your RProject file and you've downloaded a copy of the RMarkdown file:
```
├── BIOL205_RP/
│ ├── BIOL205_report.RProj
│ ├── data/
│ ├── figures/
│ ├── report/
│ │ ├── 20220101_Lab03_205_Assignment_V1.Rmd
│ ├── scripts/
```
### YAML {-}
The top of the template contains some front matter called YAML. YAML provides instructions to all the pieces of software involved in converting your RMarkdown document to it\'s outputs, in this case, `pdf`. YAML is very specific to spacing, so don\'t add any extra spaces!
What you need to do.
1. Provide a title within the quotations after `title`.
2. Provide your name within the quotations after `author`.
3. Provide your abstract within the quotations after `abstract`.
What might be nice to know.
1. <code>r Sys.Date()</code> pulls the date from your computer and auto populates this for you.
2. The `output` tag defines the output format. Other options include `html_document` and `word_document`.
<div class = "advanced">
What exactly is YAML?
> YAML™ (rhymes with “camel”) is a human-friendly, cross language, Unicode based data serialization language designed around the common native data types of dynamic programming languages. It is broadly useful for programming needs ranging from configuration files to internet messaging to object persistence to data auditing and visualization.
Read more at [the Official YAML Web Site](https://yaml.org/)
</div>
### Document Body {-}
The template is then pre-populated with first level headers for each section you\'re expected to include in your report. Each heading re-iterates the key elements the content of these headings should address. This is just place holder text, so replace it with your own.
### Images & Graphs {-}
There is one sample graph referenced in the template. If you\'d like to download this image and place it in your `figures/` directory to test knitting your template, the file can be downloaded [at this link](https://osf.io/download/nrzdu). And your project should look like this:
```
├── BIOL205_RP/
│ ├── BIOL205_report.RProj
│ ├── data/
│ ├── figures/
│ │ ├── MVD_BIOL125-Lab5_Fig-1-Boxplot_V1.png
│ ├── report/
│ │ ├── 20220101_Lab03_205_Assignment_V1.Rmd
│ ├── scripts/
```
You might note the following directly after the image path: `{width=50%}`. This reduces the image size by 50%.
As noted in the template, you do not need to write `Figure 1:` before your figures; this small piece of text is handled during the conversion from RMarkdown to pdf. Any other information that you would like to include in the caption should go in the `[]` before the `()` that contain the path to the image.
<div class = "note">
Figure placement
The engine behind the conversion from RMarkdown to pdf is a typesetting application, one with pretty strict rules about how content should be formatted - much more strict than something like Microsoft Word.
What this means is that if the placement of your images will disrupt your prose - by creating large amounts of empty white space for example - this typesetting application will *push* your figure to somewhere lower in your report where it won\'t create this white space.
Your figures should be adjacent to the relevant text in your RMarkdown file. How this manifests to your pdf might look a little different; that\'s ok.
</div>
### References {-}
Just before the heading for references you\'ll see the following
```
\clearpage
```
This creates a page break between your references section and the rest of your report.
### Building the `pdf` {-}
If you've installed `R`, RStudio, and the `markdown` and `tinytex` packages succesfully, when you open the template `.Rmd` file you should see an option to `Knit`.
![](images/Knit_20220101.png)
Click this button or select the drop down arrow and select `Knit to pdf`. This will generate a pdf in the same directory as your `.Rmd` file.
# Assignment 3: Protocol (first submission) {-}
You will use the following template for your protocol:
[BIOL205_Lab03_Assignment3.Rmd](https://osf.io/download/qhc2v) (3 KB)
<div class = "flag">
You will need to submit 2 files for this assignment:
* Updated Protocol as `.Rmd`
* Updated Protocol as `.pdf`
</div>
<div class="note">
See [Canvas](https://canvas.ubc.ca) for assignment due dates.
</div>
For this assignment you will submit a protocol with an established <a href="https://ubco-biology.github.io/Procedures-and-Guidelines/glossary#A-priori-hypothesis">a priori hypothesis</a>, experimental design, and plan for presenting and analyzing your data. This will be marked before the experiment implementation phase and TA feedback incorporated into the project as needed. Creating a detailed, thorough plan for your research often takes as much time as running the experiment and collecting and analyzing your data. The more you plan, including anticipating potential problems, the easier the implementation!
Your protocol will be comprised of the following sections:
* Abstract
* Data availability
* Introduction
* Methods
* References
<div class = "note">
Protocols don't often have an abstract. But being able to write a concise synopsis of what's to come is a critical skill in academic writing. So we're going to take advantage of the opportunity to practice by requiring one for this assignment!
Your data availability statement should be a proposed statement. Something like 'Data will be made available...'.
</div>
You will receive your marked protocol one week from the time it is submitted. If you have any questions regarding your mark and / or the comments from your TA please ensure you take the opportunity to chat with your TA to go over these. This will ensure that you are in the best position to attain the highest marks possible for this assignment.
**Tips for Preparing a Protocol**
* Read a lot! It is important that you have a thorough understanding of the topic. At the very least you should have at least 3 primary source papers you are referring too throughout your report.
* Discuss your ideas with other students (not just your partner). Get a feel for what everyone else is doing and the depth they are working in.
* Start writing early! Students often make the mistake of starting the night before the report is due. This more than not results in poor submissions and thus lower grades. You should expect that you will have at least 3 rounds of revisions before you submit.
* Someone reading your report should be able to tell what question(s) you will address, why the topic is interesting and/or important, how you will approach the problem, the types of data you will collect, and how your research will advance the field.
## Practicing Knitting {-}
If you haven\'t already downloaded the assignment template, here it is again:
[BIOL205_Lab03_Assignment3.Rmd](https://osf.io/download/qhc2v)
To test the template,
* ensure the template `.Rmd` file is in your `report/` directory
* download the following image into your `figures/` directory
* [MVD_BIOL205-Lab5_Fig-1-Boxplot_V1.png](https://osf.io/download/zuehg) (4 KB)
* launch your project using your RProject file
* open the template `.Rmd` file from within RStudio
* insert your name as the author in the YAML header
* knit the document to a PDF
You should get something that looks like this after `Knitting` the `.Rmd` file:
* [20220824_Lab05_125_Assignment_V1.pdf](https://osf.io/download/3k8ve) (180 KB)
**Your knitted document should show your name under the title!** Take a screenshot of the first page of the knitted assignment template. You'll need to upload this screenshot to the quiz on Canvas.
## Assignment 3: Rubric {-}
**Total\ /39**
| <span style="display: inline-block; width:600px">Criteria</span> | Points |
| :--- | :--- |
| **Abstract**<br />- Brief, no more than 500 words<br />- Clearly outlines the question/problem<br />- Clearly describes how the question/problem will be addressed | 3 |
| **Introduction**<br />- Relevant background information provided<br />- Clearly articulates how the background information is connected to the current project idea<br />- Well written and easy to follow<br />- Flows from more general and broad background information and narrows towards the focus of this proposed project<br />- Hypothesis/question(s) posed are clearly stated towards the end of this section<br />- No factual errors are present | 6 |
| **Background**<br />- Information regarding feeding and habitat needs of organism provided<br />- significance of using this particular organism to study has been provided<br />- information regarding specific problem being addressed, both current and historical, have been provided <br />- students show a solid understanding of the organism, its habitat and its impact within its environment | 4 |
| **Significance of Project**<br />- Significance of the problem is clearly and convincingly stated<br />- Experimental design has been described in a way that elicits confidence in study <br />- Background information was used well in order to show the importance of this project | 3 |
| **Experimental Design**<br />- No bullet points<br />- The experimental design is specific and addresses the question/problem<br />- Enough information is provided that experiment can be replicated<br />- There is an appropriate control where applicable<br />- Both independent and dependent variables are clearly defined<br />- Statistical analysis to be used has been clearly outlined and is appropriate for type of data being collected | 6 |
| **Spelling & Grammar**<br />- No spelling errors<br />- No grammar errors<br />- No awkward sentence structures | 3 |
| **References & in-text citations**<br />- APA format used properly and consistently<br />- Minimum of 3 primary source papers used in the proposal<br />- In-text citations are used when required<br />- Citations and references match up | 4 |
| **Plagiarism & Quotations**<br />- No plagiarism of any kind has been found<br />- No quotations present<br />- Information attained from outside resources are properly cited | 3 |
| **Open Science & Format**<br />- 5 pages double spaced, font 12, Times New Roman (not including references)<br />- Screen shot of directory structure has been uploaded and directory follows good practices<br />- Registered report submitted as Rmd and pdf version<br />- YAML is provided at the top of the template | 4 |
| **Timeline**<br />- All data collection dates included and a description of what data will be collected and how this will be done<br />- All non-data collection dates included with details of what will be done on those days<br />- start and end of dates are provided | 3 |