### Get All Weeks Statistics for Genomic Data Science Coursera Quiz Answers

An introduction to the statistics behind the most popular genomic data science projects. This is the sixth course in the Genomic Big Data Science Specialization from Johns Hopkins University.

### Statistics for Genomic Data Science Coursera Quiz Answers

### Week 1 Quiz Answers

#### Quiz 1: Module 1 Quiz

Q1. Reproducibility is defined informally as the ability to recompute data analytic results conditional on an observed data set and knowledge of the statistical pipeline used to calculate them Peng 2011, Science. Replicability of a study is the chance that a new experiment targeting the same scientific question will produce a consistent result Asendorpf 2013 European Journal of Personality.

- Susan asks Joe for his data shared according to the data sharing plan discussed in the lectures. Which of the following are reasons the study may be reproducible, but not replicable?
- Susan only uses Python and Joe uses R so when she runs a new experiment, she will definitely get different results.
- Joe doesn’t make the raw data accessible so Susan can’t re-run his code.
- All the data and code are available but the codebook does not fully explain the experimental design and all protocols for patient recruitment.
- The code and data are available so the study is always replicable if it is reproducible.

Q2. Put the following code chunk at the top of an R markdown document called test.Rmd but set \verb|eval=TRUE|eval=TRUE

`{r setup, eval=FALSE}`

knitr::opts_chunk$set(cache=TRUE)

Then create the following code chunks

`{r }`

x = rnorm(10)

plot(x,pch=19,col="dodgerblue")

`{r }`

y = rbinom(20,size=1,prob=0.5)

table(y)

- The plot is random the first time you knit the document. It is identical to the first time the second time you knit the document. After removing the folders \verb|test_cache|test_cache and \verb|test_files|test_files they generate new random versions.
- The plot and table are random the first time you knit the document. They are identical the second time you knit the document. After removing the folders \verb|test_cache|test_cache and \verb|test_files|test_files they are still identical.
- The table is random each time you knit the document, but the plot is always the same after you knit it the first time.
- The plot and table are random every time you kint the document, except for the last time.

Q3. Create a \verb|summarizedExperiment|summarizedExperiment object with the following code

`library(Biobase)`

library(GenomicRanges)

data(sample.ExpressionSet, package = "Biobase")

se = makeSummarizedExperimentFromExpressionSet(sample.ExpressionSet)

Look up the help files for \verb|summarizedExperiment|summarizedExperiment with the code \verb|?summarizedExperiment|?summarizedExperiment. How do you access the genomic data for this object? How do you access the phenotype table? How do you access the feature data? What is the unique additional information provided by \verb|rowRanges(se)|rowRanges(se)?

- Get the genomic table with \verb|assay(se)|assay(se), get the phenotype table with \verb|colData(se)|colData(se), get the feature data with \verb|rowData(se)|rowData(se). \verb|rowRanges(se)|rowRanges(se) gives information on the genomic location and structure of the measured features.
- Get the genomic table with \verb|assay(se)|assay(se), get the phenotype table with \verb|colData(se)|colData(se), get the feature data with \verb|rowRanges(se)|rowRanges(se). \verb|rowRanges(se)|rowRanges(se) gives the range of possible values for the expression data.
- Get the genomic table with
`assay(se)`

, get the phenotype table with`pData(se)`

, get the feature data with`rowData(se)`

.`rowRanges(se)`

gives information on the genomic location and structure of the measured features. - Get the genomic table with \verb|assay(se)|assay(se), get the phenotype table with \verb|colData(se)|colData(se), get the feature data with \verb|rowData(se)|rowData(se). \verb|rowRanges(se)|rowRanges(se) gives the range of possible values for the expression data.

Q4. Suppose that you have measured ChIP-Seq data from 10 healthy individuals and 10 metastatic cancer patients. For each individual you split the sample into two identical sub-samples and perform the ChIP-Seq experiment on each sub-sample. How can you measure (a) biological variability, (b) technical variability and (c) phenotype variability.

- (a) By looking at variation across samples from 10 different healthy individuals
- (b) By looking at variability between the measurements on the two sub-samples from the same sample and
- (c) by comparing the average measurements on the healthy individuals to the measurements on the individuals with cancer.

- (a) By looking at variation across samples from 10 different individuals with cancer
- (b) By comparing the average variability in the cancer and normal individuals
- (c) By comparing the average measurements on the healthy individuals to the measurements on the individuals with cancer.

