NAME
OBO::CCO::IntActParser - An IntAct to OBO parser/filter.
SYNOPSIS
use OBO::CCO::IntActParser; use strict;
my $A_t_intact_files_dir = "/home/pik/Bioinformatics/Erick_two/IntactFiles/At/"; my @A_t_intact_files = @{&get_intact_files ($A_t_intact_files_dir)};
my $A_t_interactionmanager = InteractionManager->new; $A_t_interactionmanager->work( "pre_cco_A_thaliana.obo", "cco_I_A_thaliana.obo", "3702", "cco_i_A_thaliana.ids", "cco_b_A_thaliana.ids", "cco_i.ids", "cco_b.ids", @A_t_intact_files );
sub get_intact_files{ my $intact_files_dir = shift; my @intact_files = (); opendir(DIR, $intact_files_dir) || die "can't opendir $intact_files_dir: $!"; my @files = readdir(DIR); for my $file (@files){ if (!($file eq ".") and !($file eq "..")){ push (@intact_files,$intact_files_dir.$file); } } closedir DIR; return \@intact_files; }
DESCRIPTION
A parser for IntAct to OBO conversion. The conversion is filtered according to the proteins already existing in the OBO file and the roles this proteins have in the interactions (prey, bait, neutral component). It deletes any interaction in OBO that it is not present in IntAct, for sync.
AUTHOR
Mikel Egana Aranguren, mikel.eganaaranguren@cs.man.ac.uk
COPYRIGHT AND LICENSE
Copyright (C) 2007, 2008 by Mikel Egana Aranguren
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
work
Usage - IntActParser->work()
Returns - A new OBO ontology with new proteins and interactions from IntAct
Args - old OBO file, new OBO file, taxon (e.g. 3702), cco_i_taxon_ids file, cco_b_taxon_ids file, cco_i_ids file, cco_b_ids file, XML file 1, XML file 2, ...
Function - Adds or deletes interactions to/from an OBO file, filtering the interactions from Intact XML files according to proteins already existing in CCO and their roles in IntAct (bait, prey, neutral component). It also includes any new proteins needed. It should be used for each taxon.
get_xref_acc
Usage - get_xref_acc($db, $term)
Returns - the name of the external database and the ID (strings)
Args - the database name and the term (OBO::Core::Term)
Function - Given a term, get the xref of a given db. Otherwise, undef
add_term
Usage - add_term ($term_name,$term_id,$ontology)
Returns - the added term object
Args - the term name, term name id, ontology
Function - add a term to the ontology, with an ID and name
add_xref
Usage - add_xref ($term,$db,$acc)
Returns - the provided term object
Args - the term object, database name, accesion id
Function - add an xref (database and accesion id) to a given term
add_def
Usage - add_def ($term,$db,$acc,$def_text)
Returns - the provided term object
Args - the term object, database name, accesion id, definition text
Function - add an definition (definition text, database and accesion id) to a given term
add_synonym
Usage - add_synonym ($term,$db,$acc,$syn_text)
Returns - the provided term object
Args - the term object, database name, accesion id, synonym text
Function - add an exact synonym (synonym text, database and accesion id) to a given term
add_comment
Usage - add_comment ($term,$text)
Returns - the provided term object
Args - the term object, comment text
Function - add a comment to a given term
retrieve_interactions
Usage - retrieve_interactions ($interactor,@interactions)
Returns - an array of interactions
Args - an interactor object and the array of interaction objects extracted from an IntAct XML file
Function - given an interactor, retrieve all the interactions that have the interactor as participant
get_role
Usage - get_role ($interactor_id,$interaction)
Returns - role (string)
Args - interactor id and interaction object
Function - given and interactor id (e.g. 498), get its role in the interaction
get_interactor
Usage - get_interactor ($interactor_id,@interactors)
Returns - interactor object
Args - interactor id and arrayc of interactors extracted from an IntAct XML file
Function - given an interactor id get the interactor object
add_interaction
Usage - add_interaction ($interaction, $ontology, $cco_i_taxon_ids_map, $cco_i_ids_map,$is_a)
Returns - added interaction OBO term
Args - interaction object, ontology, interaction id map (taxon), interaction id map (general), is_a relationship type id
Function - add an interaction to CCO
add_interactor
Usage - add_interactor ($interactor,$ontology,$cco_b_taxon_ids_map,$cco_b_ids_map,$is_a,$derives_from,$taxon)
Returns - added interactor OBO term
Args - interactor object, ontology, protein id map (taxon), protein id map (general), is_a relationship type id, belongs_to relationship type id, taxon id (e.g. 3702)
Function - add an interactor to CCO
lookup
Usage - lookup ($item,@array)
Returns - found result or undefined if not found
Args - string to find, array
Function - find and string in an array of strings