Skip to content

Commit db51cf3

Browse files
edited vignettes
1 parent 98e7657 commit db51cf3

File tree

10 files changed

+137
-55
lines changed

10 files changed

+137
-55
lines changed

.DS_Store

0 Bytes
Binary file not shown.

R/enrichment.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ enrichment <- function(hypeR_GEM_obj,
2020
genesets_name = 'unknown',
2121
method = c('unweighted','weighted'),
2222
weighted_by = 'one_minus_fdr',
23-
a = -1,
23+
a = 1,
2424
b = -1,
2525
sigmoid_transformation = TRUE,
2626
min_metabolite = 0,

R/signature2gene.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' @param merge merged metabolites in different compartment, for example, MAM001_c, MAM001_e, ... -> MAM001
88
#' @param reference_key the column name in the reference table which represents the standardized names (e.g. "refmet_name")
99
#' @param ensemble_id if the genes in GEM_tables$gene_df is given by Ensemble, then ensemble_id = TRUE, otherwise, ensemble_id = FALSE
10-
#' @param promiscuous_threshold gene association threshold of promiscuous metabolite
10+
#' @param promiscuous_threshold maximum allowable number of associated metabolites per gene; genes exceeding this threshold are excluded.
1111
#' @param background the background of the gene-specific hypergeometric test, default = NULL = number of merged metabolites
1212
#' @return a list containing two element: "mapped_metabolite_signatures" and "gene_tables" for each signature
1313

README.Rmd

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,34 +54,31 @@ str(COVID_urine)
5454

5555
## (iii) hypeR-GEM mapping
5656

57-
- `signature`: Must be a named list, each element is a data frame which has to contain a column with the same name as "reference_key"
58-
- `species`: c("Human", "Mouse", "Rat", "Zebrafish", "Worm", "Other")
59-
- `directional` logical parameter, if TRUE, map metabolites to reactions where these metabolites are product only
60-
- `merge`: Merge metabolites from different department
61-
- `promiscuous_threshold`: Gene association threshold of promiscuous metabolites
62-
- `ensemble_id`: for current version, if `species != 'Human`, use `ensemble_id = FALSE`
63-
- `reference_key = 'refmet_name` by default
64-
- `background` is used to compute gene-specific p-values, if `background = NULL`, then background = # of metabolites associated with non-exchange reactions
57+
- `signature`: A list of metabolic signatures. Each element must be a data frame containing a column whose name matches the `reference_key` argument, , which specifies the **RefMet** annotation for each metabolite.
58+
59+
- `directional`: Logical argument specifying the metabolite–reaction mapping rule.
60+
- If `TRUE`, metabolites are mapped only to reactions in which they appear as products (directional mapping).
61+
- If `FALSE`, metabolites are mapped to reactions in which they appear as either reactants or products (non-directional mapping).
62+
63+
- `promiscuous_threshold`: Maximum allowable number of metabolites associated with a gene. Genes exceeding this threshold are classified as promiscuous and excluded from downstream analysis.
64+
65+
- `background`: Background used in the gene-specific hypergeometric test. By default, this is set to the total number of metabolites represented in the GEM.
66+
67+
- `reference_key`: A character string indicating the column name in each signature data frame that contains **RefMet** metabolite identifiers.
6568

6669
```{r}
6770
## Undirectional mapping
6871
hypeR_GEM_obj <- hypeR.GEM::signature2gene(signatures = COVID_urine,
6972
directional = FALSE,
70-
species = "Human",
71-
merge = TRUE,
7273
promiscuous_threshold = 500,
73-
ensemble_id = TRUE,
7474
reference_key = 'refmet_name',
7575
background = NULL)
7676
7777
7878
##Directional mapping
7979
hypeR_GEM_obj_di <- hypeR.GEM::signature2gene(signatures = COVID_urine,
8080
directional = TRUE,
81-
species = "Human",
82-
merge = TRUE,
8381
promiscuous_threshold = 500,
84-
ensemble_id = TRUE,
8582
reference_key = 'refmet_name',
8683
background = NULL)
8784
```
@@ -166,13 +163,14 @@ enrichment_wt <- hypeR.GEM::enrichment(hypeR_GEM_obj,
166163
background=3068)
167164
168165
## Enrichment analysis from Directional mapping
169-
enrichment_wt_di <- hypeR.GEM::enrichment(hypeR_GEM_obj_di,
170-
genesets = reactome,
171-
genesets_name = "REACTOME",
172-
method='weighted',
173-
weighted_by = 'one_minus_fdr',
174-
min_metabolite = 2,
175-
background=3068)
166+
enrichment_wt_di <- hypeR.GEM::enrichment(hypeR_GEM_obj,
167+
genesets = reactome,
168+
genesets_name = "REACTOME",
169+
method='weighted',
170+
weighted_by = 'fdr',
171+
sigmoid_transformation = TRUE,
172+
min_metabolite = 2,
173+
background=3068)
176174
```
177175

178176

vignettes/.DS_Store

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)