Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numbers of differentially expressed genes by timepoint #5

Open
raynamharris opened this issue Mar 19, 2019 · 11 comments
Open

numbers of differentially expressed genes by timepoint #5

raynamharris opened this issue Mar 19, 2019 · 11 comments

Comments

@raynamharris
Copy link
Member

raynamharris commented Mar 19, 2019

Given the large amount of gene expression variance due to tissue type, I examined differences between points in each tissue separately. These are the counts:

Summary of differentially expressed genes (DEG) between timepoints.

Contrast Hyp Female Hyp Male Pit Female Pit Male Gon Female Gon Male
Cont - Bldg 14674 117 14593 144 14859 4
Bldg - Lay 14742 0 14593 0 14836 0
Lay - Inc3 0 0 0 0 19 0
Inc3 - Inc9 0 1 0 3 2 0
Inc9 - Inc 17 0 2 57 37 9 0
Inc17 - Hatch 0 0 3 1 3 0
Hatch - Nest5 1 0 3 0 0 0
Nest5 - Nest9 0 0 0 0 24 0
Nest9 - Cont 79 220 44 147 310 14
Nest9 - Bldg 14704 0 14671 0 14844 0

See:

@raynamharris
Copy link
Member Author

I find the above limma results to be very confusing... how can 14,000 genes be differentially expressed between 2 given timepoints??? That seems like too many to me. So, I decided to recalculate the number of differentially expressed genes between all time points (but within each sex and each tissue) using DESeq2.

To do this, I wrote a function that returns the number of differentially expressed genes (where FDR < 0.1). Tne, I wrote a nested for loop that stores which times points are being compared and the number of DEGs. Then I widen the table and print. I also use geom_tile to print a visual version of the table.

numDEGs <- function(group1, group2){
  res <- results(dds, contrast = c("treatment", group1, group2), independentFiltering = T)
  sumpadj <- sum(res$padj < 0.1, na.rm = TRUE)
  return(sumpadj)
}

a <- levels(colData$treatment)
b <- levels(colData$treatment)

dat=data.frame()
for (i in a){
  for (j in b){
    if (i != j) {
      k <- paste(i,j, sep = "") #assigns usique rownames
      dat[k,1]<-i               
      dat[k,2]<-j
      dat[k,3]<- numDEGs(i,j) #caluculates number of DEGs
    }
  }
}

data_wide <- spread(dat, V2, V3)

ggplot(dat, aes(V1, V2)) +
  geom_tile(aes(fill = V3)) +
  scale_fill_viridis(na.value="#FFFFFF00") + 
  xlab("Treatment") + ylab("Treatment") +
  labs(fill = "# of DEGs")

@raynamharris
Copy link
Member Author

raynamharris commented Apr 6, 2019

female hyp

##        V1 bldg control hatch inc.d17 inc.d3 inc.d9  lay   n5   n9
## 1    bldg   NA    7436  1709    5025   2039   1165  778 1295   55
## 2 control 7436      NA  3519    2284   5303   5523 7164 4885 7191
## 3   hatch 1709    3519    NA       2     82      6 2132    3  723
## 4 inc.d17 5025    2284     2      NA    125    305 4090   17 3952
## 5  inc.d3 2039    5303    82     125     NA     13 2193  482 1867
## 6  inc.d9 1165    5523     6     305     13     NA 1456   65 1031
## 7     lay  778    7164  2132    4090   2193   1456   NA 1198 1039
## 8      n5 1295    4885     3      17    482     65 1198   NA  271
## 9      n9   55    7191   723    3952   1867   1031 1039  271   NA

male hyp

##        V1 bldg control hatch inc.d17 inc.d3 inc.d9  lay   n5   n9
## 1    bldg   NA    4352     0       0      0      0  126    0    0
## 2 control 4352      NA  4315    3474   3827   4251 5500 4878 5284
## 3   hatch    0    4315    NA       0      0      2   34    0    0
## 4 inc.d17    0    3474     0      NA      0      0  373    1    0
## 5  inc.d3    0    3827     0       0     NA      0  127    1    2
## 6  inc.d9    0    4251     2       0      0     NA 2527  409   16
## 7     lay  126    5500    34     373    127   2527   NA    0    1
## 8      n5    0    4878     0       1      1    409    0   NA    0
## 9      n9    0    5284     0       0      2     16    1    0   NA

See https://github.com/macmanes-lab/DoveParentsRNAseq/blob/master/analysis/02_DESeq2_hyp.md

@raynamharris
Copy link
Member Author

raynamharris commented Apr 6, 2019

female gonad

##        V1 bldg control hatch inc.d17 inc.d3 inc.d9  lay   n5   n9
## 1    bldg   NA    7436  1709    5025   2039   1165  778 1295   55
## 2 control 7436      NA  3519    2284   5303   5523 7164 4885 7191
## 3   hatch 1709    3519    NA       2     82      6 2132    3  723
## 4 inc.d17 5025    2284     2      NA    125    305 4090   17 3952
## 5  inc.d3 2039    5303    82     125     NA     13 2193  482 1867
## 6  inc.d9 1165    5523     6     305     13     NA 1456   65 1031
## 7     lay  778    7164  2132    4090   2193   1456   NA 1198 1039
## 8      n5 1295    4885     3      17    482     65 1198   NA  271
## 9      n9   55    7191   723    3952   1867   1031 1039  271   NA

male gonad

