Al-Murphy / MungeSumstats

Rapid standardisation and quality control of GWAS or QTL summary statistics
https://doi.org/doi:10.18129/B9.bioc.MungeSumstats
75 stars 16 forks source link

Add "N" to `find_sumstats` table #52

Closed bschilder closed 3 years ago

bschilder commented 3 years ago

The "sample_size" column in find_sumstats is often NA. In these situations, create N from the sum of "ncase" and "ncontrol".

metagwas <- metagwas %>% 
  dplyr::mutate(N = ifelse(is.na(sample_size), sum(ncase, ncontrol, na.rm = TRUE), sample_size))