goAnalysis

PURPOSE ^

This script analyze C. Elegans neural network, Drosophila's cnetral complex

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 This script analyze C. Elegans neural network, Drosophila's cnetral complex
 neural network, and several theoretical networks generated based on C. Elegans
 neural network.

 The standard process of analysis:
 # load neural network
 # analyse neural network
 # create theoretical networks based on the loaded neural network
 # analyse theoretical networks
 # compute the average of realisation results

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % This script analyze C. Elegans neural network, Drosophila's cnetral complex
0002 % neural network, and several theoretical networks generated based on C. Elegans
0003 % neural network.
0004 %
0005 % The standard process of analysis:
0006 % # load neural network
0007 % # analyse neural network
0008 % # create theoretical networks based on the loaded neural network
0009 % # analyse theoretical networks
0010 % # compute the average of realisation results
0011 
0012 %   ---------
0013 %   Yen-Nan Lin, NTHU, 2010-2014, Matlab 2012a
0014 
0015 close all;
0016 clear all;
0017 goIncludeToolbox;
0018 
0019 % parameter for analysis
0020 parameter.MAX_LEVEL = 8;
0021 parameter.REPEAT_TIMES = 100;
0022 parameter.STRIDE_SEED_NUMBER = 10000;
0023 parameter.REWIRE_PROB_RING = 0.3;
0024 parameter.ANALYSIS_RECURRENTION = false;
0025 
0026 % rewiring probabilites of SW networks
0027 REWIRE = [0.01 0.03 0.05 0.1 0.15 0.20 0.4 0.5];
0028 
0029 % load parameter struct into base workspace
0030 loadStruct(parameter, 'base');
0031 
0032 % C. Elegans network analysis
0033 ceNetwork = bioNetwork('./CE_ExpData/C_elegans_Matrix.mat', 'mat');
0034 ceNetwork = readLabel(ceNetwork, './CE_ExpData/C_elegans_Label.txt');
0035 ceNetwork = setIO(ceNetwork, ceNetwork.inputList, ceNetwork.outputList);
0036 rand('seed', 0);
0037 ceNetwork = levelAnalysis(ceNetwork, MAX_LEVEL);
0038 
0039 % generate theoretical networks based on C. Elegans neural network
0040 % and analyze the networks
0041 [meanNetworks, allNetworks, stdNetworks] = ...
0042     makeNetAndAnalysis(ceNetwork, parameter);
0043 % load meanNetworks and allNetworks to base workspace
0044 loadStruct(meanNetworks, 'base');
0045 loadStruct(allNetworks, 'base');
0046 loadStruct(stdNetworks, 'base');
0047 clear meanNetworks allNetworks stdNetworks
0048 
0049 % central complex network analysis
0050 cxNetwork = bioNetwork('./PcbExpData/CXGraph_AllRevised.mat', 'mat');
0051 cxNetwork = readLabel(cxNetwork, './PcbExpData/CXLabel_AllRevised.txt');
0052 cxNetwork = setIO(cxNetwork, cxNetwork.inputList, cxNetwork.outputList);
0053 rand('seed', 0);
0054 cxNetwork = levelAnalysis(cxNetwork, MAX_LEVEL);
0055 
0056 % analyze SW netwroks with rewiring probabilites from 0.01 to 0.5
0057 tmpMeanNumEdge = full(mean(sum(ceNetwork.matrix')));
0058 % change rewire probabilites of SW network
0059 for iRewire = 1:numel(REWIRE)
0060     smallWireNet{iRewire} = cell(1, REPEAT_TIMES);
0061     for jNet = 1:REPEAT_TIMES
0062         seedNumber = jNet * STRIDE_SEED_NUMBER;
0063         smallWireNet{iRewire}{jNet} = smallWorldNetwork(ceNetwork.size, ...
0064             REWIRE(iRewire), seedNumber, tmpMeanNumEdge);
0065         smallWireNet{iRewire}{jNet} = setIO(smallWireNet{iRewire}{jNet}, ...
0066             ceNetwork.inputNumber, ceNetwork.outputNumber);
0067         smallWireNet{iRewire}{jNet} = ...
0068             levelAnalysis(smallWireNet{iRewire}{jNet}, MAX_LEVEL);
0069     end
0070     % compute mean and std result of analysis
0071     meanSmallNet{iRewire} = meanFieldInCells(smallWireNet{iRewire});
0072     stdSmallNet{iRewire} = stdFieldInCells(smallWireNet{iRewire});
0073     % remove individul network data to save memory usage
0074     smallWireNet{iRewire} = [];
0075 end
0076 clear smallWireNet
0077 
0078 % randomly select I/O neurons of C. Elegans neural network
0079 for iNet = 1:REPEAT_TIMES
0080     seedNumber = iNet * STRIDE_SEED_NUMBER;
0081     rand('seed', seedNumber);
0082     randIoCeNet{iNet} = ...
0083         bioNetwork('./CE_ExpData/C_elegans_Matrix.mat', 'mat');
0084     randIoCeNet{iNet} = setIO(randIoCeNet{iNet}, ...
0085         ceNetwork.inputNumber, ceNetwork.outputNumber);
0086     randIoCeNet{iNet} = levelAnalysis(randIoCeNet{iNet}, MAX_LEVEL);
0087 end
0088 meanRandIoCeNet = meanFieldInCells(randIoCeNet);
0089 stdRandIoCeNet = stdFieldInCells(randIoCeNet);
0090 
0091 % select I/O neurons in separated modules
0092 for iNet = 1:REPEAT_TIMES
0093     seedNumber = iNet * STRIDE_SEED_NUMBER;
0094     rand('seed', seedNumber);
0095     sepIoCeNet{iNet} = ...
0096         bioNetwork('./CE_ExpData/C_elegans_Matrix.mat', 'mat');
0097     sepIoCeNet{iNet} = ...
0098         readLabel(sepIoCeNet{iNet}, './CE_ExpData/C_elegans_Label.txt');
0099     % select I/O neuron by modules
0100     sepIoCeNet{iNet} = setIoByModule(sepIoCeNet{iNet}, ...
0101         numel(sepIoCeNet{iNet}.inputList), numel(sepIoCeNet{iNet}.outputList));
0102     sepIoCeNet{iNet} = levelAnalysis(sepIoCeNet{iNet}, MAX_LEVEL);
0103 end
0104 meanSepIoCeNet = meanFieldInCells(sepIoCeNet);
0105 stdSepIoCeNet = stdFieldInCells(sepIoCeNet);
0106 
0107 % Reverse I/O neurons of C. Elegans network
0108 revIoCeNet = bioNetwork('./CE_ExpData/C_elegans_Matrix.mat', 'mat');
0109 revIoCeNet = readLabel(revIoCeNet, './CE_ExpData/C_elegans_Label.txt');
0110 revIoCeNet = ...
0111     setIO(revIoCeNet, revIoCeNet.outputList, revIoCeNet.inputList);
0112 rand('seed', 0);
0113 revIoCeNet = levelAnalysis(revIoCeNet, MAX_LEVEL);

Generated on Thu 30-Jan-2014 00:00:07 by m2html © 2005