uk.ac.ebi.intact.util
Class InsertComplexMerck

java.lang.Object
  |
  +--uk.ac.ebi.intact.util.InsertComplexMerck

public class InsertComplexMerck
extends java.lang.Object

Insert binary iteraction data (customize to MERCK format). Custom version for IntAct Merck installation for initial * insertion of Merck and Mint data. Data is read from an input text file. Input file format: Line records, elements are space-delimited: Prey Bait ExperimentLabel addionalInformation * Q05524 P00330 hyb Various data additions, e.g. full Mint record. * The experimentLabel may be a pubmed id. IMPORTANT! The order is prey bait

Version:
$Id: InsertComplexMerck.java,v 1.6 2004/02/26 11:59:29 skerrien Exp $
Author:
Henning Hermjakob, hhe@ebi.ac.uk
, Samuel Kerrien, skerrien@ebi.ac.uk

Field Summary
static java.lang.String NEW_LINE
           
 
Constructor Summary
InsertComplexMerck()
          basic constructor - sets up intact helper and protein factory
 
Method Summary
 void closeHelper()
          Close the database connexion if it has been opened.
 void insert(java.lang.String filename, java.lang.String taxId, java.lang.String interactionType)
           
 void insertComplex(java.lang.String baitAC, java.util.ArrayList preyACs, java.lang.String experimentLabel, java.lang.String commentTopicLabel, java.lang.String commentTopicDescription)
          Inserts a complex into the database If the complex already exists, it is skipped!
 void insertComponent(Interaction interaction, java.lang.String spAc, java.lang.String taxId, CvComponentRole role)
          Insert a Component object linking an Interactor to an Interaction.
static void main(java.lang.String[] args)
          Read complex data from flat file and insert it into the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_LINE

public static final java.lang.String NEW_LINE
Constructor Detail

InsertComplexMerck

public InsertComplexMerck()
                   throws java.lang.Exception
basic constructor - sets up intact helper and protein factory

Method Detail

insertComponent

public void insertComponent(Interaction interaction,
                            java.lang.String spAc,
                            java.lang.String taxId,
                            CvComponentRole role)
                     throws java.lang.Exception
Insert a Component object linking an Interactor to an Interaction.

Parameters:
interaction - The interaction to add the Interactor to
spAc - Swiss-Prot accession number of the Protein to add. If the protein does not yet exist, it will be created.
taxId - The tax Id of the target proteins.
role - Role of the protein in the interaction.
Throws:
java.lang.Exception

insertComplex

public void insertComplex(java.lang.String baitAC,
                          java.util.ArrayList preyACs,
                          java.lang.String experimentLabel,
                          java.lang.String commentTopicLabel,
                          java.lang.String commentTopicDescription)
                   throws java.lang.Exception
Inserts a complex into the database If the complex already exists, it is skipped!

Parameters:
baitAC - Swiss-Prot accession number of the bait protein.
preyACs - Swiss-Prot accession numbers of the prey proteins.
experimentLabel - The short label of the experiment the complex belongs to.
Throws:
java.lang.Exception

insert

public void insert(java.lang.String filename,
                   java.lang.String taxId,
                   java.lang.String interactionType)
            throws java.lang.Exception
Parameters:
filename - the filename to parse
taxId - the taxId
interactionType - the CvInteractionType shortlabel which will allow to retreive the right object from the database and then to link it to the created interactions.
Throws:
java.lang.Exception

closeHelper

public void closeHelper()
Close the database connexion if it has been opened.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Read complex data from flat file and insert it into the database.

Format of the file: One line describe one binary interaction as follow, PREY BAIT EXPERIMENT DESCRIPTION, PREY and BAIT are swiss-prot ACs, EXPERIMENT is preferably a PUBMED id, DESCRIPTION is the rest of the line (stored as an Annotation).

Warning: there is no managment of transaction isolation, they have been removed because nothing were written in the database. So, if anything goes wrong during the loading, the program doesn't stop and some objects may hang around.

Usage of the program: InsertComplexMerck -file -taxId -interactionType

Developper note: the command line interface uses common-cli (jakarta)

Parameters:
args - [0] InputFileName, [1] the tax id of the target proteins, [2] the interaction type of the experiment.
Throws:
java.lang.Exception - for any errors.


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk