LoadCDSFromAce.java File Reference


Functions

Class. forName ("org.postgresql.Driver")
 LoadCDSFromAce () throws SQLException, ClassNotFoundException
void connect (String h, int p)
void connectAce (String dbname)
void close () throws SQLException
void closeAce ()
void updateFrom (String aceQuery, boolean mRNA) throws SQLException, AceException
void loadFrom (String aceQuery, boolean mRNA) throws SQLException, AceException
void createFileFrom (String aceQuery, boolean mRNA) throws SQLException, AceException
void insert () throws SQLException, AceException
void loadOrganism (String div) throws SQLException, AceException
int getOrgid (String orgName) throws SQLException
String getOrgidString (String orgName) throws SQLException
Vector getUnusedId () throws SQLException
int nextID ()
static void main (String[] args)

Variables

 psconn = DriverManager.getConnection(pgDB, usr, pgPassword)
 stmt = psconn.createStatement()
 orgidStmt = psconn.prepareStatement("Select id from species where name=?")
 unusedIds = getUnusedId()

Function Documentation

void close (  )  throws SQLException

References orgidStmt, and psconn.

Referenced by readGFSR(), writeGFSR(), and Socket::~Socket().

void closeAce (  ) 

void connect ( String  h,
int  p 
)

This is to connect to an ACEDB on host h and port p.

References user.

Referenced by cadbc::cadbc().

void connectAce ( String  dbname  ) 

void createFileFrom ( String  aceQuery,
boolean  mRNA 
) throws SQLException, AceException

create a file for the postgres command, this can speed up Database loading by 1000x. Duging loading also drop index. This can also greately increase the speed of loading

References aceid, getOrgidString(), length, n_cluster, nextID(), p_cluster, and prtid.

Class. forName ( "org.postgresql.Driver"   )  [package]

int getOrgid ( String  orgName  )  throws SQLException

does a database query from species table to obtain the id of species from name, orgName must be scientific

References orgidStmt.

Referenced by loadFrom(), and updateFrom().

String getOrgidString ( String  orgName  )  throws SQLException

References orgidStmt.

Referenced by createFileFrom().

Vector getUnusedId (  )  throws SQLException [private]

used to obtain unused cds_id in the cds table, run at

/** used to obtain unused cds_id in the cds table, run at object construction. Called by the constructor.

Referenced by LoadCDSFromAce().

void insert (  )  throws SQLException, AceException

References loadFrom().

LoadCDSFromAce (  )  throws SQLException, ClassNotFoundException

void loadFrom ( String  aceQuery,
boolean  mRNA 
) throws SQLException, AceException

use this function when the cds table is originally empty. Or all of the entries are mostly new. When called for both CDS and CDS_from_mRNA, usually the second call fails with large databases such as bony, human, ... I have no solutions yet. The failer is from the backend!!!

References aceid, getOrgid(), nextID(), prtid, and psconn.

Referenced by insert().

void loadOrganism ( String  div  )  throws SQLException, AceException

Load all organisms from this acedb to the species table in the relational database. If organism already exist then just ignore. So this function can update an existing organism table div provides a division such as rod, vrt depends on postgres sequence to keep track of the id

References psconn.

static void main ( String[]  args  )  [static]

int nextID (  )  [private]

Referenced by createFileFrom(), and loadFrom().

void updateFrom ( String  aceQuery,
boolean  mRNA 
) throws SQLException, AceException

update the cds table from ACEDB, updates every existing ace_id and inserting new ace_id. more efficient if cds table is already loaded

References aceid, getOrgid(), length, prtid, psconn, source, and unusedIds.


Variable Documentation

orgidStmt = psconn.prepareStatement("Select id from species where name=?")

psconn = DriverManager.getConnection(pgDB, usr, pgPassword)

stmt = psconn.createStatement()

unusedIds = getUnusedId()

Referenced by LoadCDSFromAce(), and updateFrom().


Generated on Wed Aug 10 11:57:01 2011 for Softwares from Orpara by  doxygen 1.5.6