HW7 - Quarto Exercises
Learning Quarto
This homework accompanies the course projects by practicing Quarto functionalities that will be essential to write the report for your GEN242 course project (see here).
To get started with the following homework tasks, log in to your HPCC account and then cd into /bigdata/gen242/<user_name>. Next, clone your Project Repo linked under your name in Colum N of the Course Planning Sheet. After this, cd into your project’s repos and create a subdirectory called HW7. Subsequently, download into the HW7 directory with wget the sample.qmd and bibtex.bib files linked from the Quarto Tutorial here. Next, make the following changes (Tasks 1.-8.) to the downloaded Quarto (qmd) file. After this render the modified qmd to HTML format, and then submit both files to your project repos on GitHub. The changes to include in the Quarto are:
Homework Tasks
- At the beginning of the Quarto report, add a short section describing the analysis steps you have chosen to perform as part of your challenge project.
- In the challenge project section, cite the reference(s) of the paper(s) you have chosen to present in class as part of your course project. For this add the reference in BibTeX format to the downloaded
bibtex.bibfile, and then cite it in the text of theqmdfile so that the properly rendered citation shows up in the text and the corresponding reference is automatically added to the reference list at the end of the Quarto when runningquarto::quarto_render. Note, references in BibTeX format can be obtained from Google Scholar, Paperpile or most other reference management software. More detailed information about managing references in Quarto files is here. - Add a mathematical equation in LaTeX format to the challenge project section and make sure it renders properly when generating the HTML report.
- Evaluate an R expression in the text as inline R code (see here) of your challenge project, e.g. mathematical or number from an existing R object such as mean value of the first column of the iris
data.frame. - Add a code chunk that auto-generates the barplot for HW3C. This barplot should be embedded in the rendered report without saving it to a file first. In addition, add a reference to the image in the text of the report where the image number gets autogerated by taking advantage of the cross-referencing feature of Quarto following the instructions here.
- Insert the targets file of the RNA-Seq workflow from here as an interactive table using the
DTpackage. How to do this is shown in the table section of the Quarto manual here. - To enable remote web browser viewing of your Quarto HTML file on the HPCC cluster with real-time updates, create a symbolic link to it within your
~/.htmldirectory following the instruction here. Once configured, provide the remote viewing URL for your Quarto HTML file under this homework task as a plain URL on its own line. Importantly, please make sure this link works. - Use the
quarto::quarto_render()function to render the report to an HTML file (details are here). To embed the targets file under step 6 into the report, the interactive table generated by theDTpackage can only be included in the HTML version of the report. For including this table in the PDF version of the report, use the staticknitr::kableoption instead as outlined here.
Homework submission
Please submit both the final qmd and HTML files, where the above Tasks 1-8 have been fully addressed, to the HW7 subdirectory of your Project Repos (not homework repos!) on GitHub.
Due date
This homework will be due Thu, June 4th at 6:00 PM.
Homework Solution
To be added after due date.