Hi, thank you for your reply. I did following your comments but the result of my DEGs are still the same (2 DEGs).
- I have 3 different structures(8 samples). I want to know the gene expression profiling of structure A. I grouped structure A and other 2 structures as others.
- Does this mean there are no DEGs between my structures? Can you help identify if I did something wrong in my script? The following is my script:
groupsA <- c("others","A","others","others","A","others","A","others")
geneexpA <- DGEList(counts=counts_mat, group=groupsA)
head(geneexpA)
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("rtracklayer")
install.packages("rtracklayer")
gtf <- rtracklayer::import("gencode.v38.annotation.gtf")
table(gtf$gene_type)
lncrna <- unique(gtf[gtf$gene_type=="lncRNA"]$gene_name)
geneexpA[rownames(geneexpA) %in% lncrna,]
filterByExpr(geneexpA,remove.lncrna=TRUE)
geneexpA <- calcNormFactors(geneexpA)
geneexpA <- estimateCommonDisp(geneexpA)
geneexpA <- estimateTagwiseDisp(geneexpA)
head(geneexpA)
genediffA <- exactTest(geneexpA)
genediffA
topTags(genediffA)
genediffA$table <- cbind(genediffA$table, FDR=p.adjust(genediffA$table$PValue, method ='fdr'))
head(genediffA)
str(genediffA)
summary(genediffA)
gsignA <- genediffA$table[genediffA$table$FDR<0.03,]
gsignA <- gsignA[order(gsignA$FDR),]
dim(gsignA)
head(gsignA)
At the time quantification (counts) from bams, you can use gtf without non-coidng RNAs.