Preparation

Load packages and set options

Setup the default knitr options for the R code sections below.

Load the packages used throughout this analysis.

setwd("/share/users/Mike/AutismPaper/RNASeq/R")
suppressMessages({
  library('kableExtra')
  library('goseq')
  library('readr')
  library('stringr')
  library('tibble')
  library('dplyr')
  library('tidyr')
  library('VennDiagram')
  library('tximport')
  library('DESeq2')
  library('regionReport')
  library('ggplot2')
  library('BiocParallel')
  library('RColorBrewer')
  library('colorspace')
  library('dendextend')
  library('gplots')
  library('superheat')
  library('GGally')
  library('corrplot')
  library('pheatmap')
  library('DT')
  library('devtools')
  library('VennDiagram')
  library('ggrepel')
  register(MulticoreParam(detectCores()))
  options(tibble.print_max=100)
})

Import metadata

This section assembles the metadata for the datasets included in this analysis.

meta_int <- read_tsv('../../metadata/RNASeq.internal.tsv') %>%
  mutate(library = 'paired end') %>%
  mutate(readlength = 101) %>%
  mutate(tissue = 'SVZ') %>%
  mutate(path = paste0('/share/users/Mike/AutismPaper/RNASeq/OurData/', 
                           sample, '.refseqnorrna.kallisto.paired/abundance.h5')
  )

meta_ext <- read_tsv('../../metadata/RNASeq.external.tsv') %>%
  mutate(library = 'single end') %>%
  mutate(readlength = 75) %>%
  mutate(condition = 'Control') %>%
  mutate(path = paste0('/share/users/Mike/AutismPaper/RNASeq/external/', 
                           sample, '.refseqnorrna.kallisto.single/abundance.h5')
  )

meta_ext1 <-read_tsv('../../metadata/RNASeq.external2.tsv') %>%
  mutate(path = paste0('/share/users/Mike/AutismPaper/RNASeq/external2/', 
                           sample, '.refseqnorna.kallisto.single/abundance.h5') 
)

metadata <- bind_rows(meta_int, meta_ext, meta_ext1) %>%
  mutate(age = factor(if_else(!is.na(age_wpc), 'Fetal', 
                              if_else(between(age_years,1,19),'Child','Adult')),
                      levels = c('Fetal', 'Child', 'Adult')
                      )
         ) %>%
  mutate(tissue1 = if_else(grepl('SVZ$', tissue), 'SVZ', 
                           if_else(grepl('frontal', tissue), 'FC',
                                   if_else(grepl('temporal', tissue), 'TC',
                                           tissue)
                                   )
                           )
         ) %>%
  mutate(sample = if_else(grepl('OurData', path),
                          paste(sep="_",sub("(\\w).*", "\\1", condition), 
                                paste0(age_years, 'y'),
                                sample), 
                          if_else(grepl('external2',path), 
                                  paste(sep='_', sub("(\\w).*", "\\1", condition), 
                                        tissue1, 
                                        paste0(age_years, 'y'), 
                                        sub(".*(\\d{2})$", "\\1", sample)
                                        ),
                                  paste(sep='_', tissue, 
                                        paste0(age_wpc, 'w'), 
                                        sub(".*(\\d{2})$", "\\1", sample)
                                        )
                                  )
                          )
  ) %>%
  filter(is.na(sex) | sex == 'M')

SVZ tissue analysis

DESeq2 analysis

Select SVZ metadata

Select the metadata corresponding to the SVZ tissue samples:

metadata1 <- metadata %>%
  filter(grepl('SVZ',tissue) & !grepl('H16$', sample)) %>%
  mutate(condition = factor(condition, levels=c('Control', 'Autism'))) %>%
  mutate(grp = factor(paste0(age,condition), levels=c('FetalControl', 'ChildControl', 'ChildAutism', 'AdultControl', 'AdultAutism'))) %>%
  arrange(sample) %>%
  dplyr::select( c('sample', 'condition', 'library', 'readlength', 'tissue', 'age', 'grp', 'path'))
metadata1

Read kallisto output files

Read the files with the kallisto estimated counts for each of the transcripts in RefSeq version 108 (http://www.ncbi.nlm.nih.gov/genome/annotation_euk/Homo_sapiens/108/).

files <- metadata1 %>% dplyr::select('sample', 'path') %>% spread('sample', 'path') %>% as.list() %>% unlist()
txi.kallisto <- tximport(files, type = "kallisto", txOut = TRUE)
metadata1.df <- metadata1 %>%  column_to_rownames(var="sample") %>% as.data.frame()
rownames(txi.kallisto$counts) <- as.character(rownames(txi.kallisto$counts))

Read RefSeq transcript-to-genes data

Read the transcript-to-genes metadata table that associates RefSeq accessions (e.g. NM_xxxxxx) to Entrez Gene IDs, symbols, etc.

ttgfile <- '/share/db/refseq/human/refseq.108.rna.t2g.txt'
ttg <- read_tsv(ttgfile)

Perform Wald test

  • Create a DESeq dataset from the imported estimated counts object with a model design based on a factor made by combining the age group and the condition (grp) with a baseline level corresponding to the Control condition and Fetal age group.
  • Filter out all the rows that have less than 5 reads on average in the fetal or 10 reads in the non-fetal samples.
  • Perform a Wald test on this model.
  • List the available contrasts
dds <- DESeqDataSetFromTximport(txi = txi.kallisto, colData = metadata1.df, design = ~grp)
# c <- counts(dds) %>% as.tibble()
# c[['target_id']] <- rownames(counts(dds))
# c <- c %>% mutate(sum1 = rowSums(dplyr::select(., contains("_H"))), 
#                   sum2 = rowSums(dplyr::select(., contains("SVZ"))),
#                   sum3 = rowSums(dplyr::select(., starts_with("A_"))),
#                   sum4 = rowSums(dplyr::select(., starts_with("C_"))))
# n1 <- colnames(c) %>% as.tibble() %>% filter(grepl('_H', value)) %>% summarise(n()) %>% as.numeric()
# n2 <- colnames(c) %>% as.tibble() %>% filter(grepl('SVZ', value)) %>% summarise(n()) %>% as.numeric()
# n3 <- colnames(c) %>% as.tibble() %>% filter(grepl('A_', value)) %>% summarise(n()) %>% as.numeric()
# n4 <- colnames(c) %>% as.tibble() %>% filter(grepl('C_', value)) %>% summarise(n()) %>% as.numeric()
# c <- c %>% filter((sum1 > 10 * n1) & (sum2 > 5 * n2) & (sum3 > 10 * n3) & (sum4 > 10 * n4))
# dds <- dds[c$target_id,]
# rm('c')
ddsWald <- DESeq(dds, test = "Wald", betaPrior = TRUE, parallel = TRUE)
resultsNames(ddsWald)
## [1] "Intercept"       "grpFetalControl" "grpChildControl" "grpChildAutism" 
## [5] "grpAdultControl" "grpAdultAutism"

DESeq results

Extract the results from the model.

resultsChild   <- results(ddsWald, alpha = 0.05, 
                          contrast = c('grp', 'ChildControl', 'FetalControl'))
resultsAdult   <- results(ddsWald, alpha = 0.05,
                          contrast = c('grp', 'AdultControl', 'FetalControl'))
resultsChildA  <- results(ddsWald, alpha = 0.05,
                          contrast = c('grp', 'ChildAutism', 'FetalControl'))
resultsAdultA  <- results(ddsWald, alpha = 0.05,
                          contrast = c('grp', 'AdultAutism', 'FetalControl'))
resultsChildCA <- results(ddsWald, alpha = 0.05,
                          contrast = c('grp','ChildControl','ChildAutism'))
resultsAdultCA <- results(ddsWald, alpha = 0.05,
                          contrast = c('grp','AdultControl','AdultAutism'))


# From the DESeq2 vignette: 
#
# "Regarding multiple test correction, if a user is planning to contrast all pairs of many levels
#  and then selectively reporting the results of only a subset of those pairs, one needs to perform multiple testing across contrasts 
#  as well as genes to control for this additional form of multiple testing. 
#  This can be done by using the p.adjust function across a long vector of p values from all pairs of contrasts, 

#  then re-assigning these adjusted p values to the appropriate results table."
# pChild <- resultsChild %>% as.tibble() %>% rownames_to_column(var='target_id') %>%
#   dplyr::select(c('target_id', 'pvalue')) %>% spread('target_id', 'pvalue') %>%
#   as.list() %>% unlist()
# pAdult <- resultsAdult %>% as.tibble() %>% rownames_to_column(var='target_id') %>%
#   dplyr::select(c('target_id', 'pvalue')) %>% spread('target_id', 'pvalue') %>%
#   as.list() %>% unlist()

signifChild <- resultsChild %>%
  as.tibble(.) %>% rownames_to_column(var='target_id') %>%
  filter(padj<0.05 & abs(log2FoldChange)<15) %>% arrange(padj) %>%
  left_join(ttg, by = 'target_id') %>%
  dplyr::select(c('target_id', 'baseMean', 'log2FoldChange', 'lfcSE', 'stat', 'pvalue', 'padj', 'gene_id', 'symbol', 'description', 'status', 'molecule_type'))

signifAdult <- resultsAdult %>%
  as.tibble(.) %>% rownames_to_column(var='target_id') %>%
  filter(padj<0.05 & abs(log2FoldChange)<15) %>% arrange(padj) %>%
  left_join(ttg, by = 'target_id') %>%
  dplyr::select(c('target_id', 'baseMean', 'log2FoldChange', 'lfcSE', 'stat', 'pvalue', 'padj', 'gene_id', 'symbol', 'description', 'status', 'molecule_type'))

signifChildA <- resultsChildA %>%
  as.tibble(.) %>% rownames_to_column(var='target_id') %>%
  filter(padj<0.05 & abs(log2FoldChange)<15) %>% arrange(padj) %>%
  left_join(ttg, by = 'target_id') %>%
  dplyr::select(c('target_id', 'baseMean', 'log2FoldChange', 'lfcSE', 'stat', 'pvalue', 'padj', 'gene_id', 'symbol', 'description', 'status', 'molecule_type'))

signifAdultA <- resultsAdultA %>%
  as.tibble(.) %>% rownames_to_column(var='target_id') %>%
  filter(padj<0.05 & abs(log2FoldChange)<15) %>% arrange(padj) %>%
  left_join(ttg, by = 'target_id') %>%
  dplyr::select(c('target_id', 'baseMean', 'log2FoldChange', 'lfcSE', 'stat', 'pvalue', 'padj', 'gene_id', 'symbol', 'description', 'status', 'molecule_type'))

signifChildCA <- resultsChildCA %>%
  as.tibble(.) %>% rownames_to_column(var='target_id') %>%
  filter(padj<0.05 & abs(log2FoldChange)<15) %>% arrange(padj) %>%
  left_join(ttg, by = 'target_id') %>%
  dplyr::select(c('target_id', 'baseMean', 'log2FoldChange', 'lfcSE', 'stat', 'pvalue', 'padj', 'gene_id', 'symbol', 'description', 'status', 'molecule_type'))

signifAdultCA <- resultsAdultCA %>%
  as.tibble(.) %>% rownames_to_column(var='target_id') %>%
  filter(padj<0.05 & abs(log2FoldChange)<15) %>% arrange(padj) %>%
  left_join(ttg, by = 'target_id') %>%
  dplyr::select(c('target_id', 'baseMean', 'log2FoldChange', 'lfcSE', 'stat', 'pvalue', 'padj', 'gene_id', 'symbol', 'description', 'status', 'molecule_type'))

devChildCA  <- intersect(signifChild$target_id, signifChildCA$target_id)
devAdultCA  <- intersect(signifAdult$target_id, signifAdultCA$target_id)
devChildCAg <- tibble(target_id=devChildCA) %>% left_join(ttg, by='target_id') %>% 
  dplyr::select('gene_id') %>% as.list() %>% unlist() %>% unique()
devAdultCAg <- tibble(target_id=devAdultCA) %>% left_join(ttg, by='target_id') %>% 
  dplyr::select('gene_id') %>% as.list() %>% unlist() %>% unique()
devChildCAs <- tibble(target_id=devChildCA) %>% left_join(ttg, by='target_id') %>% 
  dplyr::select('symbol') %>% as.list() %>% unlist() %>% unique()
devAdultCAs <- tibble(target_id=devAdultCA) %>% left_join(ttg, by='target_id') %>% 
  dplyr::select('symbol') %>% as.list() %>% unlist() %>% unique()

Control - Fetal

Summary of the number of transcripts and genes differentially expressed in control samples of different age groups vs. the fetal samples (“developmental genes”):

rsum_control_fetal <- tribble( ~Counts, ~Child, ~Adult,
                               'Transcripts', 
                               length(signifChild$target_id), 
                               length(signifAdult$target_id), 
                               'Genes', 
                               length(unique(signifChild$gene_id)),
                               length(unique(signifAdult$gene_id))
                               )
kable(rsum_control_fetal, format = 'markdown')
Counts Child Adult
Transcripts 15767 18111
Genes 10248 11265

Venn diagram:

grid.draw(venn.diagram(list(Child=signifChild$target_id, Adult=signifAdult$target_id), 
             filename = NULL,
             alpha = 0.5,
             inverted = TRUE, 
             cat.pos = c(45, 315),
             fill = c("cornflowerblue", "darkorchid1"),
             cat.col = c("darkblue", "darkorchid4")
             )
)

Autism - Fetal

Summary of the number of transcripts and genes differentially expressed in autism samples of different age groups vs. the fetal samples:

rsum_autism_fetal <- tribble( ~Counts, ~Child, ~Adult, 
                               'Transcripts', 
                               length(signifChildA$target_id), 
                               length(signifAdultA$target_id), 
                               'Genes', 
                               length(unique(signifChildA$gene_id)),
                               length(unique(signifAdultA$gene_id))
                               )
kable(rsum_autism_fetal, format = 'markdown')
Counts Child Adult
Transcripts 18621 17554
Genes 11626 11089

Venn diagram:

grid.draw(venn.diagram(list(Child=signifChildA$target_id, Adult=signifAdultA$target_id),
             filename = NULL,
             alpha = 0.5,
             fill = c("cornflowerblue", "darkorchid1"),
             cat.col = c("darkblue", "darkorchid4")
             )
)

Control - Autism

Summary of the number of transcripts and genes differentially expressed in autism samples of different age groups vs. the same age control samples:

rsum_autism_control <- tribble( ~Counts, ~Child, ~Adult,
                               'Transcripts', 
                               length(signifChildCA$target_id), 
                               length(signifAdultCA$target_id), 
                               'Genes', 
                               length(unique(signifChildCA$gene_id)),
                               length(unique(signifAdultCA$gene_id))
                               )
kable(rsum_autism_control, format = 'markdown')
Counts Child Adult
Transcripts 32 54
Genes 32 50

Venn diagram:

grid.draw(venn.diagram(list(Child=signifChildCA$target_id, Adult=signifAdultCA$target_id),
                       inverted = TRUE, 
                       cat.pos = c(45, 315),
                       filename = NULL,
                       alpha = 0.5,
                       fill = c("cornflowerblue", "darkorchid1"),
                       cat.col = c("darkblue", "darkorchid4")
                       )
          )

Developmental Control - Autism

Summary of the number of transcripts and genes differentially expressed in autism samples of different age groups vs. the same age control samples AND also different in the control age group vs. the fetal samples (“developmental”):

rsum_autism_control_fetal <- tribble( ~Counts, ~Child, ~Adult,
                               'Transcripts', 
                               length(devChildCA), 
                               length(devAdultCA), 
                               'Genes', 
                               length(devChildCAg),
                               length(devAdultCAg)
                               )
kable(rsum_autism_control_fetal, format = 'markdown')
Counts Child Adult
Transcripts 22 44
Genes 22 40

Venn diagram:

grid.draw(venn.diagram(list(Child=devChildCA, Adult=devAdultCA),
                       filename = NULL,
                       alpha = 0.5,
                       fill = c("cornflowerblue", "darkorchid1"),
                       cat.col = c("darkblue", "darkorchid4")
                       )
          )

QC

PCA

## Transform count data
intgroup = "grp"
rld <- tryCatch(rlog(dds), error = function(e) { rlog(dds, fitType = 'mean') })

## Perform PCA analysis and get percent of variance explained
data_pca <- plotPCA(rld, intgroup = intgroup, ntop = 1000, returnData = TRUE)
percentVar <- round(100 * attr(data_pca, "percentVar"))

## Make plot
data_pca %>%
ggplot(aes_string(x = "PC1", y = "PC2", color = "grp")) +
 geom_point(size = 3) +
 xlab(paste0("PC1: ", percentVar[1], "% variance")) +
 ylab(paste0("PC2: ", percentVar[2], "% variance")) +
 coord_fixed() +
 geom_text(aes(label=name), nudge_x = 1, hjust = 0, size = 3, check_overlap = FALSE)

The above plot shows the first two principal components that explain the variability in the data using the regularized log count data. If you are unfamiliar with principal component analysis, you might want to check the Wikipedia entry or this interactive explanation. In this case, the first and second principal component explain 12 and 7 percent of the variance respectively.

Sample-to-sample distances

## Obtain the sample euclidean distances
sampleDists <- dist(t(assay(rld)))
sampleDistMatrix <- as.matrix(sampleDists)
## Add names based on intgroup
rownames(sampleDistMatrix) <- rownames(colData(rld))
colnames(sampleDistMatrix) <- NULL

## Define colors to use for the heatmap if none were supplied
colors <- colorRampPalette( rev(brewer.pal(9, "Blues")) )(255)

## Make the heatmap
pheatmap(sampleDistMatrix, clustering_distance_rows = sampleDists, 
         clustering_distance_cols = sampleDists, color = colors)

This plot shows how samples are clustered based on their euclidean distance using the regularized log transformed count data. This figure gives an overview of how the samples are hierarchically clustered. It is a complementary figure to the PCA plot.

MA Plots

Control - Fetal

This section contains the MA plots (see Wikipedia) that compare the mean of the normalized counts against the log fold change. They show one point per feature. The points are shown in red if the feature has an adjusted p-value less than alpha, that is, the statistically significant features are shown in red.

ChildControl-Fetal
## MA plot with alpha used in DESeq2::results()
plotMA(resultsChild, alpha = 0.05, main = 'MA plot with alpha = 0.05')
abline(h=c(-1,1),col="dodgerblue",lwd=2)

This plot uses alpha = 0.05, which is the alpha value used to determine which resulting features were significant when running the function DESeq2::results().

AdultControl-Fetal
## MA plot with alpha used in DESeq2::results()
plotMA(resultsAdult, alpha = 0.05, main = 'MA plot with alpha = 0.05')
abline(h=c(-1,1),col="dodgerblue",lwd=2)

This plot uses alpha = 0.05, which is the alpha value used to determine which resulting features were significant when running the function DESeq2::results().

Autism - Fetal

This section contains the MA plots (see Wikipedia) that compare the mean of the normalized counts against the log fold change. They show one point per feature. The points are shown in red if the feature has an adjusted p-value less than alpha, that is, the statistically significant features are shown in red.

ChildAutism-Fetal
## MA plot with alpha used in DESeq2::results()
plotMA(resultsChildA, alpha = 0.05, main = 'MA plot with alpha = 0.05')
abline(h=c(-1,1),col="dodgerblue",lwd=2)

This plot uses alpha = 0.05, which is the alpha value used to determine which resulting features were significant when running the function DESeq2::results().

AdultAutism-Fetal
## MA plot with alpha used in DESeq2::results()
plotMA(resultsAdultA, alpha = 0.05, main = 'MA plot with alpha = 0.05')
abline(h=c(-1,1),col="dodgerblue",lwd=2)

This plot uses alpha = 0.05, which is the alpha value used to determine which resulting features were significant when running the function DESeq2::results().

Control - Autism

This section contains the MA plots (see Wikipedia) that compare the mean of the normalized counts against the log fold change. They show one point per feature. The points are shown in red if the feature has an adjusted p-value less than alpha, that is, the statistically significant features are shown in red.

Child
## MA plot with alpha used in DESeq2::results()
plotMA(resultsChildCA, alpha = 0.05, main = 'MA plot with alpha = 0.05')
abline(h=c(-1,1),col="dodgerblue",lwd=2)

This plot uses alpha = 0.05, which is the alpha value used to determine which resulting features were significant when running the function DESeq2::results().

Adult
## MA plot with alpha used in DESeq2::results()
plotMA(resultsAdultCA, alpha = 0.05, main = 'MA plot with alpha = 0.05')
abline(h=c(-1,1),col="dodgerblue",lwd=2)

This plot uses alpha = 0.05, which is the alpha value used to determine which resulting features were significant when running the function DESeq2::results().

P-values distributions

Control - Fetal

This plot shows a histogram of the unadjusted p-values. It might be skewed right or left, or flat as shown in the Wikipedia examples. The shape depends on the percent of features that are differentially expressed. For further information on how to interpret a histogram of p-values check David Robinson’s post on this topic.

ChildControl-Fetal
## P-value histogram plot
resultsChild %>% as.tibble() %>%
  filter(!is.na(pvalue)) %>%
  ggplot(aes(x = pvalue)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title='Histogram of unadjusted p-values') +
  xlab('Unadjusted p-values') +
  coord_cartesian(xlim=c(0, 1.0005), ylim=c(0,20000))

This is the numerical summary of the distribution of the p-values.

## P-value distribution summary
res <- resultsChild %>%
  as.tibble() %>%
  filter(!is.na(pvalue))
summary(res$pvalue)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.1305  0.5022  0.4522  0.7089  1.0000
AdultControl-Fetal
## P-value histogram plot
resultsAdult %>% as.tibble() %>%
  filter(!is.na(pvalue)) %>%
  ggplot(aes(x = pvalue)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title='Histogram of unadjusted p-values') +
  xlab('Unadjusted p-values') +
  coord_cartesian(xlim=c(0, 1.0005), ylim=c(0,20000))

This is the numerical summary of the distribution of the p-values.

## P-value distribution summary
res <- resultsAdult %>%
  as.tibble() %>%
  filter(!is.na(pvalue))
summary(res$pvalue)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.1024  0.4813  0.4386  0.7030  1.0000

Autism - Fetal

This plot shows a histogram of the unadjusted p-values. It might be skewed right or left, or flat as shown in the Wikipedia examples. The shape depends on the percent of features that are differentially expressed. For further information on how to interpret a histogram of p-values check David Robinson’s post on this topic.

ChildAutism-Fetal
## P-value histogram plot
resultsChildA %>% as.tibble() %>%
  filter(!is.na(pvalue)) %>%
  ggplot(aes(x = pvalue)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title='Histogram of unadjusted p-values') +
  xlab('Unadjusted p-values') +
  coord_cartesian(xlim=c(0, 1.0005), ylim=c(0,20000))

This is the numerical summary of the distribution of the p-values.

## P-value distribution summary
res <- resultsChildA %>%
  as.tibble() %>%
  filter(!is.na(pvalue))
summary(res$pvalue)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.1083  0.4934  0.4415  0.6958  1.0000
AdultAutism-Fetal
## P-value histogram plot
resultsAdultA %>% as.tibble() %>%
  filter(!is.na(pvalue)) %>%
  ggplot(aes(x = pvalue)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title='Histogram of unadjusted p-values') +
  xlab('Unadjusted p-values') +
  coord_cartesian(xlim=c(0, 1.0005), ylim=c(0,20000))

This is the numerical summary of the distribution of the p-values.

## P-value distribution summary
res <- resultsAdultA %>%
  as.tibble() %>%
  filter(!is.na(pvalue))
summary(res$pvalue)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.1054  0.4815  0.4398  0.7025  1.0000

Control - Autism

This plot shows a histogram of the unadjusted p-values. It might be skewed right or left, or flat as shown in the Wikipedia examples. The shape depends on the percent of features that are differentially expressed. For further information on how to interpret a histogram of p-values check David Robinson’s post on this topic.

Child
## P-value histogram plot
resultsChildCA %>% as.tibble() %>%
  filter(!is.na(pvalue)) %>%
  ggplot(aes(x = pvalue)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title='Histogram of unadjusted p-values') +
  xlab('Unadjusted p-values') +
  coord_cartesian(xlim=c(0, 1.0005), ylim=c(0,20000))

This is the numerical summary of the distribution of the p-values.

## P-value distribution summary
res <- resultsChildCA %>%
  as.tibble() %>%
  filter(!is.na(pvalue))
summary(res$pvalue)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.5233  0.7569  0.6924  0.9113  1.0000
Adult
## P-value histogram plot
resultsAdultCA %>% as.tibble() %>%
  filter(!is.na(pvalue)) %>%
  ggplot(aes(x = pvalue)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title='Histogram of unadjusted p-values') +
  xlab('Unadjusted p-values') +
  coord_cartesian(xlim=c(0, 1.0005), ylim=c(0,20000))

This is the numerical summary of the distribution of the p-values.

## P-value distribution summary
res <- resultsAdultCA %>%
  as.tibble() %>%
  filter(!is.na(pvalue))
summary(res$pvalue)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.5294  0.7607  0.6997  0.9210  1.0000

P-values cumulative sums

This table shows the number of features with p-values less or equal than some commonly used cutoff values.

Control - Fetal

ChildControl-Fetal
## Split features by different p-value cutoffs
pval_table <- resultsChild %>% 
  as.tibble() %>% 
  filter(!is.na(pvalue)) %>%
  mutate(Cut = as.numeric(
    as.character(
      cut(pvalue, include.lowest = TRUE, 
          breaks=c(0, 1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1),
          labels = c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1))))) %>%
  group_by(Cut) %>%
  summarise(nCut=n()) %>%
  mutate(Count=cumsum(nCut)) %>%
  dplyr::select(c('Cut', 'Count'))
  
