[Bioperl-l] Overlapping Features with GFF dbase

Lincoln Stein lstein at cshl.edu
Thu Jul 7 12:28:39 EDT 2005


Hi Victor,

Once you get a gene, you can do this:

	my @overlapping_features = $gene->features;

The same filtering syntax that you use, as well as the get_seq_stream() method 
call, works with features as well as segments.

Lincoln

On Thursday 07 July 2005 11:05 am, Victor wrote:
> Hello,
> I was wondering if someone can point me out on how best to retrieve a set
> of overlapping features from the GFF schema. Right now I am looking at the
> GFF.pm <http://GFF.pm> to do this by:
>
> use Bio::DB::GFF;
> my $db = Bio::DB:GFF->new(-dsn =>'mydbase',
> -aggregators =>'gene_model{CDS ,five_prime_UTR,three_prime_UTR'});
>
> my $gene_stream = $db=>get_seq_stream('gene_model:UCSC_hg16');
>
> while (my $gene = $gene_stream->next_seq) {
> print $gene->name, "\n";
> for my $part ($gene->get_SeqFeatures) {
> print "\t", join("\t", $part->method,$part->start,$part->end), "\n";
> }
> print "\n";
> }
>
> This gets all the genes from the GFF schema. Should I be using another
> while loop to retrieve other features that overlap with these genes? It
> there a bioperl module to retrieve overlapping features? I would like to be
> able to get all the features that overlap with a particular gene or a whole
> set of genes.
>
> Thanks in advance.
> Victor
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724


More information about the Bioperl-l mailing list