-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexperiment_merger.pl
27 lines (24 loc) · 954 Bytes
/
experiment_merger.pl
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
:- consult(dslp).
:- use_module(library(lists)).
:- use_module(library(apply)).
:- multifile gene_patient_probability_file/1.
:- multifile gene_function_file/1.
:- multifile network_file/1.
:- multifile output_file/1.
:- multifile selection/2.
:- multifile threshold/1.
:- multifile mcda/2.
:- multifile pattern_quality_metric_threshold/1.
:- multifile experiment_query/2.
:- multifile experiment_query/1.
:- multifile '-'/2.
%:- set_prolog_stack(global, limit(30 000 000 000)).
:- set_prolog_flag(stack_limit, 30000000000).
% assume that the files that have to be merged were passed to yap, and their data is in the kb.
merge(Files, Output_File) :-
forall(member(File, Files), consult(File)),
findall(Weight-solution(Pattern), Weight-solution(Pattern), Weighted_Answers),
dslp:postprocessing(Weighted_Answers, true, Results),
open(Output_File, write, S),
forall(member(Result, Results), format(S, '~q.~n', Result)),
close(S).