Loading CHANGELOG.txt +2 −0 Original line number Diff line number Diff line 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 Loading build.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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=""> Loading prolog/logol.pl +3 −2 Original line number Diff line number Diff line Loading @@ -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)). Loading Loading @@ -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. Loading src/org/irisa/genouest/logol/SequenceAnalyser.java +64 −59 Original line number Diff line number Diff line Loading @@ -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(); Loading src/org/irisa/genouest/logol/test/GrammarTest.java +46 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading Loading
CHANGELOG.txt +2 −0 Original line number Diff line number Diff line 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 Loading
build.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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=""> Loading
prolog/logol.pl +3 −2 Original line number Diff line number Diff line Loading @@ -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)). Loading Loading @@ -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. Loading
src/org/irisa/genouest/logol/SequenceAnalyser.java +64 −59 Original line number Diff line number Diff line Loading @@ -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(); Loading
src/org/irisa/genouest/logol/test/GrammarTest.java +46 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading