[Biojava-l] SeqIOTools

Thomas Down td2 at sanger.ac.uk
Thu Apr 3 10:01:07 EST 2003


On Wed, Apr 02, 2003 at 11:29:50AM -0800, Ren, Zhen wrote:
> 
> So, obviously the method SeqIOTools.readFastaProtein() uses a space (probably all kinds of whitespace) as delimiters to parse whatever into the name property in a sequence.  My question is how I can specify my own delimiter and then display the whole line here as a sequence's name.


I'm afraid you can't currently change the delimiter (although it
shouldn't be too hard to modify FastaFormat.java to make this
possible, if you do want to go down that route).  However, you
can access to complete description line with:

    SequenceIterator si = SeqIOTools.readFastaProtein(...);
    Sequence seq = si.nextSequence();
    System.out.println(seq.getAnnotation().getProperty(FastaFormat.PROPERTY_DESCRIPTIONLINE));

Thomas.


More information about the Biojava-l mailing list