I've been attempting to run the Ballgown differential expression package, but am getting odd results. I have an experiment where a particular gene is knocked down, but it isn't showing as differentially expressed with Ballgown. I am comparing the results to EdgeR, and they are not coming out the same.
I've come up with the following script based on Alyssa Frazee's GitHub page and https://davetang.org/muse/2017/10/25/getting-started-hisat-stringtie-ballgown/
library(ballgown) library(RSkittleBrewer) library(genefilter) library(dplyr) library(devtools) samples <- c("/dir/A","dir/B","dir/C", "dir/D") bg = ballgown(samples=samples, meas="all") bg_filtered <- subset(bg, "rowVars(texpr(bg)) > 1", genomesubset = TRUE) rm(bg) pData(bg_filtered) = data.frame(id=sampleNames(bg_filtered), group=c(rep(0,2), rep(1,2))) results_transcripts = stattest(bg_filtered, feature="transcript", meas="FPKM", getFC = TRUE, covariate="group") results_transcripts <- data.frame(transcriptNames=transcriptNames(bg_filtered), results_transcripts) results_transcripts <- results_transcripts[order(results_transcripts$qval),]#sort by qval write.table(file = "ballgown_output/J1_and_J2яEarlyяH1_H2_and_H5_vs_control.tsv", results_transcripts, sep="\t", quote=FALSE)
my question is whether I'm missing anything, I don't know why these results are turning out to be so different from one another. Why is the knockdown transcript not showing as differentially expressed?