CCT 2.0

Software Prerequisites

 * MySQL
 * May want phpMyAdmin as well
 * BioPerl -- Version 1.5.2 or above
 * Perl DBD::MySQL
 * NCBI BLAST / mpiBLAST
 * OpenMPI

CCT Installation

 * 1) Unzip CCT source
 * 2) Move the CCT perl code folder to the cgi-bin directory of the webserver
 * 3) Move the CCT html code folder to the html directory of the webserver
 * 4) Modify the relevant values in config.pl [located in the cgi-bin CCT folder]
 * 5) Create a new MySQL database called cct in MySQL using any user / password of your choosing
 * 6) Create a file containing the MySQL user / password and place it based on the MYSQLINFOFILE variable located in config.pl.  The default is '../../cctmysql.pl'.  Here is what a sample cctmysql.pl file looks like (note that the 1 is necessary):
 * 7) Give this file permissions of 400 and owned by the web server so that only it can read this file
 * 8) Copy the CCT data directory over to the located indicated by the DATAPATH directory in config.pl
 * 9) Change the owner of all relevant files to that of the web user [so, the HTML, CGI, and data directories + files].
 * 10) Fix permissions on all files.  This can be accomplished by running the fixPermissions.pl script located in the CGI directory
 * 11) Make the original database structure.  This is best accomplished by importing the defaultCCT.sql file into the cct MySQL database
 * 12) We are mostly ready to go.  Install all relevant database formatters by accessing the CCTDatabaseFormatterInstallation.pl script via the web
 * 13) Install all relevant program modules by accessing the ProgramModuleInstallation.pl script via the web
 * 14) Add the runCCT.pl script to the web user's cron schedule.  Setting it to go off at midnight every night works well
 * 15) Done!

Tables
The Tables section of CCT allows you to see all of the sequence files uploaded into the system. Here you can add, delete, edit, or view sequences and their report files. Here is the main interface:



Sorting
Tables of sequences currently installed in CCT can become quite long, and sometimes it is nice to sort be able to sort them different. You can sort these tables by name, Sequence Type, Number of Sequences, Addition Date, or by Description, and you an do so by ascending or descending order. Just click on the link at the top of the Tables page.



Adding
To add a new set of sequences, click on the 'Add New Table' button at the bottom of the Tables page. You will be presented with the following page:



Enter in a valid name, choose the sequence file type, the proper file format, the location of the sequence file, and a useful description for your set of sequences.

Deleting
Deleting a page in CCT is easy. In the main Tables interface, select the checkbox next to each sequence file list you want to delete. Then, hit the delete button at the bottom of the page. You will be presented with a confirmation page, where you will be able to back out of your deletion. WARNING: Deleting a sequence file table in CCT will also delete all of its results files. You will not be able to get these result files back, so be sure of what you are doing!

Editing
To edit the name, sequence type, or description of one or more tables, select the checkbox next to each table and hit the edit button. You will be able to edit each selected table with the following edit interface:



Viewing
Displaying reports is the most crucial part of CCT. In the main Tables interface, click on the name of the sequence table whose reports you would like to view. You will be presented with a page that looks like the following:



The first column is the entry id of the sequence and the second column is an accompanying description. On the rightmost column(s) in this picture [and of any sequences page], you will see color-coded links. These are links to reports, and they are color coded by age:



Using this table, we can see that all of the visible results were generated within the past 7 days, but not within the past 3 days. If any of these links turn red, it means that a new report was recently generated.

To view an actual report, click on one of the color coded links. Here is what a report looks like:



Sometimes, you will notice tomato-highlighted or black-highlighted portions of text. These highlighted regions represent new additions and deleted sections, respectively, as compared to the previous report.

Databases
The database interface in CCT allows you to add, delete, or edit databases to/in the CCT system. These databases are used when creating searches, the results of which are put in the tables section. Below is the main databases interface in CCT:



Sorting
Like the other sections in CCT, you can sort the databases in many sections. You can sort by transfer type, name, database type, addition date, or date last downloaded.



Adding
To add a new database into CCT, click on the 'Monitor New Database' at the bottom of the main databases interface page. You will be presented with the following interface:



Here, you can enter in a name, address, database type, and ftp login/password. The database types are determined by what database formatters you have installed.

Deleting
To delete a database from CCT, check the checkboxes next to the databases that you want to delete, and then hit the 'Delete Selected' button at the bottom of the main databases interface page. You will be presented with a confirmation page, at which point you can confirm or deny the deletions. WARNING: Deletion of a database is permanent. Also, any relevant searches AND report files are deleted as well and are irrecoverable.

Editing
To edit databases in CCT, check the checkboxes next to the databases that you want to edit, and then hit the 'Edit Selected' button at the bottom of the main databases interface page. You will be presented with an edit page that looks like the following:



Here, you will be able to modify each selected database's name, address, database type, transfer type, and ftp login/password. When you are done making changes, hit the 'Make Changes' button at the bottom of the page.

