Skip to content

Commit 0e142d5

Browse files
edited documentations
1 parent d9ae914 commit 0e142d5

File tree

9 files changed

+122
-90
lines changed

9 files changed

+122
-90
lines changed

.DS_Store

0 Bytes
Binary file not shown.

README.Rmd

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The dataset is a list object containing two data frames:
4949

5050
```{r}
5151
data(COVID_urine)
52-
str(COVID_urine)
52+
print(str(COVID_urine))
5353
```
5454

5555
## (iii) hypeR-GEM mapping
@@ -77,15 +77,15 @@ hypeR_GEM_obj <- hypeR.GEM::signature2gene(signatures = COVID_urine,
7777
7878
##Directional mapping
7979
hypeR_GEM_obj_di <- hypeR.GEM::signature2gene(signatures = COVID_urine,
80-
directional = TRUE,
81-
promiscuous_threshold = 500,
82-
reference_key = 'refmet_name',
83-
background = NULL)
80+
directional = TRUE,
81+
promiscuous_threshold = 500,
82+
reference_key = 'refmet_name',
83+
background = NULL)
8484
```
8585

8686
## (iv) Enrichment analysis in the gene space
8787

88-
Here we use REACTOME genesets as an example
88+
Here we use REACTOME genesets as an example.
8989

9090
```{r}
9191
data(reactome)
@@ -94,7 +94,7 @@ data(reactome)
9494

9595
### Unweighted (standard) Hypergeometric test
9696

97-
The background we use in this analysis equals to all protein(-coding) genes in the Human GEM model
97+
The background we use in this analysis equals to all enzyme-coding genes in the Human GEM model (for more details, see [here](https://www.pnas.org/doi/abs/10.1073/pnas.2102344118)).
9898

9999
```{r}
100100
max_fdr <- 0.05
@@ -155,15 +155,16 @@ max_fdr <- 0.05
155155
156156
## Enrichment analysis from undirectional mapping
157157
enrichment_wt <- hypeR.GEM::enrichment(hypeR_GEM_obj,
158-
genesets = reactome,
159-
genesets_name = "REACTOME",
160-
method='weighted',
161-
weighted_by = 'one_minus_fdr',
162-
min_metabolite = 2,
163-
background=3068)
158+
genesets = reactome,
159+
genesets_name = "REACTOME",
160+
method='weighted',
161+
weighted_by = 'fdr',
162+
sigmoid_transformation = TRUE,
163+
min_metabolite = 2,
164+
background=3068)
164165
165166
## Enrichment analysis from Directional mapping
166-
enrichment_wt_di <- hypeR.GEM::enrichment(hypeR_GEM_obj,
167+
enrichment_wt_di <- hypeR.GEM::enrichment(hypeR_GEM_obj_di,
167168
genesets = reactome,
168169
genesets_name = "REACTOME",
169170
method='weighted',

README.md

Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The dataset is a list object containing two data frames:
3939

4040
``` r
4141
data(COVID_urine)
42-
str(COVID_urine)
42+
print(str(COVID_urine))
4343
List 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
7787
hypeR_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
8895
hypeR_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
103107
data(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
112117
max_fdr <- 0.05
@@ -168,21 +173,23 @@ max_fdr <- 0.05
168173

169174
## Enrichment analysis from undirectional mapping
170175
enrichment_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
179185
enrichment_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

man/figures/unnamed-chunk-10-1.png

3.74 KB
Loading

man/figures/unnamed-chunk-11-1.png

3.27 KB
Loading

vignettes/.DS_Store

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)