Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Buenos días hermanos: I need some help for this script:
use strict; use warnings; use Bio::EnsEMBL::Registry; ## Load the registry automatically my $reg = "Bio::EnsEMBL::Registry"; $reg->load_registry_from_url('mysql://anonymous@ensembldb.ensembl. +org'); ## Get the human gene adaptor my $human_gene_adaptor = $reg->get_adaptor('Homo sapiens', 'core', 'Gene'); ## Get the compara member adaptor my $member_adaptor = $reg->get_adaptor('Compara', 'compara', 'Member'); ## Get the compara homology adaptor my $homology_adaptor = $reg->get_adaptor ('Multi', 'compara', 'MethodLinkSpeciesSet') +; my @BreastCANgenes = ('ABCA3','ABCB10','ABCB8'); open ('archivo', '>homologos.txt'); my $gen; foreach $gen (@BreastCANgenes) { ## Get all existing gene object my $ctdp1_genes = $human_gene_adaptor->fetch_all_by_external_name( +$gen); ## For each of these genes... foreach my $ctdp1_gene (@$ctdp1_genes) { ## Get the compara member my $member = $member_adaptor->fetch_by_source_stable_id( "ENSEMBLGENE", $ctdp1_gene->stable_id); ## Get all the orthologues my $all_homologies = $homology_adaptor->fetch_all_by_MethodLinkS +peciesSet_orthology_type_subtype($member,'ortholog_one2one','Mammalia +'); ## For each homology foreach my $this_homology (@$all_homologies) { ## print the description (type of homology) and the ## subtype (taxonomy level of the event: duplic. or speciation +) print $this_homology->description, " [", $this_homology->subty +pe, "]\n"; print archivo $this_homology->description, " [", $this_homolog +y->subtype, "]\n"; ## print the members in this homology my $members = $this_homology->get_all_Members(); foreach my $this_member (@$members) { print archivo $this_member->source_name, " ", $this_member->stable_id, " (", $this_member->genome_db->name, ")\n" } print "\n"; } } } close ('archivo');
it isn't works. The error: Can't locate object method "fetch_all_by_MethodLinkSpeciesSet_orthology_type_subtype" via package "Bio::EnsEMBL::Compara::DBSQL::MethodLinkSpeciesSetAdaptor" at ortologos.pl line 34.

In reply to Problems with ensembl perl script by bioinfo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-24 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found