@@ -87,14 +87,17 @@ public String getBlastProgram() {
8787 public void setBlastProgram (String program ) throws Exception {
8888
8989 boolean isValid = false ;
90- String [] blastPr = new String []{ "blastn" , "blastp" , "blastx" , "tblastn" , "tblastx" };
90+ String [] blastPr = new String []{ "blastn" ,"megablast" , "blastp" , "blastx" , "tblastn" , "tblastx" };
9191
9292 /*
9393 * To check if the program called for belongs to the blastPr array
9494 *
9595 */
9696 if (Arrays .binarySearch (blastPr ,program )>=0 ){
97- this .param .put ("PROGRAM" , program );
97+ if (program !="megablast" )
98+ this .param .put ("PROGRAM" , program );
99+ else
100+ this .param .put ("PROGRAM" , program +"&MEGABLAST=on" );
98101 isValid = true ;
99102 }
100103
@@ -170,7 +173,7 @@ else if(this.param.get("PROGRAM")=="blastn")
170173 return 11 ;
171174 else if (this .param .get ("PROGRAM" )=="blastp" || this .param .get ("PROGRAM" )=="blastx" || this .param .get ("PROGRAM" )=="tblastn" || this .param .get ("PROGRAM" )=="tblastx" )
172175 return 3 ;
173- else if (this .param .get ("PROGRAM" )=="megablast " )
176+ else if (this .param .get ("PROGRAM" )=="blastn&MEGABLAST=on " )
174177 return 28 ;
175178 else
176179 return -1 ;
@@ -180,8 +183,8 @@ else if(this.param.get("PROGRAM")=="megablast")
180183 * This method set the WORD_SIZE parameter to be use with blastall.
181184 *
182185 * WARNING!! At this point, the method does not verify the validity of your
183- * choice; for example, word size of greater than 5 returns error messages
184- * from QBlast. Word size range depends on the algorithm chosen.
186+ * choice; for example, word size of greater than 5 with blastp returns
187+ * error messages from QBlast. Word size range depends on the algorithm chosen.
185188 *
186189 * More at http://www.ncbi.nlm.nih.gov/staff/tao/URLAPI/new/node74.html
187190 *
0 commit comments