Introduction

The following graphs uses information collected by Alice B. Popejoy and Stephanie M. Fullerton from the genome-wide association studies (GWAS) Catalog. The GWAS Catalog is produced by the US National Human Genome Research Institute in partnership with the European Bioinformatics Institute where every week, curators are notified of any new GWAS in PubMed. These new GWAS are then checked for validation before being added to the catalogue. In 2009, 96% of participants in GWAS were of European descent. Popejoy and Fullerton wanted to collect 2016 samples to see changes in diversity.

Create data

#pie chart with GWAS 2009 European, Asian, and other non-Europeans percentages
euro_asian_other2009<-c(96,3,1)
labels1<-c("European\nAncestry","\nAsian\nAncestry","Other\nnon-European Ancestry\n\n")
pieColors2 <- c(8,6,5)
pie(euro_asian_other2009, labels1, edges = 200, radius = 0.7,
    angle = 45, col = pieColors2, 
    main = "GWAS Demography 2009:\nEuropean, Asian, and Other Non-European")

#pie chart with GWAS 2016 European, Asian, and other non-Europeans percentages
euro_asian_other2016<-c(81,14,5)
labels2<-c("European\nAncestry","Asian\nAncestry","Other\nnon-European\nAncestry")
pie(euro_asian_other2016, labels2, edges = 200, radius = 0.7,
    angle = 45, col = pieColors2, 
    main = "GWAS Demography 2016:\nEuropean, Asian, and Other Non-European")

Pie graphs

# set up par()
par(mfrow = c(1,2), mar = c(2,3,1,5))

#pie graphs 1
# add main, init.angle, radius, and col
pie(euro_asian_other2009, labels1, edges = 200, radius = 1,
    init.angle = -82, col = c(1,7,2), 
    main = "GWAS Demography 2009:\nEuropean, Asian, and Other Non-European")

# pie graph 2
# add main, init.angle, radius, and col
pie(euro_asian_other2016, labels2, edges = 200, radius = 1,
    init.angle = -82, col = c(1,7,2), 
    main = "GWAS Demography 2016:\nEuropean, Asian, and Other Non-European")

Bar graphs

# data
dat2016 <- c(14, 3,1,0.54,0.28,0.08,0.05)
dat2016_rev <- rev(dat2016)
barplotdata2016 <- matrix(c(dat2016_rev))

# labels
labels_x <- rev(c("Asian","African","Mixed", "Hispanic &\nLatin American",
                        "Pacific Islander","Arab & Middle East","Native peoples"))

par(mfrow = c(1,1))

barplot(barplotdata2016,
        width = 0.01, 
        xlim = c(0,0.1),
         axes = F,
        col = c(1,2,3,4,5,6,7),
        legend.text = labels_x)