Contents

Citation: if you use MAGeCKFlute in published research, please cite: Binbin Wang, Mei Wang, Wubing Zhang. “Integrative analysis of pooled CRISPR genetic screens using MAGeCKFlute.” Nature Protocols (2019), doi: 10.1038/s41596-018-0113-7.t

1 Input data - weighted gene list

library(MAGeCKFlute)
file1 = file.path(system.file("extdata", package = "MAGeCKFlute"),
                  "testdata/rra.gene_summary.txt")
gdata = ReadRRA(file1)
genelist = gdata$Score
names(genelist) = gdata$id
genelist[1:5]
##   CREBBP    EP300      CHD C16orf72   CACNB2 
##  0.96608  1.02780  0.59265  0.82307  0.39268

2 Enrichment analysis methods

MAGeCKFlute incorporates three enrichment methods, including Over-Representation Test (ORT), Gene Set Enrichment Analysis (GSEA), and Hypergeometric test (HGT). Here, ORT and GSEA are borrowed from R package clusterProfiler (Yu et al. 2012).

2.1 Hypergeometric test

# Alternative functions EnrichAnalyzer and enrich.HGT.
hgtRes1 = EnrichAnalyzer(genelist[genelist< -1], method = "HGT")
head(hgtRes1@result)
##                                                                                                                  ID
## REACTOME_2467813                                                                                   REACTOME_2467813
## REACTOME_72163                                                                                       REACTOME_72163
## GO_TRNA_METABOLIC_PROCESS                                                                 GO_TRNA_METABOLIC_PROCESS
## GO_SISTER_CHROMATID_SEGREGATION                                                     GO_SISTER_CHROMATID_SEGREGATION
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS
## REACTOME_68949                                                                                       REACTOME_68949
##                                                                                                      Description
## REACTOME_2467813                                                                 Separation of Sister Chromatids
## REACTOME_72163                                                                     mRNA Splicing - Major Pathway
## GO_TRNA_METABOLIC_PROCESS                                                                 TRNA METABOLIC PROCESS
## GO_SISTER_CHROMATID_SEGREGATION                                                     SISTER CHROMATID SEGREGATION
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS ANAPHASE PROMOTING COMPLEX DEPENDENT CATABOLIC PROCESS
## REACTOME_68949                                                                       Orc1 removal from chromatin
##                                                                  NES
## REACTOME_2467813                                          -10.350541
## REACTOME_72163                                            -10.123151
## GO_TRNA_METABOLIC_PROCESS                                 -10.970698
## GO_SISTER_CHROMATID_SEGREGATION                            -9.637773
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS  -7.591227
## REACTOME_68949                                             -7.619360
##                                                                 pvalue
## REACTOME_2467813                                          5.258300e-14
## REACTOME_72163                                            1.844729e-13
## GO_TRNA_METABOLIC_PROCESS                                 8.226663e-13
## GO_SISTER_CHROMATID_SEGREGATION                           2.943300e-12
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS 4.637988e-11
## REACTOME_68949                                            8.565588e-11
##                                                               p.adjust
## REACTOME_2467813                                          4.306548e-11
## REACTOME_72163                                            7.554166e-11
## GO_TRNA_METABOLIC_PROCESS                                 2.245879e-10
## GO_SISTER_CHROMATID_SEGREGATION                           6.026407e-10
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS 7.597025e-09
## REACTOME_68949                                            1.069499e-08
##                                                           GeneRatio BgRatio
## REACTOME_2467813                                             24/190 190/190
## REACTOME_72163                                               23/183 183/183
## GO_TRNA_METABOLIC_PROCESS                                    22/178 178/178
## GO_SISTER_CHROMATID_SEGREGATION                              22/189 189/189
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS     14/81   81/81
## REACTOME_68949                                                13/71   71/71
##                                                                                                                                                                                       geneID
## REACTOME_2467813                                          29945/5708/54820/5689/5695/5518/701/25936/5688/8697/81930/5702/5692/5347/10403/5691/147841/9212/100527963/5885/1778/8243/5686/9184
## REACTOME_72163                                                6426/1479/56949/5435/6632/27339/23398/7536/54883/29894/5433/51340/10523/8175/10262/9775/1660/1665/3192/25804/10772/23020/23517
## GO_TRNA_METABOLIC_PROCESS                                  79897/4677/51637/285381/1615/8565/57505/51520/60528/51367/29894/90353/10056/283989/3035/112858/51067/7407/348180/54938/3028/55226
## GO_SISTER_CHROMATID_SEGREGATION                                      29945/79643/79075/5518/701/25936/8697/81930/55294/23397/5347/10403/11331/9212/7153/5885/79892/27243/8243/3192/9184/3837
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS                                                              29945/5708/5689/5695/701/5688/8697/5702/5692/5347/5691/9212/5686/9184
## REACTOME_68949                                                                                                              5708/5689/5695/5688/4175/5702/5692/5691/4171/890/9978/5686/23594
##                                                                                                                                                                                                   geneName
## REACTOME_2467813                                           ANAPC4/PSMD2/NDE/PSMB1/PSMB7/PPP2R1A/BUB1B/NSL1/PSMA7/CDC23/KIF18A/PSMC3/PSMB4/PLK1/NDC80/PSMB3/SPC24/AURKB/PMF1/RAD21/DYNC1H1/SMC1A/PSMA5/BUB3
## REACTOME_72163                                            SRSF1/CSTF3/XAB2/POLR2F/SNRPD/PRPF19/PPWD1/SF1/CWC25/CPSF1/POLR2D/CRNKL1/CHERP/SF3A2/SF3B4/EIF4A3/DHX9/DHX15/HNRNPU/LSM4/SRSF10/SNRNP200/SKIV2L2
## GO_TRNA_METABOLIC_PROCESS                                                 RPP21/NARS/C14orf166/DPH3/DARS/YARS/AARS2/LARS/ELAC2/POP5/CPSF1/CTU1/FARSB/TSEN54/HARS/TP53RK/YARS2/VARS/CTU2/SYS/HSD17B10/NAT10
## GO_SISTER_CHROMATID_SEGREGATION                                       ANAPC4/CHMP6/DSCC1/PPP2R1A/BUB1B/NSL1/CDC23/KIF18A/CDC4/NCAPH/PLK1/NDC80/PHB2/AURKB/TOP2A/RAD21/MCMBP/CHMP2A/SMC1A/HNRNPU/BUB3/KPNB1
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS                                                               ANAPC4/PSMD2/PSMB1/PSMB7/BUB1B/PSMA7/CDC23/PSMC3/PSMB4/PLK1/PSMB3/AURKB/PSMA5/BUB3
## REACTOME_68949                                                                                                                   PSMD2/PSMB1/PSMB7/PSMA7/MCM6/PSMC3/PSMB4/PSMB3/MCM2/CCNA2/RBX1/PSMA5/ORC6
##                                                           Count
## REACTOME_2467813                                             24
## REACTOME_72163                                               23
## GO_TRNA_METABOLIC_PROCESS                                    22
## GO_SISTER_CHROMATID_SEGREGATION                              22
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS    14
## REACTOME_68949                                               13
# hgtRes2 = enrich.HGT(genelist[genelist< -1])
# head(hgtRes2@result)

