Skip to content

Commit afa8ba3

Browse files
authored
netZooM 0.5.5 (#146)
* update test suite (#140) * update test suite * update test suite * update test suite * update test suite * update test suite * update test suite * update test suite * update test suite * update test suite * update test suite * update tests * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update actions * update ci without spider * update ci without spider * update ci without spider * update ci without spider * update ci without spider * update ci without spider * update ci without spider * update ci without spider * update ci without spider * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update workflow * update actions * update github * update github * update github * update github * update github * update github * update github * fix spider test * update test data with annotation in lioness * changed test data lioness * update test data * update test data * separte process functions * separte process functions * separte process functions * separte process functions * separte process functions * separte process functions * separte process functions * separte process functions * separte process functions * separte process functions * separte process functions * removed macos from tests * fix savepairs (#142) * fix savepairs * fix savepairs * add eye in PPI (#145) * add eye in PPI * update tfcoop * add python gt data * add labels to panda test * expand test data
1 parent fd3edac commit afa8ba3

9 files changed

+16017
-2
lines changed

netZooM/tools/NormalizeNetwork.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
% Outputs:
77
% normMat: normalized adjacency matrix
88
% Author(s):
9-
% Kimberley Glass
9+
% Kimberly Glass
1010

1111
%compute means and stds
1212
mu2 = mean(X,2);

netZooM/tools/processData.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
%Initialize result
109109
RegNet = zeros(NumTFs,NumGenes);
110110
Exp = zeros(NumGenes,NumConditions);
111-
TFCoop = zeros(NumTFs,NumTFs);
111+
TFCoop = eye(NumTFs);
112112
%Populate result
113113
%Gene expression
114114
[ig,locg]= ismember(GeneNamesExp,GeneNames);

tests/testPanda.m

+83
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,89 @@
66
initTestSuite;
77
end
88

9+
function testPandaPantest()
10+
% Tell if this is Octave (Unit tests) or Matlab
11+
isOctave = exist('OCTAVE_VERSION', 'builtin') ~= 0;
12+
13+
% Load statistics package from Octave
14+
if isOctave
15+
%we need the nan package because it has a fast implementation of corrcoeff
16+
%pkg load statistics
17+
pkg load nan;
18+
return % readtable is not available in octave
19+
end
20+
21+
% Set Program Parameters
22+
exp_file = 'tests/test_data/pantests/expression.txt';
23+
motif_file = 'tests/test_data/pantests/motif.txt';
24+
ppi_file = 'tests/test_data/pantests/ppi.txt';
25+
panda_out = ''; % optional, leave empty if file output is not required
26+
save_temp = ''; % optional, leave empty if temp data files will not be needed afterward
27+
lib_path = '../netZooM'; % path to the folder of PANDA source code
28+
alpha = 0.1;
29+
save_pairs = 0;%saving in .pairs format
30+
modeProcess= 'legacy';
31+
32+
% Add path
33+
addpath(genpath(fullfile(pwd,'tests')));
34+
35+
% Call Panda
36+
tic;[AgNet,TFNames,GeneNames] = panda_run(lib_path,exp_file, motif_file, ppi_file, panda_out,...
37+
save_temp, alpha, save_pairs, modeProcess);toc;
38+
ExpTbl = array2table(AgNet,'RowNames',TFNames,'VariableNames',GeneNames');
39+
40+
% Load the expected result
41+
filename = 'panda_pantests_gt_matlab.csv';
42+
ExpAgNet = readtable(filename,'ReadVariableNames',1,'ReadRowNames',1,'PreserveVariableNames',1);
43+
44+
% Compare the outputs
45+
tolMat =1e-6;
46+
deltaMat=max(max(abs(ExpTbl{:,:}-ExpAgNet{:,:})));
47+
assertTrue( deltaMat < tolMat );
48+
49+
end
50+
51+
function testPandaPythonData()
52+
% Tell if this is Octave (Unit tests) or Matlab
53+
isOctave = exist('OCTAVE_VERSION', 'builtin') ~= 0;
54+
55+
% Load statistics package from Octave
56+
if isOctave
57+
%we need the nan package because it has a fast implementation of corrcoeff
58+
%pkg load statistics
59+
pkg load nan;
60+
return % readtable is not available in octave
61+
end
62+
63+
% Set Program Parameters
64+
exp_file = 'tests/test_data/panda/ToyExpressionData.txt';
65+
motif_file = 'tests/test_data/panda/ToyMotifData.txt';
66+
ppi_file = 'tests/test_data/panda/ToyPPIData.txt';
67+
panda_out = ''; % optional, leave empty if file output is not required
68+
save_temp = ''; % optional, leave empty if temp data files will not be needed afterward
69+
lib_path = '../netZooM'; % path to the folder of PANDA source code
70+
alpha = 0.1;
71+
save_pairs = 0;%saving in .pairs format
72+
modeProcess= 'legacy';
73+
74+
% Add path
75+
addpath(genpath(fullfile(pwd,'tests')));
76+
77+
% Call Panda
78+
tic;[AgNet,TFNames,GeneNames] = panda_run(lib_path,exp_file, motif_file, ppi_file, panda_out,...
79+
save_temp, alpha, save_pairs, modeProcess);toc;
80+
ExpTbl = array2table(AgNet,'RowNames',TFNames,'VariableNames',GeneNames');
81+
82+
% Load the expected result
83+
filename = 'panda_gt_matlab.csv';
84+
ExpAgNet = readtable(filename,'ReadVariableNames',1,'ReadRowNames',1,'PreserveVariableNames',1);
85+
86+
% Compare the outputs
87+
tolMat =1e-6;
88+
deltaMat=max(max(abs(ExpTbl{:,:}-ExpAgNet{:,:})));
89+
assertTrue( deltaMat < tolMat );
90+
end
91+
992
function testPandaSimple()
1093
% Tell if this is Octave (Unit tests) or Matlab
1194
isOctave = exist('OCTAVE_VERSION', 'builtin') ~= 0;

tests/test_data/panda/ToyExpressionData.txt

+1,000
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)