Skip to content
Snippets Groups Projects
Verified Commit 1e9a4daa authored by Adam Caprez's avatar Adam Caprez
Browse files

Update blast example scripts.

parent 718b4156
Branches
No related tags found
1 merge request!242Update blast example scripts.
......@@ -47,7 +47,7 @@ If you want to create and use a BLAST database that is not mentioned above, chec
Basic SLURM example of nucleotide BLAST run against the non-redundant **nt** BLAST database with `8 CPUs` is provided below. When running BLAST alignment, it is recommended to first copy the query and database files to the **/scratch/** directory of the worker node. Moreover, the BLAST output is also saved in this directory (**/scratch/blastn_output.alignments**). After BLAST finishes, the output file is copied from the worker node to your current work directory.
{{% notice info %}}
**Please note that the worker nodes can not write to the */home/* directories and therefore you need to run your job from your */work/* directory.**
**This example will first copy your database to faster local storage called scratch. This can greatly improve performance!**
**This example will first copy the database and your input file to faster local storage called "scratch", assuming that the input file exists in your current directory. This can greatly improve performance!**
{{% /notice %}}
{{% panel header="`blastn_alignment.submit`"%}}
......@@ -64,13 +64,13 @@ Basic SLURM example of nucleotide BLAST run against the non-redundant **nt** BL
module load blast/2.10
module load biodata/1.0
cd $WORK/<project_folder>
# Be sure to use a directory under $WORK for your job
cp $BLAST/nt.* /scratch/
cp input_reads.fasta /scratch/
blastn -query /scratch/input_reads.fasta -db /scratch/nt -out /scratch/blastn_output.alignments -num_threads $SLURM_NTASKS_PER_NODE
cp /scratch/blastn_output.alignments $WORK/<project_folder>
cp /scratch/blastn_output.alignments .
{{< /highlight >}}
{{% /panel %}}
......@@ -87,7 +87,7 @@ The default BLAST output is in pairwise format. However, BLAST’s parameter **-
Basic SLURM example of protein BLAST run against the non-redundant **nr **BLAST database with tabular output format and `8 CPUs` is shown below. Similarly as before, the query and database files are copied to the **/scratch/** directory. The BLAST output is also saved in this directory (**/scratch/blastx_output.alignments**). After BLAST finishes, the output file is copied from the worker node to your current work directory.
{{% notice info %}}
**Please note that the worker nodes can not write to the */home/* directories and therefore you need to run your job from your */work/* directory.**
**This example will first copy your database to faster local storage called scratch”. This can greatly improve performance!**
**This example will first copy the database and your input file to faster local storage called "scratch", assuming that the input file exists in your current directory. This can greatly improve performance!**
{{% /notice %}}
{{% panel header="`blastx_alignment.submit`"%}}
......@@ -104,12 +104,12 @@ Basic SLURM example of protein BLAST run against the non-redundant **nr **BLAS
module load blast/2.10
module load biodata/1.0
cd $WORK/<project_folder>
# Be sure to use a directory under $WORK for your job
cp $BLAST/nr.* /scratch/
cp input_reads.fasta /scratch/
blastx -query /scratch/input_reads.fasta -db /scratch/nr -outfmt 6 -out /scratch/blastx_output.alignments -num_threads $SLURM_NTASKS_PER_NODE
cp /scratch/blastx_output.alignments $WORK/<project_folder>
cp /scratch/blastx_output.alignments .
{{< /highlight >}}
{{% /panel %}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment