In order to estimate transduction efficiency from sc-RNA-Seq data, we use the following model: We assume that a
non-transduced cell expresses NeoR such that an expected fraction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A sketch on how one can use hwriter to display an image when hovering | |
# over a table row. | |
library( hwriter ) | |
# Make a data frame with some parameters or other data | |
df <- data.frame( | |
name = sprintf( "Lissajous-%02d", 0:99 ), | |
freq.x = floor( runif( 100, min=2, max=8 ) ), | |
freq.y = floor( runif( 100, min=2, max=8 ) ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library( quantreg ) | |
x <- runif( 1000, 0, 10 ) | |
y <- 30*exp(-(x-5)^2) + rnorm(1000) + x*rnorm(1000) | |
plot( x, y ) | |
fit <- rq( y ~ x + I(x^2), .9 ) | |
xg <- seq( 0, 10, l=1000 ) | |
lines( xg, predict( fit, data.frame( x=xg, `I(x^2)`=xg^2 ) ), col="red" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Swiss roll and Sleepwalk | |
n <- 10000 | |
# Draw random position on a rectangle | |
x0 <- runif( n, 0, 2*pi ) | |
y0 <- runif( n, 0, 6*pi ) | |
# Roll up the rectangle to form a Swiss roll | |
x <- x0 + rnorm( n, 0, .3 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. In der Vorlesung haben wir uns den GO-Term "inflammatory response" angesehen und festgestellt, dass (wie zu erwarten war) viele der Gene, die diesem Term zugeordnet sind, in den Psoriasis-Proben deutlich stärker exprimiert sind als in den normalen Vergleich-Proben. | |
a) Wie lautet die GO-Term-ID zum Term "inflammatory response"? Dese Informationen finden Sie auf der Webseite des Gene-Ontology-KOnsortiums. | |
b) Welche Gene sind im Menschen dieser GO-Kategorie zugeordnet? FInden Sie (zB auf der Ensembl-Website) eine Liste der Ensembl-Gen-IDs und Gen-Namen. | |
c) Erstellen Sie einen MA-Plot, d.h. einen Scatter-Plot mit einem Punkt für jedes Gen, auf der x-Achse die durchschnittliche Expressionsstärke des Gens, gemittelt über alle Proben, und auf der y-Achse das Verhältnis der MIttelwerte für Psoriasis geteilt durch normal. (KEVIN: Setz bitte einen Link zur Tabelle mit den beiden Gruppen-Mittelwerten.) Färben Sie in diesem Plot die Gene in einer anderen Farbe ein, die der GO-Kategorie "inflammatory response" zugeo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library( tidyverse ) | |
library( ggplot2 ) | |
jhu_url <- paste("https://raw.githubusercontent.com/CSSEGISandData/", | |
"COVID-19/master/csse_covid_19_data/", "csse_covid_19_time_series/", | |
"time_series_19-covid-Confirmed.csv", sep = "") | |
seq( 0, by=.211, length.out=300 ) -> a | |
hsv( a - floor(a), 1, 1 ) -> palette |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library( tidyverse ) | |
readRDS("~/sds/sd17l002/p/covidTests/data/allCurvesSeegene.rds") %>% ungroup() -> tbl | |
readRDS("~/sds/sd17l002/p/covidTests/data/testResults.rds" ) -> testres | |
tbl %>% pull( plateId ) %>% unique() | |
c( "FAM" = "E", "HEX" = "IC", "Cal Red 610" = "R", "Quasar 670" = "N" ) ->flph2gene | |
tbl %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library( jrc ) | |
library( rlc ) | |
myfun <- function(x) { print( paste( "user clicked on", x ) ) } | |
rlc::openPage(useViewer=FALSE) | |
jrc::allowFunctions( "myfun" ) | |
genes <- c( "gene1", "gene2", "gene3" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# So zieht man 10000 Werte mit Mittelwert 178 und Standardabweichung 7: | |
rnorm( 10000, 178, 7 ) -> x | |
# Und so plotted man das Histogramm aller Werte in x | |
library( tidyverse) | |
tibble(x) %>% ggplot + geom_histogram(aes(x)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Wir haben 300 Stämme | |
m <- 300 | |
# Die wahre mittlere Floureszenz der Stämme ist | |
true_mu <- exp( rnorm( m, 3, 2) ) | |
# Die mittlere Hintergrund-Floureszenz ist | |
true_bg <- 10 | |
# Die Hintergrund-Floureszenz schwankt mit einer Standardabweichung von |
OlderNewer