File tree Expand file tree Collapse file tree
biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties
biojava-protein-disorder/src/main/java/org/biojava/nbio/ronn Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,10 +69,10 @@ public final static double roundToDecimals(double d, int c) {
6969 * true if invalid characters are found, else return false.
7070 */
7171 public final static boolean doesSequenceContainInvalidChar (String sequence , Set <Character > cSet ){
72- boolean result = sequence .chars (). filter ( c -> ! cSet . contains (( char ) c ))
73- . findFirst ()
74- . isPresent ();
75- return result ;
72+ for ( char c : sequence .toCharArray ()){
73+ if (! cSet . contains ( c )) return true ;
74+ }
75+ return false ;
7676 }
7777
7878 /**
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ static boolean isValidSequence(final FastaSequence fsequence) {
141141 public ORonn call () throws NumberFormatException , IOException {
142142 final String seq = sequence .getSequence ();
143143 // Calculate for each model
144- Stream .iterate (0 , n -> n +1 ).limit (10 ).map (modelNumber -> mloader .getModel (modelNumber ))
144+ Stream .iterate (0 , n -> n +1 ).limit (NUMBER_OF_MODELS ).map (modelNumber -> mloader .getModel (modelNumber ))
145145 .map (rmodel -> new ORonnModel (seq , rmodel , disorder ).detect ())
146146 .forEach (score ->addScore (score ));
147147 final char [] ch = seq .toCharArray ();
You can’t perform that action at this time.
0 commit comments