MetabolicFeatures¶
This process performs enrichment analysis for the metabolic pathways for each group in each subset.
The enrichment analysis is done with fgsea
package or the GSEA_R
package.
Input¶
sobjfile
: The Seurat object file in rds.
It should be loaded as a Seurat object
Output¶
outdir
: Default:{{in.sobjfile | stem}}.pathwayfeatures
.
The output directory.
It will contain the GSEA results and plots.
Environment Variables¶
ncores
(type=int;pgarg
): Default:1
.
Number of cores to use for parallelization for the comparisons for each subset and group.
Defaults toScrnaMetabolicLandscape.ncores
.prerank_method
(choice
): Default:signal_to_noise
.
Method to use for gene preranking.
Signal to noise: the larger the differences of the means (scaled by the standard deviations); that is, the more distinct the gene expression is in each phenotype and the more the gene acts as a “class marker.”.
Absolute signal to noise: the absolute value of the signal to noise.
T test: Uses the difference of means scaled by the standard deviation and number of samples.
Ratio of classes: Uses the ratio of class means to calculate fold change for natural scale data.
Diff of classes: Uses the difference of class means to calculate fold change for nature scale data Log2 ratio of classes: Uses the log2 ratio of class means to calculate fold change for natural scale data. This is the recommended statistic for calculating fold change for log scale data.signal_to_noise
: Signal to noises2n
: Alias of signal_to_noiseabs_signal_to_noise
: absolute signal to noiseabs_s2n
: Alias of abs_signal_to_noiset_test
: T testratio_of_classes
: Also referred to as fold changediff_of_classes
: Difference of class meanslog2_ratio_of_classes
: Log2 ratio of class means
gmtfile
(pgarg
): The GMT file with the metabolic pathways.
Defaults toScrnaMetabolicLandscape.gmtfile
subset_by
(pgarg;readonly
): Subset the data by the given column in the metadata. For example,Response
.
NA
values will be removed in this column.
Defaults toScrnaMetabolicLandscape.subset_by
If None, the data will not be subsetted.group_by
(pgarg;readonly
): Group the data by the given column in the metadata. For example,cluster
.
Defaults toScrnaMetabolicLandscape.group_by
comparisons
(type=list
): Default:[]
.
The comparison groups to use for the analysis.
If not provided, each group in thegroup_by
column will be used to compare with the other groups.
If a single group is provided as an element, it will be used to compare with all the other groups.
For example, if we havegroup_by = "cluster"
and we have1
,2
and3
in thegroup_by
column, we could havecomparisons = ["1", "2"]
, which will compare the group1
with groups2
and3
, and the group2
with groups1
and3
. We could also havecomparisons = ["1:2", "1:3"]
, which will compare the group1
with group2
and group1
with group3
.fgsea_args
(type=json
): Default:{}
.
Other arguments for thefgsea::fgsea()
function.
For example,{"minSize": 15, "maxSize": 500}
.
See https://rdrr.io/bioc/fgsea/man/fgsea.html for more details.plots
(type=json
): Default:{'Summary Plot': Diot({'plot_type': 'summary', 'top_term': 10, 'devpars': Diot({'res': 100})}), 'Enrichment Plots': Diot({'plot_type': 'gsea', 'top_term': 10, 'devpars': Diot({'res': 100})})}
.
The plots to generate.
Names will be used as the title for the plot. Values will be the arguments passed tobiopipen.utils::VizGSEA()
function.
See https://pwwang.github.io/biopipen.utils.R/reference/VizGSEA.html.
A keylevel
is supported to specify the level of the plot.
Possible values arecase
, which includes all subsets and groups in the case;subset
, which includes all groups in the subset; otherwise, it will plot for the groups.
Forcase
/subset
level plots, currentplot_type
only "dot" is supported for now, then the values will be passed toplotthis::DotPlot()
cases
(type=json
): Default:{}
.
Multiple cases for the analysis.
If you only have one case, you can specify the parameters directly toenvs.prerank_method
,envs.subset_by
,envs.group_by
,envs.comparisons
,envs.fgsea_args
andenvs.plots
.
The name of this default case will beenvs.subset_by
.
If you have multiple cases, you can specify the parameters for each case in a dictionary. The keys will be the names of the cases and the values will be dictionaries with the parameters for each case, where the values will be inherited fromenvs.prerank_method
,envs.subset_by
,envs.group_by
,envs.comparisons
,envs.fgsea_args
andenvs.plots
.