I am running edgeR on sRNA-seq data with two tissues Control(Tissue_1) and Treated(Tissue_2) having normalized TPM (transcript per million) values for each. I need the log FC ratio with Treated(tissue_2) value in the numerator and Control(Tissue_1) in the denominator but the results I am getting with EdgeR are there with opposite sign (-ve sign in place of + and vice a versa); e.g.:
edgeR input:
Gene_IDs | Tissue_1 | Tissue_2 | ||||||||||||||||||||||
Gene_1 | 3.221 | 7.309 | ||||||||||||||||||||||
Gene_2 | 2.052 | 2.186 | ||||||||||||||||||||||
Gene_3 | 395.654 | 3190.938 | ||||||||||||||||||||||
Gene_4 | 6.823 | 1.518 | ||||||||||||||||||||||
edgeR output:
|
|
even when I swap the groups the result remain the same. Please suggest where I am going wrong.
We are using R 2.15.0 and BiocInstaller version 1.8.3.
Please ask for any other data you need to undersatnd this issue. We found similar kind of issue previously asked on Bioconductor ( EdgeR: Log FC does not changes when I swap the groups ), but no satisfactory solution found there.
Command line is as following -
Case1: Column1 = Gene_IDs, Column2 = Tissue_1, Column3 = Tissue_2.
R command line as following-
$ /home/DE_analysis.pl --matrix Input_case1.txt --method edgeR --output Inputcase1
Got 3 samples, and got: 3 data fields.
Header: Gene_IDs Tissue1 Tissue2
Next: Gene_1 7.309 3.221
-shifting sample indices over.
$VAR1 = {
'Tissue2' => 2,
'Tissue1' => 1
};
$VAR1 = {
'Tissue2' => [
'Tissue2'
],
'Tissue1' => [
'Tissue1'
]
};
Contrasts to perform are: $VAR1 = [
[
'Tissue1',
'Tissue2'
]
];
CMD: R --vanilla -q < Input_case1.txt.Tissue1_vs_Tissue2.Tissue1.vs.Tissue2.EdgeR.Rscript > library(edgeR)
Loading required package: limma
> data = read.table("/home/Anoop/testing/Input_case1.txt", header=T, row.names=1, com='')
> col_ordering = c(1,2)
> rnaseqMatrix = data[,col_ordering]
> rnaseqMatrix = round(rnaseqMatrix)
> rnaseqMatrix = rnaseqMatrix[rowSums(rnaseqMatrix)>=2,]
> conditions = factor(c(rep("Tissue1", 1), rep("Tissue2", 1)))
> exp_study = DGEList(counts=rnaseqMatrix, group=conditions)
> exp_study = calcNormFactors(exp_study)
> et = exactTest(exp_study, dispersion=0.1)
> tTags = topTags(et,n=NULL)
> write.table(tTags, file='Input_case1.txt.Tissue1_vs_Tissue2.edgeR.DE_results', sep=' ', quote=F, row.names=T)
> source("/home/Analysis/DifferentialExpression/R/rnaseq_plot_funcs.R")
> pdf("Input_case1.txt.Tissue1_vs_Tissue2.edgeR.DE_results.MA_n_Volcano.pdf")
> result_table = tTags$table
> plot_MA_and_Volcano(result_table$logCPM, result_table$logFC, result_table$FDR)
> dev.off()
There's a couple of problems with your post:
edgeR
, you need the raw counts.