LieberInstitute / brainseq_phase2

BrainSeq Phase II project lead by LIBD for the BrainSeq Consortium
http://eqtl.brainseq.org/
8 stars 5 forks source link

Find sample sizes for the region-specific analyses #4

Closed lcolladotor closed 6 years ago

lcolladotor commented 6 years ago

Both for BrainSeq and BrainSpan

lcolladotor commented 6 years ago

Here are the numbers. Note that for BrainSeq we are using Dx == 'Control' only.

Code

library('SummarizedExperiment')
type <- 'gene'
load_file <- file.path(
    '/dcl01/lieber/ajaffe/lab/brainseq_phase2/expr_cutoff',
    paste0('rse_', type, '.Rdata'))
load(load_file)

colData(rse_gene)$age_group <- ifelse(colData(rse_gene)$Age >= 18, 'adult', ifelse(colData(rse_gene)$Age <= 0, 'fetal', 'other'))
colData(rse_gene)$Region <- relevel(factor(colData(rse_gene)$Region), 'DLPFC')

with(colData(rse_gene), addmargins(table(age_group, Region, Dx)))

load_file <- file.path(
    '/dcl01/lieber/ajaffe/lab/brainseq_phase2/brainspan',
    paste0('rse_span_', type, '.Rdata'))
load(load_file)  

colData(rse_span_gene)$age_group <- ifelse(colData(rse_span_gene)$Age >= 18, 'adult', ifelse(colData(rse_span_gene)$Age <= 0, 'fetal', 'other'))

with(colData(rse_span_gene), addmargins(table(age_group, Region)))

Output

## BrainSeq
, , Dx = Control

         Region
age_group DLPFC HIPPO Sum
    adult   222   238 460
    fetal    29    28  57
    other    49    48  97
    Sum     300   314 614

, , Dx = Schizo

         Region
age_group DLPFC HIPPO Sum
    adult   152   132 284
    fetal     0     0   0
    other     1     1   2
    Sum     153   133 286

, , Dx = Sum

         Region
age_group DLPFC HIPPO Sum
    adult   374   370 744
    fetal    29    28  57
    other    50    49  99
    Sum     453   447 900

## BrainSpan

         Region
age_group DLPFC HIPPO Sum
    adult     8     8  16
    fetal    18    18  36
    other    14    13  27
    Sum      40    39  79

Summary

lcolladotor commented 6 years ago

For the number of individuals used in the regional difference analysis.

> span_reg <- rse_span_gene[, colData(rse_span_gene)$age_group %in% c('adult', 'fetal')]
> dim(span_reg)
[1] 24652    52
> length(colData(span_reg)$Braincode)
[1] 52
> length(unique(colData(span_reg)$Braincode))
[1] 26

Overall numbers used for the development analysis:

> dim(rse_span_gene)
[1] 24652    79
> length(unique(colData(rse_span_gene)$Braincode))
[1] 41
> length(colData(rse_span_gene)$Braincode)
[1] 79