2.2 Over-representation test

# Alternative functions EnrichAnalyzer and enrich.ORT.
ortRes1 = EnrichAnalyzer(genelist[genelist< -1], method = "ORT")
head(ortRes1@result)
##                                                                                                                  ID
## REACTOME_2467813                                                                                   REACTOME_2467813
## REACTOME_72163                                                                                       REACTOME_72163
## GO_TRNA_METABOLIC_PROCESS                                                                 GO_TRNA_METABOLIC_PROCESS
## GO_SISTER_CHROMATID_SEGREGATION                                                     GO_SISTER_CHROMATID_SEGREGATION
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS
## GO_RNA_3_END_PROCESSING                                                                     GO_RNA_3_END_PROCESSING
##                                                                                                      Description
## REACTOME_2467813                                                                 Separation of Sister Chromatids
## REACTOME_72163                                                                     mRNA Splicing - Major Pathway
## GO_TRNA_METABOLIC_PROCESS                                                                 TRNA METABOLIC PROCESS
## GO_SISTER_CHROMATID_SEGREGATION                                                     SISTER CHROMATID SEGREGATION
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS ANAPHASE PROMOTING COMPLEX DEPENDENT CATABOLIC PROCESS
## GO_RNA_3_END_PROCESSING                                                                     RNA 3 END PROCESSING
##                                                                  NES
## REACTOME_2467813                                          -10.350541
## REACTOME_72163                                            -10.123151
## GO_TRNA_METABOLIC_PROCESS                                 -10.970698
## GO_SISTER_CHROMATID_SEGREGATION                            -9.637773
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS  -7.591227
## GO_RNA_3_END_PROCESSING                                    -8.926127
##                                                                 pvalue
## REACTOME_2467813                                          1.542034e-13
## REACTOME_72163                                            5.619434e-13
## GO_TRNA_METABOLIC_PROCESS                                 2.572894e-12
## GO_SISTER_CHROMATID_SEGREGATION                           8.679735e-12
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS 2.956773e-10
## GO_RNA_3_END_PROCESSING                                   3.467555e-10
##                                                               p.adjust
## REACTOME_2467813                                          4.259099e-10
## REACTOME_72163                                            7.760439e-10
## GO_TRNA_METABOLIC_PROCESS                                 2.368777e-09
## GO_SISTER_CHROMATID_SEGREGATION                           5.993357e-09
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS 1.596231e-07
## GO_RNA_3_END_PROCESSING                                   1.596231e-07
##                                                           GeneRatio   BgRatio
## REACTOME_2467813                                             24/288 190/15323
## REACTOME_72163                                               23/288 183/15323
## GO_TRNA_METABOLIC_PROCESS                                    22/288 178/15323
## GO_SISTER_CHROMATID_SEGREGATION                              22/288 189/15323
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS    14/288  81/15323
## GO_RNA_3_END_PROCESSING                                      18/288 148/15323
##                                                                                                                                                                                       geneID
## REACTOME_2467813                                          29945/5708/54820/5689/5695/5518/701/25936/5688/8697/81930/5702/5692/5347/10403/5691/147841/9212/100527963/5885/1778/8243/5686/9184
## REACTOME_72163                                                6426/1479/56949/5435/6632/27339/23398/7536/54883/29894/5433/51340/10523/8175/10262/9775/1660/1665/3192/25804/10772/23020/23517
## GO_TRNA_METABOLIC_PROCESS                                  79897/4677/51637/285381/1615/8565/57505/51520/60528/51367/29894/90353/10056/283989/3035/112858/51067/7407/348180/54938/3028/55226
## GO_SISTER_CHROMATID_SEGREGATION                                      29945/79643/79075/5518/701/25936/8697/81930/55294/23397/5347/10403/11331/9212/7153/5885/79892/27243/8243/3192/9184/3837
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS                                                              29945/5708/5689/5695/701/5688/8697/5702/5692/5347/5691/9212/5686/9184
## GO_RNA_3_END_PROCESSING                                                                580/64852/6426/170506/1479/2091/60528/9984/114034/80145/29894/5433/55656/56915/54512/9775/134353/3028
##                                                                                                                                                                                                    geneName
## REACTOME_2467813                                          ANAPC4/PSMD2/NDE1/PSMB1/PSMB7/PPP2R1A/BUB1B/NSL1/PSMA7/CDC23/KIF18A/PSMC3/PSMB4/PLK1/NDC80/PSMB3/SPC24/AURKB/PMF-1/RAD21/DYNC1H1/SMC1A/PSMA5/BUB3
## REACTOME_72163                                              SRSF1/CSTF3/XAB2/POLR2F/SNRPD1/PRPF19/PPWD1/SF1/CWC25/CPSF1/POLR2D/CRNKL1/CHERP/SF3A2/SF3B4/EIF4A3/DHX9/DHX15/HNRNPU/LSM4/SRSF10/SNRNP200/MTREX
## GO_TRNA_METABOLIC_PROCESS                                              RPP21/NARS1/RTRAF/DPH3/DARS1/YARS1/AARS2/LARS1/ELAC2/POP5/CPSF1/CTU1/FARSB/TSEN54/HARS1/TP53RK/YARS2/VARS1/CTU2/SARS2/HSD17B10/NAT10
## GO_SISTER_CHROMATID_SEGREGATION                                       ANAPC4/CHMP6/DSCC1/PPP2R1A/BUB1B/NSL1/CDC23/KIF18A/FBXW7/NCAPH/PLK1/NDC80/PHB2/AURKB/TOP2A/RAD21/MCMBP/CHMP2A/SMC1A/HNRNPU/BUB3/KPNB1
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS                                                                ANAPC4/PSMD2/PSMB1/PSMB7/BUB1B/PSMA7/CDC23/PSMC3/PSMB4/PLK1/PSMB3/AURKB/PSMA5/BUB3
## GO_RNA_3_END_PROCESSING                                                                     BARD1/PAPD2/SRSF1/DHX36/CSTF3/FBL/ELAC2/THOC1/TOE1/THOC7/CPSF1/POLR2D/INTS8/EXOSC5/EXOSC4/EIF4A3/LSM11/HSD17B10
##                                                           Count
## REACTOME_2467813                                             24
## REACTOME_72163                                               23
## GO_TRNA_METABOLIC_PROCESS                                    22
## GO_SISTER_CHROMATID_SEGREGATION                              22
## GO_ANAPHASE_PROMOTING_COMPLEX_DEPENDENT_CATABOLIC_PROCESS    14
## GO_RNA_3_END_PROCESSING                                      18
# ortRes2 = enrich.ORT(genelist[genelist< -1])
# head(ortRes2@result)

2.3 Gene set enrichment analysis

# Alternative functions EnrichAnalyzer and enrich.GSE.
gseRes1 = EnrichAnalyzer(genelist, method = "GSEA")
## Warning in .GSEA(geneList = geneList, exponent = exponent, minGSSize =
## minGSSize, : We do not recommend using nPerm parameter incurrent and future
## releases
## Warning in fgsea(pathways = geneSets, stats = geneList, nperm = nPerm, minSize
## = minGSSize, : You are trying to run fgseaSimple. It is recommended to use
## fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument
## in the fgsea function call.
## Warning in preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam, : There are ties in the preranked stats (2.56% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
head(gseRes1@result)
##                                                                                                                    ID
## GO_REGULATION_OF_LIPID_BIOSYNTHETIC_PROCESS                               GO_REGULATION_OF_LIPID_BIOSYNTHETIC_PROCESS
## GO_CELLULAR_KETONE_METABOLIC_PROCESS                                             GO_CELLULAR_KETONE_METABOLIC_PROCESS
## GO_PROTEIN_ACETYLATION                                                                         GO_PROTEIN_ACETYLATION
## GO_ANTIGEN_PROCESSING_AND_PRESENTATION_OF_PEPTIDE_ANTIGEN   GO_ANTIGEN_PROCESSING_AND_PRESENTATION_OF_PEPTIDE_ANTIGEN
## GO_REGULATION_OF_SIGNAL_TRANSDUCTION_BY_P53_CLASS_MEDIATOR GO_REGULATION_OF_SIGNAL_TRANSDUCTION_BY_P53_CLASS_MEDIATOR
## REACTOME_2467813                                                                                     REACTOME_2467813
##                                                                                                        Description
## GO_REGULATION_OF_LIPID_BIOSYNTHETIC_PROCESS                               REGULATION OF LIPID BIOSYNTHETIC PROCESS
## GO_CELLULAR_KETONE_METABOLIC_PROCESS                                             CELLULAR KETONE METABOLIC PROCESS
## GO_PROTEIN_ACETYLATION                                                                         PROTEIN ACETYLATION
## GO_ANTIGEN_PROCESSING_AND_PRESENTATION_OF_PEPTIDE_ANTIGEN   ANTIGEN PROCESSING AND PRESENTATION OF PEPTIDE ANTIGEN
## GO_REGULATION_OF_SIGNAL_TRANSDUCTION_BY_P53_CLASS_MEDIATOR REGULATION OF SIGNAL TRANSDUCTION BY P53 CLASS MEDIATOR
## REACTOME_2467813                                                                   Separation of Sister Chromatids
##                                                                  NES
## GO_REGULATION_OF_LIPID_BIOSYNTHETIC_PROCESS                -1.693697
## GO_CELLULAR_KETONE_METABOLIC_PROCESS                       -1.705535
## GO_PROTEIN_ACETYLATION                                     -1.712543
## GO_ANTIGEN_PROCESSING_AND_PRESENTATION_OF_PEPTIDE_ANTIGEN  -1.914588
## GO_REGULATION_OF_SIGNAL_TRANSDUCTION_BY_P53_CLASS_MEDIATOR -1.693346
## REACTOME_2467813                                           -2.318692
##                                                                  pvalue
## GO_REGULATION_OF_LIPID_BIOSYNTHETIC_PROCESS                0.0005246590
## GO_CELLULAR_KETONE_METABOLIC_PROCESS                       0.0005254861
## GO_PROTEIN_ACETYLATION                                     0.0005260389
## GO_ANTIGEN_PROCESSING_AND_PRESENTATION_OF_PEPTIDE_ANTIGEN  0.0005274262
## GO_REGULATION_OF_SIGNAL_TRANSDUCTION_BY_P53_CLASS_MEDIATOR 0.0005274262
## REACTOME_2467813                                           0.0005299417
##                                                              p.adjust
## GO_REGULATION_OF_LIPID_BIOSYNTHETIC_PROCESS                0.03139187
## GO_CELLULAR_KETONE_METABOLIC_PROCESS                       0.03139187
## GO_PROTEIN_ACETYLATION                                     0.03139187
## GO_ANTIGEN_PROCESSING_AND_PRESENTATION_OF_PEPTIDE_ANTIGEN  0.03139187
## GO_REGULATION_OF_SIGNAL_TRANSDUCTION_BY_P53_CLASS_MEDIATOR 0.03139187
## REACTOME_2467813                                           0.03139187
##                                                                                                                                                                                                                                                                                                             geneID
## GO_REGULATION_OF_LIPID_BIOSYNTHETIC_PROCESS                                                                                                                                                                           4802/4800/51085/672/6309/11218/6713/2222/6647/2194/10654/3837/10399/4047/2475/7536/3157/3692
## GO_CELLULAR_KETONE_METABOLIC_PROCESS                                                                                                                                                          5693/133/84274/6770/5707/2739/5719/5709/10197/5690/9861/51805/7167/5702/5686/5692/5695/5708/5688/2821/2475/5689/5691
## GO_PROTEIN_ACETYLATION                                                                                                                                                              54386/339287/2648/117143/6877/51616/10847/8260/54934/672/64769/8089/8607/80155/2959/84148/79075/86/80018/1111/3054/122830/6880
## GO_ANTIGEN_PROCESSING_AND_PRESENTATION_OF_PEPTIDE_ANTIGEN                                                                                                           10120/5707/10437/5719/5709/6396/10197/1062/3796/10671/51164/84516/5690/11004/9861/11258/829/5702/5686/81930/1778/5692/5695/5708/5688/5689/5691
## GO_REGULATION_OF_SIGNAL_TRANSDUCTION_BY_P53_CLASS_MEDIATOR                                                                                             10524/1655/83990/79915/1263/23246/80279/960/6874/9219/83695/6877/51616/672/5982/64769/6749/22974/112858/6118/5810/23028/4839/55702/9212/83860/1111/580/6880
## REACTOME_2467813                                           5719/23244/9735/11130/54821/55746/5709/79019/6396/23047/10197/1062/1063/57405/3796/113130/10274/5690/11004/9861/5905/701/5518/5702/8697/54820/9184/5686/81930/5885/29945/1778/5692/5695/5708/147841/25936/5688/8243/9212/10403/5689/5347/100527963/5691
##                                                                                                                                                                                                                                                                                                                                        geneName
## GO_REGULATION_OF_LIPID_BIOSYNTHETIC_PROCESS                                                                                                                                                                                                    NFYC/NFYA/MLXIPL/BRCA1/SC5D/DDX20/SQLE/FDFT1/SOD1/FASN/PMVK/KPNB1/RACK1/LSS/MTOR/SF1/HMGCS1/EIF6
## GO_CELLULAR_KETONE_METABOLIC_PROCESS                                                                                                                                                                           PSMB5/ADM/COQ5/STAR/PSMD1/GLO1/PSMD13/PSMD3/PSME3/PSMB2/PSMD6/COQ3/TPI1/PSMC3/PSMA5/PSMB4/PSMB7/PSMD2/PSMA7/GPI/MTOR/PSMB1/PSMB3
## GO_PROTEIN_ACETYLATION                                                                                                                                                                              TERF2IP/MSL1/KAT2A/TADA1/TAF5/TAF9B/SRCAP/NAA10/KANSL2/BRCA1/MEAF6/YEATS4/RUVBL1/NAA15/GTF2B/KAT8/DSCC1/ACTL6A/NAA25/CHEK1/HCFC1/NAA30/TAF9
## GO_ANTIGEN_PROCESSING_AND_PRESENTATION_OF_PEPTIDE_ANTIGEN                                                                                                               ACTR1B/PSMD1/IFI30/PSMD13/PSMD3/SEC13/PSME3/CENPE/KIF2A/DCTN6/DCTN4/DCTN5/PSMB2/KIF2C/PSMD6/DCTN3/CAPZA1/PSMC3/PSMA5/KIF18A/DYNC1H1/PSMB4/PSMB7/PSMD2/PSMA7/PSMB1/PSMB3
## GO_REGULATION_OF_SIGNAL_TRANSDUCTION_BY_P53_CLASS_MEDIATOR                                                                                                                    KAT5/DDX5/BRIP1/ATAD5/PLK3/BOP1/CDK5RAP3/CD44/TAF4/MTA2/RHNO1/TAF5/TAF9B/BRCA1/RFC2/MEAF6/SSRP1/TPX2/TP53RK/RPA2/RAD1/KDM1A/NOP2/YJU2/AURKB/TAF3/CHEK1/BARD1/TAF9
## REACTOME_2467813                                           PSMD13/PDS5A/KNTC1/ZWINT/ERCC6L/NUP133/PSMD3/CENPM/SEC13/PDS5B/PSME3/CENPE/CENPF/SPC25/KIF2A/CDCA5/STAG1/PSMB2/KIF2C/PSMD6/RANGAP1/BUB1B/PPP2R1A/PSMC3/CDC23/NDE1/BUB3/PSMA5/KIF18A/RAD21/ANAPC4/DYNC1H1/PSMB4/PSMB7/PSMD2/SPC24/NSL1/PSMA7/SMC1A/AURKB/NDC80/PSMB1/PLK1/PMF-1/PSMB3
##                                                            Count
## GO_REGULATION_OF_LIPID_BIOSYNTHETIC_PROCESS                   18
## GO_CELLULAR_KETONE_METABOLIC_PROCESS                          23
## GO_PROTEIN_ACETYLATION                                        23
## GO_ANTIGEN_PROCESSING_AND_PRESENTATION_OF_PEPTIDE_ANTIGEN     27
## GO_REGULATION_OF_SIGNAL_TRANSDUCTION_BY_P53_CLASS_MEDIATOR    29
## REACTOME_2467813                                              45
# gseRes2 = enrich.GSE(genelist)
# head(gseRes2@result)

2.4 Visualize enrichment results.

2.4.1 Barplot

require(ggplot2)
df = hgtRes1@result
df$logFDR = -log10(df$p.adjust)
p = BarView(df[1:5,], "Description", 'logFDR')
p = p + labs(x = NULL) + coord_flip()
p

# Or use function barplot from enrichplot package
barplot(hgtRes1, showCategory = 5)

2.4.2 Dot plot

EnrichedView(hgtRes1, bottom = 5, mode = 1)

EnrichedView(hgtRes1, bottom = 5, mode = 2)

dotplot(hgtRes1, showCategory = 5)

2.4.3 Visualization functions from enrichplot (Yu 2018).

hgtRes1@result$geneID = hgtRes1@result$geneName
#cnetplot
cnetplot(hgtRes1, 2)

heatplot(hgtRes1, showCategory = 3, foldChange=genelist)

emapplot(hgtRes1, layout="kk")

2.4.4 Visulization for GSEA enriched categories

#gseaplot
gseaplot(gseRes1, geneSetID = 1, title = gseRes1$Description[1])

gseaplot(gseRes1, geneSetID = 1, by = "runningScore", title = gseRes1$Description[1])

gseaplot(gseRes1, geneSetID = 1, by = "preranked", title = gseRes1$Description[1])

#or
gseaplot2(gseRes1, geneSetID = 1:3)

2.5 Type of gene sets for enrichment analysis

For enrichment analysis, MAGeCKFlute signifies the public available gene sets, including Pathways (PID, KEGG, REACTOME, BIOCARTA, C2CP), GO terms (GOBP, GOCC, GOMF), Complexes (CORUM) and molecular signature from MsigDB (c1, c2, c3, c4, c5, c6, c7, HALLMARK).

2.5.1 Functional enrichment analysis on GO terms and pathways

Analysis of high-throughput data increasingly relies on pathway annotation and functional information derived from Gene Ontology, which is also useful in the analysis of CRISPR screens.

## KEGG and REACTOME pathways
enrich = EnrichAnalyzer(geneList = genelist[genelist< -1], type = "KEGG+REACTOME")
EnrichedView(enrich, bottom = 5)

## Only KEGG pathways
enrich = EnrichAnalyzer(geneList = genelist[genelist< -1], type = "KEGG")
EnrichedView(enrich, bottom = 5)

## Gene ontology
enrichGo = EnrichAnalyzer(genelist[genelist< -1], type = "GOBP+GOMF")
EnrichedView(enrichGo, bottom = 5)

2.5.2 Protein complex analysis

Functional annotations from the pathways and GO are powerful in the context of network dynamics. However, the approach has limitations in particular for the analysis of CRISPR screenings, in which elements within a protein complex rather than complete pathways might have a strong selection. So we incorporate protein complex resource from CORUM database, which enable identification of essential protein complexes from the CRISPR screens.

enrichPro = EnrichAnalyzer(genelist[genelist< -1], type = "CORUM")
EnrichedView(enrichPro, bottom = 5)

2.5.3 Enrichment analysis on the combination of the gene sets

enrichComb = EnrichAnalyzer(genelist[genelist< -1], type = "GOBP+KEGG")
EnrichedView(enrichComb, bottom = 5)

2.6 Limit the size of gene sets for testing

enrich = EnrichAnalyzer(genelist[genelist< -1], type = "GOBP", limit = c(1, 80))
EnrichedView(enrich, bottom = 5)

2.7 Remove redundant results using EnrichedFilter.

enrich1 = EnrichAnalyzer(genelist[genelist< -1], type = "GOMF+GOBP")
enrich2 = EnrichAnalyzer(genelist[genelist< -1], type = "GOMF+GOBP", filter = TRUE)
enrich3 = EnrichedFilter(enrich1)
EnrichedView(enrich1, bottom = 15)

EnrichedView(enrich2, bottom = 15)

EnrichedView(enrich3, bottom = 15)

3 Session info

sessionInfo()
## R version 4.0.0 (2020-04-24)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.4 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.11-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.11-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] ggplot2_3.3.0     MAGeCKFlute_1.8.0 BiocStyle_2.16.0 
## 
## loaded via a namespace (and not attached):
##   [1] fastmatch_1.1-0        BiocFileCache_1.12.0   plyr_1.8.6            
##   [4] igraph_1.2.5           splines_4.0.0          BiocParallel_1.22.0   
##   [7] pathview_1.28.0        sva_3.36.0             urltools_1.7.3        
##  [10] digest_0.6.25          htmltools_0.4.0        GOSemSim_2.14.0       
##  [13] viridis_0.5.1          magick_2.3             GO.db_3.10.0          
##  [16] magrittr_1.5           memoise_1.1.0          limma_3.44.0          
##  [19] Biostrings_2.56.0      annotate_1.66.0        graphlayouts_0.7.0    
##  [22] matrixStats_0.56.0     askpass_1.1            enrichplot_1.8.0      
##  [25] prettyunits_1.1.1      colorspace_1.4-1       blob_1.2.1            
##  [28] rappdirs_0.3.1         ggrepel_0.8.2          xfun_0.13             
##  [31] dplyr_0.8.5            crayon_1.3.4           RCurl_1.98-1.2        
##  [34] jsonlite_1.6.1         graph_1.66.0           scatterpie_0.1.4      
##  [37] genefilter_1.70.0      survival_3.1-12        glue_1.4.0            
##  [40] polyclip_1.10-0        gtable_0.3.0           zlibbioc_1.34.0       
##  [43] XVector_0.28.0         Rgraphviz_2.32.0       BiocGenerics_0.34.0   
##  [46] scales_1.1.0           DOSE_3.14.0            msigdbr_7.0.1         
##  [49] pheatmap_1.0.12        DBI_1.1.0              edgeR_3.30.0          
##  [52] Rcpp_1.0.4.6           viridisLite_0.3.0      xtable_1.8-4          
##  [55] progress_1.2.2         gridGraphics_0.5-0     bit_1.1-15.2          
##  [58] europepmc_0.3          stats4_4.0.0           httr_1.4.1            
##  [61] fgsea_1.14.0           RColorBrewer_1.1-2     ellipsis_0.3.0        
##  [64] pkgconfig_2.0.3        XML_3.99-0.3           farver_2.0.3          
##  [67] dbplyr_1.4.3           locfit_1.5-9.4         ggplotify_0.0.5       
##  [70] tidyselect_1.0.0       labeling_0.3           rlang_0.4.5           
##  [73] reshape2_1.4.4         AnnotationDbi_1.50.0   munsell_0.5.0         
##  [76] tools_4.0.0            downloader_0.4         RSQLite_2.2.0         
##  [79] ggridges_0.5.2         evaluate_0.14          stringr_1.4.0         
##  [82] yaml_2.2.1             knitr_1.28             bit64_0.9-7           
##  [85] tidygraph_1.1.2        purrr_0.3.4            KEGGREST_1.28.0       
##  [88] dendextend_1.13.4      ggraph_2.0.2           nlme_3.1-147          
##  [91] KEGGgraph_1.48.0       DO.db_2.9              xml2_1.3.2            
##  [94] biomaRt_2.44.0         compiler_4.0.0         curl_4.3              
##  [97] png_0.1-7              ggsignif_0.6.0         tibble_3.0.1          
## [100] tweenr_1.0.1           stringi_1.4.6          lattice_0.20-41       
## [103] Matrix_1.2-18          ggsci_2.9              vctrs_0.2.4           
## [106] pillar_1.4.3           lifecycle_0.2.0        BiocManager_1.30.10   
## [109] triebeard_0.3.0        data.table_1.12.8      cowplot_1.0.0         
## [112] bitops_1.0-6           qvalue_2.20.0          R6_2.4.1              
## [115] bookdown_0.18          gridExtra_2.3          IRanges_2.22.0        
## [118] codetools_0.2-16       MASS_7.3-51.6          assertthat_0.2.1      
## [121] openssl_1.4.1          withr_2.2.0            S4Vectors_0.26.0      
## [124] mgcv_1.8-31            parallel_4.0.0         hms_0.5.3             
## [127] clusterProfiler_3.16.0 grid_4.0.0             tidyr_1.0.2           
## [130] rmarkdown_2.1          rvcheck_0.1.8          ggpubr_0.2.5          
## [133] ggforce_0.3.1          Biobase_2.48.0

References

Wei Li, Han Xu, Johannes Köster, and X. Shirley Liu. 2015. “Quality control, modeling, and visualization of CRISPR screens with MAGeCK-VISPR.” https://genomebiology.biomedcentral.com/articles/10.1186/s13059-015-0843-6.

Wei Li, Tengfei Xiao, Han Xu, and X Shirley Liu. 2014. “MAGeCK enables robust identification of essential genes from genome-scale CRISPR/Cas9 knockout screens.” https://genomebiology.biomedcentral.com/articles/10.1186/s13059-014-0554-4.

Yu, Guangchuang. 2018. Enrichplot: Visualization of Functional Enrichment Result. https://github.com/GuangchuangYu/enrichplot.

Yu, Guangchuang, Li-Gen Wang, Yanyan Han, and Qing-Yu He. 2012. “ClusterProfiler: An R Package for Comparing Biological Themes Among Gene Clusters.” OMICS: A Journal of Integrative Biology 16 (5):284–87. https://doi.org/10.1089/omi.2011.0118.