- (a) By looking at variation across replicate sub-samples within the normal individuals
- (b) By looking at variation across samples from 10 different healthy individuals
- (c) By comparing the average measurements on the healthy individuals to the measurements on the individuals with cancer.

- (a) & (b) By looking at variation across samples from 10 different healthy individuals.
- (c) by comparing the average measurements on the healthy individuals to the measurements on the individuals with cancer.

Q5. Load the Bottomly and the Bodymap data sets with the following code:

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bottomly_eset.RData")`

load(file=con)

close(con)

bot = bottomly.eset

pdata_bot=pData(bot)

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bodymap_eset.RData")`

load(file=con)

close(con)

bm = bodymap.eset

- Just considering the phenotype data what are some reasons that the Bottomly data set is likely a better experimental design than the Bodymap data? Imagine the question of interest in the Bottomly data is to compare strains and in the Bodymap data it is to compare tissues.
- The Bottomly data has biological replicates for each group but the Bodymap data does not.
- The Bodymap data has measured more levels of the outcome of interest (tissues) than the Bottomly data has measured (strains).
- The Bottomly data set does not measure the age of the mice.
- Most of the tissues in the Bodymap data have a consistent number of technical replicates (2).

Q6. What are some reasons why this plot is not useful for comparing the number of technical replicates by tissue (you may need to install the plotrix package).

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bodymap_eset.RData")`

load(file=con)

close(con)

bm = bodymap.eset

pdata_bm=pData(bm)

library(plotrix)

pie3D(pdata_bm$num.tech.reps,labels=pdata_bm$tissue.type)

- The plot is in 3-d so it makes it hard to compare the angles.
- There are a large number of data points underlying each wedge and you can’t see them.
- The plot would be much easier to see if the pie chart were rotated by 90 degrees from its current position.
- There is nothing wrong with the plot, it accurately shows how many replicates of each type there are.

Q7. Load the Bottomly data:

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bodymap_eset.RData")`

load(file=con)

close(con)

bm = bodymap.eset

edata = exprs(bm)

Which of the following code chunks will make a heatmap of the 500 most highly expressed genes (as defined by total count), without re-ordering due to clustering? Are the highly expressed samples next to each other in sample order?

`row_sums = rowSums(edata)`

index = which(rank(-row_sums) < 500 )

heatmap(edata[index,],Rowv=NA,Colv=NA)

The highly expressed samples are next to each other.

`row_sums = rowSums(edata)`

index = which(rank(-row_sums) < 500 )

heatmap(edata[index,],Rowv=NA)

The highly expressed samples are next to each other.

`row_sums = rowSums(edata)`

index = which(rank(-row_sums) < 500 )

heatmap(edata[index,],Rowv=NA)

The highly expressed samples are not next to each other.

`row_sums = rowSums(edata)`

edata = edata[order(row_sums),]

index = which(rank(-row_sums) < 500 )

heatmap(edata[index,],Rowv=NA,Colv=NA)

No they are not next to each other.

Q8. Load the Bodymap data using the following code:

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bodymap_eset.RData")`

load(file=con)

close(con)

bm = bodymap.eset

pdata = pData(bm)

edata = exprs(bm)

Make an MA-plot of the first sample versus the second sample using the log2 transform (hint: you may have to add 1 first) and the \verb|rlog|rlog transform from the DESeq2 package. How are the two MA-plots different? Which kind of genes appear most different in each plot?

The plots are very different, there are two strong diagonal stripes (corresponding to the zero count genes) in the \verb|log2|log2 plot and the high abundance genes are most different, but the low abundance genes seem to show smaller differences with the \verb|rlog|rlog transform

- The plots look pretty similar, but the \verb|rlog|rlog transform seems to shrink the low abundance genes more. In both cases, the genes in the middle of the expression distribution show the biggest differences.
- The plots look pretty similar, but there are two strong diagonal stripes (corresponding to the zero count genes) in the \verb|rlog|rlog plot. In both cases, the genes in the middle of the expression distribution show the biggest differences, but the low abundance genes seem to show smaller differences with the \verb|log2|log2 transform.
- The plots look pretty similar, but the \verb|log2|log2 plot seems to do a better job of shrinking the low abundance genes toward each other. In both cases, the genes in the middle of the expression distribution show the biggest differences.

Q9. Load the Montgomery and Pickrell eSet:

```
con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/montpick_eset.RData")
load(file=con)
close(con)
mp = montpick.eset
pdata=pData(mp)
edata=as.data.frame(exprs(mp))
fdata = fData(mp)
Cluster the data in three ways:
```

With no changes to the data

After filtering all genes with \verb|rowMeans|rowMeans less than 100

After taking the \verb|log2|log2 transform of the data without filtering

Color the samples by which study they came from (Hint: consider using the function \verb|myplclust.R|myplclust.R in the package \verb|rafalib|rafalib available from CRAN and looking at the argument \verb|lab.col|lab.col.)

How do the methods compare in terms of how well they cluster the data by study? Why do you think that is?

- Clustering with or without log2 transform is about the same. Clustering after filtering shows better clustering with respect to the study variable. The reason is that the lowly expressed genes have some extreme outliers that skew the calculation.
- Clustering is identical with all three approaches and they show equal clustering. The \verb|log2|log2 transform is a monotone transformation so it doesn’t affect the clustering.
- Clustering is identical with all three approaches and they show equal clustering. The distance is an average over all the dimensions so it doesn’t change.
- Clustering with or without filtering is about the same. Clustering after the log2 transform shows better clustering with respect to the study variable. The likely reason is that the highly skewed distribution doesn’t match the Euclidean distance metric being used in the clustering example.

Q10. Load the Montgomery and Pickrell eSet:

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/montpick_eset.RData")`

load(file=con)

close(con)

mp = montpick.eset

pdata=pData(mp)

edata=as.data.frame(exprs(mp))

fdata = fData(mp)

Cluster the samples using k-means clustering after applying the \verb|log2|log2 transform (be sure to add 1). Set a seed for reproducible results (use \verb|set.seed(1235)|set.seed(1235)). If you choose two clusters, do you get the same two clusters as you get if you use the \verb|cutree|cutree function to cluster the samples into two groups? Which cluster matches most closely to the study labels?

- They produce different answers. The k-means clustering matches study better. Hierarchical clustering would look better if we went farther down the tree but the top split doesn’t perfectly describe the study variable.
- They produce the same answers and match the study variable equally well.
- They produce the same answers except for three samples that hierarchical clustering correctly assigns to the right study but k-means does not.
- They produce different answers, with k-means clustering giving a much more unbalanced clustering. The hierarchical clustering matches study better.

### Week 2

#### Module 2 Quiz

Q1. Load the Montgomery and Pickrell eSet:

`7`

con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/montpick_eset.RData")

load(file=con)

close(con)

mp = montpick.eset

pdata=pData(mp)

edata=as.data.frame(exprs(mp))

fdata = fData(mp)

What percentage of variation is explained by the 1st principal component in the data set if you:

Do no transformations?

log2(data + 1) transform?

log2(data + 1) transform and subtract row means?

- a. 0.97 b. 0.97 c. 0.97
- a. 0.89 b. 0.97 c. 0.35
- a. 0.97 b. 0.97 c. 0.35
- a. 0.35 b. 0.35 c. 0.35

Q2. Load the Montgomery and Pickrell eSet:

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/montpick_eset.RData")`

load(file=con)

close(con)

mp = montpick.eset

pdata=pData(mp)

edata=as.data.frame(exprs(mp))

fdata = fData(mp)

Perform the log2(data + 1) transform and subtract row means from the samples. Set the seed to \verb|333|333 and use k-means to cluster the samples into two clusters. Use \verb|svd|svd to calculate the singular vectors. What is the correlation between the first singular vector and the sample clustering indicator?

- 0.33
- 0.85
- 0.87
- -0.52

Q3. Load the Bodymap data with the following command

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bodymap_eset.RData")`

load(file=con)

close(con)

bm = bodymap.eset

edata = exprs(bm)

pdata_bm=pData(bm)

Fit a linear model relating the first gene’s counts to the number of technical replicates, treating the number of replicates as a factor. Plot the data for this gene versus the covariate. Can you think of why this model might not fit well?

- The difference between 2 and 5 technical replicates is not the same as the difference between 5 and 6 technical replicates.
- There is only one data point with a value of 6 so it is likely that the estimated value for that number of technical replicates is highly variable.
- There may be different numbers of counts for different numbers of technical replicates.
- The data are right skewed.

Q4. Load the Bodymap data with the following command

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bodymap_eset.RData")`

