Skip to content
Commits on Source (5)
History:
1.7.8: 03/04/18 O. Sallou - Detect process execution failure (out of memory, etc.) and display error message
1.7.7: 08/12/17 O. Sallou - Fix *not* and *spacer* contraints when reaching end of sequence (last characters)
1.7.6: 07/12/17 O. Sallou - Fix endConstraint, was comparing end position + 1 instead of end position
1.7.5: 09/09/16 O. Sallou - Fix way to load characters from sequence file to increase performance
1.7.4: 08/01/16 O. Sallou - Fix multiexec error message display
......
......@@ -10,7 +10,7 @@
target.dir=/path_where_files_should_be_installed
-->
<property name="version" value="1.7.6" />
<property name="version" value="1.7.8" />
<condition property="ruby_path" value="${env.RUBY_PATH}"
else="">
......
logol (1.7.8-1) unstable; urgency=medium
* New upstream release (bug fixes)
-- Olivier Sallou <osallou@debian.org> Wed, 04 Apr 2018 13:33:57 +0000
logol (1.7.6-1) unstable; urgency=medium
* New upstream release
......
......@@ -2,17 +2,17 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: logol
Source: https://gforge.inria.fr/projects/logolexec
Files: *
Copyright: 2015 Olivier Sallou <olivier.sallou@irisa.fr>
License: AGPL-3.0+
License can be found at https://www.gnu.org/licenses/agpl-3.0.html
Files: Doc/pldoc.sty
Copyright: 1985-2004 University of Amsterdam
License: LGPL-2+
On Debian systems, you can find the GNU Lesser General Public License in
the file /usr/share/common-licenses/LGPL-2
Files: *
Copyright: 2015 Olivier Sallou <olivier.sallou@irisa.fr>
License: AGPL-3.0+
License can be found at https://www.gnu.org/licenses/agpl-3.0.html
Files: debian/*
Copyright: 2011 Olivier Sallou <olivier.sallou@irisa.fr>
License: GPL-2+
......
Subject: adapt to new swi-prolog
Description: swipl doc generation changed and breaks
current definition
Author: Olivier Sallou <osallou@debian.org>
Last-Updated: 2013-12-01
Forwarded: yes
Bug: 739916
Upstream-Bug: https://gforge.inria.fr/tracker/index.php?func=detail&aid=16708&group_id=1318&atid=5219
--- a/tools/swidoc.pl
+++ b/tools/swidoc.pl
@@ -1,4 +1,4 @@
:- use_module(library(doc_latex)).
-:- current_prolog_flag(argv,[_,_,_,_,Doc]),open('logol.tex',write,OS),latex_for_file(Doc,OS,[]),close(OS).
+:- open('logol.tex',write,OS),latex_for_file('logoldoc.pl',OS,[]),close(OS).
:-halt.
Subject: generated tex by pldoc not supported by texlive
Description: lpdoc generate tex file from prolog. Generated file
fails to be converted with pdflatex since later releases.
This patch modifies generated file to support pdf conversion.
Author: Olivier Sallou <osallou@debian.org>
Last-Updated: 2013-08-08
Forwarded: yes
Bug: 719079
--- a/tools/generate-doc.sh
+++ b/tools/generate-doc.sh
@@ -2,6 +2,10 @@
sed 's/,\[assertions,basicmodes,functions,regtypes,hiord\]//' ../prolog/logol.pl > logoldoc.pl
swipl -f swidoc.pl -- logoldoc.pl
+
+sed -i 's/makeindex/makeindex\n\\newenvironment{arguments}{\\textbf{Arguments} \\newline}{\\vspace*{0.5\\baselineskip}}/' logol.tex
+sed -i 's/} &/}/g' logol.tex
+
pdflatex logol.tex
rm logoldoc.pl
Subject: fix module declaration for swipl, different from sicstus-prolog.
Description: for swipl, default used in packaging, the module declaration is different. This patch fix this difference. Upstream manage both
Forwarded: No
Author: Olivier Sallou <osallou@debian.org>
Last-Updated: 2013-10-07
--- a/prolog/logol.pl
+++ b/prolog/logol.pl
@@ -1,4 +1,4 @@
-:- module(logol,[writeFinalMatches/0,isMin/5,replaceMatch/4,appendMatch/3,getCounter/1,config/1,optimalmatch/5,matchstore/2,isMax/3,parseResults/2,checkAlphabetPercentage/3,mapListExact/2,mapListGlobal/2,mapListLocal/2,mapListLocal0/2,matchExist/2,mapModels/3,externalinterfacewithspacer/2,externalinterface/2,notpred_pos/6,between/3,notexact_pos/6,notexact/3,matchExist/1,mapModels/2,mapList/2,mydb/1,matchlist/2,isexactwithgaponly/5,isexactwithgaponly_pos/5,setParent/2,getParent/2,logData/2,logolMain/5,cut_sequence/3,isequal/2,isexact_pos/4,isexactwithgapanderror_pos/5,isexactwitherroronly_pos/5,spacer_withresult_pos/5,wordSize_pos/4,getPosition_pos/3,wordContent_pos/4,checkPosition_pos/4,anySpacer_pos/7,repeatPredicate_pos/14,testOverlap_pos/5,getsuffixmatch_pos/12,getWordContent/4,openSequenceStream/2,closeSequenceStream/0,getCharsFromPosition/3,getNChar/3,resetParamList/3,getKnownVariables/2,getPosition/3,myCost/4,getDistance/3,initResultFile/1,closeResultFile/1,getParentVariable/2,is4me/5,outputfile/1,writeallresult/2,maxsize/1,getresult/2,offset/1,setSequence/2,computeCost/2,getsuffixmatch/12,writeSequence/2,sequenceData/3,suffixmatch/9,repeatPredicate/14,anySpacer/5,anySpacer/7,any/2,isoverlap/5,morphism/3,spacer_withresult/5,isexact/3,isexact/4,isexact/5,isexactwithgapanderror/4,isexactwithgapanderror/5,isexactwitherroronly/4,isexactwitherroronly/5,matrix/3, iscompequal/2,getcomplement/2,getreversecomplement/2,applymorphism/4, checkCost/4,cost/4,parentalCost/4,varDefinition/5,saveVariable/8,getVariable/9,removeVariable/1,wordSize/3,wordSize/4,percent/3,percent2int/3,checkCost/4,checkCost/5,checkPosition/3,checkPosition/5,checkRelativePosition/4,getContent/3,getContent/4,pushResult/2,countAlphabet/4,isexactwithdistinctgapanderror_pos/7],[assertions,basicmodes,functions,regtypes,hiord]).
+:- module(logol,[writeFinalMatches/0,isMin/5,replaceMatch/4,appendMatch/3,getCounter/1,config/1,optimalmatch/5,matchstore/2,isMax/3,parseResults/2,checkAlphabetPercentage/3,mapListExact/2,mapListGlobal/2,mapListLocal/2,mapListLocal0/2,matchExist/2,mapModels/3,externalinterfacewithspacer/2,externalinterface/2,notpred_pos/6,between/3,notexact_pos/6,notexact/3,matchExist/1,mapModels/2,mapList/2,mydb/1,matchlist/2,isexactwithgaponly/5,isexactwithgaponly_pos/5,setParent/2,getParent/2,logData/2,logolMain/5,cut_sequence/3,isequal/2,isexact_pos/4,isexactwithgapanderror_pos/5,isexactwitherroronly_pos/5,spacer_withresult_pos/5,wordSize_pos/4,getPosition_pos/3,wordContent_pos/4,checkPosition_pos/4,anySpacer_pos/7,repeatPredicate_pos/14,testOverlap_pos/5,getsuffixmatch_pos/12,getWordContent/4,openSequenceStream/2,closeSequenceStream/0,getCharsFromPosition/3,getNChar/3,resetParamList/3,getKnownVariables/2,getPosition/3,myCost/4,getDistance/3,initResultFile/1,closeResultFile/1,getParentVariable/2,is4me/5,outputfile/1,writeallresult/2,maxsize/1,getresult/2,offset/1,setSequence/2,computeCost/2,getsuffixmatch/12,writeSequence/2,sequenceData/3,suffixmatch/9,repeatPredicate/14,anySpacer/5,anySpacer/7,any/2,isoverlap/5,morphism/3,spacer_withresult/5,isexact/3,isexact/4,isexact/5,isexactwithgapanderror/4,isexactwithgapanderror/5,isexactwitherroronly/4,isexactwitherroronly/5,matrix/3, iscompequal/2,getcomplement/2,getreversecomplement/2,applymorphism/4, checkCost/4,cost/4,parentalCost/4,varDefinition/5,saveVariable/8,getVariable/9,removeVariable/1,wordSize/3,wordSize/4,percent/3,percent2int/3,checkCost/4,checkCost/5,checkPosition/3,checkPosition/5,checkRelativePosition/4,getContent/3,getContent/4,pushResult/2,countAlphabet/4,isexactwithdistinctgapanderror_pos/7],[]).
/** <module> Logol Prolog API
Author: Olivier Sallou <osallou@debian.org>
Subject: swi-prolog raise error instead of warnings for undefined modules
Description: swi-prolog raise an error for exported procedure not matching
declared procedure.
It also raises error on modules declared for sicstus prolog. Patch need to
remove them (not needed for swi-prolog)
Forwarded: yes
Bug: https://gforge.inria.fr/tracker/index.php?func=detail&aid=16249&group_id=1318&atid=5219
--- a/prolog/logol.pl
+++ b/prolog/logol.pl
@@ -1,4 +1,4 @@
-:- module(logol,[writeFinalMatches/0,isMin/5,replaceMatch/4,appendMatch/3,getCounter/1,config/1,optimalmatch/5,matchstore/2,isMax/3,parseResults/2,checkAlphabetPercentage/3,mapListExact/2,mapListGlobal/2,mapListLocal/2,mapListLocal0/2,matchExist/2,mapModels/3,externalinterfacewithspacer/2,externalinterface/2,notpred_pos/6,between/3,notexact_pos/6,notexact/3,matchExist/1,mapModels/2,mapList/2,mydb/1,matchlist/2,isexactwithgaponly/5,isexactwithgaponly_pos/5,setParent/2,getParent/2,logData/2,logolMain/5,cut_sequence/3,isequal/2,isexact_pos/4,isexactwithgapanderror_pos/5,isexactwitherroronly_pos/5,spacer_withresult_pos/5,wordSize_pos/4,getPosition_pos/3,wordContent_pos/4,checkPosition_pos/4,anySpacer_pos/7,repeatPredicate_pos/14,testOverlap_pos/5,getsuffixmatch_pos/12,getWordContent/4,openSequenceStream/1,closeSequenceStream/0,getCharsFromPosition/3,getNChar/3,resetParamList/3,getKnownVariables/2,getPosition/3,myCost/4,getDistance/3,initResultFile/1,closeResultFile/1,getParentVariable/2,is4me/5,outputfile/1,writeallresult/2,maxsize/1,getresult/2,offset/1,setSequence/2,computeCost/2,getsuffixmatch/12,writeSequence/2,sequenceData/3,suffixmatch/9,repeatPredicate/14,anySpacer/5,anySpacer/7,any/2,isoverlap/5,morphism/3,spacer_withresult/5,isexact/3,isexact/4,isexact/5,isexactwithgapanderror/4,isexactwithgapanderror/5,isexactwitherroronly/4,isexactwitherroronly/5,matrix/3, iscompequal/2,getcomplement/2,getreversecomplement/2,applymorphism/4, checkCost/4,cost/4,parentalCost/4,varDefinition/5,saveVariable/7,saveVariableByRef/7,saveVariable/8,getVariable/9,removeVariable/1,wordSize/3,wordSize/4,percent/3,percent2int/3,checkCost/4,checkCost/5,checkPosition/3,checkPosition/5,checkRelativePosition/4,getContent/3,getContent/4,pushResult/2],[assertions,basicmodes,functions,regtypes,hiord]).
+:- module(logol,[writeFinalMatches/0,isMin/5,replaceMatch/4,appendMatch/3,getCounter/1,config/1,optimalmatch/5,matchstore/2,isMax/3,parseResults/2,checkAlphabetPercentage/3,mapListExact/2,mapListGlobal/2,mapListLocal/2,mapListLocal0/2,matchExist/2,mapModels/3,externalinterfacewithspacer/2,externalinterface/2,notpred_pos/6,between/3,notexact_pos/6,notexact/3,matchExist/1,mapModels/2,mapList/2,mydb/1,matchlist/2,isexactwithgaponly/5,isexactwithgaponly_pos/5,setParent/2,getParent/2,logData/2,logolMain/5,cut_sequence/3,isequal/2,isexact_pos/4,isexactwithgapanderror_pos/5,isexactwitherroronly_pos/5,spacer_withresult_pos/5,wordSize_pos/4,getPosition_pos/2,wordContent_pos/4,checkPosition_pos/4,anySpacer_pos/7,repeatPredicate_pos/14,testOverlap_pos/5,getsuffixmatch_pos/12,getWordContent/4,openSequenceStream/2,closeSequenceStream/0,getCharsFromPosition/3,getNChar/3,resetParamList/3,getKnownVariables/2,getPosition/3,myCost/4,getDistance/3,initResultFile/1,closeResultFile/1,getParentVariable/2,is4me/5,outputfile/1,writeallresult/2,maxsize/1,getresult/2,offset/1,setSequence/2,computeCost/2,getsuffixmatch/12,writeSequence/2,sequenceData/3,suffixmatch/9,repeatPredicate/14,anySpacer/5,anySpacer/7,any/2,isoverlap/5,morphism/3,spacer_withresult/5,isexact/3,isexact/4,isexact/5,isexactwithgapanderror/4,isexactwithgapanderror/5,isexactwitherroronly/4,isexactwitherroronly/5,matrix/3, iscompequal/2,getcomplement/2,getreversecomplement/2,applymorphism/4, checkCost/4,cost/4,parentalCost/4,varDefinition/5,saveVariable/8,saveVariable/9,getVariable/9,removeVariable/1,wordSize/3,wordSize/4,percent/3,percent2int/3,checkCost/4,checkCost/5,checkPosition/3,checkPosition/5,checkRelativePosition/4,getContent/3,getContent/4,pushResult/2,countAlphabet/4,isexactwithdistinctgapanderror_pos/7],[]).
/** <module> Logol Prolog API
......@@ -1013,7 +1013,8 @@ spacer_withresult([X|Y],Min, Max, Word, Z) :- (((Min=0,NewX=[X|Y]);(Min>0,cut_se
%spacer_withresult([X|Y],Min, Max, Z, Word) :- N is 0,((Min=0,Z=[X | Y]);(spacer_withresult([X|Y],N,Min,Max,Z,[], Word))).
% sub predicate, do not call directly
spacer_withresult([], N, Min, Max, Z, Spacer, Word) :- fail.
%spacer_withresult([], N, Min, Max, Z, Spacer, Word) :- fail.
spacer_withresult([], N, Min, Max, Z, Spacer, Word) :- Word=Spacer.
% sub predicate, do not call directly
%spacer_withresult([X|Y],N, Min, Max, Z, Spacer, Word) :- Ninc is N+1,append(Spacer, [X], IncWord),((Ninc<Max,isalphabet(X), spacer_withresult(Y,Ninc,Min,Max,Z,IncWord, Word));(Ninc>=Min,Z = Y, Word=IncWord)).
spacer_withresult([X|Y],N, Min, Max, Z, Spacer, Word) :- (Z = [X |Y], Word=Spacer); (Ninc is N+1,append(Spacer, [X], IncWord),Ninc=<Max, spacer_withresult(Y,Ninc,Min,Max,Z,IncWord, Word)).
......@@ -2459,7 +2460,7 @@ between(Min,Cur,Max,Value):-Cur=<Max,(Value=Cur;Next is Cur + 1,between(Min,Next
% Fix 1406
% Call predicate. If match, return last argument e.g. position, else return 0.
callpred(Pred,OutPos,Pos):- (Pred ,(Pred=..VarDef,nth0(OutPos,VarDef,Pos)));(Pos=0).
notpred_pos(VarId,StartPos,Pred,Min,Max,Value):-random(Id),retractall(hasmatch(Id,_)),Pred=..VarDef,length(VarDef,Predlength),OutPos is Predlength - 1,PosMin is StartPos + Min, PosMax is StartPos + Max,!,between(StartPos,PosMax,Value),(callpred(Pred,OutPos,Pos) , ((\+hasmatch(Id,Pos) -> (assert(hasmatch(Id,Pos)));1=1),\+hasmatch(Id,Value),assert(hasmatch(Id,Value)))),Value>=PosMin.
notpred_pos(VarId,StartPos,Pred,Min,Max,OutputPos):-random(Id),retractall(hasmatch(Id,_)),Pred=..VarDef,length(VarDef,Predlength),OutPos is Predlength - 1,PosMin is StartPos + Min, PosMax is StartPos + Max,!,between(StartPos,PosMax,Value),(callpred(Pred,OutPos,Pos) , ((\+hasmatch(Id,Pos) -> (assert(hasmatch(Id,Pos)));1=1),\+hasmatch(Id,Value),assert(hasmatch(Id,Value)))),Value>=PosMin,ValueLength is Value - StartPos,getCharsFromPosition(StartPos,ValueLength,FoundWord),length(FoundWord,FoundLength),FoundLength >= Min, FoundLength=<Max, OutputPos is StartPos+FoundLength.
% Test predicate to use with predicate requiring a position relative predicate as parameter.
......
......@@ -216,6 +216,11 @@ public class SequenceAnalyser extends Thread {
s2.start ();
logger.debug("start program execution ");
logol.waitFor();
int status_code = logol.exitValue();
if(status_code != 0){
logger.error("Program exited with wrong status code: " + status_code);
throw new IOException("Program exited with wrong status code");
}
logger.debug("program is over, results are available in file "+resultFileName);
os.close();
......
......@@ -2350,6 +2350,52 @@ public class GrammarTest {
}
}
@Test
public void testEndOfStream1() {
init();
Vector<String[]> result = new Vector<String[]>();
result.add(new String[] {"LogolVAR_1","32","38"});
result.add(new String[] {"LogolVAR_2","39","40"});
execute("test.fasta","end_of_stream1.logol");
try {
checkResult(result,0);
} catch (ParserConfigurationException e) {
fail(e.getMessage());
} catch (SAXException e) {
fail(e.getMessage());
} catch (IOException e) {
fail(e.getMessage());
} catch (TransformerException e) {
fail(e.getMessage());
}
}
@Test
public void testEndOfStream2() {
init();
Vector<String[]> result = new Vector<String[]>();
result.add(new String[] {"LogolVAR_1","32","38"});
result.add(new String[] {"LogolVAR_2","39","40"});
execute("test.fasta","end_of_stream2.logol");
try {
checkNoMatch(result,0);
} catch (ParserConfigurationException e) {
fail(e.getMessage());
} catch (SAXException e) {
fail(e.getMessage());
} catch (IOException e) {
fail(e.getMessage());
} catch (TransformerException e) {
fail(e.getMessage());
}
}
@Test
public void testRubyCassiopee() {
try {
......
def:{
morphism(foo,a,g)
}
mod1()==>"ccaccat",!("taa"|"tga"|"tag"):{#[2,2]}
mod1()==*>SEQ1
def:{
morphism(foo,a,g)
}
mod1()==>"ccaccat",!("taa"|"tga"|"tag"):{#[3,3]}
mod1()==*>SEQ1