# pval_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
#     0.6, 0.7, 0.8, 0.9, 1), function(x) {
#     data.frame('Cut' = x, 'Count' = sum(resultsChild$pvalue <= x, na.rm = TRUE))
# })
# pval_table <- do.call(rbind, pval_table)
if (outputIsHTML) {
    kable(pval_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(pval_table)
}
Cut Count
0.0001 7481
0.0010 10365
0.0100 15921
0.0250 19791
0.0500 24011
0.1000 30702
0.2000 40631
0.3000 49345
0.4000 58044
0.5000 67450
0.6000 84321
0.7000 100527
0.8000 112796
0.9000 124479
1.0000 135640
AdultControl-Fetal
## Split features by different p-value cutoffs
pval_table <- resultsAdult %>% 
  as.tibble() %>% 
  filter(!is.na(pvalue)) %>%
  mutate(Cut = as.numeric(
    as.character(
      cut(pvalue, include.lowest = TRUE, 
          breaks=c(0, 1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1),
          labels = c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1))))) %>%
  group_by(Cut) %>%
  summarise(nCut=n()) %>%
  mutate(Count=cumsum(nCut)) %>%
  dplyr::select(c('Cut', 'Count'))
  
# pval_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
#     0.6, 0.7, 0.8, 0.9, 1), function(x) {
#     data.frame('Cut' = x, 'Count' = sum(resultsAdult$pvalue <= x, na.rm = TRUE))
# })
# pval_table <- do.call(rbind, pval_table)
if(outputIsHTML) {
    kable(pval_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(pval_table)
}
Cut Count
0.0001 8447
0.0010 11763
0.0100 17926
0.0250 22142
0.0500 26746
0.1000 33640
0.2000 43757
0.3000 52507
0.4000 60773
0.5000 69608
0.6000 84381
0.7000 101200
0.8000 113968
0.9000 125172
1.0000 135640

Autism - Fetal

ChildAutism-Fetal
## Split features by different p-value cutoffs
pval_table <- resultsChildA %>% 
  as.tibble() %>% 
  filter(!is.na(pvalue)) %>%
  mutate(Cut = as.numeric(
    as.character(
      cut(pvalue, include.lowest = TRUE, 
          breaks=c(0, 1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1),
          labels = c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1))))) %>%
  group_by(Cut) %>%
  summarise(nCut=n()) %>%
  mutate(Count=cumsum(nCut)) %>%
  dplyr::select(c('Cut', 'Count'))
  
# pval_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
#     0.6, 0.7, 0.8, 0.9, 1), function(x) {
#     data.frame('Cut' = x, 'Count' = sum(resultsChild$pvalue <= x, na.rm = TRUE))
# })
# pval_table <- do.call(rbind, pval_table)
if(outputIsHTML) {
    kable(pval_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(pval_table)
}
Cut Count
0.0001 9004
0.0010 12251
0.0100 18180
0.0250 22312
0.0500 26710
0.1000 32980
0.2000 42850
0.3000 51276
0.4000 59454
0.5000 68513
0.6000 82434
0.7000 102391
0.8000 114580
0.9000 125681
1.0000 135640
AdultAutism-Fetal
## Split features by different p-value cutoffs
pval_table <- resultsAdultA %>% 
  as.tibble() %>% 
  filter(!is.na(pvalue)) %>%
  mutate(Cut = as.numeric(
    as.character(
      cut(pvalue, include.lowest = TRUE, 
          breaks=c(0, 1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1),
          labels = c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1))))) %>%
  group_by(Cut) %>%
  summarise(nCut=n()) %>%
  mutate(Count=cumsum(nCut)) %>%
  dplyr::select(c('Cut', 'Count'))
  
# pval_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
#     0.6, 0.7, 0.8, 0.9, 1), function(x) {
#     data.frame('Cut' = x, 'Count' = sum(resultsAdult$pvalue <= x, na.rm = TRUE))
# })
# pval_table <- do.call(rbind, pval_table)
if(outputIsHTML) {
    kable(pval_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(pval_table)
}
Cut Count
0.0001 8092
0.0010 11364
0.0100 17473
0.0250 21766
0.0500 26356
0.1000 33274
0.2000 43444
0.3000 52222
0.4000 60630
0.5000 69683
0.6000 84162
0.7000 101379
0.8000 113652
0.9000 125001
1.0000 135640

Control - Autism

Child
## Split features by different p-value cutoffs
pval_table <- resultsChildCA %>% 
  as.tibble() %>% 
  filter(!is.na(pvalue)) %>%
  mutate(Cut = as.numeric(
    as.character(
      cut(pvalue, include.lowest = TRUE, 
          breaks=c(0, 1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1),
          labels = c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1))))) %>%
  group_by(Cut) %>%
  summarise(nCut=n()) %>%
  mutate(Count=cumsum(nCut)) %>%
  dplyr::select(c('Cut', 'Count'))
  
