SKED: Systems Biology Tutorial

All the source code for SKED in located online here.  The most up-to-date tutorial is located here.  The tutorial reviews the different SKED functions using examples, and demonstrates their use in analyzing multi-omic data. It was designed to be run using MATLAB 2017a (some of the graphing options do not work with previous versions). Descriptions  and documentation for the functions and classes are located on the Documentation page.

The tutorial with a more complete description and documentation are also contained in a PDF document located here.

 

clear; clc;
disp('SKED Tutorial. Examples of multiple data type retrieval from the MaHPIC and HAMMER projects')
disp('Calling the script that loads data in RAM...')
if ~(exist('cStructures','var'))
    scpMultiDataLoadE04;
end
SKED Tutorial. Examples of multiple data type retrieval from the MaHPIC and HAMMER projects
Calling the script that loads data in RAM...
disp('-----------------------------------------------')
disp('All downloaded data has been loaded into the variable cStructure. ')
disp('Now look at which experiments have been downloaded:')
cExperiments = funGetExperimentNames(cStructures);
display(cExperiments);
-----------------------------------------------
All downloaded data has been loaded into the variable cStructure. 
Now look at which experiments have been downloaded:

cExperiments =

  cell

    'E04'

disp('-----------------------------------------------')
disp('Define experiment of interest')
sExp = 'E04';
disp('Generate Overview of Data of E04. Table shows frequency of protocols')
tExperiment = funGetExperimentSummary(cStructures,sExp);
disp(tExperiment)
-----------------------------------------------
Define experiment of interest
Generate Overview of Data of E04. Table shows frequency of protocols
    Subjects     Clinical    Functional_Genomics    Lipidomics    Metabolomics
    _________    ________    ___________________    __________    ____________

    'Summary'    4           5                      1             4           
    'RMe14'      4           5                      1             4           
    'RFa14'      4           5                      1             4           
    'RIc14'      4           5                      1             4           
    'RSb14'      4           5                      1             4           

disp('-----------------------------------------------')
disp('Generate overview of protocol of E04 Clinical')
sSubjects = 'Summary';
sDataType = 'Clinical';
disp(funGetProtocol(cStructures,sExp,sSubjects,sDataType));
-----------------------------------------------
Generate overview of protocol of E04 Clinical
    Summary_Clinical_Protocol_Names
    _______________________________

    'ME_CBC'                       
    'ME_mpss'                      
    'ME_parasitemia'               
    'ME_retic'                     

disp('-----------------------------------------------')
disp('Generate overview of protocol of E04 Metabolomics of subject RMe14')
sSubjects = 'RMe14';
sDataType = 'Metabolomics';
disp(funGetProtocol(cStructures,sExp,sSubjects,sDataType));
sDataType = 'Clinical';
disp(funGetProtocol(cStructures,sExp,sSubjects,sDataType));
-----------------------------------------------
Generate overview of protocol of E04 Metabolomics of subject RMe14
    RMe14_Metabolomics_Protocol_Names
    _________________________________

    'MB_c18_neg'                     
    'MB_c18_neg_raw'                 
    'MB_c18_pos'                     
    'MB_c18_pos_raw'                 

    RMe14_Clinical_Protocol_Names
    _____________________________

    'ME_CBC'                     
    'ME_mpss'                    
    'ME_parasitemia'             
    'ME_retic'                   

disp('-----------------------------------------------')
disp('Explore what variable are measured for a protocol for  a subject')
disp('Display Variable Names')
sProtocol = 'ME_CBC';
display(funGetVariableNames(cStructures,sExp,sSubjects,sProtocol));
sProtocol = 'ME_parasitemia';
display(funGetVariableNames(cStructures,sExp,sSubjects,sProtocol));
-----------------------------------------------
Explore what variable are measured for a protocol for  a subject
Display Variable Names
  16×1 table

    RMe14_ME_CBC_Variables
    ______________________

    'hematocrit'          
    'hgb'                 
    'mch'                 
    'mchc'                
    'mcv'                 
    'mpv'                 
    'perc_basophils'      
    'perc_eosinophils'    
    'perc_granulocytes'   
    'perc_lymphocytes'    
    'perc_monocytes'      
    'perc_normoblasts'    
    'platelets'           
    'rbc'                 
    'rdw'                 
    'wbc'                 

  2×1 table

    RMe14_ME_parasitemia_Variables
    ______________________________

    'parasites'                   
    'perc_parasites'              

