[ensembl-dev] question on protein domains
Nathalie Conte
nconte at ebi.ac.uk
Thu Jul 11 12:48:43 BST 2013
HI,
I am trying to retrieve the domain ID corresponding to a slice
(chromosome, start,end) using ensembl API .
Here is how I get my domains, using the ensembl APIs- My starting point
is a slice, where I get all the genes from, then the transcripts, then
the translation and domains.
my $mouse_query_slice =
$mouse_slice_adaptor->fetch_by_region('chromosome',$non_ref_seq_region,
$non_ref_start,$non_ref_end);
my $all_genes=$gene_adaptor->fetch_all_by_Slice($mouse_query_slice);
if (scalar(@$all_genes)) {
print_genes($all_genes);
foreach my $ovegen(@{$all_genes}){
print "\t",
my @transcripts = @{ $ovegen->get_all_Transcripts };
my $transcript;
foreach $transcript (@transcripts){
my $translation = $transcript->translation();
if ($translation) {
my @domain_feats = @{$translation->get_all_DomainFeatures};
my $dom;
foreach $dom(@domain_feats){
print 'transcript'.$transcript->stable_id.'-'.'domain
ID'.$dom->hseqname.",";
}
print "\n";
} else {
print
'transcript'.$transcript->stable_id.'-'."Pseudogene\n";
}
}
}
and the output looks like this:
Bio::EnsEMBL::Transcript=HASH(0x49ae4b0)transcriptENSMUST00000118364-domain
ID PS50853,transcriptENSMUST00000118364-domain ID SSF49265,
transcriptENSMUST00000118364-dommain ID
SSF49265,transcriptENSMUST00000118364-domain ID PF09240,
From this I have 2 questions:
1-First in the output, I get the $dom->hseqname() , it will display the
id- PS50853, the is the domain ID from the PROSITE database. I was
wondering if there is a method to display the description of this domain
like Fibronectin type-III domain profile?
2-Secondely, my starting point is a slice where I want my domain to be
from. The way I am accessing the domain is through all genes , where I
get all the genes from, then the transcripts, then the translation and
domains.
The problem with this is that I am going to get all the domains
corresponding to the protein features not only the ones corresponding to
this particular slice (could be 1 bp in size).
Could you suggest something?
Many thanks
Nathalie
--
Nathalie Conte, PhD
Bioinformatician BMB (WP3, WP7)
Functional Genomics group
EMBL-EBI,UK
01223 492562
More information about the Dev
mailing list