# Bioconductor has a mission of “promot[ing] the statistical # analysis and comprehension of current and emerging high-throughput # biological assays.” # Install Bioconductor if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install() # Install edgeR as an example BiocManager::install("edgeR") # Load edgeR library(edgeR) # Example: Create a DGEList object for RNA-seq data counts <- matrix(rpois(100, lambda = 10), ncol = 5) group <- factor(c("Control", "Control", "Treatment", "Treatment", "Treatment")) dge <- DGEList(counts = counts, group = group) # str() function can be used to inspect the structure of the object str(dge) # Normalize counts using TMM normalization dge <- calcNormFactors(dge) print(dge) # Perform differential expression analysis dge <- estimateDisp(dge) fit <- glmFit(dge, design = model.matrix(~group)) lrt <- glmLRT(fit, coef = 2) # Genewise Likelihood Ratio Tests topTags(lrt)