[Biojava-l] sequence allignment

bharani kumar phirnee123 at yahoo.com
Wed Sep 17 09:40:34 EDT 2003


hi, this program i found in the src of biojava and is already a precompiled one but when i  compile this it is gemnerating the following errors.
 
import java.io.*;
import org.biojava.bio.symbol.*;
import org.biojava.bio.seq.*;
import org.biojava.bio.seq.io.*;
public class Align
 {
        private static FastaSequence seq1 = new FastaSequence();
        private static FastaSequence seq2 = new FastaSequence();
 private static String filename = new String("pam250"); 
 private static String scorematrix = new String("pam250"); 
 private static int openGapPenalty = -12;
 private static int extensionGapPenalty = -3;
 private static Alignment alignment;

 public static void main(String[] argv)
  {
  int a = argv.length;
  try
         {
      // read some command-line arguments
  if (a>4 || a==0) Usage();
  if (a==4) extensionGapPenalty = Integer.parseInt(argv[3]);
  if (a>=3) openGapPenalty = Integer.parseInt(argv[2]);
  if (a>=2) scorematrix = argv[1];
  if (a>=1) filename = argv[0];
     // read the first two sequences of the specified fasta-file  
        seq1.readFasta(filename,1);
  seq2.readFasta(filename,2);
     // create the Alignment-object alignment           
  alignment = new Alignment(seq1, seq2, scorematrix);
     // call method fillEditMatrix() of object alignment
  // alignment.fillEditMatrix();
  /* for a global alignment with 
  i) linear, 
  ii) linear affine gap costs, call */
         alignment.fillEditMatrix(openGapPenalty); 

  alignment.backTracking(openGapPenalty);
     // print alignment 
  alignment.print();
  }
 
  catch (NumberFormatException e) {System.out.println(e.getMessage() + " is not an integer.\n");Usage();}
  catch (ErrorInSequenceException e) {System.out.println(e.getMessage());}
  catch (ErrorInScoreMatrixException e) {System.out.println(e.getMessage());}
      catch (FileNotFoundException e) {System.out.println("File not found: " + e.getMessage());}
        catch (IOException e){System.out.println("IOException: " + e.getMessage());}
  catch (ArrayIndexOutOfBoundsException e){System.out.println("ArrayIndexOutOfBoundsException: " + e.getMessage());}
  }
 public static void Usage()
  {
  System.out.println("usage: java Align <fasta-file with two protein sequences>");
  System.out.println("\t\t[scoring matrix (default = pam250)]");
  System.out.println("\t\t[opening gap penalty (default = 12)]");
  System.out.println("\t\t[extending gap penalty (default = 3)]");
  System.exit(1);
  }
 }
 
 
COMPILATION ERRORS:
 
 
Align.java [8:1] cannot resolve symbol
symbol  : class FastaSequence 
location: class Align
        private static FastaSequence seq1 = new FastaSequence();
                       ^
Align.java [9:1] cannot resolve symbol
symbol  : class FastaSequence 
location: class Align
        private static FastaSequence seq2 = new FastaSequence();
                       ^
Align.java [8:1] cannot resolve symbol
symbol  : class FastaSequence 
location: class Align
        private static FastaSequence seq1 = new FastaSequence();
                                                ^
Align.java [9:1] cannot resolve symbol
symbol  : class FastaSequence 
location: class Align
        private static FastaSequence seq2 = new FastaSequence();
                                                ^
Align.java [38:1] org.biojava.bio.symbol.Alignment is abstract; cannot be instantiated
                alignment = new Alignment(seq1, seq2, scorematrix);
                            ^
Align.java [47:1] cannot resolve symbol
symbol  : method fillEditMatrix (int)
location: interface org.biojava.bio.symbol.Alignment
                alignment.fillEditMatrix(openGapPenalty);       
                         ^
Align.java [50:1] cannot resolve symbol
symbol  : method backTracking (int)
location: interface org.biojava.bio.symbol.Alignment
                alignment.backTracking(openGapPenalty);
                         ^
Align.java [54:1] cannot resolve symbol
symbol  : method print ()
location: interface org.biojava.bio.symbol.Alignment
                alignment.print();
                         ^
Align.java [60:1] cannot resolve symbol
symbol  : class ErrorInSequenceException 
location: class Align
                catch (ErrorInSequenceException e)      {System.out.println(e.getMessage());}
                       ^
Align.java [61:1] cannot resolve symbol
symbol  : class ErrorInScoreMatrixException 
location: class Align
                catch (ErrorInScoreMatrixException e)   {System.out.println(e.getMessage());}
                       ^
10 errors
Errors compiling Align.

  



***********************************************************************************

"The secret of success is to know something nobody else knows." 

 
BHARANI KUMAR.P.S 
CUBIC, 
UNIVERSITÄT ZU KÖLN, 
Zülpicher  Str. 47 
50674 Köln 
Germany 
Fon        +49 221 7212018, +49 176 21000597
phirnee123 at yahoo.com 
************************************************************









---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software


More information about the Biojava-l mailing list