# pval_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
#     0.6, 0.7, 0.8, 0.9, 1), function(x) {
#     data.frame('Cut' = x, 'Count' = sum(resultsChild$pvalue <= x, na.rm = TRUE))
# })
# pval_table <- do.call(rbind, pval_table)
if(outputIsHTML) {
    kable(pval_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(pval_table)
}
Cut Count
0.0001 52
0.0010 172
0.0100 623
0.0250 1211
0.0500 2055
0.1000 4029
0.2000 8077
0.3000 13371
0.4000 21268
0.5000 31255
0.6000 43498
0.7000 58250
0.8000 76015
0.9000 98196
1.0000 135640
Adult
## Split features by different p-value cutoffs
pval_table <- resultsAdultCA %>% 
  as.tibble() %>% 
  filter(!is.na(pvalue)) %>%
  mutate(Cut = as.numeric(
    as.character(
      cut(pvalue, include.lowest = TRUE, 
          breaks=c(0, 1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1),
          labels = c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1))))) %>%
  group_by(Cut) %>%
  summarise(nCut=n()) %>%
  mutate(Count=cumsum(nCut)) %>%
  dplyr::select(c('Cut', 'Count'))
  
# pval_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
#     0.6, 0.7, 0.8, 0.9, 1), function(x) {
#     data.frame('Cut' = x, 'Count' = sum(resultsAdult$pvalue <= x, na.rm = TRUE))
# })
# pval_table <- do.call(rbind, pval_table)
if(outputIsHTML) {
    kable(pval_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(pval_table)
}
Cut Count
0.0001 75
0.0010 206
0.0100 707
0.0250 1263
0.0500 2106
0.1000 4364
0.2000 8379
0.3000 13386
0.4000 20933
0.5000 30670
0.6000 42563
0.7000 57138
0.8000 75165
0.9000 97843
1.0000 135640

Adjusted p-values distributions

Control - Fetal

ChildControl-Fetal

This plot shows a histogram of the BH adjusted p-values. It might be skewed right or left, or flat as shown in the Wikipedia examples.

## Adjusted p-values histogram plot
hdescription <- elementMetadata(resultsChild) %>%
  as.tibble() %>%
  filter(grepl('adjusted',description)) %>%
  dplyr::select('description') %>%
  as.character()
resultsChild %>% 
  as.tibble() %>%
  filter(!is.na(padj)) %>% 
  ggplot(aes(x = padj)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title=paste('Histogram of',hdescription)) +
  xlab('Adjusted p-values') +
  xlim(c(0, 1.0005))

This is the numerical summary of the distribution of the BH adjusted p-values.

## Adjusted p-values distribution summary
res <- resultsChild %>%
  as.tibble() %>%
  filter(!is.na(padj))
summary(res$padj)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.1128  0.4641  0.4616  0.7879  1.0000
AdultControl-Fetal

This plot shows a histogram of the BH adjusted p-values. It might be skewed right or left, or flat as shown in the Wikipedia examples.

## Adjusted p-values histogram plot
hdescription <- elementMetadata(resultsAdult) %>%
  as.tibble() %>%
  filter(grepl('adjusted',description)) %>%
  dplyr::select('description') %>%
  as.character()
resultsAdult %>% 
  as.tibble() %>%
  filter(!is.na(padj)) %>% 
  ggplot(aes(x = padj)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title=paste('Histogram of',hdescription)) +
  xlab('Adjusted p-values') +
  xlim(c(0, 1.0005))

This is the numerical summary of the distribution of the BH adjusted p-values.

## Adjusted p-values distribution summary
res <- resultsAdult %>%
  as.tibble() %>%
  filter(!is.na(padj))
summary(res$padj)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
## 0.00000 0.08752 0.42321 0.43837 0.75748 1.00000

Autism - Fetal

ChildAutism-Fetal

This plot shows a histogram of the BH adjusted p-values. It might be skewed right or left, or flat as shown in the Wikipedia examples.

## Adjusted p-values histogram plot
hdescription <- elementMetadata(resultsChildA) %>%
  as.tibble() %>%
  filter(grepl('adjusted',description)) %>%
  dplyr::select('description') %>%
  as.character()
resultsChildA %>% 
  as.tibble() %>%
  filter(!is.na(padj)) %>% 
  ggplot(aes(x = padj)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title=paste('Histogram of',hdescription)) +
  xlab('Adjusted p-values') +
  xlim(c(0, 1.0005))

This is the numerical summary of the distribution of the BH adjusted p-values.

## Adjusted p-values distribution summary
res <- resultsChildA %>%
  as.tibble() %>%
  filter(!is.na(padj))
summary(res$padj)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.0670  0.3939  0.4240  0.7477  1.0000
AdultAutism-Fetal

This plot shows a histogram of the BH adjusted p-values. It might be skewed right or left, or flat as shown in the Wikipedia examples.

## Adjusted p-values histogram plot
hdescription <- elementMetadata(resultsAdultA) %>%
  as.tibble() %>%
  filter(grepl('adjusted',description)) %>%
  dplyr::select('description') %>%
  as.character()
resultsAdultA %>% 
  as.tibble() %>%
  filter(!is.na(padj)) %>% 
  ggplot(aes(x = padj)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title=paste('Histogram of',hdescription)) +
  xlab('Adjusted p-values') +
  xlim(c(0, 1.0005))

This is the numerical summary of the distribution of the BH adjusted p-values.

## Adjusted p-values distribution summary
res <- resultsAdultA %>%
  as.tibble() %>%
  filter(!is.na(padj))
summary(res$padj)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
## 0.00000 0.09385 0.42864 0.44133 0.75822 0.99999

Control - Autism

Child

This plot shows a histogram of the BH adjusted p-values. It might be skewed right or left, or flat as shown in the Wikipedia examples.

## Adjusted p-values histogram plot
hdescription <- elementMetadata(resultsChildCA) %>%
  as.tibble() %>%
  filter(grepl('adjusted',description)) %>%
  dplyr::select('description') %>%
  as.character()
resultsChildCA %>% 
  as.tibble() %>%
  filter(!is.na(padj)) %>% 
  ggplot(aes(x = padj)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title=paste('Histogram of',hdescription)) +
  xlab('Adjusted p-values') +
  coord_cartesian(xlim=c(0, 1.0005), ylim=c(0,1000))

This is the numerical summary of the distribution of the BH adjusted p-values.

## Adjusted p-values distribution summary
res <- resultsChildCA %>%
  as.tibble() %>%
  filter(!is.na(padj))
summary(res$padj)
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
## 0.002843 0.999994 0.999994 0.997075 0.999994 0.999997
Adult

This plot shows a histogram of the BH adjusted p-values. It might be skewed right or left, or flat as shown in the Wikipedia examples.

## Adjusted p-values histogram plot
hdescription <- elementMetadata(resultsAdultCA) %>%
  as.tibble() %>%
  filter(grepl('adjusted',description)) %>%
  dplyr::select('description') %>%
  as.character()
resultsAdultCA %>% 
  as.tibble() %>%
  filter(!is.na(padj)) %>% 
  ggplot(aes(x = padj)) +
  geom_histogram(alpha=.5, position='identity', bins = 50) +
  labs(title=paste('Histogram of',hdescription)) +
  xlab('Adjusted p-values') +
  coord_cartesian(xlim=c(0, 1.0005), ylim=c(0,1000))

This is the numerical summary of the distribution of the BH adjusted p-values.

## Adjusted p-values distribution summary
res <- resultsAdultCA %>%
  as.tibble() %>%
  filter(!is.na(padj))
summary(res$padj)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  1.0000  1.0000  0.9964  1.0000  1.0000

Adjusted p-values cummulative sums

Control - Fetal

ChildControl-Fetal

This table shows the number of features with BH adjusted p-values less or equal than some commonly used cutoff values.

## Split features by different adjusted p-value cutoffs
padj_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
    0.6, 0.7, 0.8, 0.9, 1), function(x) {
    data.frame('Cut' = x, 'Count' = sum(resultsChild$padj <= x, na.rm = TRUE))
})
padj_table <- do.call(rbind, padj_table)
if(outputIsHTML) {
    kable(padj_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(padj_table)
}
Cut Count
0.0001 5410
0.0010 7399
0.0100 10862
0.0250 13269
0.0500 15771
0.1000 19429
0.2000 25279
0.3000 31087
0.4000 36774
0.5000 42250
0.6000 48120
0.7000 54204
0.8000 61362
0.9000 69964
1.0000 80578
AdultControl-Fetal

This table shows the number of features with BH adjusted p-values less or equal than some commonly used cutoff values.

## Split features by different adjusted p-value cutoffs
padj_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
    0.6, 0.7, 0.8, 0.9, 1), function(x) {
    data.frame('Cut' = x, 'Count' = sum(resultsAdult$padj <= x, na.rm = TRUE))
})
padj_table <- do.call(rbind, padj_table)
if(outputIsHTML) {
    kable(padj_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(padj_table)
}
Cut Count
0.0001 6291
0.0010 8440
0.0100 12557
0.0250 15253
0.0500 18114
0.1000 22228
0.2000 28785
0.3000 34956
0.4000 41211
0.5000 47279
0.6000 53584
0.7000 59889
0.8000 67217
0.9000 75578
1.0000 85353

Autism - Fetal

ChildAutism-Fetal

This table shows the number of features with BH adjusted p-values less or equal than some commonly used cutoff values.

## Split features by different adjusted p-value cutoffs
padj_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
    0.6, 0.7, 0.8, 0.9, 1), function(x) {
    data.frame('Cut' = x, 'Count' = sum(resultsChildA$padj <= x, na.rm = TRUE))
})
padj_table <- do.call(rbind, padj_table)
if(outputIsHTML) {
    kable(padj_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(padj_table)
}
Cut Count
0.0001 6871
0.0010 9158
0.0100 13218
0.0250 15836
0.0500 18625
0.1000 22739
0.2000 29085
0.3000 34914
0.4000 40576
0.5000 45947
0.6000 51369
0.7000 57443
0.8000 63988
0.9000 71534
1.0000 80578
AdultAutism-Fetal

This table shows the number of features with BH adjusted p-values less or equal than some commonly used cutoff values.

## Split features by different adjusted p-value cutoffs
padj_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
    0.6, 0.7, 0.8, 0.9, 1), function(x) {
    data.frame('Cut' = x, 'Count' = sum(resultsAdultA$padj <= x, na.rm = TRUE))
})
padj_table <- do.call(rbind, padj_table)
if(outputIsHTML) {
    kable(padj_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(padj_table)
}
Cut Count
0.0001 5907
0.0010 8020
0.0100 12033
0.0250 14625
0.0500 17555
0.1000 21789
0.2000 28340
0.3000 34531
0.4000 41018
0.5000 47124
0.6000 53407
0.7000 59945
0.8000 67171
0.9000 75321
1.0000 85353

Control - Autism

Child

This table shows the number of features with BH adjusted p-values less or equal than some commonly used cutoff values.

## Split features by different adjusted p-value cutoffs
padj_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
    0.6, 0.7, 0.8, 0.9, 1), function(x) {
    data.frame('Cut' = x, 'Count' = sum(resultsChildCA$padj <= x, na.rm = TRUE))
})
padj_table <- do.call(rbind, padj_table)
if(outputIsHTML) {
    kable(padj_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(padj_table)
}
Cut Count
0.0001 0
0.0010 0
0.0100 10
0.0250 23
0.0500 32
0.1000 40
0.2000 86
0.3000 105
0.4000 166
0.5000 182
0.6000 229
0.7000 290
0.8000 326
0.9000 388
1.0000 71079
Adult

This table shows the number of features with BH adjusted p-values less or equal than some commonly used cutoff values.

## Split features by different adjusted p-value cutoffs
padj_table <- lapply(c(1e-04, 0.001, 0.01, 0.025, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5,
    0.6, 0.7, 0.8, 0.9, 1), function(x) {
    data.frame('Cut' = x, 'Count' = sum(resultsAdultCA$padj <= x, na.rm = TRUE))
})
padj_table <- do.call(rbind, padj_table)
if(outputIsHTML) {
    kable(padj_table, format = 'markdown', align = c('c', 'c'))
} else {
    kable(padj_table)
}
Cut Count
0.0001 3
0.0010 3
0.0100 17
0.0250 32
0.0500 54
0.1000 75
0.2000 105
0.3000 145
0.4000 210
0.5000 260
0.6000 320
0.7000 376
0.8000 464
0.9000 524
1.0000 78193

Volcano plots

Control - Fetal

ChildControl - Fetal

resultsChild %>%
  as.tibble()  %>%
  rownames_to_column(var='target_id') %>%
  mutate(sig=ifelse(target_id %in% signifChild[['target_id']], "FDR<0.05", "Not Sig")) %>%
  left_join(ttg, by = 'target_id') %>% 
  ggplot(aes(log2FoldChange, -log10(padj))) + 
  geom_point(aes(col=sig)) + 
  scale_color_manual(values=c("red", "black"))

#  coord_cartesian(ylim=c(0,100))

AdultControl - Fetal

resultsAdult %>%
  as.tibble()  %>%
  rownames_to_column(var='target_id') %>%
  mutate(sig=ifelse(target_id %in% signifAdult[['target_id']], "FDR<0.05", "Not Sig")) %>%
  left_join(ttg, by = 'target_id') %>% 
  ggplot(aes(log2FoldChange, -log10(padj))) + 
  geom_point(aes(col=sig)) + 
  scale_color_manual(values=c("red", "black"))

  #coord_cartesian(ylim=c(0,100))

Autism - Fetal

ChildAutism - Fetal

resultsChildA %>%
  as.tibble()  %>%
  rownames_to_column(var='target_id') %>%
  mutate(sig=ifelse(target_id %in% signifChildA[['target_id']], "FDR<0.05", "Not Sig")) %>%
  left_join(ttg, by = 'target_id') %>% 
  ggplot(aes(log2FoldChange, -log10(padj))) + 
  geom_point(aes(col=sig)) + 
  scale_color_manual(values=c("red", "black"))

#  coord_cartesian(ylim=c(0,100))

AdultAutism - Fetal

resultsAdultA %>%
  as.tibble()  %>%
  rownames_to_column(var='target_id') %>%
  mutate(sig=ifelse(target_id %in% signifAdultA[['target_id']], "FDR<0.05", "Not Sig")) %>%
  left_join(ttg, by = 'target_id') %>% 
  ggplot(aes(log2FoldChange, -log10(padj))) + 
  geom_point(aes(col=sig)) + 
  scale_color_manual(values=c("red", "black"))

#  coord_cartesian(ylim=c(0,100))

Control - Autism

Child

r1 <- resultsChildCA %>%
  as.tibble()  %>%
  rownames_to_column(var='target_id') %>%
  mutate(sig=ifelse(target_id %in% signifChildCA[['target_id']], "FDR<0.05", "Not Sig")) %>%
  left_join(ttg, by = 'target_id')
r1 %>% ggplot(aes(log2FoldChange, -log10(padj))) + 
  geom_point(aes(col=sig)) + 
  scale_color_manual(values=c("red", "black")) +
#  coord_cartesian(ylim=c(0,10)) + 
  geom_text_repel(data=filter(r1, sig=='FDR<0.05'), aes(label=symbol))

Adult

r1 <- resultsAdultCA %>%
  as.tibble()  %>%
  rownames_to_column(var='target_id') %>%
  mutate(sig=ifelse(target_id %in% signifAdultCA[['target_id']], "FDR<0.05", "Not Sig")) %>%
  left_join(ttg, by = 'target_id')
r1 %>% ggplot(aes(log2FoldChange, -log10(padj))) + 
  geom_point(aes(col=sig)) + 
  scale_color_manual(values=c("red", "black")) +
#  coord_cartesian(ylim=c(0,10)) + 
  geom_text_repel(data=filter(r1, sig=='FDR<0.05'), aes(label=symbol))

Gene lists

Control - Fetal

ChildControl - Fetal

This table shows the 50 most significant genes (out of 10248) differentially expressed between control child samples and fetal samples.

genes_control_fetal_child <- signifChild %>%
  mutate(gene = text_spec(symbol, link = paste0('http://www.genecards.org/cgi-bin/carddisp.pl?gene=', symbol)),
         transcript = target_id) %>%
  dplyr::select(c('gene', 'transcript', 'log2FoldChange', 'padj', 'description', 'status', 'molecule_type')) %>%
  head(n = 50)
genes_control_fetal_child %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), font_size = 6)
gene transcript log2FoldChange padj description status molecule_type
SOX11 NM_003108.3 -7.349298 0 SRY-box 11 (SOX11) REVIEWED mRNA
GPC2 NM_152742.2 -5.831508 0 glypican 2 (GPC2) VALIDATED mRNA
MEX3A NM_001093725.1 -6.223953 0 mex-3 RNA binding family member A (MEX3A) VALIDATED mRNA
LMNB1 NM_005573.3 -5.958816 0 lamin B1 (LMNB1), transcript variant 1 REVIEWED mRNA
KIF11 NM_004523.3 -5.032577 0 kinesin family member 11 (KIF11) REVIEWED mRNA
SOX4 NM_003107.2 -5.728428 0 SRY-box 4 (SOX4) REVIEWED mRNA
TMSB15A NM_021992.2 -7.651072 0 thymosin beta 15a (TMSB15A) VALIDATED mRNA
GPR37L1 XM_011510158.2 6.780194 0 PREDICTED: Homo sapiens G protein-coupled receptor 37 like 1 (GPR37L1), transcript variant X1 MODEL mRNA
LMNB1 NM_001198557.1 -6.272657 0 lamin B1 (LMNB1), transcript variant 2 REVIEWED mRNA
IGIP NM_001007189.1 3.815222 0 IgA inducing protein (IGIP) VALIDATED mRNA
MIR4461 NR_039666.1 14.481799 0 microRNA 4461 (MIR4461) PROVISIONAL microRNA
OMG NM_002544.4 7.157673 0 oligodendrocyte myelin glycoprotein (OMG) VALIDATED mRNA
DCHS1 NM_003737.3 -3.096174 0 dachsous cadherin-related 1 (DCHS1) REVIEWED mRNA
SMC4 XM_011512312.2 -4.617128 0 PREDICTED: Homo sapiens structural maintenance of chromosomes 4 (SMC4), transcript variant X2 MODEL mRNA
KNL1 XM_017022432.1 -5.821282 0 PREDICTED: Homo sapiens cancer susceptibility candidate 5 (CASC5), transcript variant X1 MODEL mRNA
SPC25 NM_020675.3 -4.735962 0 SPC25, NDC80 kinetochore complex component (SPC25) REVIEWED mRNA
CDK1 NM_001786.4 -7.459224 0 cyclin dependent kinase 1 (CDK1), transcript variant 1 REVIEWED mRNA
BCL2L2 NM_001199839.1 2.422108 0 BCL2 like 2 (BCL2L2), transcript variant 2 REVIEWED mRNA
FGF1 NM_001257207.1 12.100679 0 fibroblast growth factor 1 (FGF1), transcript variant 9 REVIEWED mRNA
PTGDS NM_000954.5 12.971226 0 prostaglandin D2 synthase (PTGDS) REVIEWED mRNA
ASPM NM_018136.4 -8.973773 0 abnormal spindle microtubule assembly (ASPM), transcript variant 1 REVIEWED mRNA
ZBTB47 NM_145166.3 3.472201 0 zinc finger and BTB domain containing 47 (ZBTB47) VALIDATED mRNA
TPPP XM_005248237.3 11.459962 0 PREDICTED: Homo sapiens tubulin polymerization promoting protein (TPPP), transcript variant X3 MODEL mRNA
ZBED4 NM_014838.2 -2.546023 0 zinc finger BED-type containing 4 (ZBED4) VALIDATED mRNA
PLEKHB1 NM_001130035.1 6.346620 0 pleckstrin homology domain containing B1 (PLEKHB1), transcript variant 4 VALIDATED mRNA
GPR37L1 NM_004767.3 7.914347 0 G protein-coupled receptor 37 like 1 (GPR37L1) VALIDATED mRNA
LGI3 NM_139278.2 11.287657 0 leucine rich repeat LGI family member 3 (LGI3) VALIDATED mRNA
TPPP NM_007030.2 6.520413 0 tubulin polymerization promoting protein (TPPP) VALIDATED mRNA
CCNB2 NM_004701.3 -7.578472 0 cyclin B2 (CCNB2) REVIEWED mRNA
UBL3 NM_007106.3 2.274132 0 ubiquitin like 3 (UBL3) VALIDATED mRNA
ERMN NM_020711.2 13.664215 0 ermin (ERMN), transcript variant 2 VALIDATED mRNA
NDC80 NM_006101.2 -7.807808 0 NDC80, kinetochore complex component (NDC80) VALIDATED mRNA
S100A1 NM_006271.1 8.145612 0 S100 calcium binding protein A1 (S100A1) REVIEWED mRNA
HMGB3 NM_005342.3 -3.375052 0 high mobility group box 3 (HMGB3), transcript variant 2 REVIEWED mRNA
MBP XR_001753201.1 12.638850 0 PREDICTED: Homo sapiens myelin basic protein (MBP), transcript variant X2 MODEL misc_RNA
HNRNPA0 NM_006805.3 -2.152540 0 heterogeneous nuclear ribonucleoprotein A0 (HNRNPA0) REVIEWED mRNA
LMNB2 NM_032737.3 -2.651268 0 lamin B2 (LMNB2) REVIEWED mRNA
NUSAP1 XM_005254430.4 -9.572857 0 PREDICTED: Homo sapiens nucleolar and spindle associated protein 1 (NUSAP1), transcript variant X5 MODEL mRNA
RRM2 NM_001034.3 -6.321821 0 ribonucleotide reductase regulatory subunit M2 (RRM2), transcript variant 2 REVIEWED mRNA
ZNF365 NM_014951.2 6.429411 0 zinc finger protein 365 (ZNF365), transcript variant A REVIEWED mRNA
SPOCK3 XM_017008257.1 10.848761 0 PREDICTED: Homo sapiens sparc/osteonectin, cwcv and kazal-like domains proteoglycan (testican) 3 (SPOCK3), transcript variant X1 MODEL mRNA
PRNP NM_001080123.2 4.128392 0 prion protein (PRNP), transcript variant 5 REVIEWED mRNA
NIPAL3 NM_020448.4 11.523699 0 NIPA like domain containing 3 (NIPAL3), transcript variant 1 VALIDATED mRNA
KIAA0930 NM_015264.1 10.790854 0 KIAA0930 (KIAA0930), transcript variant 1 VALIDATED mRNA
ESCO2 NM_001017420.2 -6.652677 0 establishment of sister chromatid cohesion N-acetyltransferase 2 (ESCO2) REVIEWED mRNA
ENDOD1 NM_015036.2 5.798479 0 endonuclease domain containing 1 (ENDOD1) VALIDATED mRNA
TACC3 NM_006342.2 -4.637760 0 transforming acidic coiled-coil containing protein 3 (TACC3) REVIEWED mRNA
H1F0 NM_005318.3 -2.744947 0 H1 histone family member 0 (H1F0) REVIEWED mRNA
ALDH1A1 NM_000689.4 10.679490 0 aldehyde dehydrogenase 1 family member A1 (ALDH1A1) REVIEWED mRNA
LDLRAD4 NM_001003674.3 8.798093 0 low density lipoprotein receptor class A domain containing 4 (LDLRAD4), transcript variant c1 VALIDATED mRNA

