-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPrintTable.m
61 lines (48 loc) · 2.25 KB
/
PrintTable.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
function PrintTable(SuperpathwayFile, ScaledEssenFile, Output)
%Writes the table generated by 'PrintPPIEssentiality.m' to disk. This table contains the
%interaction essentiality values for each cell source/target interaction, indicates which
%interactions are "novel" (added to superpathway from screening experiments), and captures
%the sub-pathways where each interaction participates.
%inputs:
%SuperpathwayFile - filename and path of the superpathway definition generated by
% 'GenerateSuperpathway.m'.
%ScaledEssenFile - filename and path of interaction essentialities generated by
% 'ScaleEssentialities.m'.
%Output - desired path and filename of output tab-delimited text file.
%Licensed to the Apache Software Foundation (ASF) under one
%or more contributor license agreements. See the NOTICE file
%distributed with this work for additional information
%regarding copyright ownership. The ASF licenses this file
%to you under the Apache License, Version 2.0 (the
%"License"); you may not use this file except in compliance
%with the License. You may obtain a copy of the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
%Unless required by applicable law or agreed to in writing,
%software distributed under the License is distributed on an
%"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
%KIND, either express or implied. See the License for the
%specific language governing permissions and limitations
%under the License.
load(SuperpathwayFile);
p_Novel = Novel;
load(ScaledEssenFile);
Source = Essentialities.Source;
Target = Essentialities.Target ;
essen_table = Essentialities.Labels;
for i = 1:size(essen_table,1)
for j = 1:size(essen_table{1},2)
if(~isnan(Essentialities.Values(i,j)))
essen_table{i}{j} = {num2str(Essentialities.Values(i,j))};
end
end
end
Pathways = cell(length(Source),1);
for i =1:length(Source)
Pathways{i} = PathwayNames(PathwayMapping{i});
end
p = cellfun(@(x)ReLimit(x, ','), Pathways, 'UniformOutput', false);
table = PrintPPIEssentiality(essen_table, Source, Target,...
p_Novel, p, Essentialities.Lines, Essentialities.Histology );
result = cell2text(table, Output);