[Biojava-l] opening unknown fasta file

Koen van der Drift kvddrift at earthlink.net
Thu Nov 11 17:21:25 EST 2004


The BioJava tutorial (in anger) suggests the following code to open a 
fasta file:


  // get the appropriate Alphabet
    Alphabet alpha = AlphabetManager.alphabetForName(args[1]);

  // get a SequenceDB of all sequences in the file
    SequenceDB db = SeqIOTools.readFasta(is, alpha);

But what should I do when I don't know if the fasta file contains a 
protein or dna sequence?


- Koen.

More information about the Biojava-l mailing list