load(file=con)

close(con)

bm = bodymap.eset

edata = exprs(bm)

pdata_bm=pData(bm)

Fit a linear model relating he first gene’s counts to the age of the person and the sex of the samples. What is the value and interpretation of the coefficient for age?

- -23.91. This coefficient means that for each additional year of age, the count goes down by an average of 23.91 for a fixed sex.
- -207.26. This coefficient means that for each additional year of age, the count goes down by an average of 207.26 for a fixed sex.
- -23.25. This coefficient means that there is an average decrease of 23.91 in the count variable per year within each gender.
- -22.26. This coefficient means that for each additional year of age, the count goes down by an average of 207.26 for a fixed sex.

Q5. Load the Montgomery and Pickrell eSet:

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/montpick_eset.RData")`

load(file=con)

close(con)

mp = montpick.eset

pdata=pData(mp)

edata=as.data.frame(exprs(mp))

fdata = fData(mp)

Perform the log2(data + 1) transform. Then fit a regression model to each sample using population as the outcome. Do this using the \verb|lm.fit|lm.fit function (hint: don’t forget the intercept). What is the dimension of the residual matrix, the effects matrix and the coefficients matrix?

- Residual matrix: 52580 x 129
- Effects matrix: 52580 x129
- Coefficients matrix: 2 x 52580

- Residual matrix: 129 x 52580
- Effects matrix: 129 x 52580
- Coefficients matrix: 2 x 52580

- Residual matrix: 52580 x 129
- Effects matrix: 129 x 52580
- Coefficients matrix: 2 x 52580

- Residual matrix: 129 x 52580
- Effects matrix: 129 x 52580
- Coefficients matrix: 1 x 52580

Q6. Load the Montgomery and Pickrell eSet:

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/montpick_eset.RData")`

load(file=con)

close(con)

mp = montpick.eset

pdata=pData(mp)

edata=as.data.frame(exprs(mp))

fdata = fData(mp)

Perform the log2(data + 1) transform. Then fit a regression model to each sample using population as the outcome. Do this using the \verb|lm.fit|lm.fit function (hint: don’t forget the intercept). What is the effects matrix?

- The estimated fitted values for all samples for each gene, with the values for each gene stored in the rows of the matrix.
- The model coefficients for all samples for each gene, with the values for each gene stored in the columns of the matrix.
- The estimated fitted values for all samples for each gene, with the values for each gene stored in the columns of the matrix.
- The model residuals for all samples for each gene, with the values for each gene stored in the columns of the matrix.

Q7. Load the Bodymap data with the following command

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bodymap_eset.RData")`

load(file=con)

close(con)

bm = bodymap.eset

edata = exprs(bm)

pdata_bm=pData(bm)

Fit many regression models to the expression data where \verb|age|age is the outcome variable using the \verb|lmFit|lmFit function from the \verb|limma|limma package (hint: you may have to subset the expression data to the samples without missing values of age to get the model to fit). What is the coefficient for age for the 1,000th gene? Make a plot of the data and fitted values for this gene. Does the model fit well?

- -27.61. The model fits well since there seems to be a flat trend in the counts.
- 2469.87. The model doesn’t fit well since there appears to be a non-linear trend in the data.
- -27.61. The model doesn’t fit well since there are two large outlying values and the rest of the values are near zero.
- -27.61. The model doesn’t fit well since there appears to be a non-linear trend in the data.

Q8. Load the Bodymap data with the following command

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bodymap_eset.RData")`

load(file=con)

close(con)

bm = bodymap.eset

edata = exprs(bm)

pdata_bm=pData(bm)

Fit many regression models to the expression data where \verb|age|age is the outcome variable and \verb|tissue.type|tissue.type is an adjustment variable using the \verb|lmFit|lmFit function from the \verb|limma|limma package (hint: you may have to subset the expression data to the samples without missing values of age to get the model to fit). What is wrong with this model?

- Since \verb|tissue.type|tissue.type is a factor variable with many levels, this model has more coefficients to estimate per gene (18) than data points per gene (16).
- Normally this model wouldn’t fit well since we have more coefficients (18) than data points per gene (16). But since we have so many genes to estimate with, the model fits well.
- The model doesn’t fit well since \verb|age|age should be treated as a factor variable.
- The model doesn’t fit well because there are a large number of outliers for the white blood cell tissue.