AdultControl - Fetal

This table shows the 50 most significant genes (out of 11265) differentially expressed between control adult samples and fetal samples.

genes_control_fetal_adult <- signifAdult %>%
  mutate(gene = text_spec(symbol, link = paste0('http://www.genecards.org/cgi-bin/carddisp.pl?gene=', symbol)),
         transcript = target_id) %>%
  dplyr::select(c('gene', 'transcript', 'log2FoldChange', 'padj', 'description', 'status', 'molecule_type')) %>%
  head(n = 50)
genes_control_fetal_adult %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), font_size = 6)
gene transcript log2FoldChange padj description status molecule_type
SOX11 NM_003108.3 -8.097169 0 SRY-box 11 (SOX11) REVIEWED mRNA
MEX3A NM_001093725.1 -6.578792 0 mex-3 RNA binding family member A (MEX3A) VALIDATED mRNA
SOX4 NM_003107.2 -6.728145 0 SRY-box 4 (SOX4) REVIEWED mRNA
GPC2 NM_152742.2 -5.070847 0 glypican 2 (GPC2) VALIDATED mRNA
LMNB1 NM_005573.3 -6.490096 0 lamin B1 (LMNB1), transcript variant 1 REVIEWED mRNA
KIF11 NM_004523.3 -4.945373 0 kinesin family member 11 (KIF11) REVIEWED mRNA
DCHS1 NM_003737.3 -3.864829 0 dachsous cadherin-related 1 (DCHS1) REVIEWED mRNA
GPR37L1 XM_011510158.2 6.460557 0 PREDICTED: Homo sapiens G protein-coupled receptor 37 like 1 (GPR37L1), transcript variant X1 MODEL mRNA
LMNB1 NM_001198557.1 -6.686956 0 lamin B1 (LMNB1), transcript variant 2 REVIEWED mRNA
OMG NM_002544.4 7.999721 0 oligodendrocyte myelin glycoprotein (OMG) VALIDATED mRNA
IGIP NM_001007189.1 4.091410 0 IgA inducing protein (IGIP) VALIDATED mRNA
TMSB15A NM_021992.2 -8.533119 0 thymosin beta 15a (TMSB15A) VALIDATED mRNA
SMC4 XM_011512312.2 -5.011910 0 PREDICTED: Homo sapiens structural maintenance of chromosomes 4 (SMC4), transcript variant X2 MODEL mRNA
HMGB3 NM_005342.3 -4.076148 0 high mobility group box 3 (HMGB3), transcript variant 2 REVIEWED mRNA
HNRNPA0 NM_006805.3 -2.569509 0 heterogeneous nuclear ribonucleoprotein A0 (HNRNPA0) REVIEWED mRNA
UBL3 NM_007106.3 2.625024 0 ubiquitin like 3 (UBL3) VALIDATED mRNA
ENDOD1 NM_015036.2 7.089989 0 endonuclease domain containing 1 (ENDOD1) VALIDATED mRNA
BCL2L2 NM_001199839.1 2.552130 0 BCL2 like 2 (BCL2L2), transcript variant 2 REVIEWED mRNA
S100A1 NM_006271.1 9.358662 0 S100 calcium binding protein A1 (S100A1) REVIEWED mRNA
FGF1 NM_001257207.1 12.592264 0 fibroblast growth factor 1 (FGF1), transcript variant 9 REVIEWED mRNA
PLEKHB1 NM_001130035.1 6.910400 0 pleckstrin homology domain containing B1 (PLEKHB1), transcript variant 4 VALIDATED mRNA
TPPP NM_007030.2 7.137853 0 tubulin polymerization promoting protein (TPPP) VALIDATED mRNA
PTGDS NM_000954.5 13.303835 0 prostaglandin D2 synthase (PTGDS) REVIEWED mRNA
SPOCK3 XM_017008257.1 12.397706 0 PREDICTED: Homo sapiens sparc/osteonectin, cwcv and kazal-like domains proteoglycan (testican) 3 (SPOCK3), transcript variant X1 MODEL mRNA
DBN1 NM_004395.3 -4.630562 0 drebrin 1 (DBN1), transcript variant 1 REVIEWED mRNA
ERMN NM_020711.2 14.938566 0 ermin (ERMN), transcript variant 2 VALIDATED mRNA
MBP XR_001753201.1 13.972643 0 PREDICTED: Homo sapiens myelin basic protein (MBP), transcript variant X2 MODEL misc_RNA
LGI3 NM_139278.2 12.050597 0 leucine rich repeat LGI family member 3 (LGI3) VALIDATED mRNA
LMNB2 NM_032737.3 -2.961563 0 lamin B2 (LMNB2) REVIEWED mRNA
KNL1 XM_017022432.1 -5.541103 0 PREDICTED: Homo sapiens cancer susceptibility candidate 5 (CASC5), transcript variant X1 MODEL mRNA
ASPM NM_018136.4 -8.236651 0 abnormal spindle microtubule assembly (ASPM), transcript variant 1 REVIEWED mRNA
MIR4461 NR_039666.1 13.373719 0 microRNA 4461 (MIR4461) PROVISIONAL microRNA
TF NM_001063.3 11.151690 0 transferrin (TF) REVIEWED mRNA
CDK1 NM_001786.4 -7.247968 0 cyclin dependent kinase 1 (CDK1), transcript variant 1 REVIEWED mRNA
GPR37L1 NM_004767.3 8.065756 0 G protein-coupled receptor 37 like 1 (GPR37L1) VALIDATED mRNA
LDLRAD4 NM_001003674.3 9.785637 0 low density lipoprotein receptor class A domain containing 4 (LDLRAD4), transcript variant c1 VALIDATED mRNA
ZBTB47 NM_145166.3 3.373056 0 zinc finger and BTB domain containing 47 (ZBTB47) VALIDATED mRNA
TPPP XM_005248237.3 11.351597 0 PREDICTED: Homo sapiens tubulin polymerization promoting protein (TPPP), transcript variant X3 MODEL mRNA
MOBP NR_003090.2 11.274860 0 myelin-associated oligodendrocyte basic protein (MOBP), transcript variant 4 VALIDATED non-coding RNA
KIAA0930 NM_015264.1 11.619154 0 KIAA0930 (KIAA0930), transcript variant 1 VALIDATED mRNA
ENPP4 NM_014936.4 5.494009 0 ectonucleotide pyrophosphatase/phosphodiesterase 4 (putative) (ENPP4) VALIDATED mRNA
TACC3 NM_006342.2 -5.529844 0 transforming acidic coiled-coil containing protein 3 (TACC3) REVIEWED mRNA
RRM2 NM_001034.3 -7.069335 0 ribonucleotide reductase regulatory subunit M2 (RRM2), transcript variant 2 REVIEWED mRNA
ZNF365 NM_014951.2 6.712768 0 zinc finger protein 365 (ZNF365), transcript variant A REVIEWED mRNA
NONO NM_007363.4 -2.181021 0 non-POU domain containing octamer binding (NONO), transcript variant 2 REVIEWED mRNA
H1F0 NM_005318.3 -2.948282 0 H1 histone family member 0 (H1F0) REVIEWED mRNA
NIPAL3 NM_020448.4 12.074509 0 NIPA like domain containing 3 (NIPAL3), transcript variant 1 VALIDATED mRNA
CNP NM_033133.4 6.946693 0 2’,3’-cyclic nucleotide 3’ phosphodiesterase (CNP), transcript variant 1 VALIDATED mRNA
DESI1 NM_015704.2 1.891739 0 desumoylating isopeptidase 1 (DESI1) VALIDATED mRNA
LOC105379481 XR_951069.2 12.748886 0 PREDICTED: Homo sapiens uncharacterized LOC105379481 (LOC105379481) MODEL ncRNA

