Provides a wrapper for sigora::sigora() combined with sigora::ora() and returns a list used for the generation of an .Rmd report.

sigoraWrappR(
  data,
  threshold = 0.5,
  score_col = "",
  GPSrepos = sigora::load_data("kegH"),
  db = "",
  greater_than = TRUE,
  idmap = sigora::idmap
)

Arguments

data

input data.frame (at least two columns, first column containing IDs, other columns numerical ranks, i.e. fold changes)

threshold

fold change threshold above which (in absolute terms) a protein is considered differentially regulated

score_col

Name of the fold change column, in case the input file contains multiple contrasts

GPSrepos

GPS repository used as background, can be generated via sigoraWrappR

db

database used for the generation of the GPS repository

greater_than

Logical. Whether fc_threshold should be applied as greater_than (default is TRUE) or strictly less than (FALSE)

idmap

id mapping table, dafault sigora::idmap

Value

Returns a list containing the following elements:

  • sigora: data.frame containing sigora results

  • ora: data.frame containing ora results

  • fc_threshold: fc_threshold used

  • GPS_repository: GPS repository used, to be reported

  • database: Database used for generating the GPS repository

  • data: data.frame containing Uniprot IDs and fold changes

  • proteinsAfterFiltering: numeric, number of proteins after fc filtering

Examples


library(prora)
df <- get_UniprotID_from_fasta_header(prora::exampleContrastData)
myGPSrepo <- makeGPS_wrappR(ids = df$UniprotID,target = "KEGG")
#> 'select()' returned 1:many mapping between keys and columns
#> Joining, by = "pathwayID"
#> Time difference of 0.6526198 secs
#> Time difference of 1.136227 secs
res <- sigoraWrappR(df,score_col = "estimate", GPSrepos = myGPSrepo$gps,
                     threshold = 0.5)
#>   pathwy.id                                 description    pvalues Bonferroni
#> 1     03010                                    Ribosome 1.143e-221 1.532e-219
#> 2     03060                              Protein export  1.008e-15  1.351e-13
#> 3     04141 Protein processing in endoplasmic reticulum  4.155e-10  5.568e-08
#> 4     05160                                 Hepatitis C  2.422e-08  3.245e-06
#> 5     04144                                 Endocytosis  2.813e-07  3.769e-05
#> 6     04530                              Tight junction  2.479e-06  3.322e-04
#> 7     04510                              Focal adhesion  3.521e-06  4.718e-04
#> 8     04114                              Oocyte meiosis  3.458e-05  4.634e-03
#> 9     04360                               Axon guidance  3.606e-05  4.832e-03
#>   successes PathwaySize        N sample.size
#> 1    654.12     1577.52 27971.51     3192.29
#> 2     39.27       83.71 27971.51     3192.29
#> 3    340.68     2176.34 27971.51     3192.29
#> 4     36.99      119.34 27971.51     3192.29
#> 5    343.99     2334.53 27971.51     3192.29
#> 6     82.61      432.19 27971.51     3192.29
#> 7     37.00      149.14 27971.51     3192.29
#> 8     30.88      122.42 27971.51     3192.29
#> 9     27.62      104.61 27971.51     3192.29

myGPSrepoGO <- makeGPS_wrappR(df$UniprotID, target = "GO")
#> 'select()' returned 1:many mapping between keys and columns
#> 'select()' returned 1:1 mapping between keys and columns
#> Joining, by = "pathwayID"
#> Time difference of 1.365996 mins
#> Time difference of 1.375544 mins
#> Time difference of 1.383482 mins
#> Time difference of 1.391702 mins
#> Time difference of 1.399664 mins
res <- sigoraWrappR(df,score_col = "estimate", GPSrepos = myGPSrepoGO$gps,
                     threshold = 0.5)
#>     pathwy.id
#> 1  GO:0016021
#> 2  GO:0016032
#> 3  GO:0005789
#> 4  GO:0045296
#> 5  GO:0005524
#> 6  GO:0001228
#> 7  GO:0005783
#> 8  GO:0005794
#> 9  GO:0017101
#> 10 GO:0005874
#> 11 GO:0012507
#> 12 GO:0030134
#> 13 GO:0075733
#> 14 GO:0003724
#> 15 GO:0005925
#> 16 GO:0035579
#> 17 GO:0031267
#> 18 GO:0019083
#> 19 GO:0005525
#> 20 GO:0000139
#> 21 GO:0051301
#> 22 GO:0005635
#> 23 GO:0006886
#> 24 GO:0005887
#> 25 GO:0006364
#> 26 GO:0006606
#>                                                                 description
#> 1                                            integral component of membrane
#> 2                                                             viral process
#> 3                                            endoplasmic reticulum membrane
#> 4                                                          cadherin binding
#> 5                                                               ATP binding
#> 6  DNA-binding transcription activator activity, RNA polymerase II-specific
#> 7                                                     endoplasmic reticulum
#> 8                                                           Golgi apparatus
#> 9                             aminoacyl-tRNA synthetase multienzyme complex
#> 10                                                              microtubule
#> 11                                   ER to Golgi transport vesicle membrane
#> 12                               COPII-coated ER to Golgi transport vesicle
#> 13                                         intracellular transport of virus
#> 14                                                    RNA helicase activity
#> 15                                                           focal adhesion
#> 16                                                specific granule membrane
#> 17                                                     small GTPase binding
#> 18                                                      viral transcription
#> 19                                                              GTP binding
#> 20                                                           Golgi membrane
#> 21                                                            cell division
#> 22                                                         nuclear envelope
#> 23                                          intracellular protein transport
#> 24                                    integral component of plasma membrane
#> 25                                                          rRNA processing
#> 26                                              protein import into nucleus
#>       pvalues Bonferroni successes PathwaySize        N sample.size
#> 1  8.598e-148 9.999e-145    656.83     2263.46 124990.2    12271.49
#> 2   2.663e-44  3.097e-41    279.48     1175.51 124990.2    12271.49
#> 3   1.822e-36  2.119e-33    277.46     1278.58 124990.2    12271.49
#> 4   1.166e-26  1.356e-23    273.11     1430.53 124990.2    12271.49
#> 5   5.901e-25  6.863e-22   1171.51     8971.63 124990.2    12271.49
#> 6   6.090e-23  7.083e-20     82.82      253.93 124990.2    12271.49
#> 7   6.563e-23  7.633e-20    454.78     2921.41 124990.2    12271.49
#> 8   4.686e-21  5.450e-18    355.99     2192.06 124990.2    12271.49
#> 9   1.985e-18  2.309e-15     28.00       42.75 124990.2    12271.49
#> 10  1.225e-16  1.425e-13     70.90      244.62 124990.2    12271.49
#> 11  1.602e-16  1.863e-13     36.37       77.95 124990.2    12271.49
#> 12  6.219e-16  7.233e-13     23.00       33.70 124990.2    12271.49
#> 13  1.713e-15  1.992e-12     88.00      364.76 124990.2    12271.49
#> 14  2.413e-15  2.806e-12     99.38      437.49 124990.2    12271.49
#> 15  5.676e-12  6.601e-09    191.35     1180.57 124990.2    12271.49
#> 16  6.186e-12  7.194e-09     36.13      104.39 124990.2    12271.49
#> 17  1.801e-10  2.095e-07     51.28      200.73 124990.2    12271.49
#> 18  5.015e-10  5.832e-07     28.35       77.76 124990.2    12271.49
#> 19  1.099e-09  1.278e-06     82.01      418.32 124990.2    12271.49
#> 20  2.261e-09  2.630e-06     87.43      459.80 124990.2    12271.49
#> 21  2.722e-09  3.166e-06     98.17      541.65 124990.2    12271.49
#> 22  3.829e-09  4.453e-06     31.61       99.99 124990.2    12271.49
#> 23  1.087e-08  1.264e-05     70.16      353.18 124990.2    12271.49
#> 24  1.583e-08  1.841e-05     30.48      100.32 124990.2    12271.49
#> 25  3.118e-08  3.626e-05     43.21      179.92 124990.2    12271.49
#> 26  6.041e-06  7.026e-03     10.16       20.44 124990.2    12271.49
if (FALSE) {
  res$ora
res$sigora$summary_results
res$data
GPSrepo <-  myGPSrepoGO$gps
}