changeset 23:31e517610e1f draft

v0.3.0 Updated for NCBI BLAST+ 2.7.1
author peterjc
date Sat, 30 Jun 2018 17:22:46 -0400
parents 6f386c5dc4fb
children c877294f8025
files test-data/blastn_chimera_vs_rhodopsin_db.tabular test-data/blastn_chimera_vs_three_human_and_rhodopsin_db.tabular test-data/blastn_chimera_vs_three_human_max1.txt test-data/blastn_rhodopsin_vs_three_human.xml test-data/blastp_four_human_vs_rhodopsin.tabular test-data/blastp_four_human_vs_rhodopsin.xml test-data/blastp_four_human_vs_rhodopsin_ext.tabular test-data/blastx_rhodopsin_vs_four_human.xml test-data/cd00003_and_cd00008.pin test-data/chimera.fasta.gz test-data/four_human_proteins.dbinfo.txt test-data/four_human_proteins.fasta.pin test-data/four_human_proteins_taxid.fasta.pin test-data/rhodopsin_nucs.dbinfo.txt test-data/rhodopsin_nucs.fasta.gz test-data/rhodopsin_nucs.fasta.nin test-data/tblastn_four_human_vs_rhodopsin.html test-data/tblastn_four_human_vs_rhodopsin.xml test-data/tblastn_four_human_vs_rhodopsin_deflines.tabular test-data/three_human_mRNA.dbinfo.txt test-data/three_human_mRNA.fasta.gz test-data/three_human_mRNA.fasta.nin tools/ncbi_blast_plus/README.rst tools/ncbi_blast_plus/blastxml_to_tabular.py tools/ncbi_blast_plus/blastxml_to_tabular.xml tools/ncbi_blast_plus/check_no_duplicates.py tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml tools/ncbi_blast_plus/ncbi_macros.xml tools/ncbi_blast_plus/ncbi_makeblastdb.xml tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml
diffstat 38 files changed, 619 insertions(+), 173 deletions(-) [+]
line wrap: on
line diff
--- a/test-data/blastn_chimera_vs_rhodopsin_db.tabular	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/blastn_chimera_vs_rhodopsin_db.tabular	Sat Jun 30 17:22:46 2018 -0400
@@ -1,8 +1,8 @@
-chimera	NM_001009242	92.308	1014	78	0	8881	9894	34	1047	0.0	1441
-chimera	GQ290312	91.527	956	81	0	8881	9836	4	959	0.0	1317
-chimera	AB062417	87.586	1015	124	2	8881	9894	34	1047	0.0	1175
-chimera	GQ290303	91.515	330	28	0	8881	9210	4	333	8.28e-130	455
-chimera	GQ290303	91.358	243	19	2	9542	9783	3127	3368	1.46e-92	331
-chimera	GQ290303	94.220	173	10	0	9208	9380	1410	1582	1.50e-72	265
-chimera	GQ290303	92.941	170	12	0	9375	9544	2854	3023	1.51e-67	248
-chimera	GQ290303	95.588	68	3	0	9781	9848	4222	4289	7.43e-26	110
+chimera	NM_001009242.1	92.308	1014	78	0	8881	9894	34	1047	0.0	1441
+chimera	GQ290312.1	91.527	956	81	0	8881	9836	4	959	0.0	1317
+chimera	AB062417.1	87.586	1015	124	2	8881	9894	34	1047	0.0	1175
+chimera	GQ290303.1	91.515	330	28	0	8881	9210	4	333	8.28e-130	455
+chimera	GQ290303.1	91.358	243	19	2	9542	9783	3127	3368	1.46e-92	331
+chimera	GQ290303.1	94.220	173	10	0	9208	9380	1410	1582	1.50e-72	265
+chimera	GQ290303.1	92.941	170	12	0	9375	9544	2854	3023	1.51e-67	248
+chimera	GQ290303.1	95.588	68	3	0	9781	9848	4222	4289	7.43e-26	110
--- a/test-data/blastn_chimera_vs_three_human_and_rhodopsin_db.tabular	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/blastn_chimera_vs_three_human_and_rhodopsin_db.tabular	Sat Jun 30 17:22:46 2018 -0400
@@ -1,11 +1,11 @@
 chimera	ENA|AB011145|AB011145.1	100.000	4560	0	0	1	4560	121	4680	0.0	8421
 chimera	ENA|M10051|M10051.1	99.931	4331	3	0	4560	8890	60	4390	0.0	7982
 chimera	ENA|BC112106|BC112106.1	100.000	1093	0	0	8881	9973	121	1213	0.0	2019
-chimera	NM_001009242	92.308	1014	78	0	8881	9894	34	1047	0.0	1441
-chimera	GQ290312	91.527	956	81	0	8881	9836	4	959	0.0	1317
-chimera	AB062417	87.586	1015	124	2	8881	9894	34	1047	0.0	1175
-chimera	GQ290303	91.515	330	28	0	8881	9210	4	333	1.70e-129	455
-chimera	GQ290303	91.358	243	19	2	9542	9783	3127	3368	2.98e-92	331
-chimera	GQ290303	94.220	173	10	0	9208	9380	1410	1582	3.07e-72	265
-chimera	GQ290303	92.941	170	12	0	9375	9544	2854	3023	3.09e-67	248
-chimera	GQ290303	95.588	68	3	0	9781	9848	4222	4289	1.52e-25	110
+chimera	NM_001009242.1	92.308	1014	78	0	8881	9894	34	1047	0.0	1441
+chimera	GQ290312.1	91.527	956	81	0	8881	9836	4	959	0.0	1317
+chimera	AB062417.1	87.586	1015	124	2	8881	9894	34	1047	0.0	1175
+chimera	GQ290303.1	91.515	330	28	0	8881	9210	4	333	1.70e-129	455
+chimera	GQ290303.1	91.358	243	19	2	9542	9783	3127	3368	2.98e-92	331
+chimera	GQ290303.1	94.220	173	10	0	9208	9380	1410	1582	3.07e-72	265
+chimera	GQ290303.1	92.941	170	12	0	9375	9544	2854	3023	3.09e-67	248
+chimera	GQ290303.1	95.588	68	3	0	9781	9848	4222	4289	1.52e-25	110
--- a/test-data/blastn_chimera_vs_three_human_max1.txt	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/blastn_chimera_vs_three_human_max1.txt	Sat Jun 30 17:22:46 2018 -0400
@@ -1,4 +1,4 @@
-BLASTN 2.5.0+
+BLASTN 2.7.1+
 
 
 Reference: Zheng Zhang, Scott Schwartz, Lukas Wagner, and Webb
@@ -346,7 +346,7 @@
 
 
   Database: Just 3 human mRNA sequences
-    Posted date:  Dec 2, 2016  10:38 AM
+    Posted date:  Oct 31, 2017  4:23 PM
   Number of letters in database: 10,732
   Number of sequences in database:  3
 
--- a/test-data/blastn_rhodopsin_vs_three_human.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/blastn_rhodopsin_vs_three_human.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -2,7 +2,7 @@
 <!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd">
 <BlastOutput>
   <BlastOutput_program>blastn</BlastOutput_program>
-  <BlastOutput_version>BLASTN 2.5.0+</BlastOutput_version>
+  <BlastOutput_version>BLASTN 2.7.1+</BlastOutput_version>
   <BlastOutput_reference>Zheng Zhang, Scott Schwartz, Lukas Wagner, and Webb Miller (2000), &quot;A greedy algorithm for aligning DNA sequences&quot;, J Comput Biol 2000; 7(1-2):203-14.</BlastOutput_reference>
   <BlastOutput_db></BlastOutput_db>
   <BlastOutput_query-ID>Query_1</BlastOutput_query-ID>
--- a/test-data/blastp_four_human_vs_rhodopsin.tabular	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/blastp_four_human_vs_rhodopsin.tabular	Sat Jun 30 17:22:46 2018 -0400
@@ -1,6 +1,6 @@
-P08100	NP_001009242	96.552	348	12	0	1	348	1	348	0.0	701
+P08100	NP_001009242.1	96.552	348	12	0	1	348	1	348	0.0	701
 P08100	0811197A	93.103	348	23	1	1	348	1	347	0.0	673
-P08100	ADB45242	94.817	328	17	0	11	338	1	328	0.0	653
-P08100	ADB45229	94.817	328	17	0	11	338	1	328	0.0	631
-P08100	P56514	84.795	342	51	1	1	341	1	342	0.0	619
-P08100	BAB21486	82.164	342	60	1	1	341	1	342	0.0	599
+P08100	ADB45242.1	94.817	328	17	0	11	338	1	328	0.0	653
+P08100	ADB45229.1	94.817	328	17	0	11	338	1	328	0.0	631
+P08100	P56514.1	84.795	342	51	1	1	341	1	342	0.0	619
+P08100	BAB21486.1	82.164	342	60	1	1	341	1	342	0.0	599
--- a/test-data/blastp_four_human_vs_rhodopsin.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/blastp_four_human_vs_rhodopsin.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -2,7 +2,7 @@
 <!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd">
 <BlastOutput>
   <BlastOutput_program>blastp</BlastOutput_program>
-  <BlastOutput_version>BLASTP 2.5.0+</BlastOutput_version>
+  <BlastOutput_version>BLASTP 2.7.1+</BlastOutput_version>
   <BlastOutput_reference>Stephen F. Altschul, Thomas L. Madden, Alejandro A. Sch&amp;auml;ffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), &quot;Gapped BLAST and PSI-BLAST: a new generation of protein database search programs&quot;, Nucleic Acids Res. 25:3389-3402.</BlastOutput_reference>
   <BlastOutput_db></BlastOutput_db>
   <BlastOutput_query-ID>Q9BS26</BlastOutput_query-ID>
--- a/test-data/blastp_four_human_vs_rhodopsin_ext.tabular	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/blastp_four_human_vs_rhodopsin_ext.tabular	Sat Jun 30 17:22:46 2018 -0400
@@ -1,6 +1,6 @@
-P08100	NP_001009242	96.552	348	12	0	1	348	1	348	0.0	701	gi|57163783|ref|NP_001009242.1|	1808	336	343	0	98.56	1	1	MNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVSKTETSQVAPA	MNGTEGPNFYVPFSNKTGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTLPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTGSKTETSQVAPA	348	348	N/A
+P08100	NP_001009242.1	96.552	348	12	0	1	348	1	348	0.0	701	gi|57163783|ref|NP_001009242.1|	1808	336	343	0	98.56	1	1	MNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVSKTETSQVAPA	MNGTEGPNFYVPFSNKTGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTLPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTGSKTETSQVAPA	348	348	N/A
 P08100	0811197A	93.103	348	23	1	1	348	1	347	0.0	673	gi|223523|prf||0811197A	1736	324	336	1	96.55	1	1	MNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVSKTETSQVAPA	MNGTEGPNFYVPFSNKTGVVRSPFEAPQYYLAEPWQFSMLAAYMFLLIMLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLVGWSRYIPEGMQCSCGID-YTPHEETNNESFVIYMFVVHFIIPLIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWLPYAGVAFYIFTHQGSDFGPIFMTIPAFFAKTSAVYNPVIYIMMNKQFRNCMVTTLCCGKNPLGDDEASTTVSKTETSQVAPA	348	347	N/A
-P08100	ADB45242	94.817	328	17	0	11	338	1	328	0.0	653	gi|283855846|gb|ADB45242.1|	1684	311	321	0	97.87	1	1	VPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVS	VPFSNKTGVVRSPFEHPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGLALTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWLPYAGVAFYIFTHQGSNFGPIFMTLPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS	348	328	N/A
-P08100	ADB45229	94.817	328	17	0	11	338	1	328	0.0	631	gi|283855823|gb|ADB45229.1|	1627	311	323	0	98.48	1	1	VPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVS	VPFSNKTGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVANLFMVFGGFTTTLYTSMHGYFVFGATGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGLAFTWVMALACAAPPLAGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVVAFLICWLPYASVAFYIFTHQGSNFGPVFMTIPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS	348	328	N/A
-P08100	P56514	84.795	342	51	1	1	341	1	342	0.0	619	gi|3024260|sp|P56514.1|OPSD_BUFBU	1595	290	322	1	94.15	1	1	MNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEA-SATVSKTE	MNGTEGPNFYIPMSNKTGVVRSPFEYPQYYLAEPWQYSILCAYMFLLILLGFPINFMTLYVTIQHKKLRTPLNYILLNLAFANHFMVLCGFTVTMYSSMNGYFILGATGCYVEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFSENHAVMGVAFTWIMALSCAVPPLLGWSRYIPEGMQCSCGVDYYTLKPEVNNESFVIYMFVVHFTIPLIIIFFCYGRLVCTVKEAAAQQQESATTQKAEKEVTRMVIIMVVFFLICWVPYASVAFFIFSNQGSEFGPIFMTVPAFFAKSSSIYNPVIYIMLNKQFRNCMITTLCCGKNPFGEDDASSAATSKTE	348	354	N/A
-P08100	BAB21486	82.164	342	60	1	1	341	1	342	0.0	599	gi|12583665|dbj|BAB21486.1|	1544	281	314	1	91.81	1	1	MNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPL-GDDEASATVSKTE	MNGTEGPNFYIPMSNATGVVRSPFEYPQYYLAEPWAFSALSAYMFFLIIAGFPINFLTLYVTIEHKKLRTPLNYILLNLAVADLFMVFGGFTTTMYTSMHGYFVFGPTGCNIEGFFATLGGEIALWCLVVLAIERWMVVCKPVTNFRFGESHAIMGVMVTWTMALACALPPLFGWSRYIPEGLQCSCGIDYYTRAPGINNESFVIYMFTCHFSIPLAVISFCYGRLVCTVKEAAAQQQESETTQRAEREVTRMVVIMVISFLVCWVPYASVAWYIFTHQGSTFGPIFMTIPSFFAKSSALYNPMIYICMNKQFRHCMITTLCCGKNPFEEEDGASATSSKTE	348	354	N/A
+P08100	ADB45242.1	94.817	328	17	0	11	338	1	328	0.0	653	gi|283855846|gb|ADB45242.1|	1684	311	321	0	97.87	1	1	VPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVS	VPFSNKTGVVRSPFEHPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGLALTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWLPYAGVAFYIFTHQGSNFGPIFMTLPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS	348	328	N/A
+P08100	ADB45229.1	94.817	328	17	0	11	338	1	328	0.0	631	gi|283855823|gb|ADB45229.1|	1627	311	323	0	98.48	1	1	VPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVS	VPFSNKTGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVANLFMVFGGFTTTLYTSMHGYFVFGATGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGLAFTWVMALACAAPPLAGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVVAFLICWLPYASVAFYIFTHQGSNFGPVFMTIPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS	348	328	N/A
+P08100	P56514.1	84.795	342	51	1	1	341	1	342	0.0	619	gi|3024260|sp|P56514.1|OPSD_BUFBU	1595	290	322	1	94.15	1	1	MNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEA-SATVSKTE	MNGTEGPNFYIPMSNKTGVVRSPFEYPQYYLAEPWQYSILCAYMFLLILLGFPINFMTLYVTIQHKKLRTPLNYILLNLAFANHFMVLCGFTVTMYSSMNGYFILGATGCYVEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFSENHAVMGVAFTWIMALSCAVPPLLGWSRYIPEGMQCSCGVDYYTLKPEVNNESFVIYMFVVHFTIPLIIIFFCYGRLVCTVKEAAAQQQESATTQKAEKEVTRMVIIMVVFFLICWVPYASVAFFIFSNQGSEFGPIFMTVPAFFAKSSSIYNPVIYIMLNKQFRNCMITTLCCGKNPFGEDDASSAATSKTE	348	354	N/A
+P08100	BAB21486.1	82.164	342	60	1	1	341	1	342	0.0	599	gi|12583665|dbj|BAB21486.1|	1544	281	314	1	91.81	1	1	MNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPL-GDDEASATVSKTE	MNGTEGPNFYIPMSNATGVVRSPFEYPQYYLAEPWAFSALSAYMFFLIIAGFPINFLTLYVTIEHKKLRTPLNYILLNLAVADLFMVFGGFTTTMYTSMHGYFVFGPTGCNIEGFFATLGGEIALWCLVVLAIERWMVVCKPVTNFRFGESHAIMGVMVTWTMALACALPPLFGWSRYIPEGLQCSCGIDYYTRAPGINNESFVIYMFTCHFSIPLAVISFCYGRLVCTVKEAAAQQQESETTQRAEREVTRMVVIMVISFLVCWVPYASVAWYIFTHQGSTFGPIFMTIPSFFAKSSALYNPMIYICMNKQFRHCMITTLCCGKNPFEEEDGASATSSKTE	348	354	N/A
--- a/test-data/blastx_rhodopsin_vs_four_human.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/blastx_rhodopsin_vs_four_human.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -2,7 +2,7 @@
 <!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd">
 <BlastOutput>
   <BlastOutput_program>blastx</BlastOutput_program>
-  <BlastOutput_version>BLASTX 2.5.0+</BlastOutput_version>
+  <BlastOutput_version>BLASTX 2.7.1+</BlastOutput_version>
   <BlastOutput_reference>Stephen F. Altschul, Thomas L. Madden, Alejandro A. Sch&amp;auml;ffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), &quot;Gapped BLAST and PSI-BLAST: a new generation of protein database search programs&quot;, Nucleic Acids Res. 25:3389-3402.</BlastOutput_reference>
   <BlastOutput_db></BlastOutput_db>
   <BlastOutput_query-ID>Query_1</BlastOutput_query-ID>
Binary file test-data/cd00003_and_cd00008.pin has changed
Binary file test-data/chimera.fasta.gz has changed
--- a/test-data/four_human_proteins.dbinfo.txt	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/four_human_proteins.dbinfo.txt	Sat Jun 30 17:22:46 2018 -0400
@@ -1,7 +1,7 @@
 Database: Just 4 human proteins
 	4 sequences; 3,297 total residues
 
-Date: Dec 2, 2016  10:38 AM	Longest sequence: 1,382 residues
+Date: Oct 31, 2017  4:23 PM	Longest sequence: 1,382 residues
 
 Volumes:
-	/mnt/shared/users/pc40583/repositories/galaxy_blast/test-data/four_human_proteins_taxid.fasta
+	/mnt/galaxy/repositories/galaxy_blast/test-data/four_human_proteins_taxid.fasta
Binary file test-data/four_human_proteins.fasta.pin has changed
Binary file test-data/four_human_proteins_taxid.fasta.pin has changed
--- a/test-data/rhodopsin_nucs.dbinfo.txt	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/rhodopsin_nucs.dbinfo.txt	Sat Jun 30 17:22:46 2018 -0400
@@ -1,7 +1,7 @@
 Database: Rhodopsin nucleotides
 	6 sequences; 10,296 total bases
 
-Date: Dec 2, 2016  10:38 AM	Longest sequence: 4,301 bases
+Date: Oct 31, 2017  4:23 PM	Longest sequence: 4,301 bases
 
 Volumes:
-	/mnt/shared/users/pc40583/repositories/galaxy_blast/test-data/rhodopsin_nucs.fasta
+	/mnt/galaxy/repositories/galaxy_blast/test-data/rhodopsin_nucs.fasta
Binary file test-data/rhodopsin_nucs.fasta.gz has changed
Binary file test-data/rhodopsin_nucs.fasta.nin has changed
--- a/test-data/tblastn_four_human_vs_rhodopsin.html	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/tblastn_four_human_vs_rhodopsin.html	Sat Jun 30 17:22:46 2018 -0400
@@ -1,9 +1,9 @@
 <HTML>
-<TITLE>BLAST Search Results</TITLE>
+<HEAD><TITLE>BLAST Search Results</TITLE></HEAD>
 <BODY BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#660099" ALINK="#660099">
 <PRE>
 
-<b>TBLASTN 2.5.0+</b>
+<b>TBLASTN 2.7.1+</b>
 
 
 <b><a
--- a/test-data/tblastn_four_human_vs_rhodopsin.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/tblastn_four_human_vs_rhodopsin.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -2,7 +2,7 @@
 <!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd">
 <BlastOutput>
   <BlastOutput_program>tblastn</BlastOutput_program>
-  <BlastOutput_version>TBLASTN 2.5.0+</BlastOutput_version>
+  <BlastOutput_version>TBLASTN 2.7.1+</BlastOutput_version>
   <BlastOutput_reference>Stephen F. Altschul, Thomas L. Madden, Alejandro A. Sch&amp;auml;ffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), &quot;Gapped BLAST and PSI-BLAST: a new generation of protein database search programs&quot;, Nucleic Acids Res. 25:3389-3402.</BlastOutput_reference>
   <BlastOutput_db></BlastOutput_db>
   <BlastOutput_query-ID>Query_1</BlastOutput_query-ID>
--- a/test-data/tblastn_four_human_vs_rhodopsin_deflines.tabular	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/tblastn_four_human_vs_rhodopsin_deflines.tabular	Sat Jun 30 17:22:46 2018 -0400
@@ -1,10 +1,10 @@
-P08100	NM_001009242	96.552	348	12	0	1	348	1	1044	0.0	732
-P08100	AB062417	93.391	348	23	0	1	348	1	1044	0.0	711
-P08100	GQ290312	95.092	326	16	0	11	336	1	978	0.0	658
-P08100	U59921	84.795	342	51	1	1	341	42	1067	0.0	646
-P08100	AB043817	82.164	342	60	1	1	341	23	1048	0.0	626
-P08100	GQ290303	93.243	74	5	0	239	312	3147	3368	1.34e-71	151
-P08100	GQ290303	91.525	59	5	0	177	235	2855	3031	1.34e-71	126
-P08100	GQ290303	96.396	111	4	0	11	121	1	333	3.31e-67	229
-P08100	GQ290303	93.220	59	4	0	119	177	1404	1580	2.31e-32	122
-P08100	GQ290303	88.462	26	3	0	312	337	4222	4299	3.61e-12	57.7
+P08100	NM_001009242.1	96.552	348	12	0	1	348	1	1044	0.0	732
+P08100	AB062417.1	93.391	348	23	0	1	348	1	1044	0.0	711
+P08100	GQ290312.1	95.092	326	16	0	11	336	1	978	0.0	658
+P08100	U59921.1	84.795	342	51	1	1	341	42	1067	0.0	646
+P08100	AB043817.1	82.164	342	60	1	1	341	23	1048	0.0	626
+P08100	GQ290303.1	93.243	74	5	0	239	312	3147	3368	1.34e-71	151
+P08100	GQ290303.1	91.525	59	5	0	177	235	2855	3031	1.34e-71	126
+P08100	GQ290303.1	96.396	111	4	0	11	121	1	333	3.31e-67	229
+P08100	GQ290303.1	93.220	59	4	0	119	177	1404	1580	2.31e-32	122
+P08100	GQ290303.1	88.462	26	3	0	312	337	4222	4299	3.61e-12	57.7
--- a/test-data/three_human_mRNA.dbinfo.txt	Mon Sep 18 06:21:27 2017 -0400
+++ b/test-data/three_human_mRNA.dbinfo.txt	Sat Jun 30 17:22:46 2018 -0400
@@ -1,7 +1,7 @@
 Database: Just 3 human mRNA sequences
 	3 sequences; 10,732 total bases
 
