Created
December 14, 2015 16:12
-
-
Save dbolser-ebi/87cb3bbc921686a760ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Bio::EnsEMBL::Registry; | |
Bio::EnsEMBL::Registry-> | |
load_registry_from_db( | |
-host => 'mysql-eg-prod-3.ebi.ac.uk', | |
-user => 'ensro', | |
-port => '4243', | |
-dbname => 'css_triticum_aestivum_core_30_83_1', | |
); | |
my $slice_adaptor = Bio::EnsEMBL::Registry-> | |
get_adaptor( 'Wheat', 'Core', 'Slice' ); | |
warn $slice_adaptor, "\n"; | |
my $exon_adaptor = Bio::EnsEMBL::Registry-> | |
get_adaptor( 'Wheat', 'Core', 'Exon' ); | |
warn $exon_adaptor, "\n"; | |
# get all non-redundant slices from the highest possible coordinate | |
# systems | |
my $slices = $slice_adaptor-> | |
fetch_all('toplevel'); | |
for my $slice (@$slices){ | |
#print $slice; | |
my $exons = $exon_adaptor-> | |
fetch_all_by_Slice($slice); | |
for my $exon(@$exons){ | |
print ">", $exon->stable_id, "\n"; | |
print $exon->seq->seq, "\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment