[Biojava-l] A little problem

Richard Holland holland at eaglegenomics.com
Tue Feb 17 08:59:17 UTC 2009


To convert the sequence into a String, use the seqString() method of the
Sequence object.

Also you should take a look at the replacement for SeqIOTools -
RichSequence.IOTools - as this is more up-to-date and handles file
parsing more sensibly.

cheers,
Richard

Anant Jain wrote:
> 
> Good Morning,
>          i want to retrieve dna sequnce from a GenBank file. So, I am using
> SeqIOTools.redGenbank(br) method. There is one flaw, example of
> tutorials says that i will return a sequence but its returning
> SequenceIterator.
> That's not a problem, we can get the sequence using nextSequence() method.
> 
> Now, i want to print the sequence which i have got from genbank file,so
> i used a for loop (below)
> 
> for (int pos = 1;pos<seq.length();pos++)
> {
> 
> System.out.println(seq.symbolAt(pos));
> 
> }
> 
> 
> 
> Problem 1: It prints the nucleotides in random order, means i want it
> from begining to last as i did in loop
>            plz help me out, because i want to write the sequence in file
> 
> 
> 
> Thank You
> Anant Jain
> PUNE, INDIA

-- 
Richard Holland, BSc MBCS
Finance Director, Eagle Genomics Ltd
T: +44 (0)1223 654481 ext 3 | E: holland at eaglegenomics.com
http://www.eaglegenomics.com/



More information about the Biojava-l mailing list