[Bioperl-l] Extract features from GFF

Barry Moore barry.moore at genetics.utah.edu
Tue Oct 23 04:37:07 UTC 2007


Oh yeah, much better option if you've got a database running.  Look  
at the docs for the modules Chris suggested.  Something like:

my $db      = Bio::DB::SeqFeature::Store->new( -adaptor => 'DBI::mysql',
                                                  -dsn     =>  
'dbi:mysql:test',
                                                  -write   => 1 );
# load an entire GFF3 file, using the GFF3 loader...
my $loader = Bio::DB::SeqFeature::Store::GFF3Loader->new(-store    =>  
$db,
							   -verbose  => 1,
							   -fast     => 1);

$loader->load('./my_genome.gff3');

@features = $db->get_features_by_location(-seq_id=>'Chr1',- 
start=>4000,-end=>600000);

Barry

On Oct 22, 2007, at 6:43 PM, Chris Fields wrote:

>
> On Oct 22, 2007, at 5:30 PM, Hang wrote:
>
>> Hello,
>>
>> I have a list of about 100,000 short genomic regions with paired
>> start and end
>> coordinations on reference fly genome (R5.3). I also have GFF files
>> from the
>> same genome release. I wonder how I can extract all overlapping
>> features from
>> these regions.
>>
>> For example:
>>
>> region A is on chromosome 2L between 123,456 bp to 123,489 bp. What
>> code should
>> I use to extract feature, like gene, CDS etc., that overlaps with
>> this region?
>>
>> Thank you in advance!
>>
>> -- Hang
>
> Look into using Bio::DB::GFF or Bio::DB::SeqFeature::Store; this will
> depend on the GFF version of the data you have.
>
> chris
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list