diff --git a/tool-data/blastdb.loc.sample b/tool-data/blastdb.loc.sample
index c27c605011a..ee3ce8af2a1 100644
--- a/tool-data/blastdb.loc.sample
+++ b/tool-data/blastdb.loc.sample
@@ -4,6 +4,6 @@
#
#TODO: fill in this format
#
-nt /depot/data2/galaxy/blastdb/nt/nt.chunk.00 /depot/data2/galaxy/blastdb/nt/nt.chunk.01 /depot/data2/galaxy/blastdb/nt/nt.chunk.02 /depot/data2/galaxy/blastdb/nt/nt.chunk.03 /depot/data2/galaxy/blastdb/nt/nt.chunk.04 /depot/data2/galaxy/blastdb/nt/nt.chunk.05 /depot/data2/galaxy/blastdb/nt/nt.chunk.06 /depot/data2/galaxy/blastdb/nt/nt.chunk.07 /depot/data2/galaxy/blastdb/nt/nt.chunk.08 /depot/data2/galaxy/blastdb/nt/nt.chunk.09 /depot/data2/galaxy/blastdb/nt/nt.chunk.10 /depot/data2/galaxy/blastdb/nt/nt.chunk.11 /depot/data2/galaxy/blastdb/nt/nt.chunk.12 /depot/data2/galaxy/blastdb/nt/nt.chunk.13 /depot/data2/galaxy/blastdb/nt/nt.chunk.14 /depot/data2/galaxy/blastdb/nt/nt.chunk.15 /depot/data2/galaxy/blastdb/nt/nt.chunk.16 /depot/data2/galaxy/blastdb/nt/nt.chunk.17 /depot/data2/galaxy/blastdb/nt/nt.chunk.18 /depot/data2/galaxy/blastdb/nt/nt.chunk.19 /depot/data2/galaxy/blastdb/nt/nt.chunk.20 /depot/data2/galaxy/blastdb/nt/nt.chunk.21 /depot/data2/galaxy/blastdb/nt/nt.chunk.22 /depot/data2/galaxy/blastdb/nt/nt.chunk.23
+nt /depot/data2/galaxy/blastdb/nt/nt.chunk
nr /depot/data2/galaxy/blastdb/nr/nr.chunk.0 /depot/data2/galaxy/blastdb/nr/nr.chunk.1 /depot/data2/galaxy/blastdb/nr/nr.chunk.2
test /depot/data2/galaxy/blastdb/test/test.fa
diff --git a/tools/metag_tools/blat_wrapper.py b/tools/metag_tools/blat_wrapper.py
index cc62a7e4a8a..7cd3929c849 100644
--- a/tools/metag_tools/blat_wrapper.py
+++ b/tools/metag_tools/blat_wrapper.py
@@ -62,6 +62,7 @@ def __main__():
try:
test = int(sys.argv[7])
one_off = sys.argv[7]
+ assert test >= 0 and test <= int(tile_size)
except:
stop_err('Invalid value for mismatch numbers in the word')
diff --git a/tools/metag_tools/blat_wrapper.xml b/tools/metag_tools/blat_wrapper.xml
index 07db56e7cc3..27baa7c7777 100644
--- a/tools/metag_tools/blat_wrapper.xml
+++ b/tools/metag_tools/blat_wrapper.xml
@@ -22,7 +22,7 @@
-
+
@@ -42,13 +42,17 @@
.. class:: warningmark
-Use smaller word size (*Minimal Size of Exact Match*) will increase the computational time.
+Use a smaller word size (*Minimal Size of Exact Match*) will increase the computational time.
+
+.. class:: warningmark
+
+Use a larger mismatch number (*Number of Mismatch in the Word*) will increase the computational time.
-----
**What it does**
- This tool runs alignment program **BLAT**. Your short reads file is searched against a genome build (select from table) or another uploaded file.
+ This tool runs alignment program **BLAT**. Your short reads file is searched against a genome build or another uploaded file.
-----
@@ -59,16 +63,29 @@ Use smaller word size (*Minimal Size of Exact Match*) will increase the computat
>seq1
TGGTAATGGTGGTTTTTTTTTTTTTTTTTTATTTTT
-- Search against ce2 (C. elegans March 2004)::
+- Use default settings.
+
+- Search against ce2 (C. elegans March 2004), partial result::
25 1 0 0 0 0 0 0 + seq1 36 10 36 chrI 15080483 9704438 9704464 1 26, 10, 9704438, ggttttttttttttttttttattttt, ggtttttttttttttttttttttttt,
27 0 0 0 0 0 1 32 + seq1 36 9 36 chrI 15080483 1302536 1302595 2 21,6, 9,30, 1302536,1302589, tggtttttttttttttttttt,attttt, tggtttttttttttttttttt,attttt,
-----
+**Parameters**
+
+- *Minimal Identity (-minIdentity)* : In percent, the minimum sequence identity between the query and target alignment. Default is 90.
+
+- *Minimal Size of Exact Match (-tileSize)* : The size of a match that will trigger an alignment. Default is 11. Usually between 8 and 12. Must be between 6 and 18.
+
+- *Number of Mismatch in the Word (-oneOff)* : The number of mismatches allowed in the word (tile size) and still triggers an alignment. Default is 0.
+
+-----
+
**Reference**
- BLAT: Kent, W James, BLAT--the BLAST-like alignment tool. (2002) Genome Research:12(4) 656-664.
-
+ **BLAT**: Kent, W James, BLAT--the BLAST-like alignment tool. (2002) Genome Research:12(4) 656-664.
+
+
diff --git a/tools/metag_tools/megablast_wrapper.py b/tools/metag_tools/megablast_wrapper.py
index aae06cdf73a..4113c65eac1 100644
--- a/tools/metag_tools/megablast_wrapper.py
+++ b/tools/metag_tools/megablast_wrapper.py
@@ -49,9 +49,9 @@ def __main__():
# prepare the database
db = {}
- db_file = open(DB_LOC, "r")
- for i, line in enumerate(db_file):
+ for i, line in enumerate(file(DB_LOC)):
line = line.rstrip('\r\n')
+ if line.startswith('#'): continue
fields = line.split()
db[(fields[0])] = []
for j in xrange(1, len(fields)):
@@ -61,6 +61,11 @@ def __main__():
retcode = subprocess.call('which megablast 2>&1', shell='True')
if retcode < 0:
stop_err("Cannot locate megablast.")
+
+ try:
+ assert db.has_key(db_build) is True
+ except:
+ stop_err('Cannot locate the target database. Please check your location file.')
for chunk in db[(db_build)]:
megablast_arguments = ["megablast", "-d", chunk, "-i", query_filename]
diff --git a/tools/metag_tools/megablast_wrapper.xml b/tools/metag_tools/megablast_wrapper.xml
index ba1ff0ec6b9..3908226abf8 100644
--- a/tools/metag_tools/megablast_wrapper.xml
+++ b/tools/metag_tools/megablast_wrapper.xml
@@ -5,9 +5,9 @@
-
+
-
+
@@ -55,11 +55,7 @@ Other databases and megablast parameters will be available shortly.
-----
-**Reference**
-
- **megablast**: Zhang et al. A Greedy Algorithm for Aligning DNA Sequences. 2000. JCB: 203-214.
-
- Corresponding command line options:
+**Parameters**
- **-W**: Word size
- **-p**: Identity percentage cut-off
@@ -67,5 +63,11 @@ Other databases and megablast parameters will be available shortly.
- **-N**: Type of a discontiguous word template
- **-F**: Filter query sequence
+-----
+
+**Reference**
+
+ **megablast**: Zhang et al. A Greedy Algorithm for Aligning DNA Sequences. 2000. JCB: 203-214.
+