## DO NOT EDIT THIS CHUNCK knitr::opts_chunk$set(echo = TRUE, fig.width = 7, fig.height = 5, cache = FALSE) library(L1fdvGenetics) ## Homework data and helper functions() data("hw_data") ## Homework data: geno/phenotypes of the F2 mice data("genetic_map") ## Homework data: genetic map
You're doing an internship in an immunology lab working with mice. The lab developed a QTL panel (a dense genetic map) for LEWIS and BN lines and the PI (Principal Investigator) asked the previous intern to do a QTL analysis for IgG1 production. Unfortunately, the intern was super sloppy and his digital lab book is very messy with bits of code and comments. The PI tasked you to revisit and document the analysis, to produce a nicer report.
Instructions: Give a brief description of the genetic data, with relevant information.
dim(hw_data) colnames(hw_data)[-1] summary(range(hw_data[ , "IgG1"]))
Instructions: Give a brief description of the genetic data, with relevant information.
genetic_map ## Nb markers with(genetic_map, tapply(Location, Chromosome, length)) ## dist between markers with(genetic_map, tapply(Location, Chromosome, function(x) { mean(diff(x)) })) ## Min/Max distance with(genetic_map, tapply(Location, Chromosome, function(x) { range(diff(x)) })) ## Min/Max positions with(genetic_map, tapply(Location, Chromosome, range))
Instructions: Document the analyses performed. Select, format and comment the relevant results.
chr1_map <- subset(genetic_map, Chromosome == "Chr1") chr1_markers <- chr1_map[ , "Marker"] chr1_data <- hw_data[ , c("Organism", chr1_markers, "IgG1")] for (marker in chr1_markers) { LOD(marker = marker, data = chr1_data) }
## LOD scores positions <- seq(from = 0, to = 100, by = 1) lod_scores <- rep(0, length(positions)) for (i in 1:length(positions)) { lod_scores[i] <- LOD_position(position = positions[i], data = chr1_data, map = chr1_map) } lod_data <- data.frame(Position = positions, LOD = lod_scores) ## Plot plot(LOD ~ Position, data = lod_data, type = "o", xlab = "Position along chromosome 1 (in cM)", ylab = "LOD score" ) abline(v = chr1_map$Location, lty = 3, col = "grey80")
## Positions subset(lod_data, LOD >= 2)
This part is completely optional and will not count toward the final grade.
Instructions: Repeat and adapt the previous analysis to detect and position putative QTL located in Chromosome 2.
## Write code here
Instructions: Write a small conclusion summarizing your findings. Add any information you find relevant.
Instructions: How would you adapt the experimental and/or analytic strategy to account for an additive model?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.