Autism - Fetal

ChildAutism - Fetal

This table shows the 50 most significant genes (out of 11626) differentially expressed between autism child samples and fetal samples.

genes_autism_fetal_child <- signifChildA %>%
  mutate(gene = text_spec(symbol, link = paste0('http://www.genecards.org/cgi-bin/carddisp.pl?gene=', symbol)),
         transcript = target_id) %>%
  dplyr::select(c('gene', 'transcript', 'log2FoldChange', 'padj', 'description', 'status', 'molecule_type')) %>%
  head(n = 50)
genes_autism_fetal_child %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), font_size = 6)
gene transcript log2FoldChange padj description status molecule_type
SOX11 NM_003108.3 -6.801260 0 SRY-box 11 (SOX11) REVIEWED mRNA
GPC2 NM_152742.2 -5.918823 0 glypican 2 (GPC2) VALIDATED mRNA
MEX3A NM_001093725.1 -6.194712 0 mex-3 RNA binding family member A (MEX3A) VALIDATED mRNA
LMNB1 NM_005573.3 -6.235398 0 lamin B1 (LMNB1), transcript variant 1 REVIEWED mRNA
KIF11 NM_004523.3 -5.564826 0 kinesin family member 11 (KIF11) REVIEWED mRNA
SOX4 NM_003107.2 -5.559113 0 SRY-box 4 (SOX4) REVIEWED mRNA
GPR37L1 XM_011510158.2 6.953017 0 PREDICTED: Homo sapiens G protein-coupled receptor 37 like 1 (GPR37L1), transcript variant X1 MODEL mRNA
TMSB15A NM_021992.2 -7.984293 0 thymosin beta 15a (TMSB15A) VALIDATED mRNA
DCHS1 NM_003737.3 -3.592684 0 dachsous cadherin-related 1 (DCHS1) REVIEWED mRNA
SMC4 XM_011512312.2 -5.333317 0 PREDICTED: Homo sapiens structural maintenance of chromosomes 4 (SMC4), transcript variant X2 MODEL mRNA
LMNB1 NM_001198557.1 -6.112901 0 lamin B1 (LMNB1), transcript variant 2 REVIEWED mRNA
IGIP NM_001007189.1 3.858878 0 IgA inducing protein (IGIP) VALIDATED mRNA
OMG NM_002544.4 7.287363 0 oligodendrocyte myelin glycoprotein (OMG) VALIDATED mRNA
MIR4461 NR_039666.1 14.513115 0 microRNA 4461 (MIR4461) PROVISIONAL microRNA
KNL1 XM_017022432.1 -6.290562 0 PREDICTED: Homo sapiens cancer susceptibility candidate 5 (CASC5), transcript variant X1 MODEL mRNA
BCL2L2 NM_001199839.1 2.455968 0 BCL2 like 2 (BCL2L2), transcript variant 2 REVIEWED mRNA
NUSAP1 XM_005254430.4 -7.859581 0 PREDICTED: Homo sapiens nucleolar and spindle associated protein 1 (NUSAP1), transcript variant X5 MODEL mRNA
SPC25 NM_020675.3 -5.147332 0 SPC25, NDC80 kinetochore complex component (SPC25) REVIEWED mRNA
QSER1 NM_001076786.2 -3.338748 0 glutamine and serine rich 1 (QSER1) VALIDATED mRNA
ZBED4 NM_014838.2 -2.644819 0 zinc finger BED-type containing 4 (ZBED4) VALIDATED mRNA
FOXO3B NR_026718.1 -3.683149 0 forkhead box O3B pseudogene (FOXO3B) PROVISIONAL non-coding RNA
CDK1 NM_001786.4 -7.560371 0 cyclin dependent kinase 1 (CDK1), transcript variant 1 REVIEWED mRNA
ZBTB47 NM_145166.3 3.445832 0 zinc finger and BTB domain containing 47 (ZBTB47) VALIDATED mRNA
ELAVL2 NM_001351477.1 -8.889964 0 ELAV like RNA binding protein 2 (ELAVL2), transcript variant 26 REVIEWED mRNA
S100A1 NM_006271.1 8.807386 0 S100 calcium binding protein A1 (S100A1) REVIEWED mRNA
PLEKHB1 NM_001130035.1 6.239793 0 pleckstrin homology domain containing B1 (PLEKHB1), transcript variant 4 VALIDATED mRNA
HNRNPA0 NM_006805.3 -2.194815 0 heterogeneous nuclear ribonucleoprotein A0 (HNRNPA0) REVIEWED mRNA
ASPM NM_018136.4 -9.287765 0 abnormal spindle microtubule assembly (ASPM), transcript variant 1 REVIEWED mRNA
ATP1B1 NM_001677.3 4.446844 0 ATPase Na+/K+ transporting subunit beta 1 (ATP1B1) REVIEWED mRNA
PTGDS NM_000954.5 12.567492 0 prostaglandin D2 synthase (PTGDS) REVIEWED mRNA
RRM2 NM_001034.3 -6.725265 0 ribonucleotide reductase regulatory subunit M2 (RRM2), transcript variant 2 REVIEWED mRNA
GPR37L1 NM_004767.3 8.043598 0 G protein-coupled receptor 37 like 1 (GPR37L1) VALIDATED mRNA
ZNF365 NM_014951.2 6.661035 0 zinc finger protein 365 (ZNF365), transcript variant A REVIEWED mRNA
HNRNPA1 NM_002136.3 -2.532387 0 heterogeneous nuclear ribonucleoprotein A1 (HNRNPA1), transcript variant 1 REVIEWED mRNA
CCNB2 NM_004701.3 -6.754708 0 cyclin B2 (CCNB2) REVIEWED mRNA
TPPP NM_007030.2 6.225312 0 tubulin polymerization promoting protein (TPPP) VALIDATED mRNA
PINK1 NM_032409.2 3.107355 0 PTEN induced putative kinase 1 (PINK1) REVIEWED mRNA
EOMES NM_001278183.1 -10.635396 0 eomesodermin (EOMES), transcript variant 3 REVIEWED mRNA
FGF1 NM_001257207.1 11.471307 0 fibroblast growth factor 1 (FGF1), transcript variant 9 REVIEWED mRNA
PEBP1 NM_002567.3 2.431571 0 phosphatidylethanolamine binding protein 1 (PEBP1) REVIEWED mRNA
LGI3 NM_139278.2 11.319490 0 leucine rich repeat LGI family member 3 (LGI3) VALIDATED mRNA
TACC3 NM_006342.2 -4.877290 0 transforming acidic coiled-coil containing protein 3 (TACC3) REVIEWED mRNA
PRNP NM_001080123.2 4.106136 0 prion protein (PRNP), transcript variant 5 REVIEWED mRNA
H1F0 NM_005318.3 -2.783194 0 H1 histone family member 0 (H1F0) REVIEWED mRNA
NDC80 NM_006101.2 -7.569346 0 NDC80, kinetochore complex component (NDC80) VALIDATED mRNA
LMNB2 NM_032737.3 -2.533771 0 lamin B2 (LMNB2) REVIEWED mRNA
SPOCK3 XM_017008257.1 11.274727 0 PREDICTED: Homo sapiens sparc/osteonectin, cwcv and kazal-like domains proteoglycan (testican) 3 (SPOCK3), transcript variant X1 MODEL mRNA
ERMN NM_020711.2 13.266357 0 ermin (ERMN), transcript variant 2 VALIDATED mRNA
TF NM_001063.3 9.623189 0 transferrin (TF) REVIEWED mRNA
HCN2 NM_001194.3 7.676608 0 hyperpolarization activated cyclic nucleotide gated potassium and sodium channel 2 (HCN2) REVIEWED mRNA

AdultAutism - Fetal

This table shows the 50 most significant genes (out of 11089) differentially expressed between autism adult samples and fetal samples.

genes_autism_fetal_adult <- signifAdultA %>%
  mutate(gene = text_spec(symbol, link = paste0('http://www.genecards.org/cgi-bin/carddisp.pl?gene=', symbol)),
         transcript = target_id) %>%
  dplyr::select(c('gene', 'transcript', 'log2FoldChange', 'padj', 'description', 'status', 'molecule_type')) %>%
  head(n = 50)
genes_autism_fetal_adult %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), font_size = 6)
gene transcript log2FoldChange padj description status molecule_type
SOX11 NM_003108.3 -7.268496 0 SRY-box 11 (SOX11) REVIEWED mRNA
MEX3A NM_001093725.1 -6.540832 0 mex-3 RNA binding family member A (MEX3A) VALIDATED mRNA
SOX4 NM_003107.2 -6.706596 0 SRY-box 4 (SOX4) REVIEWED mRNA
GPC2 NM_152742.2 -5.405610 0 glypican 2 (GPC2) VALIDATED mRNA
LMNB1 NM_005573.3 -6.387707 0 lamin B1 (LMNB1), transcript variant 1 REVIEWED mRNA
KIF11 NM_004523.3 -5.135591 0 kinesin family member 11 (KIF11) REVIEWED mRNA
SNORA109 NR_132964.1 14.999271 0 small nucleolar RNA, H/ACA box 109 (SNORA109) VALIDATED small nucleolar RNA
GPR37L1 XM_011510158.2 6.418046 0 PREDICTED: Homo sapiens G protein-coupled receptor 37 like 1 (GPR37L1), transcript variant X1 MODEL mRNA
LMNB1 NM_001198557.1 -6.591551 0 lamin B1 (LMNB1), transcript variant 2 REVIEWED mRNA
IGIP NM_001007189.1 4.085882 0 IgA inducing protein (IGIP) VALIDATED mRNA
SMC4 XM_011512312.2 -5.262400 0 PREDICTED: Homo sapiens structural maintenance of chromosomes 4 (SMC4), transcript variant X2 MODEL mRNA
DCHS1 NM_003737.3 -3.399609 0 dachsous cadherin-related 1 (DCHS1) REVIEWED mRNA
HNRNPA0 NM_006805.3 -2.701007 0 heterogeneous nuclear ribonucleoprotein A0 (HNRNPA0) REVIEWED mRNA
OMG NM_002544.4 7.561685 0 oligodendrocyte myelin glycoprotein (OMG) VALIDATED mRNA
HMGB3 NM_005342.3 -4.084812 0 high mobility group box 3 (HMGB3), transcript variant 2 REVIEWED mRNA
S100A1 NM_006271.1 9.010194 0 S100 calcium binding protein A1 (S100A1) REVIEWED mRNA
TPPP NM_007030.2 7.041179 0 tubulin polymerization promoting protein (TPPP) VALIDATED mRNA
PTGDS NM_000954.5 13.046271 0 prostaglandin D2 synthase (PTGDS) REVIEWED mRNA
TMSB15A NM_021992.2 -9.533347 0 thymosin beta 15a (TMSB15A) VALIDATED mRNA
PLEKHB1 NM_001130035.1 6.712008 0 pleckstrin homology domain containing B1 (PLEKHB1), transcript variant 4 VALIDATED mRNA
BCL2L2 NM_001199839.1 2.409943 0 BCL2 like 2 (BCL2L2), transcript variant 2 REVIEWED mRNA
MIR4461 NR_039666.1 13.390095 0 microRNA 4461 (MIR4461) PROVISIONAL microRNA
ASPM NM_018136.4 -8.307580 0 abnormal spindle microtubule assembly (ASPM), transcript variant 1 REVIEWED mRNA
SPOCK3 XM_017008257.1 12.103434 0 PREDICTED: Homo sapiens sparc/osteonectin, cwcv and kazal-like domains proteoglycan (testican) 3 (SPOCK3), transcript variant X1 MODEL mRNA
KNL1 XM_017022432.1 -5.445786 0 PREDICTED: Homo sapiens cancer susceptibility candidate 5 (CASC5), transcript variant X1 MODEL mRNA
CDK1 NM_001786.4 -7.661187 0 cyclin dependent kinase 1 (CDK1), transcript variant 1 REVIEWED mRNA
FGF1 NM_001257207.1 11.871241 0 fibroblast growth factor 1 (FGF1), transcript variant 9 REVIEWED mRNA
LGI3 NM_139278.2 11.801906 0 leucine rich repeat LGI family member 3 (LGI3) VALIDATED mRNA
KIAA0930 NM_015264.1 12.021455 0 KIAA0930 (KIAA0930), transcript variant 1 VALIDATED mRNA
H1F0 NM_005318.3 -3.108088 0 H1 histone family member 0 (H1F0) REVIEWED mRNA
MIR6723 NR_106781.1 14.605592 0 microRNA 6723 (MIR6723) PROVISIONAL microRNA
LMNB2 NM_032737.3 -2.832149 0 lamin B2 (LMNB2) REVIEWED mRNA
ERMN NM_020711.2 14.190130 0 ermin (ERMN), transcript variant 2 VALIDATED mRNA
MBP XR_001753201.1 13.264769 0 PREDICTED: Homo sapiens myelin basic protein (MBP), transcript variant X2 MODEL misc_RNA
TPPP XM_005248237.3 11.385896 0 PREDICTED: Homo sapiens tubulin polymerization promoting protein (TPPP), transcript variant X3 MODEL mRNA
ENDOD1 NM_015036.2 6.364347 0 endonuclease domain containing 1 (ENDOD1) VALIDATED mRNA
ZBTB47 NM_145166.3 3.373055 0 zinc finger and BTB domain containing 47 (ZBTB47) VALIDATED mRNA
SPC25 NM_020675.3 -4.111927 0 SPC25, NDC80 kinetochore complex component (SPC25) REVIEWED mRNA
TF NM_001063.3 10.484396 0 transferrin (TF) REVIEWED mRNA
HNRNPA1 NM_002136.3 -2.632144 0 heterogeneous nuclear ribonucleoprotein A1 (HNRNPA1), transcript variant 1 REVIEWED mRNA
GPR37L1 NM_004767.3 7.832109 0 G protein-coupled receptor 37 like 1 (GPR37L1) VALIDATED mRNA
UBL3 NM_007106.3 2.254224 0 ubiquitin like 3 (UBL3) VALIDATED mRNA
LOC105379481 XR_951069.2 12.675918 0 PREDICTED: Homo sapiens uncharacterized LOC105379481 (LOC105379481) MODEL ncRNA
NONO NM_007363.4 -2.124006 0 non-POU domain containing octamer binding (NONO), transcript variant 2 REVIEWED mRNA
TACC3 NM_006342.2 -5.062962 0 transforming acidic coiled-coil containing protein 3 (TACC3) REVIEWED mRNA
MOBP NR_003090.2 10.636680 0 myelin-associated oligodendrocyte basic protein (MOBP), transcript variant 4 VALIDATED non-coding RNA
PRNP NM_001080123.2 4.186647 0 prion protein (PRNP), transcript variant 5 REVIEWED mRNA
LDLRAD4 NM_001003674.3 9.111582 0 low density lipoprotein receptor class A domain containing 4 (LDLRAD4), transcript variant c1 VALIDATED mRNA
PTTG1 NM_004219.3 -6.222015 0 pituitary tumor-transforming 1 (PTTG1), transcript variant 2 REVIEWED mRNA
ZNF365 NM_014951.2 6.381353 0 zinc finger protein 365 (ZNF365), transcript variant A REVIEWED mRNA

