Koen,
One thing you might try is to parse the file, grab the
accession from the first line, and use regular
expressions to identify the type of sequence.  

Hope this helps,

Mark Fortner



--- Koen van der Drift <[EMAIL PROTECTED]> wrote:

> 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.
> 
> _______________________________________________
> Biojava-l mailing list  -  [EMAIL PROTECTED]
> http://biojava.org/mailman/listinfo/biojava-l
> 

_______________________________________________
Biojava-l mailing list  -  [EMAIL PROTECTED]
http://biojava.org/mailman/listinfo/biojava-l

Reply via email to