Q9. Why is it difficult to distinguish the study effect from the population effect in the Montgomery Pickrell dataset from ReCount?

- The study effects and population effects are difficult to distinguish because the population effect is not adjusted for study.
- The study effects and population effects are difficult to distinguish because the study effects are stronger.
- The effects are difficult to distinguish because each study only measured one population.
- The study effects and population effects are not difficult to distinguish since they are the same effect.

Q10. Load the Bodymap data with the following command

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bodymap_eset.RData")`

load(file=con)

close(con)

bm = bodymap.eset

edata = exprs(bm)

pdata_bm=pData(bm)

Set the seed using the command \verb|set.seed(33353)|set.seed(33353) then estimate a single surrogate variable using the \verb|sva|sva function after log2(data + 1) transforming the expression data, removing rows with rowMeans less than 1, and treating age as the outcome (hint: you may have to subset the expression data to the samples without missing values of age to get the model to fit). What is the correlation between the estimated surrogate for batch and age? Is the surrogate more highly correlated with \verb|race|race or \verb|gender|gender?

- Correlation with age: 0.33
- More highly correlated with gender.

- Correlation with age: 0.99
- More highly correlated with race.

- Correlation with age: 0.99
- More highly correlated with gender.

- Correlation with age: 0.20
- More highly correlated with gender.

### Week 3

#### Module 3 Quiz

Q1. Load the example SNP data with the following code:

`library(snpStats)`

library(broom)

data(for.exercise)

use <- seq(1, ncol(snps.10), 10)

sub.10 <- snps.10[,use]

snpdata = [email protected]

status = subject.support$cc

Fit a linear model and a logistic regression model to the data for the 3rd SNP. What are the coefficients for the SNP variable? How are they interpreted? (Hint: Don’t forget to recode the 0 values to NA for the SNP data)

- Linear Model = 0.54
- Logistic Model = 0.18

Both models are fit on the additive scale. So in both cases the coefficient is the decrease in probability associated with each additional copy of the minor allele.

- Linear Model = 0.54
- Logistic Model = 0.18

Both models are fit on the additive scale. So in the linear model case, the coefficient is the decrease in probability associated with each additional copy of the minor allele. In the logistic regression case, it is the decrease in the log odds ratio associated with each additional copy of the minor allele.

- Linear Model = -0.16
- Logistic Model = -0.04

Both models are fit on the additive scale. So in the linear model case, the coefficient is the decrease in probability associated with each additional copy of the minor allele. In the logistic regression case, it is the decrease in the log odds ratio associated with each additional copy of the minor allele.

- Linear Model = -0.04
- Logistic Model = -0.16

Both models are fit on the additive scale. So in the linear model case, the coefficient is the decrease in probability associated with each additional copy of the minor allele. In the logistic regression case, it is the decrease in the log odds ratio associated with each additional copy of the minor allele.

Q2. In the previous question why might the choice of logistic regression be better than the choice of linear regression?

- If you included more variables it would be possible to get negative estimates for the probability of being a case from the linear model, but this would be prevented with the logistic regression model.
- The linear model only allows modeling relationships on the additive scale but we might want to consider a dominant or recessive model.
- It is customary to use logistic regression for case-control data like those obtained from genome-wide association studies.
- The log odds is always more interpretable than a change in probability on the additive scale.

Q3. Load the example SNP data with the following code:

`library(snpStats)`

library(broom)

data(for.exercise)

use <- seq(1, ncol(snps.10), 10)

sub.10 <- snps.10[,use]

snpdata = [email protected]

status = subject.support$cc

Fit a logistic regression model on a recessive (need 2 copies of minor allele to confer risk) and additive scale for the 10th SNP. Make a table of the fitted values versus the case/control status. Does one model fit better than the other?

- No, in all cases, the fitted values are near 0.5 and there are about an equal number of cases and controls in each group. This is true regardless of whether you fit a recessive or additive model.
- The additive model fits much better since there are fewer parameters to fit and the effect size is so large.
- The recessive model shows a strong effect, but the additive model shows no difference so the recessive model is better.
- The recessive model fits much better since it appears that once you aggregate the heterozygotes and homozygous minor alleles, there is a bigger difference in the proportion of cases and controls.

Q4. Load the example SNP data with the following code:

`library(snpStats)`

library(broom)

data(for.exercise)

use <- seq(1, ncol(snps.10), 10)