Control - Autism

Child

This table shows the 32 most significant genes differentially expressed between control child samples and autism child samples.

genes_control_autism_child <- signifChildCA %>%
  mutate(gene = text_spec(symbol, link = paste0('http://www.genecards.org/cgi-bin/carddisp.pl?gene=', symbol)),
         transcript = target_id) %>%
  dplyr::select(c('gene', 'transcript', 'log2FoldChange', 'padj', 'description', 'status', 'molecule_type')) %>%
  head(n = 50)
genes_control_autism_child %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), font_size = 6)
gene transcript log2FoldChange padj description status molecule_type
H2AFY NM_001040158.1 -8.025760 0.0028433 H2A histone family member Y (H2AFY), transcript variant 4 REVIEWED mRNA
ZSCAN25 NM_001350984.1 5.127925 0.0030546 zinc finger and SCAN domain containing 25 (ZSCAN25), transcript variant 7 VALIDATED mRNA
PIK3R3 NM_003629.3 7.601205 0.0030546 phosphoinositide-3-kinase regulatory subunit 3 (PIK3R3), transcript variant 1 REVIEWED mRNA
ZNF195 XM_011520352.2 6.694985 0.0030546 PREDICTED: Homo sapiens zinc finger protein 195 (ZNF195), transcript variant X7 MODEL mRNA
SUSD5 XM_017006137.1 6.711799 0.0035603 PREDICTED: Homo sapiens sushi domain containing 5 (SUSD5), transcript variant X2 MODEL mRNA
ACVR1C NM_145259.2 8.014360 0.0039174 activin A receptor type 1C (ACVR1C), transcript variant 1 VALIDATED mRNA
BUB1B NM_001211.5 3.315151 0.0063885 BUB1 mitotic checkpoint serine/threonine kinase B (BUB1B) REVIEWED mRNA
PCM1 XM_017013484.1 7.884200 0.0063885 PREDICTED: Homo sapiens pericentriolar material 1 (PCM1), transcript variant X23 MODEL mRNA
ELAVL2 XM_011517776.2 5.712591 0.0069766 PREDICTED: Homo sapiens ELAV like neuron-specific RNA binding protein 2 (ELAVL2), transcript variant X1 MODEL mRNA
ZFP64 XM_005260449.1 -7.105792 0.0084906 PREDICTED: Homo sapiens ZFP64 zinc finger protein (ZFP64), transcript variant X6 MODEL mRNA
MYOT XM_017010061.1 -5.617699 0.0137692 PREDICTED: Homo sapiens myotilin (MYOT), transcript variant X2 MODEL mRNA
RGL1 XM_017000756.1 6.326049 0.0155666 PREDICTED: Homo sapiens ral guanine nucleotide dissociation stimulator like 1 (RGL1), transcript variant X3 MODEL mRNA
TCF4 XM_017025937.1 7.196867 0.0155666 PREDICTED: Homo sapiens transcription factor 4 (TCF4), transcript variant X5 MODEL mRNA
ZNF160 NM_001322136.1 -6.555408 0.0156208 zinc finger protein 160 (ZNF160), transcript variant 12 REVIEWED mRNA
CHD3 XM_017024064.1 7.552134 0.0156208 PREDICTED: Homo sapiens chromodomain helicase DNA binding protein 3 (CHD3), transcript variant X9 MODEL mRNA
EXOC1 NM_018261.3 -6.547517 0.0162899 exocyst complex component 1 (EXOC1), transcript variant 1 REVIEWED mRNA
TTR NM_000371.3 7.428806 0.0207366 transthyretin (TTR) REVIEWED mRNA
PELI3 NM_001243136.1 -8.116381 0.0207366 pellino E3 ubiquitin protein ligase family member 3 (PELI3), transcript variant 4 REVIEWED mRNA
PAG1 NM_018440.3 7.766469 0.0207366 phosphoprotein membrane anchor with glycosphingolipid microdomains 1 (PAG1) REVIEWED mRNA
LRRC75A-AS1 NR_027159.1 -5.821114 0.0207366 LRRC75A antisense RNA 1 (LRRC75A-AS1), transcript variant 3 PREDICTED long non-coding RNA
PLPP5 XM_017013905.1 5.051513 0.0207366 PREDICTED: Homo sapiens phospholipid phosphatase 5 (PLPP5), transcript variant X10 MODEL mRNA
YPEL2 XM_017024621.1 6.488686 0.0207366 PREDICTED: Homo sapiens yippee like 2 (YPEL2), transcript variant X1 MODEL mRNA
OSBPL2 XM_017028170.1 6.644400 0.0207366 PREDICTED: Homo sapiens oxysterol binding protein like 2 (OSBPL2), transcript variant X8 MODEL mRNA
NEUROD4 NM_021191.2 5.695382 0.0261895 neuronal differentiation 4 (NEUROD4) VALIDATED mRNA
STK38L XM_017019036.1 7.354445 0.0334952 PREDICTED: Homo sapiens serine/threonine kinase 38 like (STK38L), transcript variant X2 MODEL mRNA
MCM7 NM_001278595.1 -6.148432 0.0341248 minichromosome maintenance complex component 7 (MCM7), transcript variant 3 REVIEWED mRNA
AP2S1 NM_001301081.1 -6.879410 0.0369278 adaptor related protein complex 2 sigma 1 subunit (AP2S1), transcript variant 5 REVIEWED mRNA
RAB11FIP1 NM_025151.4 2.165864 0.0369278 RAB11 family interacting protein 1 (RAB11FIP1), transcript variant 1 VALIDATED mRNA
SFRP1 NM_003012.4 2.112847 0.0385669 secreted frizzled related protein 1 (SFRP1) REVIEWED mRNA
A4GALT XM_005261647.2 -6.759707 0.0428226 PREDICTED: Homo sapiens alpha 1,4-galactosyltransferase (A4GALT), transcript variant X4 MODEL mRNA
TAGAP NM_152133.2 5.808768 0.0497265 T-cell activation RhoGTPase activating protein (TAGAP), transcript variant 1 REVIEWED mRNA
LMBR1 XR_001744847.1 -4.560443 0.0497265 PREDICTED: Homo sapiens limb development membrane protein 1 (LMBR1), transcript variant X1 MODEL misc_RNA

Adult

This table shows the 50 most significant genes differentially expressed between control adult samples and autism adult samples.

genes_control_autism_adult <- signifAdultCA %>%
  mutate(gene = text_spec(symbol, link = paste0('http://www.genecards.org/cgi-bin/carddisp.pl?gene=', symbol)),
         transcript = target_id) %>%
  dplyr::select(c('gene', 'transcript', 'log2FoldChange', 'padj', 'description', 'status', 'molecule_type')) %>%
  head(n = 50)
genes_control_autism_adult %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), font_size = 6)
gene transcript log2FoldChange padj description status molecule_type
FHOD3 XM_005258355.1 -8.217616 0.0000000 PREDICTED: Homo sapiens formin homology 2 domain containing 3 (FHOD3), transcript variant X13 MODEL mRNA
LOC107986119 XR_001750192.1 7.763706 0.0000087 PREDICTED: Homo sapiens uncharacterized LOC107986119 (LOC107986119), transcript variant X1 MODEL ncRNA
DLGAP1 NM_001242764.1 -7.603438 0.0000505 DLG associated protein 1 (DLGAP1), transcript variant 6 VALIDATED mRNA
AFF2 NM_001170628.1 -5.376843 0.0011518 AF4/FMR2 family member 2 (AFF2), transcript variant 6 REVIEWED mRNA
CSE1L NR_045796.1 -7.724335 0.0018763 chromosome segregation 1 like (CSE1L), transcript variant 3 REVIEWED non-coding RNA
PRKCE XM_006712050.3 -7.724396 0.0019385 PREDICTED: Homo sapiens protein kinase C epsilon (PRKCE), transcript variant X17 MODEL mRNA
LOC107985374 XR_001735766.1 6.458495 0.0025999 PREDICTED: Homo sapiens uncharacterized LOC107985374 (LOC107985374) MODEL ncRNA
CHD3 XM_017024066.1 7.378109 0.0028590 PREDICTED: Homo sapiens chromodomain helicase DNA binding protein 3 (CHD3), transcript variant X11 MODEL mRNA
LOC102724788 XM_006724935.3 -8.186769 0.0028638 PREDICTED: Homo sapiens proline dehydrogenase 1, mitochondrial (LOC102724788), transcript variant X1 MODEL mRNA
ZNF821 XM_017023411.1 -6.516153 0.0028638 PREDICTED: Homo sapiens zinc finger protein 821 (ZNF821), transcript variant X4 MODEL mRNA
OGT XM_017029907.1 -7.653633 0.0034868 PREDICTED: Homo sapiens O-linked N-acetylglucosamine (GlcNAc) transferase (OGT), transcript variant X1 MODEL mRNA
LOC107986119 XR_001740863.1 -7.333702 0.0036826 PREDICTED: Homo sapiens uncharacterized LOC107986119 (LOC107986119), transcript variant X1 MODEL ncRNA
ANO1 NM_018043.5 5.930273 0.0047391 anoctamin 1 (ANO1), transcript variant 1 VALIDATED mRNA
GRIA1 XM_017009393.1 -6.981561 0.0047391 PREDICTED: Homo sapiens glutamate ionotropic receptor AMPA type subunit 1 (GRIA1), transcript variant X3 MODEL mRNA
EIF3C XM_017023814.1 7.513897 0.0047391 PREDICTED: Homo sapiens eukaryotic translation initiation factor 3 subunit C (EIF3C), transcript variant X1 MODEL mRNA
PASK XM_011510835.1 -7.389713 0.0060558 PREDICTED: Homo sapiens PAS domain containing serine/threonine kinase (PASK), transcript variant X14 MODEL mRNA
ATAD2 XM_011516996.2 -2.870322 0.0084250 PREDICTED: Homo sapiens ATPase family, AAA domain containing 2 (ATAD2), transcript variant X3 MODEL mRNA
SCAF11 XM_017020221.1 6.422783 0.0100051 PREDICTED: Homo sapiens SR-related CTD associated factor 11 (SCAF11), transcript variant X8 MODEL mRNA
WNK2 XM_011518936.2 -6.311372 0.0103810 PREDICTED: Homo sapiens WNK lysine deficient protein kinase 2 (WNK2), transcript variant X22 MODEL mRNA
TMEM268 XM_017014429.1 5.870467 0.0103810 PREDICTED: Homo sapiens chromosome 9 open reading frame 91 (C9orf91), transcript variant X3 MODEL mRNA
LSM6 XR_001741100.1 6.039595 0.0103810 PREDICTED: Homo sapiens LSM6 homolog, U6 small nuclear RNA and mRNA degradation associated (LSM6), transcript variant X3 MODEL misc_RNA
NCAPG2 NM_017760.6 7.068658 0.0105529 non-SMC condensin II complex subunit G2 (NCAPG2), transcript variant 1 REVIEWED mRNA
SETD2 NM_001349370.1 -7.886412 0.0116732 SET domain containing 2 (SETD2), transcript variant 2 REVIEWED mRNA
LOC101929097 XM_005259695.2 -8.034844 0.0116732 PREDICTED: Homo sapiens uncharacterized LOC101929097 (LOC101929097) MODEL mRNA
CHD3 XM_017024064.1 7.747000 0.0117789 PREDICTED: Homo sapiens chromodomain helicase DNA binding protein 3 (CHD3), transcript variant X9 MODEL mRNA
ACVR1C NM_001111033.1 -7.267053 0.0134341 activin A receptor type 1C (ACVR1C), transcript variant 4 VALIDATED mRNA
UBA1 XM_017029780.1 -5.980508 0.0134341 PREDICTED: Homo sapiens ubiquitin like modifier activating enzyme 1 (UBA1), transcript variant X6 MODEL mRNA
CGN XM_005245365.4 7.766203 0.0136224 PREDICTED: Homo sapiens cingulin (CGN), transcript variant X1 MODEL mRNA
H2AFY XM_011543734.2 6.261827 0.0136224 PREDICTED: Homo sapiens H2A histone family member Y (H2AFY), transcript variant X25 MODEL mRNA
TAB2 NM_001292035.2 -4.660715 0.0146400 TGF-beta activated kinase 1/MAP3K7 binding protein 2 (TAB2), transcript variant 4 REVIEWED mRNA
LIN52 NM_001024674.2 6.294265 0.0150929 lin-52 DREAM MuvB core complex component (LIN52) VALIDATED mRNA
PITPNM3 NM_001165966.1 -7.579690 0.0170745 PITPNM family member 3 (PITPNM3), transcript variant 2 REVIEWED mRNA
CEP170 XM_011544343.2 6.667994 0.0252273 PREDICTED: Homo sapiens centrosomal protein 170 (CEP170), transcript variant X23 MODEL mRNA
STARD8 XM_011531069.2 6.843532 0.0274375 PREDICTED: Homo sapiens StAR related lipid transfer domain containing 8 (STARD8), transcript variant X2 MODEL mRNA
TNFRSF10D NM_003840.4 -2.259592 0.0323857 TNF receptor superfamily member 10d (TNFRSF10D) REVIEWED mRNA
SPAST NM_014946.3 -4.304759 0.0360086 spastin (SPAST), transcript variant 1 REVIEWED mRNA
TPX2 XM_011528697.2 5.036863 0.0360086 PREDICTED: Homo sapiens TPX2, microtubule nucleation factor (TPX2), transcript variant X1 MODEL mRNA
KIAA1324 XM_011541825.1 -6.037100 0.0360086 PREDICTED: Homo sapiens KIAA1324 (KIAA1324), transcript variant X1 MODEL mRNA
LOC105372462 XR_919753.2 -5.409798 0.0360086 PREDICTED: Homo sapiens uncharacterized LOC105372462 (LOC105372462), transcript variant X2 MODEL ncRNA
C12orf57 NM_001301834.1 -5.784194 0.0417056 chromosome 12 open reading frame 57 (C12orf57), transcript variant 2 REVIEWED mRNA
MIR100HG NR_137195.1 -6.471956 0.0417056 mir-100-let-7a-2-mir-125b-1 cluster host gene (MIR100HG), transcript variant 22 REVIEWED long non-coding RNA
NFX1 XR_001746314.1 -6.104268 0.0417056 PREDICTED: Homo sapiens nuclear transcription factor, X-box binding 1 (NFX1), transcript variant X5 MODEL misc_RNA
LINC01896 XR_935681.2 -5.985569 0.0417056 PREDICTED: Homo sapiens uncharacterized LOC645321 (LOC645321), transcript variant X3 MODEL ncRNA
LINC01896 XR_952162.2 -5.985569 0.0417056 PREDICTED: Homo sapiens uncharacterized LOC645321 (LOC645321), transcript variant X3 MODEL ncRNA
LINC01896 XR_952517.2 -5.985569 0.0417056 PREDICTED: Homo sapiens uncharacterized LOC645321 (LOC645321), transcript variant X3 MODEL ncRNA
LOC105369351 XR_950214.2 -6.154897 0.0419230 PREDICTED: Homo sapiens uncharacterized LOC105369351 (LOC105369351), transcript variant X2 MODEL ncRNA
SFXN5 XM_005264648.1 -6.738681 0.0441793 PREDICTED: Homo sapiens sideroflexin 5 (SFXN5), transcript variant X23 MODEL mRNA
SELE NM_000450.2 -4.639474 0.0449577 selectin E (SELE) REVIEWED mRNA
GADD45B NM_015675.3 -3.501461 0.0449577 growth arrest and DNA damage inducible beta (GADD45B) REVIEWED mRNA
MTX3 XM_017009440.1 -5.907310 0.0449577 PREDICTED: Homo sapiens metaxin 3 (MTX3), transcript variant X2 MODEL mRNA

