You can download some testing queries from here: [human] [mouse] [bacteria].
You can download the human build 36 database from here, and the mouse build 36 database from
here.
Ackowledgement:
The human and mouse query sets are from NCBI ftp server. .
The bacteria query set is from http://www.ncbi.nlm.nih.gov/sra/SRX338063 .
1) We assume the following directory hierarchy under /home/blastn:
.
├── bin
│ ├── blastn # the orignal blastn
│ └── gblastn # the G-BLASTN (you need to copy the compiled binary "blastn" into this direcotry, and rename to "gblastn" or others;
├── blast
│ └── src
│ └── gpu
│ ├── c++
│ ├── install
│ ├── log
│ ├── ncbi-blast-2.2.28+-src
│ └── 2.28.zip
├── data # NCBI nt database
│ └── nt2m
│ ├── nohup.out
│ ├── nt.2m.00.nhr
│ ├── ...
│ ├── nt.2m.counts
│ └── nt.2m.nal
├── database # human and mouse database
│ └── blastdb
│ ├── human
│ │ ├── human.1-8.wm.body
│ │ ├── ...
│ │ ├── human.9-Y.wm.nsq
│ │ └── human.wm.nal
│ └── mouse
│ ├── mouse.1-10.wm.nhr
│ ├── ...
│ ├── mouse.11-Y.wm.nsq
│ ├── mouse.nal
│ └── mouse.wm.nal
├── output # output directory
│ ├── query.101.fa.out
│ └── ...
├── query # query directory
│ ├── queries
│ │ ├── human
│ │ │ ├── qlarge
│ │ │ │ ├── query.11.fa
│ │ │ │ └── ...
│ │ │ ├── qmedium
│ │ │ │ ├── query.100.fa
│ │ │ │ └── ...
│ │ │ └── qsmall
│ │ │ ├── query.101.fa
│ │ │ └── ...
│ │ └── mouse
│ │ ├── qlarge
│ │ │ ├── query.201.fa
│ │ │ └── ...
│ │ ├── qmedium
│ │ │ ├── query.101.fa
│ │ │ └── ...
│ │ └── qsmall
│ │ ├── query.100.fa
│ │ └── ...
│ └── SRR955707
│ ├── 1.fa
│ └── ...
├── script # shell directory
│ └── new_query_human_mouse
│ ├── g.m.sh
│ └── m.ls
└── wm_counts # mask database for human and mouse
├── human.stat
└── mouse.stat
2) Prepare the database
The following steps show how to prepare the masked database for G-BLASTN, using human build 36 as an example:
>makeblastdb -in human.fa -dbtype nucl -title human_database -parse_seqids -out human.wm -logfile human.log
>windowmasker -in human.wm -infmt blastdb -mk_counts -parse_seqids -out human.stat
Remember to put the human.stat into the wm_counts directory.
3) Prepare the query list file:
Create a text file (e.g., h.ls) which contains the path names of all your queries, e.g.:
##############################################
/home/blastn/query/queries/human/qmedium/query.10.fa
/home/blastn/query/queries/human/qmedium/query.12.fa
##############################################
4) Create a shell script (e.g., g.h.sh) to execute G-BLASTN
##############################################
#!/bin/sh
echo "***************start*****************"
blastn="/home/blastn/bin/gblastn"
data_dir="/home/blastn/"
database="${data_dir}database/blastdb/human/human.wm"
maskdb="${data_dir}wm_counts/human.stat"
query_list="h.ls"
outpath="/home/blastn/output/log.txt"
$blastn -db $database -window_masker_db $maskdb -query_list $query_list -outfmt "7" -out $outpath -use_gpu true
echo "***************complete*****************"
##############################################
>chmod +x g.h.sh
5) Run G-BLASTN;
>./g.h.sh
The results can be found in the output directory.