Skip to content

Commit 12ecd0b

Browse files
fixing images that caused hidden info
1 parent d9f32bd commit 12ecd0b

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

05-scientific-notebooks.Rmd

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,29 +56,29 @@ Because of all of these reasons, we encourage the use of computational notebooks
5656
[Click this link to download](https://raw.githubusercontent.com/jhudsl/Reproducibility_in_Cancer_Informatics/main/chapter-zips/python-heatmap-chapt-5.zip).
5757

5858
```{bash, include = FALSE}
59-
mkdir -p chapter-zips
60-
wget -O chapter-zips/python-heatmap-chapt-5.zip https://raw.githubusercontent.com/jhudsl/Reproducibility_in_Cancer_Informatics/main/chapter-zips/python-heatmap-chapt-5.zip
59+
#mkdir -p chapter-zips
60+
#wget -O chapter-zips/python-heatmap-chapt-5.zip https://raw.githubusercontent.com/jhudsl/Reproducibility_in_Cancer_Informatics/main/chapter-zips/python-heatmap-chapt-5.zip
6161
```
6262

6363
Now double click your chapter zip file to unzip. For Windows you may have to [follow these instructions](https://support.microsoft.com/en-us/windows/zip-and-unzip-files-f6dde0a7-0fec-8294-e1d3-703ed85e7ebc).
6464

6565
```{bash, include = FALSE}
66-
unzip -o chapter-zips/python-heatmap-chapt-5.zip -d chapter-zips/
66+
#unzip -o chapter-zips/python-heatmap-chapt-5.zip -d chapter-zips/
6767
```
6868
</details>
6969

7070
<details> <summary>**Get the R project example files**</summary>
7171
[Click this link to download](https://raw.githubusercontent.com/jhudsl/Reproducibility_in_Cancer_Informatics/main/chapter-zips/r-heatmap-chapt-5.zip).
7272

7373
```{bash, include = FALSE}
74-
mkdir -p chapter-zips
75-
wget -O chapter-zips/r-heatmap-chapt-5.zip https://raw.githubusercontent.com/jhudsl/Reproducibility_in_Cancer_Informatics/main/chapter-zips/r-heatmap-chapt-5.zip
74+
#mkdir -p chapter-zips
75+
#wget -O chapter-zips/r-heatmap-chapt-5.zip https://raw.githubusercontent.com/jhudsl/Reproducibility_in_Cancer_Informatics/main/chapter-zips/r-heatmap-chapt-5.zip
7676
```
7777

7878
Now double click your chapter zip file to unzip. For Windows you may have to [follow these instructions](https://support.microsoft.com/en-us/windows/zip-and-unzip-files-f6dde0a7-0fec-8294-e1d3-703ed85e7ebc).
7979

8080
```{bash, include = FALSE}
81-
unzip -o chapter-zips/r-heatmap-chapt-5.zip -d chapter-zips/
81+
#unzip -o chapter-zips/r-heatmap-chapt-5.zip -d chapter-zips/
8282
```
8383
</details>
8484

@@ -165,11 +165,13 @@ Now, in your respective IDE, we'll turn our unreproducible scripts into notebook
165165
1. Start a new notebook by going to `New` > `Notebook`.
166166
2. Then open up this chapter’s example code folder and open the `make-heatmap.py` file.
167167

168-
<img src ="https://docs.google.com/presentation/d/1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE/export/png?id=1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE&pageid=gfaa026a583_0_20" alt="In Jupyter, you can create a new notebook by going to New > Notebook. Then open up this chapter’s example code folder and open the make-heatmap.py file." style="display: block; margin: auto;" />
168+
<img src ="https://docs.google.com/presentation/d/1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE/export/png?id=1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE&pageid=gfaa026a583_0_20" alt="In Jupyter, you can create a new notebook by going to New then Notebook. Then open up this chapter’s example code folder and open the make-heatmap.py file." />
169+
169170

170171
3. Create a new code chunk in your notebook.
171172

172-
<img src ="https://docs.google.com/presentation/d/1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE/export/png?id=1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE&pageid=gfaa026a583_0_30" alt="The Jupyter interface has a ‘add a new chunk’ button, a delete chunk button, and a dropdown menu that allows you to choose the chunk type you’d like to add." style="display: block; margin: auto;" />
173+
174+
<img src ="https://docs.google.com/presentation/d/1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE/export/png?id=1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE&pageid=gfaa026a583_0_30" alt="The Jupyter interface has a ‘add a new chunk’ button, a delete chunk button, and a dropdown menu that allows you to choose the chunk type you’d like to add." />
173175

174176

175177
4. Now copy and paste all of the code from `make-heatmap.py` into a new chunk. We will later break up this large chunk of code into smaller chunks that are thematic in the next chapter.
@@ -182,26 +184,35 @@ For [more about using Jupyter notebooks see this](https://realpython.com/jupyter
182184
<details> <summary>**Set up an R notebook**</summary>
183185

184186
1. Start a new notebook by going to `File` > `New File` > `R Notebook`.
185-
2. Then open up this chapter’s example code folder and open the `make_heatmap.R` file.
186187

187-
<img src ="https://docs.google.com/presentation/d/1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE/export/png?id=1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE&pageid=gfaa026a583_0_13" alt="In RStudio, you can create a new notebook by going to File > New File > R Notebook. Then open up this chapter’s example code folder and open the make_heatmap.R file." style="display: block; margin: auto;" />
188+
<img src ="https://docs.google.com/presentation/d/1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE/export/png?id=1LMurysUhCjZb7DVF6KS9QmJ5NBjwWVjRn40MS9f2noE&pageid=gfaa026a583_0_13" alt="In RStudio, you can create a new notebook by going to File then New File then R Notebook. Then open up this chapter’s example code folder and open the make_heatmap.R file." />
188189

190+
2. Then open up this chapter’s example code folder and open the `make_heatmap.R` file.
189191
3. Practice creating a new chunk in your R notebook by clicking the `Code` > `Insert Chunk` button on the toolbar or by pressing `Cmd+Option+I` (in Mac) or `Ctrl + Alt + I` (in Windows). (You can also manually type out the back ticks and `{}`)
190192
4. Delete all the default text in this notebook but keep the header which is surrounded by `---` and looks like:
193+
191194
`````
192195
title: "R Notebook"
193196
output: html_notebook
194197
`````
195-
You can feel free to change the title from `R Notebook` to something that better suits the contents of this notebook.
198+
You can feel free to change the title from `R Notebook` to something that better suits the contents of this notebook.
199+
196200
5. Now copy and paste all of the code from `make_heatmap.R` into a new chunk. We will later break up this large chunk of code into smaller chunks that are thematic in the next chapter.
197201
6. Save your `untitled.Rmd` into something that tells us what it will end up doing like `make-heatmap.Rmd`.
198202
7. Notice that upon saving your `.Rmd` file, a new file `.nb.html` file of the same name is created. Open that file and choose `view in Browser`. If RStudio asks you to choose a browser, then choose a default browser.
199203
8. This shows the nicely rendered version of your analysis and snapshots whatever output existed when the `.Rmd` file was saved.
200204

201205
For [more about using R notebooks see this](https://bookdown.org/yihui/rmarkdown/) by @Xie2018.
202206

207+
208+
209+
203210
</details>
204211

212+
213+
<br>
214+
<br>
215+
205216
Now that you've created your notebook, you are ready to start polishing that code!
206217

207218
**Any feedback you have regarding this exercise is greatly appreciated; you can fill out [this form](https://forms.gle/ygSSwoGaEATA2S65A)!**

0 commit comments

Comments
 (0)