Developmental Control - Autism

Child

This table shows the 22 most significant genes differentially expressed between control child samples and autism child samples AND different between control child samples and fetal samples.

genes_dev_control_autism_child <- signifChildCA %>%
  filter(target_id %in% devChildCA) %>%
  mutate(gene = text_spec(symbol, link = paste0('http://www.genecards.org/cgi-bin/carddisp.pl?gene=', symbol)),
         transcript = target_id) %>%
  dplyr::select(c('gene', 'transcript', 'log2FoldChange', 'padj', 'description', 'status', 'molecule_type'))
genes_dev_control_autism_child %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"))
gene transcript log2FoldChange padj description status molecule_type
H2AFY NM_001040158.1 -8.025760 0.0028433 H2A histone family member Y (H2AFY), transcript variant 4 REVIEWED mRNA
ZNF195 XM_011520352.2 6.694985 0.0030546 PREDICTED: Homo sapiens zinc finger protein 195 (ZNF195), transcript variant X7 MODEL mRNA
SUSD5 XM_017006137.1 6.711799 0.0035603 PREDICTED: Homo sapiens sushi domain containing 5 (SUSD5), transcript variant X2 MODEL mRNA
ACVR1C NM_145259.2 8.014360 0.0039174 activin A receptor type 1C (ACVR1C), transcript variant 1 VALIDATED mRNA
BUB1B NM_001211.5 3.315151 0.0063885 BUB1 mitotic checkpoint serine/threonine kinase B (BUB1B) REVIEWED mRNA
ELAVL2 XM_011517776.2 5.712591 0.0069766 PREDICTED: Homo sapiens ELAV like neuron-specific RNA binding protein 2 (ELAVL2), transcript variant X1 MODEL mRNA
ZFP64 XM_005260449.1 -7.105792 0.0084906 PREDICTED: Homo sapiens ZFP64 zinc finger protein (ZFP64), transcript variant X6 MODEL mRNA
RGL1 XM_017000756.1 6.326049 0.0155666 PREDICTED: Homo sapiens ral guanine nucleotide dissociation stimulator like 1 (RGL1), transcript variant X3 MODEL mRNA
ZNF160 NM_001322136.1 -6.555408 0.0156208 zinc finger protein 160 (ZNF160), transcript variant 12 REVIEWED mRNA
CHD3 XM_017024064.1 7.552134 0.0156208 PREDICTED: Homo sapiens chromodomain helicase DNA binding protein 3 (CHD3), transcript variant X9 MODEL mRNA
EXOC1 NM_018261.3 -6.547517 0.0162899 exocyst complex component 1 (EXOC1), transcript variant 1 REVIEWED mRNA
TTR NM_000371.3 7.428806 0.0207366 transthyretin (TTR) REVIEWED mRNA
PELI3 NM_001243136.1 -8.116381 0.0207366 pellino E3 ubiquitin protein ligase family member 3 (PELI3), transcript variant 4 REVIEWED mRNA
LRRC75A-AS1 NR_027159.1 -5.821114 0.0207366 LRRC75A antisense RNA 1 (LRRC75A-AS1), transcript variant 3 PREDICTED long non-coding RNA
PLPP5 XM_017013905.1 5.051513 0.0207366 PREDICTED: Homo sapiens phospholipid phosphatase 5 (PLPP5), transcript variant X10 MODEL mRNA
NEUROD4 NM_021191.2 5.695382 0.0261895 neuronal differentiation 4 (NEUROD4) VALIDATED mRNA
MCM7 NM_001278595.1 -6.148432 0.0341248 minichromosome maintenance complex component 7 (MCM7), transcript variant 3 REVIEWED mRNA
AP2S1 NM_001301081.1 -6.879410 0.0369278 adaptor related protein complex 2 sigma 1 subunit (AP2S1), transcript variant 5 REVIEWED mRNA
RAB11FIP1 NM_025151.4 2.165864 0.0369278 RAB11 family interacting protein 1 (RAB11FIP1), transcript variant 1 VALIDATED mRNA
SFRP1 NM_003012.4 2.112847 0.0385669 secreted frizzled related protein 1 (SFRP1) REVIEWED mRNA
A4GALT XM_005261647.2 -6.759707 0.0428226 PREDICTED: Homo sapiens alpha 1,4-galactosyltransferase (A4GALT), transcript variant X4 MODEL mRNA
TAGAP NM_152133.2 5.808768 0.0497265 T-cell activation RhoGTPase activating protein (TAGAP), transcript variant 1 REVIEWED mRNA

Adult

This table shows the 40 most significant genes differentially expressed between control adult samples and autism adult samples AND different between control adult samples and fetal samples.

genes_dev_control_autism_adult <- signifAdultCA %>%
  filter(target_id %in% devAdultCA) %>%
  mutate(gene = text_spec(symbol, link = paste0('http://www.genecards.org/cgi-bin/carddisp.pl?gene=', symbol)),
         transcript = target_id) %>%
  dplyr::select(c('gene', 'transcript', 'log2FoldChange', 'padj', 'description', 'status', 'molecule_type'))
genes_dev_control_autism_adult %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"))
gene transcript log2FoldChange padj description status molecule_type
FHOD3 XM_005258355.1 -8.217616 0.0000000 PREDICTED: Homo sapiens formin homology 2 domain containing 3 (FHOD3), transcript variant X13 MODEL mRNA
LOC107986119 XR_001750192.1 7.763706 0.0000087 PREDICTED: Homo sapiens uncharacterized LOC107986119 (LOC107986119), transcript variant X1 MODEL ncRNA
DLGAP1 NM_001242764.1 -7.603438 0.0000505 DLG associated protein 1 (DLGAP1), transcript variant 6 VALIDATED mRNA
AFF2 NM_001170628.1 -5.376843 0.0011518 AF4/FMR2 family member 2 (AFF2), transcript variant 6 REVIEWED mRNA
CSE1L NR_045796.1 -7.724335 0.0018763 chromosome segregation 1 like (CSE1L), transcript variant 3 REVIEWED non-coding RNA
PRKCE XM_006712050.3 -7.724396 0.0019385 PREDICTED: Homo sapiens protein kinase C epsilon (PRKCE), transcript variant X17 MODEL mRNA
LOC107985374 XR_001735766.1 6.458495 0.0025999 PREDICTED: Homo sapiens uncharacterized LOC107985374 (LOC107985374) MODEL ncRNA
CHD3 XM_017024066.1 7.378109 0.0028590 PREDICTED: Homo sapiens chromodomain helicase DNA binding protein 3 (CHD3), transcript variant X11 MODEL mRNA
ZNF821 XM_017023411.1 -6.516153 0.0028638 PREDICTED: Homo sapiens zinc finger protein 821 (ZNF821), transcript variant X4 MODEL mRNA
OGT XM_017029907.1 -7.653633 0.0034868 PREDICTED: Homo sapiens O-linked N-acetylglucosamine (GlcNAc) transferase (OGT), transcript variant X1 MODEL mRNA
LOC107986119 XR_001740863.1 -7.333702 0.0036826 PREDICTED: Homo sapiens uncharacterized LOC107986119 (LOC107986119), transcript variant X1 MODEL ncRNA
ANO1 NM_018043.5 5.930273 0.0047391 anoctamin 1 (ANO1), transcript variant 1 VALIDATED mRNA
GRIA1 XM_017009393.1 -6.981561 0.0047391 PREDICTED: Homo sapiens glutamate ionotropic receptor AMPA type subunit 1 (GRIA1), transcript variant X3 MODEL mRNA
EIF3C XM_017023814.1 7.513897 0.0047391 PREDICTED: Homo sapiens eukaryotic translation initiation factor 3 subunit C (EIF3C), transcript variant X1 MODEL mRNA
PASK XM_011510835.1 -7.389713 0.0060558 PREDICTED: Homo sapiens PAS domain containing serine/threonine kinase (PASK), transcript variant X14 MODEL mRNA
ATAD2 XM_011516996.2 -2.870322 0.0084250 PREDICTED: Homo sapiens ATPase family, AAA domain containing 2 (ATAD2), transcript variant X3 MODEL mRNA
SCAF11 XM_017020221.1 6.422783 0.0100051 PREDICTED: Homo sapiens SR-related CTD associated factor 11 (SCAF11), transcript variant X8 MODEL mRNA
WNK2 XM_011518936.2 -6.311372 0.0103810 PREDICTED: Homo sapiens WNK lysine deficient protein kinase 2 (WNK2), transcript variant X22 MODEL mRNA
TMEM268 XM_017014429.1 5.870467 0.0103810 PREDICTED: Homo sapiens chromosome 9 open reading frame 91 (C9orf91), transcript variant X3 MODEL mRNA
LSM6 XR_001741100.1 6.039595 0.0103810 PREDICTED: Homo sapiens LSM6 homolog, U6 small nuclear RNA and mRNA degradation associated (LSM6), transcript variant X3 MODEL misc_RNA
SETD2 NM_001349370.1 -7.886412 0.0116732 SET domain containing 2 (SETD2), transcript variant 2 REVIEWED mRNA
CHD3 XM_017024064.1 7.747000 0.0117789 PREDICTED: Homo sapiens chromodomain helicase DNA binding protein 3 (CHD3), transcript variant X9 MODEL mRNA
ACVR1C NM_001111033.1 -7.267053 0.0134341 activin A receptor type 1C (ACVR1C), transcript variant 4 VALIDATED mRNA
UBA1 XM_017029780.1 -5.980508 0.0134341 PREDICTED: Homo sapiens ubiquitin like modifier activating enzyme 1 (UBA1), transcript variant X6 MODEL mRNA
CGN XM_005245365.4 7.766203 0.0136224 PREDICTED: Homo sapiens cingulin (CGN), transcript variant X1 MODEL mRNA
TAB2 NM_001292035.2 -4.660715 0.0146400 TGF-beta activated kinase 1/MAP3K7 binding protein 2 (TAB2), transcript variant 4 REVIEWED mRNA
PITPNM3 NM_001165966.1 -7.579690 0.0170745 PITPNM family member 3 (PITPNM3), transcript variant 2 REVIEWED mRNA
TNFRSF10D NM_003840.4 -2.259592 0.0323857 TNF receptor superfamily member 10d (TNFRSF10D) REVIEWED mRNA
SPAST NM_014946.3 -4.304759 0.0360086 spastin (SPAST), transcript variant 1 REVIEWED mRNA
TPX2 XM_011528697.2 5.036863 0.0360086 PREDICTED: Homo sapiens TPX2, microtubule nucleation factor (TPX2), transcript variant X1 MODEL mRNA
KIAA1324 XM_011541825.1 -6.037100 0.0360086 PREDICTED: Homo sapiens KIAA1324 (KIAA1324), transcript variant X1 MODEL mRNA
LOC105372462 XR_919753.2 -5.409798 0.0360086 PREDICTED: Homo sapiens uncharacterized LOC105372462 (LOC105372462), transcript variant X2 MODEL ncRNA
C12orf57 NM_001301834.1 -5.784194 0.0417056 chromosome 12 open reading frame 57 (C12orf57), transcript variant 2 REVIEWED mRNA
MIR100HG NR_137195.1 -6.471956 0.0417056 mir-100-let-7a-2-mir-125b-1 cluster host gene (MIR100HG), transcript variant 22 REVIEWED long non-coding RNA
NFX1 XR_001746314.1 -6.104268 0.0417056 PREDICTED: Homo sapiens nuclear transcription factor, X-box binding 1 (NFX1), transcript variant X5 MODEL misc_RNA
LINC01896 XR_935681.2 -5.985569 0.0417056 PREDICTED: Homo sapiens uncharacterized LOC645321 (LOC645321), transcript variant X3 MODEL ncRNA
LINC01896 XR_952162.2 -5.985569 0.0417056 PREDICTED: Homo sapiens uncharacterized LOC645321 (LOC645321), transcript variant X3 MODEL ncRNA
LINC01896 XR_952517.2 -5.985569 0.0417056 PREDICTED: Homo sapiens uncharacterized LOC645321 (LOC645321), transcript variant X3 MODEL ncRNA
SFXN5 XM_005264648.1 -6.738681 0.0441793 PREDICTED: Homo sapiens sideroflexin 5 (SFXN5), transcript variant X23 MODEL mRNA
GADD45B NM_015675.3 -3.501461 0.0449577 growth arrest and DNA damage inducible beta (GADD45B) REVIEWED mRNA
MTX3 XM_017009440.1 -5.907310 0.0449577 PREDICTED: Homo sapiens metaxin 3 (MTX3), transcript variant X2 MODEL mRNA
NCKAP5 XM_017003980.1 -6.068193 0.0466438 PREDICTED: Homo sapiens NCK associated protein 5 (NCKAP5), transcript variant X18 MODEL mRNA
FHL2 NM_001318896.1 -5.358883 0.0495433 four and a half LIM domains 2 (FHL2), transcript variant 8 REVIEWED mRNA
TREM2 XM_006715116.3 5.479870 0.0495433 PREDICTED: Homo sapiens triggering receptor expressed on myeloid cells 2 (TREM2), transcript variant X1 MODEL mRNA

The list of “developmental” genes that are differentially expressed in Autism vs Control are saved in DESeq2_glist_child.txt and DESeq2_glist_adult.txt (Entrez GeneIDs), in DESeq2_slist_child.txt and DESeq2_slist_adult.txt (gene symbols) while the list of “developmental” transcripts are saved in DESeq2_tlist_child.txt and DESeq2_tlist_adult.txt.

Save gene lists

unlink('DESeq2_tlist_child.txt')
unlink('DESeq2_tlist_adult.txt')
unlink('DESeq2_glist_child.txt')
unlink('DESeq2_glist_adult.txt')
unlink('DESeq2_slist_child.txt')
unlink('DESeq2_slist_adult.txt')
lapply(devChildCA[order(devChildCA)], write, 'DESeq2_tlist_child.txt', append=TRUE)
lapply(devAdultCA[order(devAdultCA)], write, 'DESeq2_tlist_adult.txt', append=TRUE)
lapply(devChildCAg[order(devChildCAg)], write, 'DESeq2_glist_child.txt', append=TRUE)
lapply(devAdultCAg[order(devAdultCAg)], write, 'DESeq2_glist_adult.txt', append=TRUE)
lapply(devChildCAs[order(devChildCAs)], write, 'DESeq2_slist_child.txt', append=TRUE)
lapply(devAdultCAs[order(devAdultCAs)], write, 'DESeq2_slist_adult.txt', append=TRUE)
save(file='DESeq2_tlist.RData', devChildCA, devAdultCA)
save(file='DESeq2_glist.RData', devChildCAg, devAdultCAg, devChildCAs, devAdultCAs)

GO analysis

