[Biojava-l] How to extract a Sub-sequence

Matthew Pocock matthew_pocock at yahoo.co.uk
Tue Jul 8 13:31:24 EDT 2003


Hi,

If you have a Sequence object and want a sub-sequence, use 
SequenceTools.subSequence() to extract part of it. This will take care 
of all the attached features as well. To get the symbols for a feature, 
call f.getSymbols(). This will take care of reverse-complementing 
symbols that have a reverse strand.

In what way is subStr returning the wrong information? Could you provide 
an example?

Matthew

Y D Sun wrote:
> Dear all,
> 
> Is there a method in BioJava that returns a sub-sequence using a
> Location parameter (not subStr() or subList() with two integers - start
> and end)? This consideration comes from my requirement to get the
> nucleotide sub-sequence corresponding to a CDS section. In such a case,
> the subStr(start, end) method cannot always return the sub-sequence
> correctly.
> 
> Thanks.
> 
> George
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
> 


-- 
BioJava Consulting LTD - Support and training for BioJava
http://www.biojava.co.uk



More information about the Biojava-l mailing list