-Date: Dec 2, 2016  10:38 AM	Longest sequence: 4,796 bases
+Date: Oct 31, 2017  4:23 PM	Longest sequence: 4,796 bases
 
 Volumes:
-	/mnt/shared/users/pc40583/repositories/galaxy_blast/test-data/three_human_mRNA.fasta
+	/mnt/galaxy/repositories/galaxy_blast/test-data/three_human_mRNA.fasta
Binary file test-data/three_human_mRNA.fasta.gz has changed
Binary file test-data/three_human_mRNA.fasta.nin has changed
--- a/tools/ncbi_blast_plus/README.rst	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/README.rst	Sat Jun 30 17:22:46 2018 -0400
@@ -1,10 +1,9 @@
 Galaxy wrappers for NCBI BLAST+ suite
 =====================================
 
-These wrappers are copyright 2010-2017 by Peter Cock (The James Hutton Institute,
-UK) and additional contributors including Edward Kirton, John Chilton,
-Nicola Soranzo, Jim Johnson, and Bjoern Gruening.
-
+These wrappers are copyright 2010-2018 by Peter Cock (James Hutton Institute,
+UK) and additional contributors including Edward Kirton, John Chilton, Nicola
+Soranzo, Jim Johnson, Bjoern Gruening, Caleb Easterly, and Anton Nekrutenko.
 See the licence text below.
 
 Note this does not work with the NCBI 'legacy' BLAST suite written in C
@@ -31,13 +30,13 @@
 
 NCBI BLAST+ integrated into Galaxy.
 P.J.A. Cock, J.M. Chilton, B. Gruening, J.E. Johnson, N. Soranzo
-GigaScience, 2015, 4:39 http://dx.doi.org/10.1186/s13742-015-0080-7
+GigaScience, 2015, 4:39 https://doi.org/10.1186/s13742-015-0080-7
 
 You should also cite the NCBI BLAST+ tools:
 
 BLAST+: architecture and applications.
 C. Camacho et al. BMC Bioinformatics 2009, 10:421.
-DOI: http://dx.doi.org/10.1186/1471-2105-10-421
+https://doi.org/10.1186/1471-2105-10-421
 
 
 Automated Installation
@@ -248,6 +247,18 @@
           parameter (contribution from Nicola Soranzo).
         - Add ``-max_hsps`` option (contribution from Nicola Soranzo).
         - Add ``-use_sw_tback`` option for BLASTP (Nicola Soranzo).
+v0.2.02 - Document the BLAST+ 2.5.0 change in the standard 12 column output
+          from ``qseqid,sseqid,...`` to ``qacc,sacc,...`` instead.
+        - Support for per-matrix recommended gaps settings (``-gapopen`` and
+          ``-gapextend``, contribution from Caleb Easterly and Jim Johnson).
+        - Support for ``-window_size``, ``-threshold``, ``-comp_based_stats``
+          and revising ``-word_size`` to avoid using zero to mean  default
+          (contribution from Caleb Easterly).
+v0.3.0  - Updated for NCBI BLAST+ 2.7.1,
+        - Depends on BioConda or legacy ToolShed ``package_blast_plus_2_7_1``.
+        - Document the BLAST+ 2.6.0 change in the standard 12 column output
+          from ``qacc,sacc,...`` to ``qaccver,saccver,...`` instead.
+        - Accept gzipped FASTA inputs (contribution from Anton Nekrutenko).
 ======= ======================================================================
 
 
--- a/tools/ncbi_blast_plus/blastxml_to_tabular.py	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/blastxml_to_tabular.py	Sat Jun 30 17:22:46 2018 -0400
@@ -108,6 +108,9 @@
 The columns option can be 'std' (standard 12 columns), 'ext'
 (extended 25 columns), or a list of BLAST+ column names like
 'qseqid,sseqid,pident' (space or comma separated).
+
+Note if using a list of column names, currently ONLY the 25
+extended column names are supported.
 """
 parser = OptionParser(usage=usage)
 parser.add_option('-o', '--output', dest='output', default=None,
--- a/tools/ncbi_blast_plus/blastxml_to_tabular.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/blastxml_to_tabular.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -200,7 +200,7 @@
 Peter J.A. Cock, Björn A. Grüning, Konrad Paszkiewicz and Leighton Pritchard (2013).
 Galaxy tools and workflows for sequence analysis with applications
 in molecular plant pathology. PeerJ 1:e167
-http://dx.doi.org/10.7717/peerj.167
+https://doi.org/10.7717/peerj.167
 
 This wrapper is available to install into other Galaxy Instances via the Galaxy
 Tool Shed at http://toolshed.g2.bx.psu.edu/view/devteam/ncbi_blast_plus
--- a/tools/ncbi_blast_plus/check_no_duplicates.py	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/check_no_duplicates.py	Sat Jun 30 17:22:46 2018 -0400
@@ -9,10 +9,11 @@
 will return a non-zero error if any duplicate identifiers
 are found.
 """
-
+import gzip
 import os
 import sys
 
+
 if "-v" in sys.argv or "--version" in sys.argv:
     print("v0.0.23")
     sys.exit(0)
@@ -24,7 +25,19 @@
         sys.stderr.write("Missing FASTA file %r\n" % filename)
         sys.exit(2)
     files += 1
-    handle = open(filename)
+
+    with open(filename, "rb") as binary_handle:
+        magic = binary_handle.read(2)
+    if not magic:
+        # Empty file, special case
+        continue
+    elif magic == b'\x1f\x8b':
+        # Gzipped
+        handle = gzip.open(filename, "rt")
+    elif magic[0:1] == b">":
+        # Not gzipped, shoudl be plain FASTA
+        handle = open(filename, "r")
+
     for line in handle:
         if line.startswith(">"):
             # The split will also take care of the new line character,
--- a/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -131,6 +131,10 @@
 
 -------
 
+@CLI_OPTIONS
+
+-------
+
 **References**
 
 If you use this Galaxy tool in work leading to a scientific publication please
--- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -7,31 +7,43 @@
     <expand macro="parallelism" />
     <expand macro="preamble" />
     <command detect_errors="aggressive">
+<![CDATA[
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 blastn
--query '$query'
+#if $query.is_of_type('fasta.gz'):
+-query <(gunzip -c '${query}')
+#else:
+-query '${query}'
+#end if
 @BLAST_DB_SUBJECT@
--task $blast_type
--evalue $evalue_cutoff
+-task '${blast_type}'
+-evalue '${evalue_cutoff}'
 @BLAST_OUTPUT@
 @THREADS@
 #if $adv_opts.adv_opts_selector=="advanced":
-$adv_opts.strand
+${adv_opts.strand}
 @ADV_FILTER_QUERY@
 @ADV_MAX_HITS@
 @ADV_WORD_SIZE@
 #if (str($adv_opts.identity_cutoff) and float(str($adv_opts.identity_cutoff)) > 0 ):
--perc_identity $adv_opts.identity_cutoff
+-perc_identity '${adv_opts.identity_cutoff}'
 #end if
-$adv_opts.ungapped
+${adv_opts.ungapped}
 @ADV_ID_LIST_FILTER@
 @ADV_QCOV_HSP_PERC@
+## only use window size if dc-megablast mode is used
+#if ($blast_type == "dc-megablast"):
+-window_size @ADV_WINDOW_SIZE@
+#end if
+@ADV_GAPOPEN@
+@ADV_GAPEXTEND@
 ## End of advanced options:
 #end if
+]]>
     </command>
     <inputs>
-        <param argument="-query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
+        <param argument="-query" type="data" format="fasta,fasta.gz" label="Nucleotide query sequence(s)"/>
         <expand macro="input_conditional_nucleotide_db" />
         <param name="blast_type" argument="-task" type="select" display="radio" label="Type of BLAST">
             <option value="megablast">megablast - Traditional megablast used to find very similar (e.g., intraspecies or closely related species) sequences</option>
@@ -53,13 +65,18 @@
             <expand macro="input_strand" />
             <expand macro="input_max_hits" />
             <param name="identity_cutoff" argument="-perc_identity" type="float" min="0" max="100" value="0" label="Percent identity cutoff" help="Use zero for no cutoff" />
-
-            <!-- I'd like word_size to be optional, with minimum 4 for blastn -->
-            <param argument="-word_size" type="integer" min="0" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 4" />
+            <expand macro="input_word_size" />
             <param argument="-ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
             <expand macro="input_parse_deflines" />
             <expand macro="advanced_optional_id_files" />
             <expand macro="input_qcov_hsp_perc" />
+            <!-- the help text here is unique to the blastx application, so macro not used -->
+            <param name="window_size" type="integer" optional="true" min="0"
+                label="Multiple hits window size: use 0 to specify 1-hit algorithm, leave blank for default"
+                help="Only relevant for dc-megablast, and otherwise ignored. Default window size changes with substitution matrix and BLAST type.
+                    Entering a non-negative integer will override the default."/>
+            <expand macro="input_gapopen"/>
+            <expand macro="input_gapextend"/>
         </expand>
     </inputs>
     <outputs>
@@ -91,6 +108,16 @@
         <test>
             <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
             <param name="db_opts_selector" value="file" />
+            <param name="subject" value="three_human_mRNA.fasta.gz" ftype="fasta.gz" />
+            <param name="database" value="" />
+            <param name="evalue_cutoff" value="1e-40" />
+            <param name="out_format" value="6" />
+            <param name="adv_opts_selector" value="basic" />
+            <output name="output1" file="blastn_rhodopsin_vs_three_human.tabular" ftype="tabular" />
+        </test>
+        <test>
+            <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="file" />
             <param name="subject" value="three_human_mRNA.fasta" ftype="fasta" />
             <param name="database" value="" />
             <param name="evalue_cutoff" value="1e-40" />
@@ -168,6 +195,10 @@
 
 -------
 
+@CLI_OPTIONS@
+
+-------
+
 **References**
 
 If you use this Galaxy tool in work leading to a scientific publication please
--- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -17,7 +17,7 @@
 @BLAST_OUTPUT@
 @THREADS@
 #if $adv_opts.adv_opts_selector=="advanced":
-    -matrix $adv_opts.matrix
+    @ADV_MATRIX_GAPCOSTS@
     @ADV_FILTER_QUERY@
     @ADV_MAX_HITS@
     @ADV_WORD_SIZE@
@@ -26,6 +26,10 @@
     @ADV_ID_LIST_FILTER@
     @ADV_QCOV_HSP_PERC@
     $adv_opts.use_sw_tback
+    @ADV_WINDOW_SIZE@
+    @ADV_THRESHOLD@
+    @ADV_COMP_BASED_STATS@
+## End of advanced options:
 #end if
     </command>
     <inputs>
@@ -33,19 +37,24 @@
 
         <expand macro="input_conditional_protein_db" />
 
-        <param name="blast_type" argument="-task" type="select" display="radio" label="Type of BLAST">
+        <param name="blast_type" argument="-task" type="select" display="radio"
+            label="Type of BLAST"
+            help="See help text for default parameter values for each BLAST type.">
             <option value="blastp">blastp - Traditional BLASTP to compare a protein query to a protein database</option>
+            <option value="blastp-short">blastp-short - BLASTP optimized for queries shorter than 30 residues</option>
             <option value="blastp-fast">blastp-fast - Use longer words for seeding, faster but less accurate</option>
-            <option value="blastp-short">blastp-short - BLASTP optimized for queries shorter than 30 residues</option>
         </param>
         <expand macro="input_evalue" />
         <expand macro="input_out_format" />
         <expand macro="advanced_options">
             <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' -->
             <expand macro="input_filter_query_default_false" />
-            <expand macro="input_scoring_matrix" />
+            <expand macro="input_matrix_gapcosts" />
             <expand macro="input_max_hits" />
             <expand macro="input_word_size" />
+            <expand macro="input_window_size" />
+            <expand macro="input_threshold" />
+            <expand macro="input_comp_based_stats" />
             <!--
             Can't use '-ungapped' on its own, error back is:
             Composition-adjusted searched are not supported with an ungapped search, please add -comp_based_stats F or do a gapped search
@@ -76,7 +85,8 @@
             <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM62" />
             <param name="max_hits" value="0" />
-            <param name="word_size" value="0" />
+            <param name="word_size" value="" />
+            <param name="window_size" value="40" />
             <param name="parse_deflines" value="true" />
             <param name="qcov_hsp_perc" value="25" />
             <output name="output1" file="blastp_four_human_vs_rhodopsin.xml" ftype="blastxml" />
@@ -93,7 +103,8 @@
             <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM62" />
             <param name="max_hits" value="0" />
-            <param name="word_size" value="0" />
+            <param name="word_size" value="" />
+            <param name="window_size" value="40" />
             <param name="parse_deflines" value="true" />
             <param name="qcov_hsp_perc" value="25" />
             <output name="output1" file="blastp_four_human_vs_rhodopsin.tabular" ftype="tabular" />
@@ -110,7 +121,7 @@
             <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM62" />
             <param name="max_hits" value="0" />
-            <param name="word_size" value="0" />
+            <param name="word_size" value="" />
             <param name="parse_deflines" value="true" />
             <param name="qcov_hsp_perc" value="25" />
             <output name="output1" file="blastp_four_human_vs_rhodopsin_ext.tabular" ftype="tabular" />
@@ -126,6 +137,32 @@
             <param name="adv_opts_selector" value="basic" />
             <output name="output1" file="blastp_rhodopsin_vs_four_human.tabular" ftype="tabular" />
         </test>
+        <test>
+            <param name="query" value="rhodopsin_peptides.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="file" />
+            <param name="subject" value="four_human_proteins.fasta" ftype="fasta" />
+            <param name="database" value="" />
+            <param name="evalue_cutoff" value="200000" />
+            <param name="blast_type" value="blastp-short" />
+            <param name="out_format" value="6" />
+            <param name="adv_opts_selector" value="basic" />
+            <output name="output1" file="blastp_rhodopsin_peptides_vs_four_human.tabular" ftype="tabular" />
+        </test>
+        <test>
+            <param name="query" value="rhodopsin_proteins.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="file" />
+            <param name="subject" value="four_human_proteins.fasta" ftype="fasta" />
+            <param name="database value=" />
+            <param name="evalue_cutoff" value="1e-8"/>
+            <param name="blast_type" value="blastp" />
+            <param name="out_format" value="6"/>
+            <param name="adv_opts_selector" value="advanced"/>
+            <param name="window_size" value="35" />
+            <param name="matrix" value="BLOSUM62" />
+            <param name="gap_costs" value="-gapopen 11 -gapextend 1"/>
+            <param name="comp_based_stats" value="3" />
+            <output name="output1" file="blastp_rhodopsin_adv_vs_four_human.tabular" ftype="tabular" />
+        </test>
     </tests>
     <help>
 
@@ -138,10 +175,14 @@
 
 @FASTA_WARNING@
 
------
+-------
 
 @OUTPUT_FORMAT@
 
+------
+
+@CLI_OPTIONS@
+
 -------
 
 **References**
--- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -19,13 +19,16 @@
 @THREADS@
 #if $adv_opts.adv_opts_selector=="advanced":
 $adv_opts.strand
--matrix $adv_opts.matrix
+@ADV_MATRIX_GAPCOSTS@
 @ADV_FILTER_QUERY@
 @ADV_MAX_HITS@
 @ADV_WORD_SIZE@
 $adv_opts.ungapped
 @ADV_ID_LIST_FILTER@
 @ADV_QCOV_HSP_PERC@
+@ADV_WINDOW_SIZE@
+@ADV_THRESHOLD@
+@ADV_COMP_BASED_STATS@
 ## End of advanced options:
 #end if
     </command>
@@ -45,13 +48,16 @@
             <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' -->
             <expand macro="input_filter_query_default_true" />
             <expand macro="input_strand" />
-            <expand macro="input_scoring_matrix" />
+            <expand macro="input_matrix_gapcosts" />
             <expand macro="input_max_hits" />
             <expand macro="input_word_size" />
             <param argument="-ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
             <expand macro="input_parse_deflines" />
             <expand macro="advanced_optional_id_files" />
             <expand macro="input_qcov_hsp_perc" />
+            <expand macro="input_window_size" />
+            <expand macro="input_threshold" />
+            <expand macro="input_comp_based_stats" />
         </expand>
     </inputs>
     <outputs>
@@ -105,6 +111,17 @@
             <param name="adv_opts_selector" value="basic" />
             <output name="output1" file="blastx_rhodopsin_vs_four_human_all.tabular" ftype="tabular" />
         </test>
+        <test>
+            <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="file" />
+            <param name="subject" value="four_human_proteins.fasta" ftype="fasta" />
+            <param name="database" value="" />
+            <param name="evalue_cutoff" value="1e-10" />
+            <param name="out_format" value="6" />
+            <param name="adv_opts_selector" value="advanced" />
+            <param name="matrix" value="BLOSUM62" />
+            <output name="output1" file="blastx_rhodopsin_adv_vs_four_human.tabular" ftype="tabular" />
+        </test>
     </tests>
     <help>
 
@@ -117,12 +134,16 @@
 
 @FASTA_WARNING@
 
------
+-------
 
 @OUTPUT_FORMAT@
 
 -------
 
+@CLI_OPTIONS@
+
+-------
+
 **References**
 
 If you use this Galaxy tool in work leading to a scientific publication please
--- a/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -86,7 +86,7 @@
 More information about dustmasker can be found in the `BLAST Command Line Applications User Manual`_.
 
 .. _BLAST Command Line Applications User Manual: https://www.ncbi.nlm.nih.gov/books/NBK279690/
-.. _DUST: http://www.ncbi.nlm.nih.gov/pubmed/16796549
+.. _DUST: https://www.ncbi.nlm.nih.gov/pubmed/16796549
 
 **References**
 
--- a/tools/ncbi_blast_plus/ncbi_macros.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_macros.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -1,15 +1,17 @@
 <macros>
-    <token name="@WRAPPER_VERSION@">0.2.01</token>
+    <token name="@WRAPPER_VERSION@">0.3.0</token>
     <xml name="parallelism">
         <!-- If job splitting is enabled, break up the query file into parts -->
         <parallelism method="multi" split_inputs="query" split_mode="to_size" split_size="1000" merge_outputs="output1" />
     </xml>
+
     <xml name="preamble">
         <requirements>
-            <requirement type="package" version="2.5.0">blast</requirement>
+            <requirement type="package" version="2.7.1">blast</requirement>
         </requirements>
         <version_command>@BINARY@ -version</version_command>
     </xml>
+
     <xml name="output_change_format">
         <change_format>
             <when input="output.out_format" value="0" format="txt"/>
@@ -21,6 +23,7 @@
             <when input="output.out_format" value="5" format="blastxml"/>
         </change_format>
     </xml>
+
     <xml name="input_out_format">
         <conditional name="output">
             <param name="out_format" argument="-outfmt" type="select" label="Output format">
@@ -108,6 +111,168 @@
             <when value="4 -html"/>
         </conditional>
     </xml>
