[Biojava-l] opening unknown fasta file

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


Hi,

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

[snip]

  // 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?


thanks,

- Koen.



More information about the Biojava-l mailing list