[ensembl-dev] Get Oligo probes

Sébastien Moretti sebastien.moretti at unil.ch
Tue Apr 1 14:24:13 BST 2014


Hi Nathan

I managed to do what I want this way:
my $array_adaptor = $reg->get_adaptor('human', 'funcgen', 'Array');
my $tx_adaptor    = $reg->get_adaptor('human', 'core',    'Transcript');

my $array = $array_adaptor->fetch_by_name_vendor( 'HG-U95B' );
for my $pset ( @{ $array->get_all_ProbeSets() } ){
     for my $trans ( @{ $pset->get_all_Transcript_DBEntries } ){
         my $transcript = $tx_adaptor->fetch_by_stable_id( 
$trans->primary_id );
         print $transcript->get_Gene->stable_id, "\t", $pset->name, "\n";
     }
}


I will try with your fixed fetch_all_by_linked_transcript_Gene
Thanks

> Hi Sebastian
>
> That method call doesn't appear in ur example script and seems to have been missed when we updated the API wrt removing the stable_id tables. I have updated now, and it will be available in v76. Here is the now working version:
>
> sub fetch_all_by_linked_transcript_Gene{
>    my $self = shift;
>    my $gene = shift;
>    assert_ref($gene, 'Bio::EnsEMBL::Gene');
>    #No need to pass params here as we known the gene ID is an int from the db
>    my $tx_sids = $gene->adaptor->db->dbc->sql_helper->execute_simple('select t.stable_id from transcript t where t.gene_id='.$gene->dbID);
>    return $self->fetch_all_by_external_names($tx_sids, $self->db->species.'_core_Transcript');
> }
>
> Or alternatively a link to the master check in, if you want to cherry pick the commit over on your local repo:
>
> 	https://github.com/Ensembl/ensembl-funcgen/commit/7ac1eba97fa00913de8f00b6a149e0a82753ee9f
>
> Incidentally, I will also be updating the example script, as this seems to have aged a little bit.
>
>
> Nathan Johnson
>
> Ensembl Regulation
> European Bioinformatics Institute (EMBL-EBI)
> European Molecular Biology Laboratory
> Wellcome Trust Genome Campus
> Hinxton
> Cambridge CB10 1SD
> United Kingdom
>
> http://www.ensembl.info/
> http://twitter.com/#!/ensembl
> https://www.facebook.com/Ensembl.org
>
> On 1 Apr 2014, at 09:22, njohnson <njohnson at ebi.ac.uk> wrote:
>
>> Hi Sebastian
>>
>> You probably want to have a look at our example script, found here:
>>
>> 	ensembl-funcgen/scripts/examples/microarray_annotation_example.pl
>>
>> I will have a look at that error asap.
>>
>> Thanks
>>
>> Nathan Johnson
>>
>> Ensembl Regulation
>> European Bioinformatics Institute (EMBL-EBI)
>> European Molecular Biology Laboratory
>> Wellcome Trust Genome Campus
>> Hinxton
>> Cambridge CB10 1SD
>> United Kingdom
>>
>> http://www.ensembl.info/
>> http://twitter.com/#!/ensembl
>> https://www.facebook.com/Ensembl.org
>>
>> On 1 Apr 2014, at 08:50, Sébastien Moretti <sebastien.moretti at unil.ch> wrote:
>>
>>> Hi
>>>
>>> I wonder how to retrieve all gene_id and related probeset id for a given species and a particular chip type.
>>> Usually I get that from BioMart but cannot find the equivalent way of doing that with the Ensembl API
>>> e.g. Ensembl Gene ID 	Affy HG U95AV2 probeset
>>>     ENSG00000261657 	39195_s_at
>>>     ENSG00000234627 	37079_at
>>>     ENSG00000256305 	31325_at
>>>     ...
>>>
>>> I tried the method fetch_all_by_linked_transcript_Gene but it fails with this error message:
>>> DBD::mysql::db selectcol_arrayref failed: Table 'homo_sapiens_core_75_37.transcript_stable_id' doesn't exist at /usr/local/ensembl/ensembl-funcgen/modules//Bio/EnsEMBL/Funcgen/DBSQL/BaseAdaptor.pm line 922.
>>> And the status of the method is "at risk".
>>>
>>>
>>> Any idea how to do that?
>>> Thanks
>>>
>>>
>>>
>>> PS for the API documentation of fetch_all_by_linked_transcript_Gene() & fetch_all_by_linked_Transcript() a '}'  is missing at the end of the code example.

-- 
Sébastien Moretti
Department of Ecology and Evolution,
Biophore, University of Lausanne,
CH-1015 Lausanne, Switzerland
Tel.: +41 (21) 692 4221/4079
http://selectome.unil.ch/ http://bgee.unil.ch/




More information about the Dev mailing list