Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #For your boxplot,
- #Say you wanna make a boxplot for gene UCA1, you wuold type
- goi <- norm.all[rownames(norm.all) == "UCA1" , ]
- boxplot(goi)
- #or
- goi <- melt(norm.all[grepl(x = rownames(norm.all), pattern = "GENEOFINTEREST"), ])
- boxplot(goi)
- studentT <- function(x, s1, s2){
- x <- as.numeric(x);
- x1 <- x[s1];
- x2 <- x[s2];
- z <- t.test(x1, x2, alternative = "two.sided");
- pval <- z$p.value;
- return(pval);
- }
- # We're applying the function studentT to our object tmp.all that has in the first 168 lines normal samples and the rest cancer
- tmp.all.pval <- apply(tmp.all, 1, studentT, s1 = c(1:168), s2 = c(169:588))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement