# GSEA. Subsetting Gene Ontology, Biological Processes, by gene set families of interest

I have run GSEA - on Gene Ontology , Biological Processes (GO and BP hereafter) - on some Mouse bulk RNA-seq data, and am currently in the process of going through the results. To do this, I have used the library fgsea in the R programming environment.

Prior to running the GSEA, in an attempt to refine the results (many many significant gene sets were found), I wish to exclude particular categories in the GO BP tree of gene sets - see the following link: http://www.informatics.jax.org/vocab/gene_ontology/GO:0008150.

For the purpose of this question, lets assume I would like to exclude all gene sets which fall under the two categories: pigmentation and reproduction. Is there any way in which I can obtain all of the genesets under these two categories, in order to later subset the .gmt file, prior to running fgsea ? Essentially, what I mean is, without going one by one and taking down hundreds of gene sets by hand. Is there a resource which contains this hierarchy of GO BP genesets as some sort of downloadable data structure?

Thanks.