uk.ac.ebi.intact.util
Class InsertComplex

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

public final class InsertComplex
extends java.lang.Object

Insert complex data for Ho and Gavin publications. Data is read from an input text file.

Input file format: Line records, elements are space-delimited: Interaction Bait Preys Experiment number 12 Q05524 P00330 Q05524 gavin

Author:
Henning Hermjakob, hhe@ebi.ac.uk

Field Summary
static java.lang.String NEW_LINE
           
 
Constructor Summary
InsertComplex()
          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 interactionNumber, java.lang.String bait, java.util.Vector preys, java.lang.String actLabel, Experiment experiment, java.lang.String interactionTypeLabel)
          Inserts a complex into the database If the complex already exists, it is skipped!
 void insertComponent(Interaction act, java.lang.String spAc, 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

InsertComplex

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

Method Detail

closeHelper

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


insertComponent

public final void insertComponent(Interaction act,
                                  java.lang.String spAc,
                                  CvComponentRole role)
                           throws IntactException
Insert a Component object linking an Interactor to an Interaction.

Parameters:
act - 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.
role - Role of the protein in the interaction.
Throws:
java.lang.Exception
IntactException

insertComplex

public final void insertComplex(java.lang.String interactionNumber,
                                java.lang.String bait,
                                java.util.Vector preys,
                                java.lang.String actLabel,
                                Experiment experiment,
                                java.lang.String interactionTypeLabel)
                         throws java.lang.Exception
Inserts a complex into the database If the complex already exists, it is skipped!

Parameters:
interactionNumber - The number of the interaction in the publication. Used for the shortLabel.
bait - Swiss-Prot accession number of the bait protein.
preys - Swiss-Prot accession numbers of the prey proteins.
actLabel - The short label to be used for the Interaction
experiment - The Experiment that the Complex belongs to
Throws:
java.lang.Exception

insert

public final 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

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.

Parameters:
args - the command line arguments. The first argument is the InputFileName and the second argument is the the tax id of the target proteins.
Throws:
java.lang.Exception - for any errors.


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