+
+    <xml name="input_matrix_gapcosts">
+        <conditional name="matrix_gapcosts">
+            <param argument="-matrix" type="select" label="Scoring matrix and gap costs">
+                <option value="" selected="true">Use Defaults</option>
+                <option value="BLOSUM90">BLOSUM90</option>
+                <option value="BLOSUM80">BLOSUM80</option>
+                <option value="BLOSUM62">BLOSUM62</option>
+                <option value="BLOSUM50">BLOSUM50</option>
+                <option value="BLOSUM45">BLOSUM45</option>
+                <option value="PAM250">PAM250</option>
+                <option value="PAM70">PAM70</option>
+                <option value="PAM30">PAM30</option>
+            </param>
+            <when value="">
+            <!-- do nothing -->
+            </when>
+            <when value="BLOSUM90">
+                <param name="gap_costs" type="select" label="Gap Costs">
+                    <option value="" selected="true">Use defaults</option>
+                    <option value="-gapopen 9 -gapextend 2">Existence: 9  Extension: 2</option>
+                    <option value="-gapopen 8 -gapextend 2">Existence: 8  Extension: 2</option>
+                    <option value="-gapopen 7 -gapextend 2">Existence: 7  Extension: 2</option>
+                    <option value="-gapopen 6 -gapextend 2">Existence: 6  Extension: 2</option>
+                    <option value="-gapopen 11 -gapextend 1">Existence: 11  Extension: 1</option>
+                    <option value="-gapopen 10 -gapextend 1">Existence: 10  Extension: 1</option>
+                    <option value="-gapopen 9 -gapextend 1">Existence: 9  Extension: 1</option>
+                </param>
+
+            </when>
+            <when value="BLOSUM80">
+                <param name="gap_costs" type="select" label="Gap Costs">
+                    <option value="" selected="true">Use defaults</option>
+                    <option value="-gapopen 8 -gapextend 2">Existence: 8  Extension: 2</option>
+                    <option value="-gapopen 7 -gapextend 2">Existence: 7  Extension: 2</option>
+                    <option value="-gapopen 6 -gapextend 2">Existence: 6  Extension: 2</option>
+                    <option value="-gapopen 11 -gapextend 1">Existence: 11  Extension: 1</option>
+                    <option value="-gapopen 10 -gapextend 1">Existence: 10  Extension: 1</option>
+                    <option value="-gapopen 9 -gapextend 1">Existence: 9  Extension: 1</option>
+                </param>
+            </when>
+            <when value="BLOSUM62">
+                <param name="gap_costs" type="select" label="Gap Costs">
+                    <option value="" selected="true">Use defaults</option>
+                    <option value="-gapopen 11 -gapextend 2">Existence: 11  Extension: 2</option>
+                    <option value="-gapopen 10 -gapextend 2">Existence: 10  Extension: 2</option>
+                    <option value="-gapopen 9 -gapextend 2">Existence: 9  Extension: 2</option>
+                    <option value="-gapopen 8 -gapextend 2">Existence: 8  Extension: 2</option>
+                    <option value="-gapopen 7 -gapextend 2">Existence: 7  Extension: 2</option>
+                    <option value="-gapopen 6 -gapextend 2">Existence: 6  Extension: 2</option>
+                    <option value="-gapopen 13 -gapextend 1">Existence: 13  Extension: 1</option>
+                    <option value="-gapopen 12 -gapextend 1">Existence: 12  Extension: 1</option>
+                    <option value="-gapopen 11 -gapextend 1">Existence: 11  Extension: 1</option>
+                    <option value="-gapopen 10 -gapextend 1">Existence: 10  Extension: 1</option>
+                    <option value="-gapopen 9 -gapextend 1">Existence: 9  Extension: 1</option>
+                </param>
+
+            </when>
+            <when value="BLOSUM50">
+                <param name="gap_costs" type="select" label="Gap Costs">
+                    <option value="" selected="true">Use defaults</option>
+                    <option value="-gapopen 13 -gapextend 3">Existence: 13  Extension: 3</option>
+                    <option value="-gapopen 12 -gapextend 3">Existence: 12  Extension: 3</option>
+                    <option value="-gapopen 11 -gapextend 3">Existence: 11  Extension: 3</option>
+                    <option value="-gapopen 10 -gapextend 3">Existence: 10  Extension: 3</option>
+                    <option value="-gapopen 9 -gapextend 3">Existence: 9  Extension: 3</option>
+                    <option value="-gapopen 16 -gapextend 2">Existence: 16  Extension: 2</option>
+                    <option value="-gapopen 15 -gapextend 2">Existence: 15  Extension: 2</option>
+                    <option value="-gapopen 14 -gapextend 2">Existence: 14  Extension: 2</option>
+                    <option value="-gapopen 13 -gapextend 2">Existence: 13  Extension: 2</option>
+                    <option value="-gapopen 12 -gapextend 2">Existence: 12  Extension: 2</option>
+                    <option value="-gapopen 19 -gapextend 1">Existence: 19  Extension: 1</option>
+                    <option value="-gapopen 18 -gapextend 1">Existence: 18  Extension: 1</option>
+                    <option value="-gapopen 17 -gapextend 1">Existence: 17  Extension: 1</option>
+                    <option value="-gapopen 16 -gapextend 1">Existence: 16  Extension: 1</option>
+                    <option value="-gapopen 15 -gapextend 1">Existence: 15  Extension: 1</option>
+                </param>
+
+            </when>
+            <when value="BLOSUM45">
+                <param name="gap_costs" type="select" label="Gap Costs">
+                    <option value="" selected="true">Use defaults</option>
+                    <option value="-gapopen 13 -gapextend 3">Existence: 13  Extension: 3</option>
+                    <option value="-gapopen 12 -gapextend 3">Existence: 12  Extension: 3</option>
+                    <option value="-gapopen 11 -gapextend 3">Existence: 11  Extension: 3</option>
+                    <option value="-gapopen 10 -gapextend 3">Existence: 10  Extension: 3</option>
+                    <option value="-gapopen 15 -gapextend 2">Existence: 15  Extension: 2</option>
+                    <option value="-gapopen 14 -gapextend 2">Existence: 14  Extension: 2</option>
+                    <option value="-gapopen 13 -gapextend 2">Existence: 13  Extension: 2</option>
+                    <option value="-gapopen 12 -gapextend 2">Existence: 12  Extension: 2</option>
+                    <option value="-gapopen 19 -gapextend 1">Existence: 19  Extension: 1</option>
+                    <option value="-gapopen 18 -gapextend 1">Existence: 18  Extension: 1</option>
+                    <option value="-gapopen 17 -gapextend 1">Existence: 17  Extension: 1</option>
+                    <option value="-gapopen 16 -gapextend 1">Existence: 16  Extension: 1</option>
+                </param>
+            </when>
+            <when value="PAM250">
+                <param name="gap_costs" type="select" label="Gap Costs">
+                    <option value="" selected="true">Use defaults</option>
+                    <option value="-gapopen 15 -gapextend 3">Existence: 15  Extension: 3</option>
+                    <option value="-gapopen 14 -gapextend 3">Existence: 14  Extension: 3</option>
+                    <option value="-gapopen 13 -gapextend 3">Existence: 13  Extension: 3</option>
+                    <option value="-gapopen 12 -gapextend 3">Existence: 12  Extension: 3</option>
+                    <option value="-gapopen 17 -gapextend 2">Existence: 17  Extension: 2</option>
+                    <option value="-gapopen 16 -gapextend 2">Existence: 16  Extension: 2</option>
+                    <option value="-gapopen 15 -gapextend 2">Existence: 15  Extension: 2</option>
+                    <option value="-gapopen 14 -gapextend 2">Existence: 14  Extension: 2</option>
+                    <option value="-gapopen 13 -gapextend 2">Existence: 13  Extension: 2</option>
+                    <option value="-gapopen 21 -gapextend 1">Existence: 21  Extension: 1</option>
+                    <option value="-gapopen 20 -gapextend 1">Existence: 20  Extension: 1</option>
+                    <option value="-gapopen 19 -gapextend 1">Existence: 19  Extension: 1</option>
+                    <option value="-gapopen 18 -gapextend 1">Existence: 18  Extension: 1</option>
+                    <option value="-gapopen 17 -gapextend 1">Existence: 17  Extension: 1</option>
+                </param>
+
+            </when>
+            <when value="PAM70">
+                <param name="gap_costs" type="select" label="Gap Costs">
+                    <option value="" selected="true">Use defaults</option>
+                    <option value="-gapopen 12 -gapextend 3">Existence: 12 Extension: 3</option>
+                    <option value="-gapopen 11 -gapextend 2">Existence: 11 Extension: 2</option>
+                    <option value="-gapopen 8 -gapextend 2">Existence: 8  Extension: 2</option>
+                    <option value="-gapopen 7 -gapextend 2">Existence: 7  Extension: 2</option>
+                    <option value="-gapopen 6 -gapextend 2">Existence: 6  Extension: 2</option>
+                    <option value="-gapopen 11 -gapextend 1">Existence: 11  Extension: 1</option>
+                    <option value="-gapopen 10 -gapextend 1">Existence: 10  Extension: 1</option>
+                    <option value="-gapopen 9 -gapextend 1">Existence: 9  Extension: 1</option>
+                </param>
+
+            </when>
+            <when value="PAM30">
+                <param name="gap_costs" type="select" label="Gap Costs">
+                    <option value="" selected="true">Use defaults</option>
+                    <option value="-gapopen 15 -gapextend 3">Existence: 15 Extension: 3</option>
+                    <option value="-gapopen 13 -gapextend 3">Existence: 13 Extension: 3</option>
+                    <option value="-gapopen 14 -gapextend 2">Existence: 14 Extension: 2</option>
+                    <option value="-gapopen 7 -gapextend 2">Existence: 7  Extension: 2</option>
+                    <option value="-gapopen 6 -gapextend 2">Existence: 6  Extension: 2</option>
+                    <option value="-gapopen 5 -gapextend 2">Existence: 5  Extension: 2</option>
+                    <option value="-gapopen 14 -gapextend 1">Existence: 14 Extension: 1</option>
+                    <option value="-gapopen 10 -gapextend 1">Existence: 10  Extension: 1</option>
+                    <option value="-gapopen 9 -gapextend 1">Existence: 9  Extension: 1</option>
+                    <option value="-gapopen 8 -gapextend 1">Existence: 8  Extension: 1</option>
+                </param>
+            </when>
+        </conditional>
+    </xml>
+    <!-- these gapopen and gapextend macros are only used in blastn.
+        otherwise, the combined matrix/gapcosts macro is used -->
+    <xml name="input_gapopen">
+        <param argument="-gapopen" type="integer" optional="true" min="0"
+            label="Cost to open a gap"
+            help="Leave blank for default. See tool help for defaults."/>
+    </xml>
+
+    <xml name="input_gapextend">
+        <param argument="-gapextend" type="integer" optional="true" min="1"
+            label="Cost to extend a gap"
+            help="Leave blank for default. See tool help for defaults."/>
+    </xml>
+
+    <!-- this matrix macro is used in deltablast, makeprofiledb, psiblast, and tblastx -->
     <xml name="input_scoring_matrix">
         <param argument="-matrix" type="select" label="Scoring matrix">
             <option value="BLOSUM90">BLOSUM90</option>
@@ -120,9 +285,10 @@
             <option value="PAM30">PAM30</option>
         </param>
     </xml>
+
     <xml name="input_query_gencode">
         <param argument="-query_gencode" type="select" label="Query genetic code">
-            <!-- See http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi for details -->
+            <!-- See https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi for details -->
             <option value="1" selected="true">1. Standard</option>
             <option value="2">2. Vertebrate Mitochondrial</option>
             <option value="3">3. Yeast Mitochondrial</option>
@@ -143,9 +309,10 @@
             <option value="24">24. Pterobranchia mitochondrial code</option>
         </param>
     </xml>
+
     <xml name="input_db_gencode">
         <param argument="-db_gencode" type="select" label="Database/subject genetic code">
-            <!-- See http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi for details -->
+            <!-- See https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi for details -->
             <option value="1" selected="true">1. Standard</option>
             <option value="2">2. Vertebrate Mitochondrial</option>
             <option value="3">3. Yeast Mitochondrial</option>
@@ -166,6 +333,7 @@
             <option value="24">24. Pterobranchia mitochondrial code</option>
         </param>
     </xml>
+
     <xml name="input_conditional_nucleotide_db">
         <!-- Usually database argument mapped to -db, but -in in dustmasker -->
         <conditional name="db_opts">
@@ -189,10 +357,11 @@
             <when value="file">
                 <param name="database" type="hidden" value="" />
                 <param name="histdb" type="hidden" value="" />
-                <param argument="-subject" type="data" format="fasta" label="Nucleotide FASTA subject file to use instead of a database"/>
+                <param argument="-subject" type="data" format="fasta,fasta.gz" label="Nucleotide FASTA subject file to use instead of a database"/>
             </when>
         </conditional>
     </xml>
+
     <xml name="input_conditional_protein_db">
         <!-- Usually database argument mapped to -db, but -in in segmasker -->
         <conditional name="db_opts">
@@ -220,6 +389,7 @@
             </when>
         </conditional>
     </xml>
+
     <xml name="input_conditional_pssm">
         <conditional name="db_opts">
             <param name="db_opts_selector" type="select" label="Protein domain database (PSSM)">
@@ -240,6 +410,7 @@
             </when>
         </conditional>
     </xml>
+
     <xml name="input_conditional_choose_db_type">
         <conditional name="db_opts">
             <param argument="-db_type" type="select" label="Type of BLAST database">
@@ -258,25 +429,34 @@
             </when>
         </conditional>
     </xml>
+
     <xml name="input_parse_deflines">
         <param argument="-parse_deflines" type="boolean" label="Should the query and subject defline(s) be parsed?" truevalue="-parse_deflines" falsevalue="" checked="false" help="This affects the formatting of the query/subject ID strings"/>
     </xml>
+
     <xml name="input_filter_query_default_false">
         <param name="filter_query" argument="-seg" type="boolean" label="Filter out low complexity regions (with SEG)" truevalue="-seg yes" falsevalue="-seg no" checked="false" />
     </xml>
+
     <xml name="input_filter_query_default_true">
         <param name="filter_query" argument="-seg" type="boolean" label="Filter out low complexity regions (with SEG)" truevalue="-seg yes" falsevalue="-seg no" checked="true" />
     </xml>
+
     <xml name="input_max_hits">
         <param name="max_hits" type="integer" min="0" value="0" label="Maximum hits to show" help="Use zero for default limits" />
         <param argument="-max_hsps" type="integer" min="1" optional="true" value="" label="Maximum number of HSPs (alignments) to keep for any single query-subject pair" help="The HSPs shown will be the best as judged by expect value. If this option is not set, BLAST shows all HSPs meeting the expect value criteria" />
     </xml>
+
     <xml name="input_evalue">
         <param name="evalue_cutoff" argument="-evalue" type="float" size="15" value="0.001" label="Set expectation value cutoff" />
     </xml>
+
     <xml name="input_word_size">
-        <param argument="-word_size" type="integer" min="0" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 2" />
+        <param argument="-word_size" type="integer" min="2" optional="true"
+        label="Word size for wordfinder algorithm"
+        help="Leave blank for default, otherwise minimum 2" />
     </xml>
+
     <xml name="input_strand">
         <param argument="-strand" type="select" label="Query strand(s) to search against database/subject">
             <option value="-strand both">Both</option>
@@ -284,9 +464,36 @@
             <option value="-strand minus">Minus (reverse complement)</option>
         </param>
     </xml>
+
     <xml name="input_qcov_hsp_perc">
         <param argument="-qcov_hsp_perc" type="float" value="0" min="0" max="100" label="Minimum query coverage per hsp (percentage, 0 to 100)" help="See also the output column qcovhsp"/>
     </xml>
+
+    <xml name="input_window_size">
+        <param argument="-window_size" type="integer" optional="true" min="0"
+            label="Multiple hits window size: use 0 to specify 1-hit algorithm, leave blank for default"
+            help="Default window size varies with substitution matrix and BLAST type. Enter an integer to override the default."/>
+    </xml>
+
+    <xml name="input_threshold">
+        <param argument="-threshold" type="integer" optional="true" min="0"
+            label="Minimum score to add a word to the BLAST lookup table."
+            help="Leave blank for default, which varies based on application."/>
+    </xml>
+
+    <xml name="input_comp_based_stats">
+        <param argument="-comp_based_stats" type="select"
+            label="Composition-based statistics"
+            help="The default value varies based on application and task. Most common default is 2.">
+            <option value="">Use default</option>
+            <option value="0">0: No composition-based statistics</option>
+            <option value="1">1: Composition-based statistics as in NAR 29:2994-3005, 2001</option>
+            <option value="2">2: Composition-based score adjustment as in Bioinformatics
+                21:902-911, 2005, conditioned on sequence properties</option>
+            <option value="3">3: Composition-based score adjustment as in Bioinformatics 21:902-911, 2005, unconditionally</option>
+        </param>
+    </xml>
+
     <xml name="advanced_options">
         <conditional name="adv_opts">
             <param name="adv_opts_selector" type="select" label="Advanced Options">
@@ -299,6 +506,7 @@
             </when>
         </conditional>
     </xml>
+
     <xml name="advanced_optional_id_files">
         <conditional name="adv_optional_id_files_opts">
             <param name="adv_optional_id_files_opts_selector" type="select"
@@ -324,31 +532,47 @@
             </when>
         </conditional>
     </xml>
-    <token name="@ADV_QCOV_HSP_PERC@">
-#if float(str($adv_opts.qcov_hsp_perc)) &gt; 0:
-    -qcov_hsp_perc $adv_opts.qcov_hsp_perc
+<!--Tokens-->
+    <token name="@ADV_MATRIX_GAPCOSTS@"><![CDATA[
+#if str($adv_opts.matrix_gapcosts.matrix):
+    -matrix '${adv_opts.matrix_gapcosts.matrix}'
+    ${adv_opts.matrix_gapcosts.gap_costs}
 #end if
-    </token>
-    <token name="@ADV_ID_LIST_FILTER@">
+    ]]></token>
+
+    <token name="@ADV_QCOV_HSP_PERC@"><![CDATA[
+#if float(str($adv_opts.qcov_hsp_perc)) > 0:
+    -qcov_hsp_perc '${adv_opts.qcov_hsp_perc}'
+#end if
+    ]]></token>
+
+    <token name="@ADV_ID_LIST_FILTER@"><![CDATA[
 #if $adv_opts.adv_optional_id_files_opts.adv_optional_id_files_opts_selector == 'negative_gilist':
-    -negative_gilist $adv_opts.adv_optional_id_files_opts.negative_gilist
+    -negative_gilist '${adv_opts.adv_optional_id_files_opts.negative_gilist}'
 #elif $adv_opts.adv_optional_id_files_opts.adv_optional_id_files_opts_selector == 'gilist':
-    -gilist $adv_opts.adv_optional_id_files_opts.gilist
+    -gilist '{$adv_opts.adv_optional_id_files_opts.gilist}'
 #elif $adv_opts.adv_optional_id_files_opts.adv_optional_id_files_opts_selector == 'seqidlist':
-    -seqidlist $adv_opts.adv_optional_id_files_opts.seqidlist
+    -seqidlist '${adv_opts.adv_optional_id_files_opts.seqidlist}'
 #end if
-    </token>
+    ]]></token>
+
     <token name="@THREADS@">-num_threads "\${GALAXY_SLOTS:-8}"</token>
-    <token name="@BLAST_DB_SUBJECT@">
+
+    <token name="@BLAST_DB_SUBJECT@"><![CDATA[
 #if $db_opts.db_opts_selector == "db":
   -db '${" ".join(str($db_opts.database.fields.path).split(","))}'
 #elif $db_opts.db_opts_selector == "histdb":
   -db '${os.path.join($db_opts.histdb.extra_files_path, "blastdb")}'
 #else:
-  -subject '$db_opts.subject'
+    #if $db_opts.subject.is_of_type('fasta.gz'):
+        -subject <(gunzip -c '${$db_opts.subject}')
+    #else:
+        -subject '${db_opts.subject}'
+    #end if
 #end if
-    </token>
-    <token name="@BLAST_OUTPUT@">-out '$output1'
+    ]]></token>
+
+    <token name="@BLAST_OUTPUT@"><![CDATA[ -out '$output1'
 ##Set the extended list here so when we add things, saved workflows are not affected
 #if str($output.out_format)=="ext":
     -outfmt '6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles'
@@ -359,61 +583,102 @@
     -outfmt '6 $cols'
 #else:
 ## Note do not quote this as can be '0 -html' which is really two arguments
-    -outfmt $output.out_format
+    -outfmt ${output.out_format}
 #end if
-    </token>
+    ]]></token>
     <token name="@ADV_FILTER_QUERY@">$adv_opts.filter_query</token>
-    <token name="@ADV_MAX_HITS@">
+    <token name="@ADV_MAX_HITS@"><![CDATA[
 ## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
 ## Note -max_target_seqs used to simply override -num_descriptions and -num_alignments
 ## but this was changed in BLAST+ 2.2.27 onwards to force their use (raised with NCBI)
 #if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
     #if str($output.out_format) in ["6", "ext", "cols", "5"]:
         ## Most output formats use this, including tabular and XML:
-        -max_target_seqs $adv_opts.max_hits
+        -max_target_seqs '${adv_opts.max_hits}'
     #else
         ## Text and HTML output formats 0-4 currently need this instead:
         -num_descriptions $adv_opts.max_hits -num_alignments $adv_opts.max_hits
     #end if
 #end if
 #if str($adv_opts.max_hsps)
-    -max_hsps $adv_opts.max_hsps
+    -max_hsps '${adv_opts.max_hsps}'
 #end if
-    </token>
-    <token name="@ADV_WORD_SIZE@">
-#if (str($adv_opts.word_size) and int(str($adv_opts.word_size)) > 0):
--word_size $adv_opts.word_size
+    ]]></token>
+    <token name="@ADV_WORD_SIZE@"><![CDATA[
+#if str($adv_opts.word_size):
+-word_size '${adv_opts.word_size}'
 #end if
 $adv_opts.parse_deflines
-    </token>
+    ]]></token>
+    <token name="@ADV_WINDOW_SIZE@"><![CDATA[
+#if str($adv_opts.window_size):
+-window_size '${adv_opts.window_size}'
+#end if
+    ]]></token>
+
+    <token name="@ADV_THRESHOLD@"><![CDATA[
+#if str($adv_opts.threshold):
+-threshold '${adv_opts.threshold}'
+#end if
+    ]]></token>
+
+    <token name="@ADV_COMP_BASED_STATS@"><![CDATA[
+#if str($adv_opts.comp_based_stats):
+-comp_based_stats '${adv_opts.comp_based_stats}'
+#end if
+    ]]></token>
+
+    <token name="@ADV_GAPOPEN@"><![CDATA[
+#if str($adv_opts.gapopen):
+-gapopen '${adv_opts.gapopen}'
+#end if
+    ]]></token>
+
+    <token name="@ADV_GAPEXTEND@"><![CDATA[
+#if str($adv_opts.gapextend):
+-gapextend '${adv_opts.gapextend}'
+#end if
+    ]]></token>
+
+    <token name="@ADV_MATRIX@"><![CDATA[
+#if str($adv_opts.matrix):
+-matrix '${adv_opts.matrix}'
+#end if
+    ]]></token>
+
     <!-- @ON_DB_SUBJECT@ is for use with @BLAST_DB_SUBJECT@ -->
