create_local_blast_database.md 1.13 KB
Newer Older
npavlovikj's avatar
npavlovikj committed
1
2
3
4
5
6
7
8
9
10
11
12
13
+++
title = "Create Local BLAST Database"
description =  "How to create local BLAST database on HCC resources"
weight = "10"
+++


The basic way to create a local BLAST database is to use the **makeblastdb** command:
{{< highlight bash >}}
$ makeblastdb -in input_reads.fasta -dbtype [nucl|prot] -out input_reads_db
{{< /highlight >}}
where **input_reads.fasta** is the input file containing all sequences that need to be made into a database, and **dbtype** can be either `nucl` or `prot` depending on the type of the input file.

npavlovikj's avatar
i    
npavlovikj committed
14

15
Simple example of how **makeblastdb** can be run on Crane using SLURM script and nucleotide database is shown below:
npavlovikj's avatar
npavlovikj committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{{% panel header="`blast_db.submit`"%}}
{{< highlight bash >}}
#!/bin/sh
#SBATCH --job-name=Blast_DB
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=168:00:00
#SBATCH --mem=10gb
#SBATCH --output=BlastDB.%J.out
#SBATCH --error=BlastDB.%J.err

module load blast/2.7

makeblastdb -in input_reads.fasta -dbtype nucl -out input_reads_db
{{< /highlight >}}
{{% /panel %}}

npavlovikj's avatar
i    
npavlovikj committed
33

34
More parameters used with **makeblastdb** can be seen by typing:
npavlovikj's avatar
npavlovikj committed
35
36
{{< highlight bash >}}
$ makeblastdb -help
npavlovikj's avatar
i    
npavlovikj committed
37
{{< /highlight >}}