Basic Local Alignment Search Tool (BLAST) is initially an online web-based tool allowing to find regions of similarity between biological sequences. The program compares nucleotide sequences to sequence databases and computes statistical significance. Depending on the sequencing data type, there are different specific tools. In this article, we focus on the alignment of nucleotide sequences and thus, on the usage of BlastN. The test case uses BLAST 2.10.1.
If you are interested in another version, please send us an email at firstname.lastname@example.org.
Before launching the case, please ensure that the following prerequisites have been met.
- Create an account (here)
- Retrieve the authentication token (here)
- Install one of Qarnot’s SDK (Python) (Node.js) (C#) (Commande Line)
This test case is a simple example of using BLAST, and more particularly the tool BlastN, on Qarnot, using the Python SDK. We will align a list of query DNA sequences against another list of reference DNA sequences. You can download the data containing two local sequences here. You need to unzip it to be able to launch the computation on Qarnot. Find bellow the headers of the two local sequences files:
NC_000006.12 Homo sapiens chromosome 6, GRCh38.p13 Primary Assembly NM_005514.8 Homo sapiens major histocompatibility complex, class I, B (HLA-B), mRNA
Copy the following code in a sh script and place it in the
dataset-blastn folder you unzipped previously. It contains instructions to:
- Build a database based on a reference sequence (for more information, see BLAST documentation),
- Align a sequence (query) from a FASTA file to the previously built database.
Launching the case
Copy the following code in a Python script and save it in the same path as the
Be sure you have copied your authentication token in the script (instead of
<<<MY_SECRET_TOKEN>>>) to be able to launch the task on Qarnot.
Make sure that all input files mentioned above (1 fna file, 1 fsa file, 1 sh file) are in the same folder named
dataset-blastn. Your working directory should look like this :
chr6.fna: Homo sapiens chromosome 6
hla-b.fsa: Homo sapiens major histocompatibility complex
run_blastn.sh: script to run the alignment using BlastN
blastn.py: Python script to run the computation on Qarnot
To launch this script, open a terminal in your working directory and execute
python3 blastn.py &.
At any given time, you can monitor the status of your task on the Console.
Successful BlastN execution on Qarnot’s console
You should now have an
output folder in your working directory on your computer and a
blastn-out bucket on Qarnot’s Console containing all output files (built database and scores for sequences alignment in the
results.out file, see bellow).
That’s it! If you have any questions, please contact email@example.com and we will help you with pleasure! You can read a more detailed article on this use case here : Nucleotide sequence alignment with BlastN – Qarnot Blog or discover an other bio-technology use case on Qarnot here : Molecular docking and cloud computing – Qarnot Blog.