-    <token name="@ON_DB_SUBJECT@">#if str($db_opts.db_opts_selector)=='db'
+    <token name="@ON_DB_SUBJECT@"><![CDATA[
+#if str($db_opts.db_opts_selector)=='db'
 '${db_opts.database}'
 #elif str($db_opts.db_opts_selector)=='histdb'
 '${db_opts.histdb.name}'
 #else
 '${db_opts.subject.name}'
-#end if</token>
-    <token name="@REFERENCES@">
+#end if
+]]></token>
+
+    <token name="@REFERENCES@"><![CDATA[
 Peter J. A. Cock, John M. Chilton, Björn Grüning, James E. Johnson, Nicola Soranzo (2015).
 NCBI BLAST+ integrated into Galaxy. *GigaScience* 4:39
-http://dx.doi.org/10.1186/s13742-015-0080-7
+https://doi.org/10.1186/s13742-015-0080-7
 
 Christiam Camacho et al. (2009).
 BLAST+: architecture and applications.
 *BMC Bioinformatics* 15;10:421.
-http://dx.doi.org/10.1186/1471-2105-10-421
+https://doi.org/10.1186/1471-2105-10-421
 
 This wrapper is available to install into other Galaxy Instances via the Galaxy
 Tool Shed at http://toolshed.g2.bx.psu.edu/view/devteam/ncbi_blast_plus
-    </token>
+    ]]></token>
     <xml name="blast_citations">
         <citations>
+            <citation type="doi">10.1093/nar/25.17.3389</citation>
             <citation type="doi">10.1186/1471-2105-10-421</citation>
             <citation type="doi">10.1186/s13742-015-0080-7</citation>
         </citations>
     </xml>