##        V1 bldg control hatch inc.d17 inc.d3 inc.d9  lay   n5   n9
## 1    bldg   NA    4352     0       0      0      0  126    0    0
## 2 control 4352      NA  4315    3474   3827   4251 5500 4878 5284
## 3   hatch    0    4315    NA       0      0      2   34    0    0
## 4 inc.d17    0    3474     0      NA      0      0  373    1    0
## 5  inc.d3    0    3827     0       0     NA      0  127    1    2
## 6  inc.d9    0    4251     2       0      0     NA 2527  409   16
## 7     lay  126    5500    34     373    127   2527   NA    0    1
## 8      n5    0    4878     0       1      1    409    0   NA    0
## 9      n9    0    5284     0       0      2     16    1    0   NA

See https://github.com/macmanes-lab/DoveParentsRNAseq/blob/master/analysis/04_DESeq2_gon.md

@raynamharris
Copy link
Member Author

raynamharris commented Apr 7, 2019

female pit

##        V1 bldg control hatch inc.d17 inc.d3 inc.d9  lay   n5   n9
## 1    bldg   NA    6448  2682    3427     37    103  280  494  294
## 2 control 6448      NA  5966    5341   5550   6244 6315 6140 6141
## 3   hatch 2682    5966    NA       6   1083   1671 3348 1089 2319
## 4 inc.d17 3427    5341     6      NA   1132   2017 3995 1711 2883
## 5  inc.d3   37    5550  1083    1132     NA      1  333  198  377
## 6  inc.d9  103    6244  1671    2017      1     NA  107   87  277
## 7     lay  280    6315  3348    3995    333    107   NA  460  570
## 8      n5  494    6140  1089    1711    198     87  460   NA   23
## 9      n9  294    6141  2319    2883    377    277  570   23   NA

male pit

##        V1 bldg control hatch inc.d17 inc.d3 inc.d9  lay   n5   n9
## 1    bldg   NA    7026  1953     880     14      0    0  612   99
## 2 control 7026      NA  7026    6724   7028   6997 7304 7304 7114
## 3   hatch 1953    7026    NA      56   1880   1157 2231  155 1207
## 4 inc.d17  880    6724    56      NA    660    433  951  142  486
## 5  inc.d3   14    7028  1880     660     NA      1    5  703  183
## 6  inc.d9    0    6997  1157     433      1     NA    5  541   35
## 7     lay    0    7304  2231     951      5      5   NA  677   75
## 8      n5  612    7304   155     142    703    541  677   NA   63
## 9      n9   99    7114  1207     486    183     35   75   63   NA

https://github.com/macmanes-lab/DoveParentsRNAseq/blob/master/analysis/03_DESeq2_pit.md

@raynamharris
Copy link
Member Author

combined figure showing the total number of DEGs between all the timepoints for females (top) and males (bottom)

DoveParentsRNAseq-01

@raynamharris
Copy link
Member Author

here's the same image without the control groups as a reference.

DoveParentsRNAseq-01

@raynamharris
Copy link
Member Author

I'm working on a new analysis to examine specific hypotheses regarding timepoints. Thes two images show the number of changes between each time point through the normal parental stage.

characterization-1

characterization-2

@raynamharris
Copy link
Member Author

These two images show how manipulation changes expression by comparing to a specific manipulation to a specific time point in parental care (Eg. Day 3 remove eggs versus normal Day 3 incubation). I have also included "normal transitions" (e.g. lay versus day 3 incubation).

Here's an image for all the egg or chick removal stages.

offspringremoval-1

And here's focusing on manipulations around egg hatching.

prolongextend-1

@raynamharris
Copy link
Member Author

Back to only the characterization study, I like this viewing comparing the two normalization/ differential equation methods edgeR and DESeq2.

Table 1: EdgeR comparison of total DEGs determined by edgeR and DESeq2

Method Contrast Hyp Female Hyp Male Pit Female Pit Male Gon Female Gon Male
EdgeR Cont - Bldg 14674 117 14593 144 14859 4
EdgeR Bldg - Lay 14742 0 14593 0 14836 0
EdgeR Lay - Inc3 0 0 0 0 19 0
EdgeR Inc3 - Inc9 0 1 0 3 2 0
EdgeR Inc9 - Inc 17 0 2 57 37 9 0
EdgeR Inc17 - Hatch 0 0 3 1 3 0
EdgeR Hatch - Nest5 1 0 3 0 0 0
EdgeR Nest5 - Nest9 0 0 0 0 24 0
DESeq2 Cont - Bldg 3452 4499 3950 4680 4597 2135
DESeq2 Bldg - Lay 0 0 101 0 104 1
DESeq2 Lay - Inc3 0 0 18 1 440 1
DESeq2 Inc3 - Inc9 1 0 0 1 8 0
DESeq2 Inc9 - Inc 17 1 0 640 186 1 0
DESeq2 Inc17 - Hatch 2 0 3 18 1 0
DESeq2 Hatch - Nest5 166 0 340 3 1 0
DESeq2 Nest5 - Nest9 0 0 1 23 19 0

@raynamharris
Copy link
Member Author

here's the latest of this version, pituitary only

DoveParentsRNAseq_pituitarygenes

from the very bottom of https://github.com/macmanes-lab/DoveParentsRNAseq/blob/master/analysis/03_DESeq2_characterization.md

@raynamharris
Copy link
Member Author

plotDEGsmales-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant