Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #187

Merged
merged 2 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions analysis/conservedMoieties/results/DAS/DAS_CD.xml

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified analysis/conservedMoieties/tutorial_identifyConservedMoieties.mlx
Binary file not shown.
Binary file modified analysis/conservedMoieties/tutorial_initConservedMoietyPaths.mlx
Binary file not shown.
Binary file not shown.
73 changes: 30 additions & 43 deletions analysis/microbiomeModelingToolbox/tutorial_mgPipe.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

taxonLevel='Species';

createPanModels(modPath,panPath,taxonLevel,numWorkers);
createPanModels(modPath,panPath,taxonLevel);
%%
% By setting panPath as the input variable modPath for initMgPipe, personalized
% microbiome models for the samples from the above study with the EMBL-EBI accession
Expand Down Expand Up @@ -217,24 +217,26 @@
% are computed:*
%
% Flux Variability analysis for all the exchange reactions of the diet and fecal
% compartment are performed and saved in a file called "simRes" and exported in
% spreadsheet format in the following files:
%%
% # *netSecretionFluxes.csv* contains the maximal secretion potential of each
% sample for each metabolite that could be produced by at least one microbe. Note
% that secretion potential is substracted by dietary uptake of each metabolite,
% hence, only the metabolite production explicitly resulting from microbiome metabolism
% are quantified and shown in the table. The unit is mmol/sample/day.
% # *netUptakeFluxes.csv* contains the maximal uptake potential of each sample
% for each metabolite that could be taken up by at least one microbe. Note that
% uptake potential is substracted by the fraction of dietary metabolites that
% are only passing through and being excreted, hence, only the quantities of each
% metabolite that are actively being consumed by at least one microbe are shown
% in the table. The unit is mmol/sample/day.
%%
% The similarity of metabolic secretion profiles (using the net secretion potential
% as features) between individuals is also evaluated with classical multidimensional
% scaling.
% compartment are performed and temporarily saved in a file called "simRes". Specifically
% what is temporarily saved is:
%%
% # *fvaCt* a cell array containing min flux through uptake and max through
% secretion exchanges
% # *nsCt* a cell array containing max flux through uptake and min trough secretion
% exchanges
% # *presol* an array containing the value of objectives for each microbiota
% model with rich and selected diet
% # *inFesMat* cell array containing the names of the microbiota models that
% reported an infeasible status when solved for their objective
%%
% Finally, the net uptake and secretion potential are computed in a metabolite
% resolved manner and saved in the output variables 'netSecretionFluxes' and netUptakeFluxes,
% and the files 'netSecretionFluxes.csv' and 'netUptakeFluxes.csv' in the results
% folder. They indicate the maximal uptake and production, respectively, of each
% metabolite and are computed as the absolute value of the sum of the maximal
% secretion flux with the maximal uptake flux. The similarity of metabolic secretion
% profiles (using the net secretion potential as features) between individuals
% is also evaluated with classical multidimensional scaling.
%
% The output file "ReactionAbundance.csv" in the Results folder contains the
% relative abundance of each reaction in each sample. A description of each reaction
Expand All @@ -247,7 +249,7 @@
%
% In the export of models with dietary constraints is desired, they will be
% found in the folder constrModelsPath.
%% Correlation between computed uptake and secretion fluxes and abundances and different taxon levels
%% Correlation between computed fluxes and abundances and different taxon levels
% For an overview of metabolite-taxa relationships, the computed uptake and
% secretion profiles for each metabolite can be correlated with taxon abundances
% on different levels (species, genus, etc.). Note that a correlation may not
Expand All @@ -267,12 +269,6 @@
% Path to fluxes that should be correlated

fluxPath = [pwd filesep 'Results' filesep 'inputDiet_net_secretion_fluxes.csv'];
%%
% Correlations with uptake fluxes are computed similarly by using inputDiet_net_uptake_fluxes.csv
% as the input file instead.
%
% Run the function.

corrMethod = 'Spearman';
[FluxCorrelations, PValues, TaxonomyInfo] = correlateFluxWithTaxonAbundance(abunFilePath, fluxPath, taxInfo, corrMethod);
%%
Expand All @@ -281,9 +277,8 @@
% with annotations, e.g., in R.
%% Metabolite-resolved plots of metabolite-strain correlations
% For a more detailed view of the relationships between metabolites and abundances,
% the secretion fluxes can also be directly plotted against organism abundances.
% This may reveal microbes that are bottlenecks for the production of metabolites
% of interest.
% the fluxes can also be directly plotted against organism abundances. This may
% reveal microbes that are bottlenecks for the production of metabolites of interest.
%
% We will define the metabolites to analyze (default: all exchanged metabolites
% in the models). As an example, we will take only one metabolite, acetate. Enter
Expand All @@ -301,10 +296,6 @@
plotFluxesAgainstOrganismAbundances(abunFilePath,fluxPath,metList);
%%
% Afterwards, the plots will be in the subfolder Metabolite_plots.
%
% Note that the microbe-metabolite relationships for metabolite uptake can be
% plotted in the same way by using inputDiet_net_uptake_fluxes.csv as the input
% file instead.
%% Stratification of samples
% If metadata for the analyzed samples is available (e.g., disease state), the
% samples can be stratified based on this classification. To provide metadata,
Expand Down Expand Up @@ -354,18 +345,17 @@
% p-values and test results. If there are any fluxes or abundances that significantly
% differed between groups, there will be files ending in "significantFeatures.txt"
% listing only these instances. Created violin plots will be found in the folder
% "ViolinPlots". There will be an image in png format for each predicted metabolite's
% uptake and secretion potential.
%% Targeted analysis: Strain-level contributions to the uptake and secretion of metabolites of interest
% "ViolinPlots". There will be an image in png and pdf format for each predicted
% metabolite's uptake and secretion potential. There will also be a file ending
% in "All_plots.pdf" containing all plots.
%% Targeted analysis: Strain-level contributions to metabolites of interest
% For metabolites of particular interest (e.g., for which the community-wide
% secretion potential was significantly different between disease cases and controls),
% the strains consuming and secreting the metabolites in each sample may be computed.
% This will yield insight into the contribution of each strain to each metabolite.
% Note that for metabolites for which the community wide secretion potential did
% not differ, the strains contributing to metabolites may still be significantly
% different. The contribution of each strain to metabolite consumption is also
% computed through the same function. If pan-models are used, the contributions
% will be on the species, genus, etc. level.
% different.
%
% The first step for the preparation of targeted analyses is the export of models
% that had already been constrained with the simulated dietary regime. They can
Expand All @@ -389,10 +379,7 @@
% internal exchange reactions that had nonzero flux for each analyzed metabolite.
% The output 'maxFluxes' shows the corresponding forward fluxes. 'fluxSpans' shows
% the distance between minimal and maximal fluxes for each internal exchange reaction
% with nonzero flux for each metabolite. Note that contrary to conventions in
% the field, in this case, *minFluxes represent internal secretion fluxes* for
% each strain and each metabolite and *maxFluxes represent internal uptake fluxes*
% for each strain and each metabolite.
% with nonzero flux for each metabolite.
%
% Afterwards, statistical analysis of the strain contributions can also be performed.
%
Expand Down
Binary file modified analysis/microbiomeModelingToolbox/tutorial_mgPipe.mlx
Binary file not shown.
Binary file not shown.
Loading