-    <token name="@OUTPUT_FORMAT@">**Output format**
+    <token name="@OUTPUT_FORMAT@"><![CDATA[
+**Output format**
 
 Because Galaxy focuses on processing tabular data, the default output of this
 tool is tabular. The standard BLAST+ tabular output contains 12 columns:
@@ -421,8 +686,8 @@
 ====== ========= ============================================
 Column NCBI name Description
 ------ --------- --------------------------------------------
-     1 qseqid    Query Seq-id (ID of your sequence)
-     2 sseqid    Subject Seq-id (ID of the database hit)
+     1 qaccver   Query accession dot version
+     2 saccver   Subject accession dot version (database hit)
      3 pident    Percentage of identical matches
      4 length    Alignment length
      5 mismatch  Number of mismatches
@@ -435,6 +700,12 @@
     12 bitscore  Bit score
 ====== ========= ============================================
 
+Until BLAST+ 2.5.0, the first two columns were ``qseqid`` and ``sseqid``,
+which were usually strings contained multiple pipe-separated entries.
+In BLAST+ 2.5.0, the first two columns became ``qacc`` and ``sacc``
+(accesion only), while in BLAST+ 2.6.0 this was changed again to use
+``qaccver`` and ``saccver`` (accession dot version).
+
 The BLAST+ tools can optionally output additional columns of information,
 but this takes longer to calculate. Many commonly used extra columns are
 included by selecting the extended tabular output. The extra columns are
@@ -457,7 +728,7 @@
     22 sseq          Aligned part of subject sequence
     23 qlen          Query sequence length
     24 slen          Subject sequence length
-    25 salltitles    All subject title(s), separated by a '&lt;&gt;'
+    25 salltitles    All subject title(s), separated by a '<>'
 ====== ============= ===========================================
 
 The third option is to customise the tabular output by selecting which
@@ -472,8 +743,9 @@
 The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query.
 The two query anchored outputs show a multiple sequence alignment between the query and all the matches,
 and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences).
-    </token>
-    <token name="@FASTA_WARNING@">.. class:: warningmark
+    ]]></token>
+    <token name="@FASTA_WARNING@"><![CDATA[
+.. class:: warningmark
 
 You can also search against a FASTA file of subject (target)
 sequences. This is *not* advised because it is slower (only one
@@ -481,12 +753,26 @@
 searches (very small e-values which will look overly signficiant).
 In most cases you should instead turn the other FASTA file into a
 database first using *makeblastdb* and search against that.
-    </token>
-    <token name="@SEARCH_TIME_WARNING@">.. class:: warningmark
+    ]]></token>
+    <token name="@SEARCH_TIME_WARNING@"><![CDATA[
+.. class:: warningmark
 
 **Note**. Database searches may take a substantial amount of time.
 For large input datasets it is advisable to allow overnight processing.
 
 -----
-    </token>
+    ]]></token>
+    <token name="@CLI_OPTIONS@"><![CDATA[
+**Advanced Options**
+
+For help with advanced options and their default values, visit the
+NCBI BLAST® Command Line Applications User Manual, Appendices,
+`Options for the command-line applications
+<https://www.ncbi.nlm.nih.gov/books/NBK279684/#_appendices_Options_for_the_commandline_a_>`_.
+
+For amino acid substitution matrices, see `BLAST Substitution Matrices
+<https://www.ncbi.nlm.nih.gov/books/NBK279684/#_appendices_BLAST_Substitution_Matrices_>`_ in the same
+appendices.
+
+    ]]></token>
 </macros>
--- a/tools/ncbi_blast_plus/ncbi_makeblastdb.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_makeblastdb.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -5,21 +5,30 @@
         <import>ncbi_macros.xml</import>
     </macros>
     <expand macro="preamble" />
-    <command detect_errors="aggressive" strict="true">
+    <command detect_errors="aggressive" strict="true"><![CDATA[
 python $__tool_directory__/check_no_duplicates.py
 ##First check for duplicates (since BLAST+ 2.2.28 fails to do so)
 ##and abort (via the ampersand ampersand trick) if any are found.
 #for i in $input_file#'${i}' #end for#
-&amp;&amp;
-makeblastdb -out '${os.path.join($outfile.files_path, "blastdb")}'
+&&
+##makeblastdb does not like input redirects of the sort
+##makeblastdb -in <(gunzip -c gzipped_fasta_file)
+##therefore we're cramming everything
+##into a single cat command below
+cat
+#for i in $input_file:
+    #if $i.is_of_type('fasta.gz'):
+        <(gunzip -c ${i})
+    #else:
+        ${i}
+    #end if
+#end for
+| makeblastdb -out '${os.path.join($outfile.files_path, "blastdb")}'
 $parse_seqids
 $hash_index
-## Single call to -in with multiple filenames space separated with outer quotes
-## (presumably any filenames with spaces would be a problem). Note this gives
-## some extra spaces, e.g. -in "file1 file2 file3 " but BLAST seems happy:
--in '#for i in $input_file#${i} #end for#'
+-in -
 #if $title:
--title '$title'
+-title '${title}'
 #else:
 ##Would default to being based on the cryptic Galaxy filenames, which is unhelpful
 -title 'BLAST Database'
@@ -46,8 +55,8 @@
 #end if
 ## --------------------------------------------------------------------
 ## Capture the stdout log information to the primary file (plain text):
-&gt; "$outfile"
-    </command>
+> '$outfile'
+    ]]></command>
     <inputs>
         <param argument="-dbtype" type="select" display="radio" label="Molecule type of input">
             <option value="prot">protein</option>
@@ -57,7 +66,7 @@
              NOTE Double check the new database would be self contained first
         -->
         <!-- Note this is a mandatory parameter - default should be most recent FASTA file -->
-        <param name="input_file" argument="-in" type="data" multiple="true" optional="false" format="fasta" label="Input FASTA files(s)" help="One or more FASTA files" />
+        <param name="input_file" argument="-in" type="data" multiple="true" optional="false" format="fasta,fasta.gz" label="Input FASTA files(s)" help="One or more FASTA files" />
         <param argument="-title" type="text" value="" label="Title for BLAST database" help="This is the database name shown in BLAST search output" />
         <param argument="-parse_seqids" type="boolean" truevalue="-parse_seqids" falsevalue="" checked="false" label="Parse the sequence identifiers" help="This is only advised if your FASTA file follows the NCBI naming conventions using pipe '|' symbols" />
         <param argument="-hash_index" type="boolean" truevalue="-hash_index" falsevalue="" checked="true" label="Enable the creation of sequence hash values" help="These hash values can then be used to quickly determine if a given sequence data exists in this BLAST database." />
@@ -110,7 +119,7 @@
             <param name="hash_index" value="true" />
             <output name="outfile" compare="contains" file="four_human_proteins.fasta.log.txt" ftype="blastdbp">
                 <extra_files type="file" value="four_human_proteins.fasta.phr" name="blastdb.phr" />
-                <extra_files type="file" value="four_human_proteins.fasta.pin" name="blastdb.pin" lines_diff="2" />
+                <extra_files type="file" value="four_human_proteins.fasta.pin" name="blastdb.pin" compare="sim_size" delta="0" />
                 <extra_files type="file" value="four_human_proteins.fasta.psq" name="blastdb.psq" />
                 <extra_files type="file" value="four_human_proteins.fasta.pog" name="blastdb.pog" />
                 <extra_files type="file" value="four_human_proteins.fasta.phd" name="blastdb.phd" />
@@ -129,7 +138,7 @@
             <param name="taxid" value="9606" />
             <output name="outfile" compare="contains" file="four_human_proteins_taxid.fasta.log.txt" ftype="blastdbp">
                 <extra_files type="file" value="four_human_proteins_taxid.fasta.phr" name="blastdb.phr" />
-                <extra_files type="file" value="four_human_proteins_taxid.fasta.pin" name="blastdb.pin" lines_diff="2" />
+                <extra_files type="file" value="four_human_proteins_taxid.fasta.pin" name="blastdb.pin" compare="sim_size" delta="0" />
                 <extra_files type="file" value="four_human_proteins_taxid.fasta.psq" name="blastdb.psq" />
                 <extra_files type="file" value="four_human_proteins_taxid.fasta.pog" name="blastdb.pog" />
                 <extra_files type="file" value="four_human_proteins_taxid.fasta.phd" name="blastdb.phd" />
@@ -147,7 +156,7 @@
             <param name="mask_data_file" value="segmasker_four_human.maskinfo-asn1" ftype="maskinfo-asn1" />
             <output name="outfile" compare="contains" file="four_human_proteins.fasta.log.txt" ftype="blastdbp">
                 <extra_files type="file" value="four_human_proteins.fasta.phr" name="blastdb.phr" />
-                <extra_files type="file" value="four_human_proteins.fasta.pin" name="blastdb.pin" lines_diff="2" />
+                <extra_files type="file" value="four_human_proteins.fasta.pin" name="blastdb.pin" compare="sim_size" delta="0" />
                 <extra_files type="file" value="four_human_proteins.fasta.psq" name="blastdb.psq" />
                 <extra_files type="file" value="four_human_proteins.fasta.pog" name="blastdb.pog" />
                 <extra_files type="file" value="four_human_proteins.fasta.phd" name="blastdb.phd" />
@@ -158,7 +167,7 @@
         </test>
         <test>
             <param name="dbtype" value="nucl" />
-            <param name="input_file" value="three_human_mRNA.fasta" ftype="fasta" />
+            <param name="input_file" value="three_human_mRNA.fasta.gz" ftype="fasta.gz" />
             <param name="title" value="Just 3 human mRNA sequences" />
             <param name="parse_seqids" value="" />
             <param name="hash_index" value="true" />
@@ -166,7 +175,7 @@
             <param name="taxid" value="9606" />
             <output name="outfile" compare="contains" file="three_human_mRNA.fasta.log.txt" ftype="blastdbn">
                 <extra_files type="file" value="three_human_mRNA.fasta.nhr" name="blastdb.nhr" />
-                <extra_files type="file" value="three_human_mRNA.fasta.nin" name="blastdb.nin" lines_diff="2" />
+                <extra_files type="file" value="three_human_mRNA.fasta.nin" name="blastdb.nin" compare="sim_size" delta="8" />
                 <extra_files type="file" value="three_human_mRNA.fasta.nsq" name="blastdb.nsq" />
                 <extra_files type="file" value="three_human_mRNA.fasta.nog" name="blastdb.nog" />
                 <extra_files type="file" value="three_human_mRNA.fasta.nhd" name="blastdb.nhd" />
@@ -184,15 +193,16 @@
 This is a wrapper for the NCBI BLAST+ tool 'makeblastdb', which is the
 replacement for the 'formatdb' tool in the NCBI 'legacy' BLAST suite.
 
+More information about makeblastdb can be found in the `BLAST Command Line Applications User Manual`_.
+
+.. _BLAST Command Line Applications User Manual: https://www.ncbi.nlm.nih.gov/books/NBK279690/
+
+
 <!--
 Applying masks to an existing BLAST database will not change the original database; a new database will be created.
 For this reason, it's best to apply all masks at once to minimize the number of unnecessary intermediate databases.
 -->
 
-**Documentation**
-
-https://www.ncbi.nlm.nih.gov/books/NBK279690/
-
 **References**
 
 If you use this Galaxy tool in work leading to a scientific publication please
--- a/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -23,6 +23,7 @@
 @ADV_FILTER_QUERY@
 @ADV_MAX_HITS@
 @ADV_QCOV_HSP_PERC@
+@ADV_WINDOW_SIZE@
 ## End of advanced options:
 #end if
     </command>
@@ -41,6 +42,7 @@
             <expand macro="input_max_hits" />
             <expand macro="input_parse_deflines" />
             <expand macro="input_qcov_hsp_perc" />
+            <expand macro="input_window_size" />
         </expand>
     </inputs>
     <outputs>
@@ -73,15 +75,15 @@
 (PSSMs) and are available for a number of domain collections including:
 
 *CDD* - NCBI curarated meta-collection of domains, see
-http://www.ncbi.nlm.nih.gov/Structure/cdd/cdd_help.shtml#NCBI_curated_domains
+https://www.ncbi.nlm.nih.gov/Structure/cdd/cdd_help.shtml#NCBI_curated_domains
 
 *Kog* - PSSMs from automatically aligned sequences and sequence
 fragments classified in the KOGs resource, the eukaryotic
-counterpart to COGs, see http://www.ncbi.nlm.nih.gov/COG/
+counterpart to COGs, see https://www.ncbi.nlm.nih.gov/COG/
 
 *Cog* - PSSMs from automatically aligned sequences and sequence
 fragments classified in the COGs resource, which focuses primarily
-on prokaryotes, see http://www.ncbi.nlm.nih.gov/COG/
+on prokaryotes, see https://www.ncbi.nlm.nih.gov/COG/
 
 *Pfam* - PSSMs from Pfam-A seed alignment database, see
 http://xfam.org/
@@ -90,11 +92,11 @@
 http://smart.embl-heidelberg.de/
 
 *Tigr* - PSSMs from TIGRFAM database of protein families, see
-http://www.jcvi.org/cms/research/projects/tigrfams/overview/
+ftp://ftp.jcvi.org/pub/data/TIGRFAMs/
 
 *Prk* - PSSms from automatically aligned stable clusters in the
 Protein Clusters database, see
-http://www.ncbi.nlm.nih.gov/proteinclusters?cmd=search&amp;db=proteinclusters
+https://www.ncbi.nlm.nih.gov/proteinclusters?cmd=search&amp;db=proteinclusters
 
 The exact list of domain databases offered will depend on how your
 local Galaxy has been configured.
@@ -105,6 +107,10 @@
 
 -------
 
+@CLI_OPTIONS@
+
+-------
+
 **References**
 
 If you use this Galaxy tool in work leading to a scientific publication please
--- a/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -73,15 +73,15 @@
 (PSSMs) and are available for a number of domain collections including:
 
 *CDD* - NCBI curarated meta-collection of domains, see
-http://www.ncbi.nlm.nih.gov/Structure/cdd/cdd_help.shtml#NCBI_curated_domains
+https://www.ncbi.nlm.nih.gov/Structure/cdd/cdd_help.shtml#NCBI_curated_domains
 
 *Kog* - PSSMs from automatically aligned sequences and sequence
 fragments classified in the KOGs resource, the eukaryotic
-counterpart to COGs, see http://www.ncbi.nlm.nih.gov/COG/
+counterpart to COGs, see https://www.ncbi.nlm.nih.gov/COG/
 
 *Cog* - PSSMs from automatically aligned sequences and sequence
 fragments classified in the COGs resource, which focuses primarily
-on prokaryotes, see http://www.ncbi.nlm.nih.gov/COG/
+on prokaryotes, see https://www.ncbi.nlm.nih.gov/COG/
 
 *Pfam* - PSSMs from Pfam-A seed alignment database, see
 http://xfam.org/
@@ -90,11 +90,11 @@
 http://smart.embl-heidelberg.de/
 
 *Tigr* - PSSMs from TIGRFAM database of protein families, see
-http://www.jcvi.org/cms/research/projects/tigrfams/overview/
+ftp://ftp.jcvi.org/pub/data/TIGRFAMs/
 
 *Prk* - PSSms from automatically aligned stable clusters in the
 Protein Clusters database, see
-http://www.ncbi.nlm.nih.gov/proteinclusters?cmd=search&amp;db=proteinclusters
+https://www.ncbi.nlm.nih.gov/proteinclusters?cmd=search&amp;db=proteinclusters
 
 The exact list of domain databases offered will depend on how your
 local Galaxy has been configured.
@@ -105,6 +105,10 @@
 
 -------
 
+@CLI_OPTIONS@
+
+-------
+
 **References**
 
 If you use this Galaxy tool in work leading to a scientific publication please
--- a/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -88,7 +88,7 @@
 More information about segmasker can be found in the `BLAST Command Line Applications User Manual`_.
 
 .. _BLAST Command Line Applications User Manual: https://www.ncbi.nlm.nih.gov/books/NBK279690/
-.. _SEG: http://www.ncbi.nlm.nih.gov/pubmed/8743706
+.. _SEG: https://www.ncbi.nlm.nih.gov/pubmed/8743706
 
 **References**
 
--- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -18,14 +18,17 @@
 @THREADS@
 #if $adv_opts.adv_opts_selector=="advanced":
 -db_gencode $adv_opts.db_gencode
--matrix $adv_opts.matrix
 @ADV_FILTER_QUERY@
 @ADV_MAX_HITS@
 @ADV_WORD_SIZE@
+@ADV_MATRIX_GAPCOSTS@
 ##Ungapped disabled for now - see comments below
 ##$adv_opts.ungapped
 @ADV_ID_LIST_FILTER@
 @ADV_QCOV_HSP_PERC@
+@ADV_WINDOW_SIZE@
+@ADV_THRESHOLD@
+@ADV_COMP_BASED_STATS@
 ## End of advanced options:
 #end if
     </command>
@@ -44,7 +47,7 @@
 
             <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' -->
             <expand macro="input_filter_query_default_true" />
-            <expand macro="input_scoring_matrix" />
+            <expand macro="input_matrix_gapcosts" />
             <expand macro="input_max_hits" />
             <expand macro="input_word_size" />
             <!--
@@ -56,6 +59,9 @@
             <expand macro="input_parse_deflines" />
             <expand macro="advanced_optional_id_files" />
             <expand macro="input_qcov_hsp_perc" />
+            <expand macro="input_window_size" />
+            <expand macro="input_threshold" />
+            <expand macro="input_comp_based_stats" />
         </expand>
     </inputs>
     <outputs>
@@ -75,7 +81,7 @@
             <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM80" />
             <param name="max_hits" value="0" />
-            <param name="word_size" value="0" />
+            <param name="word_size" value="" />
             <param name="parse_deflines" value="false" />
             <output name="output1" file="tblastn_four_human_vs_rhodopsin.xml" ftype="blastxml" />
         </test>
@@ -90,7 +96,7 @@
             <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM80" />
             <param name="max_hits" value="0" />
-            <param name="word_size" value="0" />
+            <param name="word_size" value="" />
             <param name="parse_deflines" value="false" />
             <output name="output1" file="tblastn_four_human_vs_rhodopsin_ext.tabular" ftype="tabular" />
         </test>
@@ -105,7 +111,7 @@
             <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM80" />
             <param name="max_hits" value="0" />
-            <param name="word_size" value="0" />
+            <param name="word_size" value="" />
             <param name="parse_deflines" value="false" />
             <output name="output1" file="tblastn_four_human_vs_rhodopsin.tabular" ftype="tabular" />
         </test>
@@ -122,7 +128,7 @@
             <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM80" />
             <param name="max_hits" value="0" />
-            <param name="word_size" value="0" />
+            <param name="word_size" value="" />
             <param name="parse_deflines" value="true" />
             <output name="output1" file="tblastn_four_human_vs_rhodopsin_deflines.tabular" ftype="tabular" />
         </test>
@@ -138,7 +144,7 @@
             <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM80" />
             <param name="max_hits" value="0" />
-            <param name="word_size" value="0" />
+            <param name="word_size" value="" />
             <param name="parse_deflines" value="false" />
             <output name="output1" file="tblastn_four_human_vs_rhodopsin.html" ftype="html" lines_diff="8" />
         </test>
@@ -154,11 +160,15 @@
 
 @FASTA_WARNING@
 
------
+------
 
 @OUTPUT_FORMAT@
 
--------
+------
+
+@CLI_OPTIONS
+
+------
 
 **References**
 
--- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -17,14 +17,15 @@
 @BLAST_OUTPUT@
 @THREADS@
 #if $adv_opts.adv_opts_selector=="advanced":
--db_gencode $adv_opts.db_gencode
-$adv_opts.strand
--matrix $adv_opts.matrix
-@ADV_FILTER_QUERY@
-@ADV_MAX_HITS@
-@ADV_WORD_SIZE@
-@ADV_ID_LIST_FILTER@
-@ADV_QCOV_HSP_PERC@
+    -db_gencode $adv_opts.db_gencode
+    $adv_opts.strand
+    @ADV_MATRIX@
+    @ADV_FILTER_QUERY@
+    @ADV_MAX_HITS@
+    @ADV_WORD_SIZE@
+    @ADV_ID_LIST_FILTER@
+    @ADV_QCOV_HSP_PERC@
+    @ADV_THRESHOLD@
 ## End of advanced options:
 #end if
     </command>
@@ -49,6 +50,7 @@
             <expand macro="input_parse_deflines" />
             <expand macro="advanced_optional_id_files" />
             <expand macro="input_qcov_hsp_perc" />
+            <expand macro="input_threshold" />
         </expand>
     </inputs>
     <outputs>
@@ -85,6 +87,10 @@
 
 -------
 
+@CLI_OPTIONS@
+
+-------
+
 **References**
 
 If you use this Galaxy tool in work leading to a scientific publication please