sub.10 <- snps.10[,use]

snpdata = [email protected]

status = subject.support$cc

Fit an additive logistic regression model to each SNP. What is the average effect size? What is the max? What is the minimum?

- Average effect size = 0.02, minimum = -0.88, maximum = 0.88
- Average effect size = -0.02, minimum =-3.59 , maximum = 4.16
- Average effect size = 1.35, minimum =-6.26 , maximum = 6.26
- Average effect size = 0.007, minimum = -4.25, maximum = 3.90

Q5. Load the example SNP data with the following code:

`library(snpStats)`

library(broom)

data(for.exercise)

use <- seq(1, ncol(snps.10), 10)

sub.10 <- snps.10[,use]

snpdata = [email protected]

status = subject.support$cc

Fit an additive logistic regression model to each SNP and square the coefficients. What is the correlation with the results from using \verb|snp.rhs.tests|snp.rhs.tests and \verb|chi.squared|chi.squared? Why does this make sense?

- 0.81 They are both testing for the same association using the same additive regression model on the logistic scale. But it doesn’t make sense since they should be perfectly correlated.
- 0.99. They are both testing for the same association using the same additive regression model on the logistic scale. But it doesn’t make sense since they should be perfectly correlated.
- 0.99. It doesn’t make sense since they are both testing for the same association using the same additive regression model on the logistic scale but using slightly different tests.
- 0.99. They are both testing for the same association using the same additive regression model on the logistic scale but using slightly different tests.

Q6. Load the Montgomery and Pickrell eSet:

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/montpick_eset.RData")`

load(file=con)

close(con)

mp = montpick.eset

pdata=pData(mp)

edata=as.data.frame(exprs(mp))

fdata = fData(mp)

Do the log2(data + 1) transform and fit calculate F-statistics for the difference between studies/populations using genefilter:rowFtests and using genefilter:rowttests. Do you get the same statistic? Do you get the same p-value?

- You get different p-values and statistics. The F-statistic and t-statistic are testing the same thing but do it totally differently.
- You get different p-values and statistics. The F-statistic and t-statistic are testing totally different things.
- You get the same p-values and statistics. This is because the F-statistic and t-statistic are the exact same in this case.
- You get the same p-value but different statistics. This is because the F-statistic and t-statistic test the same thing when doing a two group test and one is a transform of the other.

Q7. Load the Montgomery and Pickrell eSet:

`con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/montpick_eset.RData")`

load(file=con)

close(con)

mp = montpick.eset

pdata=pData(mp)

edata=as.data.frame(exprs(mp))

edata = edata[rowMeans(edata) > 100,]

fdata = fData(mp)

First test for differences between the studies using the \verb|DESeq2|DESeq2 package using the \verb|DESeq|DESeq function. Then do the log2(data + 1) transform and do the test for differences between studies using the \verb|limma|limma package and the \verb|lmFit|lmFit, \verb|ebayes|ebayes and \verb|topTable|topTable functions. What is the correlation in the statistics between the two analyses? Are there more differences for the large statistics or the small statistics (hint: Make an MA-plot).

- 0.63. There are more differences for the large statistics.
- 0.93. There are more differences for the small statistics.
- 0.93. There are more differences for the large statistics.
- 0.85. There are more differences for the large statistics.

Q8. Apply the Benjamni-Hochberg correction to the P-values from the two previous analyses. How many results are statistically significant at an FDR of 0.05 in each analysis?

- DESeq = 1119 significant;
- limma = 2328 significant
- DESeq = 0 significant;
- limma = 0 significant
- DESeq = 12 significant;
- limma = 3significant
- DESeq = 1995 significant;
- limma = 2807 significant

Q9. Is the number of significant differences surprising for the analysis comparing studies from Question 8? Why or why not?

- Yes and no. It is surprising because there is a large fraction of the genes that are significantly different, but it isn’t that surprising because we would expect that when comparing measurements from very different batches.
- Yes. This is a very large number of genes different between studies and we don’t have a good explanation.
- Yes and no. It is surprising because there very few genes that are significantly different, but it isn’t that surprising because we would expect that when comparing measurements from very different batches.
- No. There are very few genes different between studies and that is what we would expect.

Q10. Suppose you observed the following P-values from the comparison of differences between studies. Why might you be suspicious of the analysis?

