Changes

Jump to: navigation, search

CrocoBLAST:Job management

609 bytes added, 03:43, 25 July 2016
no edit summary
=Create BLAST job=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 [http://www.ncbi.nlm.nih.gov/BLAST/blast_program.shtml 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 database
<code>
CrocoBLAST -add_to_queue <span style="color:blue">blast_program database</span> <span style="color:green">input_file output_folder<span><br>
CrocoBLAST -add_to_queue <span style="color:blue">blast_program database</span> <span style="color:green">input_file output_folder<span> --options <span style="color:blue">option1 value1 ...</span>
</code>
=Manage databases=
As already mentioned, BLAST takes an input file with unknown sequences and aligns each such sequence against a database of known sequences. Therefore, to 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:
<code bash>
CrocoBLAST -list_databases
</code>
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:
<code bash>
CrocoBLAST -add_database --ncbi_download <span style="color:blue">ncbi_database_name</span> <span style="color:green">output_folder</span><br>
CrocoBLAST -update_ncbi_database <span style="color:blue">ncbi_database_name</span> <span style="color:green">output_folder</span>
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):
<code bash>
CrocoBLAST -add_database --formated_db <span style="color:green">nsq_database_file</span><br>
CrocoBLAST -add_database --formated_db <span style="color:green">psq_database_file</span>
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:
<code bash>
CrocoBLAST -add_database --sequence_file '''nucleotide''' <span style="color:green">fasta_file</span> <span style="color:orange">database_name</span> <span style="color:green">output_folder</span><br>
CrocoBLAST -add_database --sequence_file '''protein''' <span style="color:green">fasta_file</span> <span style="color:orange">database_name</span> <span style="color:green">output_folder</span><br>
</code>
=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.
Say you have ''created one or more BLAST jobs'' and are ready to start munching some sequences. It's easy:
<code bash>
CrocoBLAST -run
</code>
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:
<code bash>
CrocoBLAST -run --num_threads <span style="color:orange">number_of_threads</span>
</code>
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:
<code bash>
CrocoBLAST -stop
</code>
On the other hand, if you are more interested in the output:
<code bash>
CrocoBLAST -pause
</code>
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.
<code bash>
CrocoBLAST -run
</code>
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:
<code bash>
CrocoBLAST -status
</code>
This will provide you with information regarding which jobs are queued, with full details regarding the 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. 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.

Navigation menu