Difference between revisions of "CrocoBLAST:Job management"
(→Create BLAST jobs) |
|||
Line 1: | Line 1: | ||
+ | __NOTOC__ | ||
CrocoBLAST is built to help you plan your BLAST jobs and run them efficiently. CrocoBLAST operates with the concept of queue, which is basically a list of BLAST jobs scheduled to run. Thus, you can plan several BLAST job and let CrocoBLAST manage their execution for you. | CrocoBLAST is built to help you plan your BLAST jobs and run them efficiently. CrocoBLAST operates with the concept of queue, which is basically a list of BLAST jobs scheduled to run. Thus, you can plan several BLAST job and let CrocoBLAST manage their execution for you. | ||
Line 7: | Line 8: | ||
− | <div class=" | + | <div class="mw-collapsible mw-collapsed"> |
=Create BLAST jobs= | =Create BLAST jobs= | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
Line 21: | Line 22: | ||
</div> | </div> | ||
+ | <div class="mw-collapsible mw-collapsed"> | ||
=Manage databases= | =Manage databases= | ||
− | + | <div class="mw-collapsible-content"> | |
To submit a BLAST job, you must specify which database you wish to align against. The first time you indicate a database for a BLAST job, CrocoBLAST will remember it and add it to its index, so that in the future it is easier for you to access this database. You can see which databases are already indexed in CrocoBLAST: | To submit a BLAST job, you must specify which database you wish to align against. The first time you indicate a database for a BLAST job, CrocoBLAST will remember it and add it to its index, so that in the future it is easier for you to access this database. You can see which databases are already indexed in CrocoBLAST: | ||
Line 38: | Line 40: | ||
There are two ways to add a new database to the CrocoBLAST index. In both cases, you should provide a simple name for new each database, so that you may later refer this database easily whenever you need to run a BLAST job. | There are two ways to add a new database to the CrocoBLAST index. In both cases, you should provide a simple name for new each database, so that you may later refer this database easily whenever you need to run a BLAST job. | ||
+ | </div> | ||
+ | </div> | ||
− | ==Retrieve database from NCBI servers== | + | <div class="mw-collapsible mw-collapsed"> |
+ | ===Retrieve database from the NCBI servers=== | ||
+ | <div class="mw-collapsible-content"> | ||
In the most typical scenario, you will use the [ftp://ftp.ncbi.nlm.nih.gov/refseq/release/ established reference sequence databases maintained by NCBI]. CrocoBLAST allows you to specify the name of such a database, and will download or update the database for you: | In the most typical scenario, you will use the [ftp://ftp.ncbi.nlm.nih.gov/refseq/release/ established reference sequence databases maintained by NCBI]. CrocoBLAST allows you to specify the name of such a database, and will download or update the database for you: | ||
Line 48: | Line 54: | ||
When adding or updating a database in this manner, you need not worry about the format of the database, as NCBI provides pre-formatted database files. | When adding or updating a database in this manner, you need not worry about the format of the database, as NCBI provides pre-formatted database files. | ||
+ | </div> | ||
+ | </div> | ||
− | ==Add database from your computer== | + | <div class="mw-collapsible mw-collapsed"> |
+ | ===Add database from your computer=== | ||
+ | <div class="mw-collapsible-content"> | ||
If you have already downloaded the databases from NCBI, or if you do not have internet connection, you may add to the CrocoBLAST index database files stored on your computer. Remember to provide a unique and representative name for each database you add, so that it is easy to call the databases later. If the database files are appropriately formatted (e.g., psq or nsq): | If you have already downloaded the databases from NCBI, or if you do not have internet connection, you may add to the CrocoBLAST index database files stored on your computer. Remember to provide a unique and representative name for each database you add, so that it is easy to call the databases later. If the database files are appropriately formatted (e.g., psq or nsq): | ||
Line 65: | Line 75: | ||
CrocoBLAST -add_database --sequence_file '''protein''' <span style="color:green">fastq_file</span> <span style="color:orange">database_name</span> <span style="color:green">output_folder</span> | CrocoBLAST -add_database --sequence_file '''protein''' <span style="color:green">fastq_file</span> <span style="color:orange">database_name</span> <span style="color:green">output_folder</span> | ||
</code> | </code> | ||
+ | </div> | ||
+ | </div> | ||
− | =Manage CrocoBLAST queue= | + | #===Manage CrocoBLAST queue=== |
The efficiency of CrocoBLAST lies in its ability to parallelize the execution of your BLAST jobs. This is related to breaking each big calculation into smaller pieces, and then organizing the execution of the pieces. Having smaller pieces means that you need less memory to run each job, and if you can analyze several pieces at once you can speed up the total calculation time. CrocoBLAST takes care of these things for you. | The efficiency of CrocoBLAST lies in its ability to parallelize the execution of your BLAST jobs. This is related to breaking each big calculation into smaller pieces, and then organizing the execution of the pieces. Having smaller pieces means that you need less memory to run each job, and if you can analyze several pieces at once you can speed up the total calculation time. CrocoBLAST takes care of these things for you. | ||
− | ==Execution== | + | <div class="mw-collapsible mw-collapsed"> |
+ | ##====Execution==== | ||
+ | <div class="mw-collapsible-content"> | ||
Say you have ''created one or more BLAST jobs'' and are ready to start munching some sequences. It's easy: | Say you have ''created one or more BLAST jobs'' and are ready to start munching some sequences. It's easy: | ||
Line 112: | Line 126: | ||
This will provide you with information regarding which jobs are queued, with full details regarding the job ID and BLAST setup, as well as a description about the progress of the alignment. The progress of each job is described in three main directions: fragmentation of the input file, alignment, and assembly of results. | This will provide you with information regarding which jobs are queued, with full details regarding the job ID and BLAST setup, as well as a description about the progress of the alignment. The progress of each job is described in three main directions: fragmentation of the input file, alignment, and assembly of results. | ||
− | ==Administration== | + | ##====Administration==== |
If you want to change anything about the queue (say, pause one job and start another, or change the order of the jobs in a queue), you need to first pause or stop the current run. Subsequently, you may perform operations like adding, removing, or reordering jobs in the queue: | If you want to change anything about the queue (say, pause one job and start another, or change the order of the jobs in a queue), you need to first pause or stop the current run. Subsequently, you may perform operations like adding, removing, or reordering jobs in the queue: | ||
Line 128: | Line 142: | ||
CrocoBLAST -status | CrocoBLAST -status | ||
</code> | </code> | ||
+ | </div> | ||
+ | </div> | ||
− | + | <div class="mw-collapsible mw-collapsed"> | |
− | =Generate report= | + | #===Generate report=== |
+ | <div class="mw-collapsible-content"> | ||
CrocoBLAST logs all your activity, so that you may always review your work. To output this information: | CrocoBLAST logs all your activity, so that you may always review your work. To output this information: | ||
Line 137: | Line 154: | ||
CrocoBLAST -generate_report | CrocoBLAST -generate_report | ||
</code> | </code> | ||
− | + | </div> | |
+ | </div> | ||
'''Return to the [[CrocoBLAST:UserManual | Table of contents]]''' | '''Return to the [[CrocoBLAST:UserManual | Table of contents]]''' |
Revision as of 08:22, 25 July 2016
CrocoBLAST is built to help you plan your BLAST jobs and run them efficiently. CrocoBLAST operates with the concept of queue, which is basically a list of BLAST jobs scheduled to run. Thus, you can plan several BLAST job and let CrocoBLAST manage their execution for you.
All CrocoBLAST functionality is available via the command line utility and the graphical user interface. In fact, the graphical user interface does precisely what its name suggests: it provides an interface for the command line utility. In a nutshell, while you can interact with CrocoBLAST via simple commands, you may also use the interface to generate the commands or read the output of such commands.
Return to the Table of contents
Create BLAST jobs
As already mentioned, BLAST takes an input file with unknown sequences and aligns each such sequence against a database of known sequences. To create a job, you must first specify the BLAST program you plan to use, which depends on the nature of the unknown sequences in your input file, and the nature of the sequences in the reference database. Then, you need to specify the name of the database listed in the CrocoBLAST index (more details on that below) that contains the reference sequences you wish to use. Finally, provide the input file and the location where you want CrocoBLAST to place the output files. Keep in mind that the output files may be quite large. Finally, if you want to change the default BLAST settings, you can do so by specifying the names and values of the BLAST options of interest.
CrocoBLAST -add_to_queue blast_program database input_file output_folder
CrocoBLAST -add_to_queue blast_program database input_file output_folder --options option1 value1 option2 value2...
Note that, when you create a BLAST job, CrocoBLAST automatically assigns each BLAST job a unique job ID, and updates the CrocoBLAST queue (more on this later).
Manage databases
To submit a BLAST job, you must specify which database you wish to align against. The first time you indicate a database for a BLAST job, CrocoBLAST will remember it and add it to its index, so that in the future it is easier for you to access this database. You can see which databases are already indexed in CrocoBLAST:
CrocoBLAST -list_databases
If you want to remove a database from the CrocoBLAST index (for example, because it has become obsolete), you need to first specify the type of sequences it holds, and, of course, the name of the database.
CrocoBLAST -remove_database nucleotide database_name
CrocoBLAST -remove_database protein database_name
There are two ways to add a new database to the CrocoBLAST index. In both cases, you should provide a simple name for new each database, so that you may later refer this database easily whenever you need to run a BLAST job.
Retrieve database from the NCBI servers
In the most typical scenario, you will use the established reference sequence databases maintained by NCBI. CrocoBLAST allows you to specify the name of such a database, and will download or update the database for you:
CrocoBLAST -add_database --ncbi_download ncbi_database_name output_folder
CrocoBLAST -update_ncbi_database ncbi_database_name output_folder
When adding or updating a database in this manner, you need not worry about the format of the database, as NCBI provides pre-formatted database files.
Add database from your computer
If you have already downloaded the databases from NCBI, or if you do not have internet connection, you may add to the CrocoBLAST index database files stored on your computer. Remember to provide a unique and representative name for each database you add, so that it is easy to call the databases later. If the database files are appropriately formatted (e.g., psq or nsq):
CrocoBLAST -add_database --formated_db nsq_database_file
CrocoBLAST -add_database --formated_db psq_database_file
If your database is in FASTA or FASTQ format, you will need to tell CrocoBLAST the type of sequence it will find in the database:
CrocoBLAST -add_database --sequence_file nucleotide fasta_file database_name output_folder
CrocoBLAST -add_database --sequence_file protein fasta_file database_name output_folder
CrocoBLAST -add_database --sequence_file nucleotide fastq_file database_name output_folder
CrocoBLAST -add_database --sequence_file protein fastq_file database_name output_folder
- ===Manage CrocoBLAST queue===
The efficiency of CrocoBLAST lies in its ability to parallelize the execution of your BLAST jobs. This is related to breaking each big calculation into smaller pieces, and then organizing the execution of the pieces. Having smaller pieces means that you need less memory to run each job, and if you can analyze several pieces at once you can speed up the total calculation time. CrocoBLAST takes care of these things for you.
- ====Execution====
Say you have created one or more BLAST jobs and are ready to start munching some sequences. It's easy:
CrocoBLAST -run
This tells CrocoBLAST to take the input file, break it into little fragments, and submit each fragment for sequence alignment as soon as a core becomes free. This means that, if your computer has only one core, the alignment will start only after fragmentation of the input file is complete. However, if your computer has two cores (or one core that supports multi-threading), the alignment will start as soon as at least one fragment has been generated, which means immediately. The alignment of each fragment runs as an independent thread. The more threads you can run simultaneously, the faster your job will finish. This depends on the number and type of cores your computer has.
When you run CrocoBLAST without any additional options, you will make the most efficient use of your computational resources, as CrocoBLAST will figure out how to best parallelize the calculation on your machine. Nonetheless, if you want to limit the number of threads running simultaneously, you may do so:
CrocoBLAST -run --num_threads number_of_threads
Similarly, you can easily stop or pause the execution at any time. The difference between pause and stop rests with how long you are willing to wait before your computational resources become available, and how much partial output you need. To immediately kill a CrocoBLAST job and free up the memory and cores:
CrocoBLAST -stop
On the other hand, if you are more interested in the output:
CrocoBLAST -pause
This lets CrocoBLAST know that no new threads should be initiated, and the output produced by each running thread will be incorporated in the partial results as soon as the thread finishes. Therefore, you will have to wait until all running threads have completed. Depending on the type of BLAST program you are running, the size of the database, and the similarity between your input sequences and the sequences in the database, you may have to wait a considerable amount of time. However, this will ensure that you can resume the calculation at a later time. To resume, simply tell CrocoBLAST to start munching.
CrocoBLAST -run
It will automatically detect the current state of each job in the queue, and continue from where it left off, unless you have made changes to the queue in the meantime. While CrocoBLAST operates with the concept of queue, it is important to note that only one job is active at any given time. You can check the current state of the CrocoBLAST queue:
CrocoBLAST -status
This will provide you with information regarding which jobs are queued, with full details regarding the job ID and BLAST setup, as well as a description about the progress of the alignment. The progress of each job is described in three main directions: fragmentation of the input file, alignment, and assembly of results.
- ====Administration====
If you want to change anything about the queue (say, pause one job and start another, or change the order of the jobs in a queue), you need to first pause or stop the current run. Subsequently, you may perform operations like adding, removing, or reordering jobs in the queue:
CrocoBLAST -add_to_queue blast_program database input_file output_folder
CrocoBLAST -remove_from_queue job_id
CrocoBLAST -remove_from_queue job_id_1 job_id_2 ...
CrocoBLAST -move_top_queue job_id
CrocoBLAST -move_top_queue job_id_pos_1 job_id_pos_2 ...
Note that, once a job is added to the queue, you may perform operations with it (remove, reorder) if you refer to the job by its job ID. You can obtain the job IDs by checking the current state of the queue:
CrocoBLAST -status
- ===Generate report===
CrocoBLAST logs all your activity, so that you may always review your work. To output this information:
CrocoBLAST -generate_report
Return to the Table of contents