Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- use Bio::EnsEMBL::ApiVersion;
- use Bio::EnsEMBL::Registry;
- my $ac = shift;
- my $r = 'Bio::EnsEMBL::Registry';
- $r->load_registry_from_db(
- -user => 'anonymous',
- -host => 'ensembldb.ensembl.org',
- -port => 5306
- );
- my $ta = $r->get_adaptor( 'homo_sapiens', 'Core', 'Transcript' );
- my ($tx) = @{ $ta->fetch_all_by_external_name($ac) };
- printf("Ensembl %s (%s; %s)\n", software_version(), $ac, $tx->display_id);
- foreach my $exon ( @{ $tx->get_all_Exons() } ) {
- printf("%d\t%d\t%d\n", $exon->start, $exon->end, $exon->length);
- }
Advertisement
Add Comment
Please, Sign In to add comment