The goal of L1fdvGenetics
is to provide interactive tutorials for the
Genetics project. Tutorials are packaged so you can install them on you
computer and do the exercices without access to an internet connection.
You only need to perform each of the following steps once:
remotes
and learnr
However each of them may take some time.
Go to the CRAN webpage, select your OS and follow the instructions.
## If you're on Ubuntu
sudo apt-get install r-base
On Windows: you may need Rtools (unlikely) and git
On MacOS: you may need XCode (unlikely)
Go to the download page. Select, download and install the file corresponding to your OS.
Launch Rstudio (by clicking on the corresponding icon) and execute the following commands in the console
install.packages("remotes")
install.packages("learnr")
You need to install the tutorials every time I update them (hopefully not too often).
You can install the tutorials from GitHub by launching Rstudio and typing the following command in the console:
remotes::install_github("mahendra-mariadassou/L1fdvGenetics")
The tutorials included in L1fdvGenetics
are lightweight and have no
dependencies. It should be quite fast and not consume a lot of data.
If you have trouble installing R on your computer, you can also use it on a remote server. This is not the preferred solution as it’s limited to 9 people. Favor the local installation if you can.
Alternatively, you can use create a remote R session to complete the
tutorial by launching binder:
You only need a web browser, no account or anything. The main drawback of this solution (compared to the previous ones) is that you lose your progress each time you launch a new session.
This package is intended for use with learnr
(which should be
installed when you install L1fdvGenetics
).
There are two tutorials in the package. Make sure to restart R before running a tutorial. Don’t run a tutorial twice (or two different tutorials) in the same R session.
## Launch only one tutorial at the time and restart R before doing so!!
learnr::run_tutorial("01_candidate_gene", package = "L1fdvGenetics")
If you have an error, you can try the following command:
rmarkdown::run(file = NULL,
dir = learnr:::get_tutorial_path("01_candidate_gene",
package = "L1fdvGenetics"),
shiny_args = list(launch.browser = 1))
## Launch only one tutorial at the time and restart R before doing so!!
learnr::run_tutorial("02_interval_mapping", package = "L1fdvGenetics")
If you have an error, you can try the following command:
rmarkdown::run(file = NULL,
dir = learnr:::get_tutorial_path("02_interval_mapping",
package = "L1fdvGenetics"),
shiny_args = list(launch.browser = 1))
You can open the (empty) assignment template with:
file.edit(system.file("assignment/assignment.Rmd", package = "L1fdvGenetics"))
Or download it from the web.
Make a copy and save it on your computer (you can edit the file you just opened but you can’t save it).
This is an Rmd (similar to a jupyter notebook). You can write R code in code chuncks (you shoudn’t have to, unless you attempt to detect QTL in Chromosome 2).
You should knit the document to an html file once to get the raw results. You can do so by clicking on the knit button.
You can also execute each chunck in the console using the small green triangle (note that you should execute chuncks in turn as a chunck may depend on previous chuncks).
When you’re done adding comments and editing the document (for example, hiding some output from the final reports), you should knit it to a html file and submit it to moodle or through a google form (further instructions will follow).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.