Searches
The main CCT searches interface allows you to add, delete, edit, freeze, or thaw searches. Below is what the CCT Searches interface looks like:



Sorting
You can sort the currently listed searches in a variety of ways. You have the option to sort them by search type, database type, status, or age, and do so by ascending or descending order.



Mass Add/Delete
To add a new search, first add your relevant sequence table and database to CCT. Then, at the bottom of the main CCT searches page, click on the 'Mass Add/Delete New Searches' page. You will be presented with a page that looks much like the following:



Each colored table represents a different uploaded sequence tables in CCT. In the above picture, we can see the 'massive varsplic' and 'from varsplic' sequence tables. The blue headers are the labels for each relevant genetic database in CCT. If a checkbox is checked [and the 'Submit Searches' button at the bottom of the page is pressed], CCT will create a search based on the relevant parameters for that checkbox. In the above picture, we see that only one checkbox is checked. It means that an mpiblastp search is going to be run with 'local tb' as the database and 'massive varsplic' as the sequence table.

If a checkbox is unchecked, a search will not be run. If a checkbox was checked, but is now unchecked, and the 'Submit Searches' button at the bottom of the page is checked, these searches will be deleted.

CCT has the ability to run searches that depend on the results of other searches. This is called a pipeline. In the above image, we can see that a 'seq' search depends on a 'blastp' search, and that a 'revblast' search depends on a 'seq' search. If just the 'revblast' button is checked when the 'Submit Searches' button is pushed, the relevant 'blastp' and 'seq' search will be created. Likewise, if the 'blastp' checkbox was unchecked, the 'seq' and 'revblast' searches would be deleted after the 'Submit Searches' button is pressed.

WARNING: If a search is deleted, its reports are also [irrecoverably] deleted.

Freezing
Freezing a search keeps it from being run the next time the runCCT.pl</tt> script is called [usually around midnight every day].

To freeze searches, select the checkboxes next to each search on the main CCT searches page. Then, at the bottom of the page, hit the 'Freeze Selected' button.

Thawing
If you have frozen a search and want to have it run again, select its checkbox and hit the 'Thaw Selected' button at the bottom of the main CCT searches page.

Deleting
There are two ways to delete a search: The first method is the preferred method [and is described above], but you can also delete searches by checking their checkboxes on the main CCT searches page and hitting the 'Delete Selected' button at the bottom of the same page. WARNING: If a search is deleted, its reports are also [irrecoverably] deleted, as are any searches that depend on this search.
 * 1) By using the 'Mass Add/Delete New Searches' button / interface
 * 2) By using the 'Delete Selected' button at the bottom of the main CCT searches page.

Editing
Editing a search is useful when you want to tweak some of the search's settings. Most useful is changing the e-value cutoff of a blast search. To edit a search, check a search's checkbox on the main CCT searches interface and hit the 'Edit Selected' button at the bottom of the page. You will be presented with an interface similar to the following:



Make your relevant changes and hit the 'Make Changes' button at the bottom of the page.

Administration
The CCT administration control panel allows you to increase CCT's functionality as well as change CCT's configuration values. You can also view the log here.



Install New Database Type
There are two CCT Database Formatter folders in the CCT cgi directory:
 * 1) CCTDatabaseFormatter
 * 2) CCTDatabaseFormatterDisabled

If a database formatter is in the disabled folder, it will show up when you click on the 'Install New Database Formatter' link. Here, you will be presented with database formatters awaiting installation, as well as any relevant configuration variables that must be set in order to install said formatter.

Install New Program Type
There are two CCT Program folders in the CCT cgi directory:
 * 1) Programs
 * 2) ProgramsDisabled

If a program module is in the disabled folder, it will show up when you click on the 'Install New Program Type' link. Here, you will be presented with program modules awaiting installation, as well as any relevant configuration variables that must be set in order to install said module.

Run All Searches Now
Not currently implemented. Easy to implement

Nuke
Not currently implemented. Easy to implement.

View Log
Simply put, clicking on the 'View Log' link takes you to CCT's log file. It is a log of output that the runCCT.pl</tt> script creates. It can be useful for debugging.

Add User
Not currently implemented

Remove User
Not currently implemented.

Edit config.pl
CCT and many of its database formatters and program modules need to know the locations of certain files and directories. This information is kept in the config.pl</tt> file, which is located in the CCT cgi directory. The 'Edit config.pl' link is a web-based graphical editor of this file. Below is the interface:



Troubleshooting
This is a user-added contribution section

Something's not working right! Help!
There are [unfortunately] several things that can go wrong. First, check the log to see if it tells you anything, and go from there. Second, check permissions on everything. This problem can oftentimes be solved by running the fixPermissions.pl</tt> problem. Third, try running the runCCT.pl</tt> file manually by typing the following at the command line:

I found a bug!
D'oh! I guess we'll have to fix it. [mailto:magicite@gmail.com E-mail Ben]