Perform GO analysis using the goseq package, which normalizes GO term counts by transcript length.

refseq.lengths <- read_tsv('/share/db/refseq/human/refseq.108.rna.lengths', col_names = c('target_id', 'length'))
ttg <- ttg %>% full_join(refseq.lengths, by = 'target_id')
gene_lengths <- ttg %>%
  dplyr::select(gene_id,length) %>%
  filter(!is.na(gene_id)) %>%
  group_by(gene_id) %>%
  summarise(median_length = median(length)) %>%
  dplyr::select(gene_id, median_length) %>%
  spread(gene_id, median_length) %>%
  as.list() %>%
  unlist()

genes <- rep(0, length(unique(na.omit(ttg$gene_id))))
names(genes) <- na.omit(unique(ttg$gene_id))
genes[as.character(unique(signifChildCA$gene_id))] <- 1

pwf <- nullp(DEgenes = genes, genome = NULL, id = NULL, bias.data = gene_lengths)

GO.wall <- goseq(pwf, "hg19", "knownGene")
t1 <- GO.wall %>% filter(over_represented_pvalue < 0.05) %>% group_by(ontology) %>% summarise(n=n())
t2 <- GO.wall %>% filter(ontology == 'BP' & over_represented_pvalue < 0.05 & grepl('(neur[oa])|nerv', term)) %>%
  mutate(category = paste0('[',category,'](http://amigo.geneontology.org/amigo/term/',category,')')) %>%
  dplyr::select(c('category', 'term', 'numDEInCat', 'numInCat', 'over_represented_pvalue'))
t3 <- GO.wall %>% filter(ontology == 'MF' & over_represented_pvalue < 0.05) %>% head(n=50) %>% 
  mutate(category = paste0('[',category,'](http://amigo.geneontology.org/amigo/term/',category,')')) %>%
  dplyr::select(c('category', 'term', 'numDEInCat', 'numInCat', 'over_represented_pvalue'))
t4 <- GO.wall %>% filter(ontology == 'CC' & over_represented_pvalue < 0.05) %>% head(n=50) %>% 
  mutate(category = paste0('[',category,'](http://amigo.geneontology.org/amigo/term/',category,')')) %>%
  dplyr::select(c('category', 'term', 'numDEInCat', 'numInCat', 'over_represented_pvalue'))

Summary

Number of significant categories in different ontologies

kable(t1, format = 'markdown')
ontology n
BP 232
CC 38
MF 42

Biological process

Summary of biological process terms related to neuronal development

kable(t2, format = 'markdown')
category term numDEInCat numInCat over_represented_pvalue
GO:0014034 neural crest cell fate commitment 1 3 0.0058216
GO:1904956 regulation of midbrain dopaminergic neuron differentiation 1 6 0.0105133
GO:1904338 regulation of dopaminergic neuron differentiation 1 11 0.0199172
GO:0061351 neural precursor cell proliferation 2 129 0.0211787
GO:0014029 neural crest formation 1 12 0.0216980
GO:0001764 neuron migration 2 136 0.0232999
GO:0090179 planar cell polarity pathway involved in neural tube closure 1 13 0.0234826
GO:0090178 regulation of establishment of planar polarity involved in neural tube closure 1 14 0.0245459
GO:0090177 establishment of planar polarity involved in neural tube closure 1 15 0.0260297
GO:1904948 midbrain dopaminergic neuron differentiation 1 19 0.0327061
GO:0097150 neuronal stem cell population maintenance 1 20 0.0332975

Molecular function

Summary of the 50th most significant “molecular functions” terms

kable(t3, format = 'markdown')
category term numDEInCat numInCat over_represented_pvalue
GO:0050512 lactosylceramide 4-alpha-galactosyltransferase activity 1 1 0.0011524
GO:0004003 ATP-dependent DNA helicase activity 2 35 0.0017298
GO:0001011 transcription factor activity, sequence-specific DNA binding, RNA polymerase recruiting 1 1 0.0019134
GO:0001087 transcription factor activity, TFIIB-class binding 1 1 0.0019134
GO:0003678 DNA helicase activity 2 50 0.0034513
GO:0038100 nodal binding 1 2 0.0038874
GO:0008321 Ral guanyl-nucleotide exchange factor activity 1 3 0.0052964
GO:0001093 TFIIB-class transcription factor binding 1 3 0.0057301
GO:0004674 protein serine/threonine kinase activity 4 445 0.0068994
GO:0016361 activin receptor activity, type I 1 4 0.0069912
GO:0008094 DNA-dependent ATPase activity 2 76 0.0077956
GO:0001083 transcription factor activity, RNA polymerase II basal transcription factor binding 1 5 0.0086088
GO:0010385 double-stranded methylated DNA binding 1 5 0.0090954
GO:0016773 phosphotransferase activity, alcohol group as acceptor 5 774 0.0098344
GO:0046935 1-phosphatidylinositol-3-kinase regulator activity 1 6 0.0108505
GO:0070324 thyroid hormone binding 1 6 0.0110543
GO:0017002 activin-activated receptor activity 1 7 0.0123594
GO:0035014 phosphatidylinositol 3-kinase regulator activity 1 7 0.0127756
GO:0008026 ATP-dependent helicase activity 2 101 0.0131991
GO:0070035 purine NTP-dependent helicase activity 2 101 0.0131991
GO:0016301 kinase activity 5 842 0.0135987
GO:0000182 rDNA binding 1 10 0.0166580
GO:0015643 toxic substance binding 1 11 0.0186086
GO:0003677 DNA binding 9 2451 0.0191138
GO:0035615 clathrin adaptor activity 1 11 0.0197205
GO:0098748 endocytic adaptor activity 1 11 0.0197205
GO:0001091 RNA polymerase II basal transcription factor binding 1 11 0.0198866
GO:0005068 transmembrane receptor protein tyrosine kinase adaptor activity 1 11 0.0199631
GO:0004672 protein kinase activity 4 640 0.0233940
GO:0008195 phosphatidate phosphatase activity 1 13 0.0244220
GO:0016772 transferase activity, transferring phosphorus-containing groups 5 983 0.0250600
GO:0017049 GTP-Rho binding 1 17 0.0260892
GO:0004386 helicase activity 2 150 0.0274406
GO:0004675 transmembrane receptor protein serine/threonine kinase activity 1 16 0.0294806
GO:0030674 protein binding, bridging 2 162 0.0318956
GO:0005540 hyaluronic acid binding 1 21 0.0360257
GO:0060090 binding, bridging 2 180 0.0386527
GO:0015248 sterol transporter activity 1 28 0.0457912
GO:0005539 glycosaminoglycan binding 2 200 0.0465436
GO:0019207 kinase regulator activity 2 201 0.0468330
GO:0043425 bHLH transcription factor binding 1 27 0.0477401
GO:0046982 protein heterodimerization activity 3 477 0.0487781

Cellular component

Summary of the 50th most significant “cellular component” terms

kable(t4, format = 'markdown')
category term numDEInCat numInCat over_represented_pvalue
GO:0048179 activin receptor complex 1 3 0.0054682
GO:0098592 cytoplasmic side of apical plasma membrane 1 3 0.0058180
GO:0001740 Barr body 1 5 0.0081692
GO:0044454 nuclear chromosome part 4 493 0.0098116
GO:0000805 X chromosome 1 7 0.0105260
GO:0001739 sex chromatin 1 6 0.0111291
GO:0000228 nuclear chromosome 4 527 0.0123948
GO:0000778 condensed nuclear chromosome kinetochore 1 9 0.0144316
GO:0042555 MCM complex 1 11 0.0189376
GO:0000784 nuclear chromosome, telomeric region 2 131 0.0209653
GO:0000940 condensed chromosome outer kinetochore 1 12 0.0218776
GO:0098687 chromosomal region 3 349 0.0218971
GO:0030122 AP-2 adaptor complex 1 13 0.0226759
GO:0030128 clathrin coat of endocytic vesicle 1 14 0.0238303
GO:0036020 endolysosome membrane 1 14 0.0242340
GO:0016581 NuRD complex 1 17 0.0279754
GO:0090545 CHD-type complex 1 17 0.0279754
GO:0035098 ESC/E(Z) complex 1 18 0.0306395
GO:0000780 condensed nuclear chromosome, centromeric region 1 19 0.0309061
GO:0000145 exocyst 1 19 0.0312876
GO:0030132 clathrin coat of coated pit 1 18 0.0318834
GO:0005942 phosphatidylinositol 3-kinase complex 1 20 0.0322205
GO:0005721 pericentric heterochromatin 1 20 0.0326199
GO:0000242 pericentriolar material 1 20 0.0331107
GO:0000781 chromosome, telomeric region 2 167 0.0333106
GO:0036019 endolysosome 1 20 0.0342002
GO:0005622 intracellular 29 14144 0.0343890
GO:0030666 endocytic vesicle membrane 2 167 0.0353067
GO:0005680 anaphase-promoting complex 1 21 0.0356366
GO:1990234 transferase complex 4 738 0.0374282
GO:0030125 clathrin vesicle coat 1 24 0.0413874
GO:0000775 chromosome, centromeric region 2 188 0.0414829
GO:0032993 protein-DNA complex 2 192 0.0423233
GO:0000803 sex chromosome 1 26 0.0436667
GO:0034451 centriolar satellite 1 26 0.0452129
GO:0000785 chromatin 3 470 0.0463529
GO:0005829 cytosol 13 4749 0.0466718
GO:0051233 spindle midzone 1 28 0.0469542

Heatmap of DE genes

Child

myttg <- ttg %>% filter(target_id %in% devChildCA) %>% dplyr::select(c('target_id', 'symbol'))
symbols <- myttg$symbol
names(symbols) <- myttg$target_id
vst <- varianceStabilizingTransformation(ddsWald, blind=FALSE)
obs <- assay(vst) %>%
 as.data.frame() %>%
 rownames_to_column('target_id') %>%
 filter(target_id %in% devChildCA) %>%
 gather(colnames(assay(ddsWald)), key = 'sample', value = 'est_counts') %>%
 spread(target_id, est_counts) %>%
 remove_rownames() %>%
 column_to_rownames(var="sample") %>%
 as.matrix()
colnames(obs) <- symbols[colnames(obs)]
labels <- metadata1 %>% dplyr::select(c('sample','age')) %>% arrange(sample) %>%
 remove_rownames() %>% column_to_rownames(var='sample')
Rowv <- obs %>%
  dist(method="euclidean") %>%
  hclust(method = "complete") %>%
  as.dendrogram %>%
  # rotate(c(6:7,1:5)) %>%
  color_branches(k = 3) %>%
  set("branches_lwd", 4)
obs[which(obs == 0)] <- 1
par(mar=c(5,4,4,2)+0.1)
heatmap.2(obs, Rowv = Rowv, trace="none", margins=c(5,9), srtCol = 45, 
          symm = F, symkey = F, symbreaks = F, scale="none")

Adult

myttg <- ttg %>% filter(target_id %in% devAdultCA) %>% dplyr::select(c('target_id', 'symbol'))
symbols <- myttg$symbol
names(symbols) <- myttg$target_id
vst <- varianceStabilizingTransformation(ddsWald, blind=FALSE)
obs <- assay(vst) %>%
 as.data.frame() %>%
 rownames_to_column('target_id') %>%
 filter(target_id %in% devAdultCA) %>%
 gather(colnames(assay(ddsWald)), key = 'sample', value = 'est_counts') %>%
 spread(target_id, est_counts) %>%
 remove_rownames() %>%
 column_to_rownames(var="sample") %>%
 as.matrix()
colnames(obs) <- symbols[colnames(obs)]
labels <- metadata1 %>% dplyr::select(c('sample','age')) %>% arrange(sample) %>%
 remove_rownames() %>% column_to_rownames(var='sample')
Rowv <- obs %>%
  dist(method="euclidean") %>%
  hclust(method = "complete") %>%
  as.dendrogram %>%
  # rotate(c(6:7,1:5)) %>%
  color_branches(k = 3) %>%
  set("branches_lwd", 4)
obs[which(obs == 0)] <- 1
par(mar=c(5,4,4,2)+0.1)
heatmap.2(obs, Rowv = Rowv, trace="none", margins=c(5,9), srtCol = 45,
          symm = F, symkey = F, symbreaks = F, scale="none")

Correlation plot for all genes

This correlation plot uses all the transcripts annotated as PROVISIONAL, REVIEWED or VALIDATED in RefSeq (the high confidence categories)

cor_tlist <- ttg %>% filter(status %in% c('PROVISIONAL', 'REVIEWED', 'VALIDATED')) %>% .[['target_id']]
obs <- counts(ddsWald, normalized=TRUE) %>%
  as.data.frame() %>%
  rownames_to_column('target_id') %>%
  filter(target_id %in% cor_tlist) %>%
  gather(colnames(assay(ddsWald)), key = 'sample', value = 'est_counts') %>% 
  full_join(metadata1,  by = 'sample') %>%
  dplyr::select(c('grp','target_id','est_counts')) %>%
  group_by(grp, target_id) %>%
  summarise(est_counts = mean(est_counts)) %>%
  spread(target_id, est_counts) %>%
  remove_rownames() %>%
  column_to_rownames(var="grp") %>%
  t() %>%
  as.tibble() %>%
  filter_at(vars(matches('Child|Young|Middle|Old')), any_vars(. >= 0.5))
colnames(obs) <- metadata1 %>% 
  dplyr::select(grp) %>% 
  group_by(grp) %>% 
  summarise(group_count=n()) %>% 
  mutate(group = paste0(grp,'(',group_count,')')) %>%
  .[['group']]
colpal=brewer.pal(n=8, name="RdBu")
corrplot(cor(obs),
         method="circle",
         type="lower",
         col=colpal,
         cl.lim=c(0,1),
         number.cex = 0.6,
         addCoef.col = "black",
         tl.col="black",
         tl.cex = 0.75,
         tl.srt=45,
         diag=FALSE)

Correlation plot for DE genes

This correlation plot uses the ‘significant’ transcripts, which are DE between Fetal and Control samples and also between Autism and Control samples.

obs <- counts(ddsWald, normalized=TRUE) %>%
  as.data.frame() %>%
  rownames_to_column('target_id') %>%
  filter(target_id %in% devChildCA) %>%
  gather(colnames(assay(ddsWald)), key = 'sample', value = 'est_counts') %>% 
  full_join(metadata1,  by = 'sample') %>%
  dplyr::select(c('grp','target_id','est_counts')) %>%
  group_by(grp, target_id) %>%
  summarise(est_counts = mean(est_counts)) %>%
  spread(target_id, est_counts) %>%
  remove_rownames() %>%
  column_to_rownames(var="grp") %>%
  t() %>%
  as.tibble() %>%
  filter_at(vars(matches('Child|Young|Middle|Old')), any_vars(. >= 0.5))
colnames(obs) <- metadata1 %>% 
  dplyr::select(grp) %>% 
  group_by(grp) %>% 
  summarise(group_count=n()) %>% 
  mutate(group = paste0(grp,'(',group_count,')')) %>%
  .[['group']]
colpal=brewer.pal(n=8, name="RdBu")
corrplot(cor(obs),
         method="circle",
         type="lower",
         col=colpal,
         #cl.lim=c(0,1),
         number.cex = 0.6,
         addCoef.col = "black",
         tl.col="black",
         tl.cex = 0.75,
         tl.srt=45,
         diag=FALSE)