[Bioperl-l] Re: DNA topology
Jason Stajich
jason@cgt.mc.duke.edu
Fri, 15 Nov 2002 10:33:19 -0500 (EST)
I think it's easier than that. Don't we have a function
$seq->is_circular
Which will get set to true if it is circular?
>From Bio/SeqIO/genbank.pm:
my $circ = shift(@tokens);
if ($circ eq 'circular') {
$params{'-is_circular'} = 1;
$params{'-division'} = shift(@tokens);
} else {
# 'linear' or 'circular' may actually be omitted altogether
$params{'-division'} =
(CORE::length($circ) == 3 ) ? $circ : shift(@tokens);
}
-jason
On 15 Nov 2002, Heikki Lehvaslaiho wrote:
> Jing,
>
> RefSeq loosely follows GenBank format. In GenBank, the LOCUS line can
> contain the word 'circular'. That word should be part of the string
> returned by the Bio::Seq::RichSeq::division method. I am not sure if
> there are any circular molecules in RefSeq.
>
> Try:
>
> if ($seq->division =~ /circular/ ) {
>
> } else { #linear
>
> }
>
>
> Yours,
> -Heikki
>
>
> On Fri, 2002-11-15 at 13:56, jzhao wrote:
> > Mr. Lehvaslaiho,
> >
> > I am wrapping some BioPerl modules to retrieve genome features from the
> > RefSeq database. Is there any handy methods that can tell whether the DNA
> > is linear or circular?
> >
> > Thanks,
> > Jing
> >
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu