Created: 2021-09-09 Thu 15:12
For these slides: https://almaan.github.io/genetech/
There are 4 of us:
Emails are welcome, but hands-on help with the exercises will mainly be limited to the lab sessions. You can also reach us on Canvas, but slower response times.
NOTE: Tag emails with [CB2040] in the subject line.
For example: "[CB2040] Question about lab 2"
In this course 4 labs in total, one "main TA" for each:
All labs are in R, we assume that you have:
Workflow:
Deadlines:
NOTE: Late reports will be corrected, but you will get a set of additional exercises to solve. An incomplete report is also considered late.
Working in pairs?:
All information you need can be found at:
https://github.com/almaan/genetech
Example C++ : Compiled language
std::vector<double> vec1 = {1,2,3,4}; std::vector<double> vec2 = {5,6,7,8}; double prod = 0; for (int i = 0; i<= vec1.size(); i++){ prod += vec1[i]*vec2[i]; }
Example R : Interpreted language
vec1 <- c(1,2,3,4) vec2 <- c(5,6,7,8) prod <- vec1 %*%vec2
ggplot) - don't underestimate this…Python or R.
GENETECH_PATHgenetech in GENETECH_PATHcd into the genetech folder and do:git clone https://github.com/almaan/genetech.git codecd into the (newly cloned) code folder and do:git checkout cb2040 <– this puts you on the right branchR packages and rstudio
docker psdocker pull almaand/genetech:TAGdocker imagesgenetech to a volume:docker run -d -p 1337:8787 --name genetech -e USER='genetech' -e PASSWORD='genetech' --memory=6g --mount type=bind,source=GENETECH_PATH,target=/home/genetech/code -e ROOT=TRUE almaand/genetech:TAGdocker container ls -a
genetechlocalhost:1337docker stop CONTAINER_IDdocker start CONTAINER_ID
CB2040exY, Y = {1,2,3,4} indicating which lablabs/exY/main.Rmd files
We've also installed all of the necessary packages for you
To get an idea of how you work with the code, we will have a look at Lab 1
localhost:1337)/home/code/labs/ex1/main.RmdAt the top of the file you will see:
--- title: "Lab 1 - Introduction to R" author: "Alma Andersson" date: "17-09-2021" output: tufte::tufte_html: default ---
Change the author field to your name(s)
{r,eval = TRUE, echo=TRUE} # bind the values 1337 to the variable fancy_name_1 fancy_name_1 <- 1337 # print fancy_name_1 print(sprintf("fancy_name_1 is : %d",fancy_name_1))
To knit your document, press the yarn symbol that says "Knit"
