I have some RNA seq data for two different cell types (naive and Th1).
How would I find the average of the two replicates of each cell type for each gene (the grouping variable) and then plot a log-log scatter graph of these data?
My table looks like this:
df <- data.frame(Gene_name=c("Mrpl15", "Lypla1", "Tcea1"),
naive_A=c(5.21212, 6.62643, 5.74654),
naive_B=c(4.52376, 5.64459, 4.52153),
Th1_A=c(15.50650, 14.46030, 11.57770),
Th1_B=c(5.876490, 5.193010, 2.107200), stringsAsFactors=F)
df
Gene_name naive_A naive_B Th1_A Th1_B
1 Mrpl15 5.21212 4.52376 15.5065 5.87649
2 Lypla1 6.62643 5.64459 14.4603 5.19301
3 Tcea1 5.74654 4.52153 11.5777 2.10720
If anyone can help, I'd be much obliged!! Thanks