dumpClusterPrt Class Reference

List of all members.

Public Member Functions

 dumpClusterPrt (String pgQuery) throws ClassNotFoundException, SQLException
String getPrt (String div, String prtName) throws AceException
String getDef (String div, String prtName) throws AceException
void dumpClusterDef (int filesize)
void threadedTitleDump (int filesize)

Static Public Member Functions

static void main (String[] args)

Static Public Attributes

static File dir = null

Static Package Functions

static PrintWriter createPR (int cnt, String ext) throws IOException

Package Attributes

ResultSet clusters = null

Private Attributes

HashMap div2db = new HashMap()

Static Private Attributes

static String user = "kzhou"
static String passwd = "fugufish"
static String pgPasswd = ""
static String aceHost = "localhost"
static int[] ports = {3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009}
static String[] dbs = {"amp", "fr", "hs", "mam", "mm", "pri", "rod", "sau", "vrt"}
static String pgdb = "jdbc:postgresql://localhost/parortho"


Detailed Description

This program will dump all the proteins within one cluster into each file. All the clusters from orpara database stored in the cds table will be dumped.

Constructor & Destructor Documentation

dumpClusterPrt::dumpClusterPrt ( String  pgQuery  )  throws ClassNotFoundException, SQLException [inline]

initialize the 9 Acedb on localhost. They could be on different machines for parallel processing

References aceHost, clusters, dbs, div2db, passwd, pgdb, pgPasswd, ports, stmt, and user.

Referenced by main().


Member Function Documentation

String dumpClusterPrt::getPrt ( String  div,
String  prtName 
) throws AceException [inline]

obtains the fastaFormated protein sequence.

References div2db.

Referenced by main().

String dumpClusterPrt::getDef ( String  div,
String  prtName 
) throws AceException [inline]

Get the title or definition for protein prtName.

Returns:
null if prrName has no Title.

References acedb::Aceobj::at(), div2db, acedb::Aceobj::right(), and acedb::Aceobj::toString().

Referenced by dumpClusterDef().

void dumpClusterPrt::dumpClusterDef ( int  filesize  )  [inline]

dump all clusters into files with filesize clusters in each file. Files will be named 1.def 2.def ...

References clusters, and getDef().

Referenced by dumpClusterTitle::main().

void dumpClusterPrt::threadedTitleDump ( int  filesize  )  [inline]

dump the title of each protein sequence into files with filesize clusters in each file. Default filesize=2000.

References clusters, and div2db.

Referenced by dumpClusterTitle::main().

static PrintWriter dumpClusterPrt::createPR ( int  cnt,
String  ext 
) throws IOException [inline, static, package]

a helper function to manage files and directories.

References dir.

Referenced by main().

static void dumpClusterPrt::main ( String[]  args  )  [inline, static]

the trim(division) is essential to remove to whitespaces

References clusters, createPR(), dumpClusterPrt(), getPrt(), passwd, pgPasswd, and user.


Member Data Documentation

String dumpClusterPrt::user = "kzhou" [static, private]

Referenced by dumpClusterPrt(), and main().

String dumpClusterPrt::passwd = "fugufish" [static, private]

Referenced by dumpClusterPrt(), and main().

String dumpClusterPrt::pgPasswd = "" [static, private]

Referenced by dumpClusterPrt(), and main().

String dumpClusterPrt::aceHost = "localhost" [static, private]

Referenced by dumpClusterPrt().

int [] dumpClusterPrt::ports = {3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009} [static, private]

Referenced by dumpClusterPrt().

String [] dumpClusterPrt::dbs = {"amp", "fr", "hs", "mam", "mm", "pri", "rod", "sau", "vrt"} [static, private]

inside the postgresdb division is char(30), so they must be trimmed in the query, otherwise the HashMap div2db will not find it!.

Referenced by dumpClusterPrt().

File dumpClusterPrt::dir = null [static]

Referenced by createPR().

HashMap dumpClusterPrt::div2db = new HashMap() [private]

String dumpClusterPrt::pgdb = "jdbc:postgresql://localhost/parortho" [static, private]

Referenced by dumpClusterPrt().

ResultSet dumpClusterPrt::clusters = null [package]


The documentation for this class was generated from the following file:

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