Whitespace clean
This commit is contained in:
parent
60ff9daafd
commit
c407594146
|
@ -5,7 +5,10 @@
|
||||||
% support for a single sequence.
|
% support for a single sequence.
|
||||||
%
|
%
|
||||||
|
|
||||||
:- module(fasta, [fa2atoms/2,fa2atoms/3]).
|
:- module(fasta,
|
||||||
|
[fa2atoms/2,
|
||||||
|
fa2atoms/3
|
||||||
|
]).
|
||||||
|
|
||||||
fa2atoms(F, L) :-
|
fa2atoms(F, L) :-
|
||||||
fa2atoms(F, L, []).
|
fa2atoms(F, L, []).
|
||||||
|
@ -25,8 +28,8 @@ read_chars(10,S) --> !,
|
||||||
read_chars(C,S) -->
|
read_chars(C,S) -->
|
||||||
[AC],
|
[AC],
|
||||||
{
|
{
|
||||||
cvt_c(C,AC),
|
cvt_c(C,AC),
|
||||||
get0(S,MC)
|
get0(S,MC)
|
||||||
},
|
},
|
||||||
read_chars(MC, S).
|
read_chars(MC, S).
|
||||||
|
|
||||||
|
@ -44,4 +47,3 @@ skip_header(_,S) :-
|
||||||
skip_header(C,S).
|
skip_header(C,S).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,9 @@ g_f_cpt(-8455,1.0,0.00284964910984409).
|
||||||
|
|
||||||
%Null state emission CPT.
|
%Null state emission CPT.
|
||||||
nule_cpt(
|
nule_cpt(
|
||||||
e(595,-1558,85,338,-294,453,-1158,197,249,902,-1085,-142,-21,-313,45,531,201,384,-1998,-644),
|
e(595,-1558,85,338,-294,453,-1158,197,249,902,-1085,-142,-21,-313,45,531,201,384,-1998,-644),
|
||||||
0.05,
|
0.05,
|
||||||
e(0.0755236292781413,0.0169810785568618,0.0530343870684108,0.0632001549226403,0.0407818746669505,0.0684441906545919,0.0224066674892351,0.0573156092864189,0.0594191552528466,0.093432734688318,0.023569613397956,0.0453130969133667,0.0492774668469685,0.0402483068810561,0.051584158965068,0.0722465198961763,0.0574747424017338,0.0652477473844479,0.0125173406963917,0.0319968103461077)).
|
e(0.0755236292781413,0.0169810785568618,0.0530343870684108,0.0632001549226403,0.0407818746669505,0.0684441906545919,0.0224066674892351,0.0573156092864189,0.0594191552528466,0.093432734688318,0.023569613397956,0.0453130969133667,0.0492774668469685,0.0402483068810561,0.051584158965068,0.0722465198961763,0.0574747424017338,0.0652477473844479,0.0125173406963917,0.0319968103461077)).
|
||||||
|
|
||||||
%Reaching first D.
|
%Reaching first D.
|
||||||
b_d_cpt(-110,-3765,-110).
|
b_d_cpt(-110,-3765,-110).
|
||||||
|
|
|
@ -14,7 +14,7 @@ stop(S,W,Info) :-
|
||||||
gen_program(W, Info).
|
gen_program(W, Info).
|
||||||
stop(_,_,_) :-
|
stop(_,_,_) :-
|
||||||
format(user_error,"Bad HMM~n", []).
|
format(user_error,"Bad HMM~n", []).
|
||||||
|
|
||||||
parse_model(S,Info) :-
|
parse_model(S,Info) :-
|
||||||
get_line(S, Line, Info),
|
get_line(S, Line, Info),
|
||||||
% format('~s~n',[Line]),
|
% format('~s~n',[Line]),
|
||||||
|
@ -45,7 +45,7 @@ match_field(hmmer(_,_,_,Alph,_,_,_,_),_) --> "ALPH", !, % aminos or bases
|
||||||
match_field(_,_) --> "RF", !, scanner_skip.
|
match_field(_,_) --> "RF", !, scanner_skip.
|
||||||
match_field(_,_) --> "CS", !, scanner_skip.
|
match_field(_,_) --> "CS", !, scanner_skip.
|
||||||
match_field(hmmer(_,_,_,_,_,_,_,MAP),_) --> "MAP", !,
|
match_field(hmmer(_,_,_,_,_,_,_,MAP),_) --> "MAP", !,
|
||||||
scanner_skip_blanks,
|
scanner_skip_blanks,
|
||||||
to_lower(Codes),
|
to_lower(Codes),
|
||||||
{ map_code(Codes,MAP) }.
|
{ map_code(Codes,MAP) }.
|
||||||
match_field(_,_) --> "COM", !, scanner_skip.
|
match_field(_,_) --> "COM", !, scanner_skip.
|
||||||
|
@ -76,11 +76,11 @@ match_field(_,_) --> "EVD", !,
|
||||||
match_field(Info,S) --> "HMM", !,
|
match_field(Info,S) --> "HMM", !,
|
||||||
scanner_skip,
|
scanner_skip,
|
||||||
{
|
{
|
||||||
get_line(S,_,Info),
|
get_line(S,_,Info),
|
||||||
Info = hmmer(_,_,NOfStates,Alph,_,_,model(BD,NBD,Transitions),MAP),
|
Info = hmmer(_,_,NOfStates,Alph,_,_,model(BD,NBD,Transitions),MAP),
|
||||||
nof_symbols(Alph,N),
|
nof_symbols(Alph,N),
|
||||||
scan_model(S,NOfStates,N,BD,NBD,Transitions,MAP,Info),
|
scan_model(S,NOfStates,N,BD,NBD,Transitions,MAP,Info),
|
||||||
throw(done(Info))
|
throw(done(Info))
|
||||||
}.
|
}.
|
||||||
|
|
||||||
scan_model(S,NOfStates,N,BD,NBD,Transitions,MAP,Info) :-
|
scan_model(S,NOfStates,N,BD,NBD,Transitions,MAP,Info) :-
|
||||||
|
@ -95,7 +95,7 @@ scan_states(NOfStates, N, Stream, MAP, [t(E,I,S)|Transitions], Info) :-
|
||||||
scan_states(NOfStates1, N, Stream, NMAP, Transitions, Info).
|
scan_states(NOfStates1, N, Stream, NMAP, Transitions, Info).
|
||||||
|
|
||||||
scan_state(Stream, E,I,MAP,s(MM,MI,MD,IM,II,DM,DD,BM,ME), N, NMAP, Info) :-
|
scan_state(Stream, E,I,MAP,s(MM,MI,MD,IM,II,DM,DD,BM,ME), N, NMAP, Info) :-
|
||||||
get_line(Stream, ELine, Info),
|
get_line(Stream, ELine, Info),
|
||||||
get_line(Stream, ILine, Info),
|
get_line(Stream, ILine, Info),
|
||||||
get_line(Stream, SLine, Info),
|
get_line(Stream, SLine, Info),
|
||||||
% format('~s~n~s~n~s~n',[ELine,ILine,SLine]),
|
% format('~s~n~s~n~s~n',[ELine,ILine,SLine]),
|
||||||
|
@ -265,7 +265,7 @@ gen_model(W, model(BD,NBD,States),PsCPT) :-
|
||||||
format(W, '~n%Reaching first D.~n',[]),
|
format(W, '~n%Reaching first D.~n',[]),
|
||||||
format(W, 'b_d_cpt(~w,~w,~w).~n',[BD,NBD,BDCPT]),
|
format(W, 'b_d_cpt(~w,~w,~w).~n',[BD,NBD,BDCPT]),
|
||||||
gen_states(W, States,1,PsCPT).
|
gen_states(W, States,1,PsCPT).
|
||||||
|
|
||||||
gen_states(_, [],_,_).
|
gen_states(_, [],_,_).
|
||||||
gen_states(W, [State|States],StateNo,PsCPT) :-
|
gen_states(W, [State|States],StateNo,PsCPT) :-
|
||||||
gen_state(W, State,StateNo,PsCPT),
|
gen_state(W, State,StateNo,PsCPT),
|
||||||
|
@ -327,4 +327,3 @@ max_index([_|L],I0,Max0,MaxIndex0,Max,MaxIndex) :-
|
||||||
I is I0+1,
|
I is I0+1,
|
||||||
max_index(L,I,Max0,MaxIndex0,Max,MaxIndex).
|
max_index(L,I,Max0,MaxIndex0,Max,MaxIndex).
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,12 @@
|
||||||
:- ensure_loaded(library('clpbn/viterbi')).
|
:- ensure_loaded(library('clpbn/viterbi')).
|
||||||
|
|
||||||
:- use_module(fasta,
|
:- use_module(fasta,
|
||||||
[fa2atoms/3]).
|
[fa2atoms/3]).
|
||||||
|
|
||||||
:- use_module(library(lists),
|
:- use_module(library(lists),
|
||||||
[
|
[nth/3,
|
||||||
nth/3,
|
append/3
|
||||||
append/3
|
]).
|
||||||
]).
|
|
||||||
|
|
||||||
:- [plan7].
|
:- [plan7].
|
||||||
|
|
||||||
|
|
Reference in New Issue