Reactobiome and reaction richness for Liver Cirrhosis gut microbiome samples

Prerequisites

Before starting, make sure you have the following:

Load Bacterial Abundance

Load bacterial abundance data from an Excel file

cd 'to\your\local\directory'
[abundance,infoFile,~]=xlsread('BacterialAbundace_LiverCirrhosis.xlsx');;
modelList = infoFile(2:end, 1);
sampleName = infoFile(1, 2:end);

%check the samples,
% Remove the MSP name if the abundance of bacteria is zero in all samples
abundance=abundance(sum(abundance,2)~=0,:);
modelList=modelList(sum(abundance,2)~=0,:);
% Remove the samples if there is no bacterial abundance
sampleName=sampleName(sum(abundance,1)~=0);
abundance=abundance(:,sum(abundance,1)~=0);

Generate microbiome reaction richness.

Provide the path where the models are saved and the name of the model assigned in the .mat files as follows:

PathToModels.path='.\GEMmodels';
PathToModels.name='model';

Generate the gut microbiome reaction richness for all individuals

richness= RxnRichnessGenerator(modelList,PathToModels,abundance,sampleName);

Box plot of reaction richness for normal and disease samples.

metadata=readtable('metadata_LiverCirrhosis.txt');
meta1 = table2array(metadata(:,2));
meta1 = char(meta1);
eichnessValue=richness{:,2};
boxplot(eichnessValue,meta1)
title('Reaction richness')

richness

Generate reactobiome.

Reactobiome= ReactobiomeGenerator(modelList,PathToModels,abundance,sampleName);