disp('-----------------------------------------------')
cVariables = {'ME_CBC','hgb'};
h =  funPlotVariable(cStructures,sExp,sSubjects,cVariables);
disp(['Plot of time series of hemoglobin. See figure ' num2str(h.Number)] )
-----------------------------------------------
Plot of time series of hemoglobin. See figure 1
disp('-----------------------------------------------')
cVariables = {'ME_CBC','hgb';'ME_parasitemia','parasites'};
h =  funPlotVariable(cStructures,sExp,sSubjects,cVariables);
disp(['Plot of hemoglobin vs. parasite count, i.e. variables from different protocols. See figure ' num2str(h.Number)] )
-----------------------------------------------
Plot of hemoglobin vs. parasite count, i.e. variables from different protocols. See figure 2
disp('-----------------------------------------------')
sSubjects = 'All';
cVariables = {'ME_parasitemia','parasites'};
h =  funPlotVariable(cStructures,sExp,sSubjects,cVariables);
disp(['Plot of parasite counts for all subjects. See figure ' num2str(h.Number)] )
-----------------------------------------------
Plot of parasite counts for all subjects. See figure 3
disp('-----------------------------------------------')
cVariables = {'ME_CBC','hgb'};
h =  funPlotVariable(cStructures,sExp,sSubjects,cVariables);
disp(['Plot of hemoglobin for all subjects. See figure ' num2str(h.Number)] )
-----------------------------------------------
Plot of hemoglobin for all subjects. See figure 4
disp('-----------------------------------------------')
disp('Display protocol types for transcriptomics')
sSubjects = 'RFa14';
sDataType = 'Functional_Genomics';
display(funGetProtocol(cStructures,sExp,sSubjects,sDataType));
-----------------------------------------------
Display protocol types for transcriptomics
  5×1 table

    RFa14_Functional_Genomics_Protocol_Names
    ________________________________________

    'FG_GENE_EXP_LIB'                       
    'FG_GENE_EXP_RAW'                       
    'FG_GENE_EXP_RAW2'                      
    'FG_GENE_EXP_SNM_ADJ'                   
    'FG_GENE_EXP_SNM_REM'                   

disp('-----------------------------------------------')
disp('We could display the variable names for FXGN, i.e. all gene names.')
sProtocol = 'FG_GENE_EXP_RAW2';
disp('To list gene names, uncomment the line that follows in source code.')
%display(funGetVariableNames(cStructures,sExp,sSubjects,sProtocol));
-----------------------------------------------
We could display the variable names for FXGN, i.e. all gene names.
To list gene names, uncomment the line that follows in source code.
disp('-----------------------------------------------')
cVariables = {'FG_GENE_EXP_RAW2','IL27RA'};
h =  funPlotVariable(cStructures,sExp,sSubjects,cVariables);
disp(['Plot of time series for gene IL27RA, one subject. See figure ' num2str(h.Number)] )
-----------------------------------------------
Plot of time series for gene IL27RA, one subject. See figure 5
disp('-----------------------------------------------')
sSubjects = 'All';
h =  funPlotVariable(cStructures,sExp,sSubjects,cVariables);
disp(['Plot of time series for gene IL27RA, all subjects. See figure ' num2str(h.Number)] )
-----------------------------------------------
Plot of time series for gene IL27RA, all subjects. See figure 6
disp('-----------------------------------------------')
disp('Display protocol types for metabolomics')
sSubjects = 'RFa14';
sDataType = 'Metabolomics';
display(funGetProtocol(cStructures,sExp,sSubjects,sDataType));
-----------------------------------------------
Display protocol types for metabolomics
  4×1 table

    RFa14_Metabolomics_Protocol_Names
    _________________________________

    'MB_c18_neg'                     
    'MB_c18_neg_raw'                 
    'MB_c18_pos'                     
    'MB_c18_pos_raw'                 

