[Bioperl-l] bioperl-network-1.5.2_100 node IDs

Brian Osborne bosborne11 at verizon.net
Sun Jan 21 17:35:49 EST 2007


All the ids are stored as Annotations, so each id is a
Bio::Annotation::DBLink object.

So to get at these you do something like this:

ok $node = $g1->get_nodes_by_id('PIR:A64696');
@proteins = $node->proteins;
ok $proteins[0]->accession_number,'PIR:A64696';
my $ac = $proteins[0]->annotation;
@ids = $ac->get_Annotations('dblink');
ok $ids[0]->primary_id, "A64696";

By the way, it's frequently the case that a good source of example code are
the *t files in the t/ directory. The code above comes from t/ProteinNet.t,
for example.

You can also do:

%ids = $g1->get_ids_by_node($node);

This is not as Bioperl-ish but this is the way the modules were initially

Also, I've updated the documentation in IO/psi.pm, now you can easily tell
what is and what is not extracted from the XML and put in the Node object.
If there's something missing from the node that you're interested in you
should tell me and I'll see what I can do, I use this for my own work and
play and have only extracted data from the PSI MI XML that's useful for me
and not much else.

Brian O.

On 1/21/07 11:52 AM, "Mikel Egaña Aranguren"
<mikel.eganaaranguren at cs.man.ac.uk> wrote:

> Hello;
> is there a way of fine-tuning the types of ids that are stored in the
> Node objects, in the Bio::Network module?
> For example, if I have the following in an Intact psi xml file:
>              <primaryRef db="uniprotkb" id="Q9Y738"
> secondary="mis12_schpo" version="SP_37"/>
>              <secondaryRef db="interpro" id="IPR008685" secondary="Mis12"/>
>              <secondaryRef db="intact" id="EBI-1002822"
> secondary="mis12_schpo"/>
> How can I retrieve the id "mis12_schpo"? At the moment it just gives me
> "Q9Y738".
> Thanks a lot.
> Regards

More information about the Bioperl-l mailing list