Entering edit mode
Hello,
I have data from mrna sequencing and total rna sequencing of t cell developmental stages. I made a combined table with the counts for each stage and protocol and i want to do deg on them. Although I dont know how to form the LRT test.
# library(data.table)
htseq_count <- fread("quantification_merged.tsv", header=FALSE)
htseq_count <- htseq_count[1:(nrow(htseq_count)-5), ]
metadata <- fread("metadata.tsv", header=FALSE)
names(metadata) <- c("Run", "Condition", "Type")
names(htseq_count) <- c("ENSG", "GENE", metadata$Run)
countdata <- htseq_count[ ,3:(ncol(htseq_count))]
countdata <- as.data.frame(countdata)
rownames(countdata) <- htseq_count$ENSG
colnames(countdata) <- metadata$Run
metadata$Condition <- factor(metadata$Condition)
metadata$Type <- factor(metadata$Type)
library(DESeq2)
dds <- DESeqDataSetFromMatrix(countData = countdata,
colData = metadata,
design = ~ Condition + Type)
dds
smallestGroupSize <- 3
keep <- rowSums(counts(dds) >= 10) >= smallestGroupSize
dds <- dds[keep, ]
sessionInfo( )