disp('-----------------------------------------------')
disp('We could display the variable names for all metabolites.')
sProtocol = 'MB_c18_neg';
disp('To list metabolites, uncomment the lines that follows in source code')
%display(funGetVariableNames(cStructures,sExp,sSubjects,sProtocol));
-----------------------------------------------
We could display the variable names for all metabolites.
To list metabolites, uncomment the lines that follows in source code
disp('-----------------------------------------------')
cVariables = {'MB_c18_neg','435_259914_83_940934'};
%h =  funPlotVariable(cStructures,sExp,sSubjects,cVariables);
disp(['Plot the time series of a single metabolite for a single subject. See figure ' num2str(h.Number)] )
-----------------------------------------------
Plot the time series of a single metabolite for a single subject. See figure 6
disp('-----------------------------------------------')
sSubjects = 'All';
%h =  funPlotVariable(cStructures,sExp,sSubjects,cVariables);
disp(['Plot the time series of a single metabolite for all subject. See figure ' num2str(h.Number)] )
-----------------------------------------------
Plot the time series of a single metabolite for all subject. See figure 6
disp('-----------------------------------------------')
disp('Get functional genomic data for all subjects')
sSubjects = 'All';
sProtocol = 'FG_GENE_EXP_RAW2';
strucData = funGetProtocolData(cStructures,sExp,sSubjects,sProtocol) ;
-----------------------------------------------
Get functional genomic data for all subjects
disp('-----------------------------------------------')
disp('Removal of parasite gene counts.')
sIdentifier = 'x_PCOAH';
strucData = funParasiteGeneRemoval(strucData,sIdentifier);
-----------------------------------------------
Removal of parasite gene counts.
disp('-----------------------------------------------')
disp('Normalize count data by library size and remove genes with consistent low counts')
nCount = 10;
strucLibSizeNormalizedData = funLibSizeNormalizationLowCountRemoval(strucData,nCount);
-----------------------------------------------
Normalize count data by library size and remove genes with consistent low counts
disp('-----------------------------------------------')
disp('Define groups for differential expression analysis')
g1 = {1, 1, 1, 1 };
g2 = {2, 2, 2, 2 };
-----------------------------------------------
Define groups for differential expression analysis
disp('-----------------------------------------------')
disp('Conduct differential expression analysis')
tReport = funDeSeq(strucLibSizeNormalizedData,g1,g2);
-----------------------------------------------
Conduct differential expression analysis
disp('-----------------------------------------------')
disp('Display genes with the lowest q-value')
-----------------------------------------------
Display genes with the lowest q-value
tSignificantGenes = sortrows(tReport,2,'ascend');
display(tSignificantGenes(1:20,:));
  20×3 table

       GeneNames        pValue    FoldChange
    ________________    ______    __________

    'x_PCYB_125930_'    0         0.00096074
    'x_PCYB_125940_'    0         0.00039496
    'x_PCYB_125960_'    0         0.00031264
    'x_PCYB_125980_'    0         0.00022577
    'x_PCYB_125990_'    0         0.00031094
    'x_PCYB_126000_'    0         0.00061774
    'x_PCYB_126010_'    0         0.00042114
    'x_PCYB_126040_'    0         0.00089223
    'x_PCYB_126050_'    0         0.00077407
    'x_PCYB_126060_'    0         0.00035306
    'x_PCYB_126070_'    0         0.00015363
    'x_PCYB_126080_'    0         0.00028689
    'x_PCYB_126090_'    0          0.0002936
    'x_PCYB_126110_'    0          0.0002905
    'x_PCYB_126120_'    0         0.00094598
    'x_PCYB_126130_'    0         0.00032161
    'x_PCYB_126140_'    0         0.00045065
    'x_PCYB_126150_'    0         0.00033315
    'x_PCYB_126160_'    0         0.00032159
    'x_PCYB_126170_'    0         0.00039788