1
$\begingroup$

I am working on a datasets and after some discussion with my group, we doubt that maybe one or more of our controls are different than the other controls. The motivation is to see if one or more controls have been effected differently by the solvent they were kept in.

I have been suggested to use bootstrap method. If we suppose that I have a dataset with 5 controls and 3 treated samples. I want to create 5 new dataframes with the information such as every new data frame skips one out of 5 controls and do resampling with replacement. I want to see how stable the controls are and by skipping a specific control, would the DEGs result change.

Let us suppose that the original data frame is like this:

x <- round(matrix(rexp(480 * 10, rate=.1), ncol=8), 0)


rownames(x) <- paste("gene", 1:nrow(x))

colnames(x) <-c("control1","control2","control3","control4","control5","treated","treated","treated")

head(x) I want to create 5 new dataframes (as there are 5 controls in this study) where each data frame skips one specific control and replace with with another control (which means some other control will repeat).

For example one of the 5 data frame can look like:

x1 <- round(matrix(rexp(480 * 10, rate=.1), ncol=8), 0)

rownames(x1) <- paste("gene", 1:nrow(x1))

colnames(x1) <-c("control1","control1.1","control3","control4","control5","treated","treated","treated")

head(x1)

You can see that this new data frame skipped control2 with a copy of control1 called control1.1.

Thank you!

$\endgroup$
1
  • $\begingroup$ > we doubt that maybe one or more of our controls are different than > the other controls. Are they distinct by, say, PCA? $\endgroup$
    – swbarnes2
    Oct 17, 2022 at 18:04

1 Answer 1

0
$\begingroup$

I don't know DEG, but understand bootstrapping. The question is the use of bootstrapping to check the legitimacy of your controls.

What I simply propose is use bootstrapping directly to obtain and compare the 95% confidence interval (CI) of the mean (or median) between the controls. I'd cross check the 95% CI of the standard deviation between controls as well. Thats your hypothesis.

For example,

library(boot)
boot.ci(control1, type="bca")

Loop this for controls 2 and 3. In R I don't know how to obtain bootstrapped 95% CI of the median or SD, but do in Python.

Blurb on bootstrapping

  • a bootstrap is usually 1000+ replications;
  • its an R library.
  • there are lots of other uses of bootstrapping via boot(...).
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.