Clusterdump Class Reference

List of all members.

Public Member Functions

 Clusterdump (String pgQuery) throws ClassNotFoundException, SQLException
void dump (int numf, String prefix)
void tdump (int numf, String prefix)
void tdumpone (String clusterid) throws IOException, SQLException, InterruptedException

Static Public Member Functions

static void main (String[] args)

Package Attributes

ResultSet result = null

Private Member Functions

Ace getAce (String dbname)

Private Attributes

DBinfo dbinfo = new DBinfo()
HashMap div2db = null


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. We put all the sequences from each cluster into one file. We only put certain number of files in each directory, so that we don't get too many files in each directory.

We put all the title into one file. Title of each cluster is put next to each other separateted by empty line.


Constructor & Destructor Documentation

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

Construct a dump object that will dump the pgQuery result into files of protein sequences in fasta format and file of protein titles for further analysis.

This object may perform threaded dump or simple loop through dump depending on the dump method chosen.

References div2db, result, and stmt.

Referenced by main().


Member Function Documentation

Ace Clusterdump::getAce ( String  dbname  )  [inline, private]

References div2db.

Referenced by dump(), tdump(), and tdumpone().

void Clusterdump::dump ( int  numf,
String  prefix 
) [inline]

Simple loop through dump both protein fasta sequence and title will be dumpped. The format of the query is fixed: select pcluster, trim(db) as div, prt from cds c join species s on c.source=s.id where pcluster notnull order by pcluster, db, prt Files will be named 1.def 2.def ... numf numfile per directory

controls directory creation, and new deffile creation/////////

writing to output stream /////////

References ace, acedb::Aceobj::at(), getAce(), result, acedb::Aceobj::right(), and acedb::Aceobj::toString().

Referenced by main().

void Clusterdump::tdump ( int  numf,
String  prefix 
) [inline]

Exact copy of dump, with thread enabled. May speed up by 2-100 fold depends on the setting of servers and clients and the comunication speed of the connection.

Result dump into directories and files in the current directory with predefined names.

Parameters:
numf number of sequence files per directory
prefix is a prefix to give the cluster names, default C. This is essential for clustalw program. It got a bug when feeding it with 1.pep file it fails. with this set, 1.pep will becom C1.pep

controls directory creation, and new deffile creation/////////

References getAce(), and result.

Referenced by main().

void Clusterdump::tdumpone ( String  clusterid  )  throws IOException, SQLException, InterruptedException [inline]

dumps only one cluster given p_cluster = clid. In this case, the pgQuery string should be Select db, prt from cds join species s on cds.source=s.id where p_cluster=clusterid order by db, prt Where should the result go? To files first

References getAce(), and result.

Referenced by main().

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

should be able to dump either the whole cluster database or just dump one cluster. Right now I have only implemented dumping the whole database.

the trim(division) is essential to remove to whitespaces

for one cluster fetch

References Clusterdump(), dump(), tdump(), and tdumpone().


Member Data Documentation

DBinfo Clusterdump::dbinfo = new DBinfo() [private]

HashMap Clusterdump::div2db = null [private]

Referenced by Clusterdump(), and getAce().

ResultSet Clusterdump::result = null [package]

Referenced by Clusterdump(), dump(), tdump(), and tdumpone().


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