- There are too many small p-values so there are too may statistically significant results.
- This p-value histogram appears correct in the case where there is very little signal in the data .
- The p-values should have a spike near zero (the significant results) and be flat to the right hand side (the null results) so the distribution pushed toward one suggests something went wrong.
- This p-value histogram appears correct in the case where there is a large number of statistically significant results.

### Week 4

#### Module 4 Quiz

Q1. When performing gene set analysis it is critical to use the same annotation as was used in pre-processing steps. Read the paper behind the Bottomly data set on the ReCount database: http://www.ncbi.nlm.nih.gov/pubmed?term=21455293

Using the paper and the function: \verb|supportedGenomes()|supportedGenomes() in the \verb|goseq|goseq package can you figure out which of the Mouse genome builds they aligned the reads to.

- UCSC mm9
- UCSC hg18
- UCSC hg19
- NCBI Build 35

Q2. Load the Bottomly data with the following code and perform a differential expression analysis using \verb|limma|limma with only the strain variable as an outcome. How many genes are differentially expressed at the 5% FDR level using Benjamini-Hochberg correction? What is the gene identifier of the first gene differentially expressed at this level (just in order, not the smallest FDR) ? (hint: the \verb|featureNames|featureNames function may be useful)

`library(Biobase)`

library(limma)

con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bottomly_eset.RData")

load(file=con)

close(con)

bot = bottomly.eset

pdata_bot=pData(bot)

fdata_bot = featureData(bot)

edata = exprs(bot)

fdata_bot = fdata_bot[rowMeans(edata) > 5]

- 90 at FDR 5%; ENSMUSG00000000001 first DE gene
- 9431 at FDR 5%; ENSMUSG00000027855 first DE gene
- 223 at FDR 5%; ENSMUSG00000027855 first DE gene
- 223 at FDR 5%;
- ENSMUSG00000000402 first DE gene

Q3. Use the \verb|nullp|nullp and \verb|goseq|goseq functions in the \verb|goseq|goseq package to perform a gene ontology analysis. What is the top category that comes up as over represented? (hint: you will need to use the genome information on the genome from question 1 and the differential expression analysis from question 2.

- GO:0008528
- GO:0038023
- GO:0004888
- GO:0001653

Q4. Look up the GO category that was the top category from the previous question. What is the name of the category?

- peptide receptor activity
- G-protein coupled peptide receptor activity
- transmembrane signaling receptor activity
- signaling receptor activity

Q5. Load the Bottomly data with the following code and perform a differential expression analysis using \verb|limma|limma and treating strain as the outcome but adjusting for lane as a factor. Then find genes significant at the 5% FDR rate using the Benjamini Hochberg correction and perform the gene set analysis with \verb|goseq|goseq following the protocol from the first 4 questions. How many of the top 10 overrepresented categories are the same for the adjusted and unadjusted analysis?

`library(Biobase)`

library(limma)

con =url("https://bowtie-bio.sourceforge.net/recount/ExpressionSets/bottomly_eset.RData")

load(file=con)

close(con)

bot = bottomly.eset

pdata_bot=pData(bot)

fdata_bot = featureData(bot)

edata = exprs(bot)

fdata_bot = fdata_bot[rowMeans(edata) > 5]

- 10
- 0
- 3
- 2

##### Statistics for Genomic Data Science Course Review:

In our experience, we suggest you enroll in Statistics for Genomic Data Science courses and gain some new skills from Professionals completely free and we assure you will be worth it.

Statistics for Genomic Data Science course is available on Coursera for free, if you are stuck anywhere between a quiz or a graded assessment quiz, just visit Networking Funda to get Statistics for Genomic Data Science Coursera Quiz Answers.

##### Conclusion:

I hope this Statistics for Genomic Data Science Coursera Quiz Answers would be useful for you to learn something new from this Course. If it helped you then don’t forget to bookmark our site for more Quiz Answers.

This course is intended for audiences of all experiences who are interested in learning about new skills in a business context; there are no prerequisite courses.

Keep Learning!

#### Get All Course Quiz Answers of Genomic Data Science Specialization

Introduction to Genomic Technologies Coursera Quiz Answers

Python for Genomic Data Science Coursera Quiz Answers

Algorithms for DNA Sequencing Coursera Quiz Answers

Command Line Tools for Genomic Data Science Coursera Quiz Answers

Bioconductor for Genomic Data Science Coursera Quiz Answers

Statistics for Genomic Data Science