@@ -39,7 +39,7 @@ The dataset is a list object containing two data frames:
3939
4040``` r
4141data(COVID_urine )
42- str(COVID_urine )
42+ print( str(COVID_urine ) )
4343List of 2
4444 $ up : ' data.frame' : 161 obs. of 5 variables :
4545 .. $ metabolite : chr [1 : 161 ] " (S)-a-amino-omega-caprolactam" " 1,5-anhydroglucitol (1,5-AG)" " 1-methyladenine" " 1-methylguanine" ...
@@ -53,60 +53,65 @@ List of 2
5353 .. $ estimate : chr [1 : 206 ] " -2.9115951029999998" " -3.7085696989999999" " -3.6453960510000001" " -1.2098657509999999" ...
5454 .. $ P_value_adjust : num [1 : 206 ] 0.0258 0.049 0.0387 0.0483 0.0369 ...
5555 .. $ gene_type : chr [1 : 206 ] " dn" " dn" " dn" " dn" ...
56+ NULL
5657```
5758
5859## (iii) hypeR-GEM mapping
5960
60- - ` signature ` : Must be a named list, each element is a data frame which
61- has to contain a column with the same name as “reference_key”
62- - ` species ` : c(“Human”, “Mouse”, “Rat”, “Zebrafish”, “Worm”, “Other”)
63- - ` directional ` logical parameter, if TRUE, map metabolites to reactions
64- where these metabolites are product only
65- - ` merge ` : Merge metabolites from different department
66- - ` promiscuous_threshold ` : Gene association threshold of promiscuous
67- metabolites
68- - ` ensemble_id ` : for current version, if ` species != 'Human ` , use
69- ` ensemble_id = FALSE `
70- - ` reference_key = 'refmet_name ` by default
71- - ` background ` is used to compute gene-specific p-values, if
72- ` background = NULL ` , then background = \# of metabolites associated
73- with non-exchange reactions
61+ - ` signature ` : A list of metabolic signatures. Each element must be a
62+ data frame containing a column whose name matches the ` reference_key `
63+ argument, , which specifies the ** RefMet** annotation for each
64+ metabolite.
65+
66+ - ` directional ` : Logical argument specifying the metabolite–reaction
67+ mapping rule.
68+
69+ - If ` TRUE ` , metabolites are mapped only to reactions in which they
70+ appear as products (directional mapping).
71+ - If ` FALSE ` , metabolites are mapped to reactions in which they appear
72+ as either reactants or products (non-directional mapping).
73+
74+ - ` promiscuous_threshold ` : Maximum allowable number of metabolites
75+ associated with a gene. Genes exceeding this threshold are classified
76+ as promiscuous and excluded from downstream analysis.
77+
78+ - ` background ` : Background used in the gene-specific hypergeometric
79+ test. By default, this is set to the total number of metabolites
80+ represented in the GEM.
81+
82+ - ` reference_key ` : A character string indicating the column name in each
83+ signature data frame that contains ** RefMet** metabolite identifiers.
7484
7585``` r
7686# # Undirectional mapping
7787hypeR_GEM_obj <- hypeR.GEM :: signature2gene(signatures = COVID_urine ,
7888 directional = FALSE ,
79- species = " Human" ,
80- merge = TRUE ,
8189 promiscuous_threshold = 500 ,
82- ensemble_id = TRUE ,
8390 reference_key = ' refmet_name' ,
8491 background = NULL )
8592
8693
8794# #Directional mapping
8895hypeR_GEM_obj_di <- hypeR.GEM :: signature2gene(signatures = COVID_urine ,
89- directional = TRUE ,
90- species = " Human" ,
91- merge = TRUE ,
92- promiscuous_threshold = 500 ,
93- ensemble_id = TRUE ,
94- reference_key = ' refmet_name' ,
95- background = NULL )
96+ directional = TRUE ,
97+ promiscuous_threshold = 500 ,
98+ reference_key = ' refmet_name' ,
99+ background = NULL )
96100```
97101
98102## (iv) Enrichment analysis in the gene space
99103
100- Here we use REACTOME genesets as an example
104+ Here we use REACTOME genesets as an example.
101105
102106``` r
103107data(reactome )
104108```
105109
106110### Unweighted (standard) Hypergeometric test
107111
108- The background we use in this analysis equals to all protein(-coding)
109- genes in the Human GEM model
112+ The background we use in this analysis equals to all enzyme-coding genes
113+ in the Human GEM model (for more details, see
114+ [ here] ( https://www.pnas.org/doi/abs/10.1073/pnas.2102344118 ) ).
110115
111116``` r
112117max_fdr <- 0.05
@@ -168,21 +173,23 @@ max_fdr <- 0.05
168173
169174# # Enrichment analysis from undirectional mapping
170175enrichment_wt <- hypeR.GEM :: enrichment(hypeR_GEM_obj ,
171- genesets = reactome ,
172- genesets_name = " REACTOME" ,
173- method = ' weighted' ,
174- weighted_by = ' one_minus_fdr' ,
175- min_metabolite = 2 ,
176- background = 3068 )
176+ genesets = reactome ,
177+ genesets_name = " REACTOME" ,
178+ method = ' weighted' ,
179+ weighted_by = ' fdr' ,
180+ sigmoid_transformation = TRUE ,
181+ min_metabolite = 2 ,
182+ background = 3068 )
177183
178184# # Enrichment analysis from Directional mapping
179185enrichment_wt_di <- hypeR.GEM :: enrichment(hypeR_GEM_obj_di ,
180- genesets = reactome ,
181- genesets_name = " REACTOME" ,
182- method = ' weighted' ,
183- weighted_by = ' one_minus_fdr' ,
184- min_metabolite = 2 ,
185- background = 3068 )
186+ genesets = reactome ,
187+ genesets_name = " REACTOME" ,
188+ method = ' weighted' ,
189+ weighted_by = ' fdr' ,
190+ sigmoid_transformation = TRUE ,
191+ min_metabolite = 2 ,
192+ background = 3068 )
186193```
187194
188195#### Visualization of enrichment analysis
0 commit comments