Repository 'blastxml_to_top_descr'
hg clone https://testtoolshed.g2.bx.psu.edu/repos/peterjc/blastxml_to_top_descr

Changeset 15:60d0c6c1a71f (2017-02-03)
Previous changeset 14:b46c041afbe4 (2015-05-15) Next changeset 16:6ade4e7c63b3 (2017-02-09)
Commit message:
planemo upload for repository https://github.com/peterjc/galaxy_blast/tree/master/tools/blastxml_to_top_descr commit 3f6b5c953d522a724bbcd403bcb86f1e2757a556-dirty
modified:
test-data/blastp_four_human_vs_rhodopsin.xml
test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular
test-data/blastp_four_human_vs_rhodopsin_top3.tabular
test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular
tools/blastxml_to_top_descr/README.rst
tools/blastxml_to_top_descr/blastxml_to_top_descr.py
tools/blastxml_to_top_descr/repository_dependencies.xml
b
diff -r b46c041afbe4 -r 60d0c6c1a71f test-data/blastp_four_human_vs_rhodopsin.xml
--- a/test-data/blastp_four_human_vs_rhodopsin.xml Fri May 15 05:56:41 2015 -0400
+++ b/test-data/blastp_four_human_vs_rhodopsin.xml Fri Feb 03 12:38:33 2017 -0500
[
b'@@ -2,10 +2,10 @@\n <!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd">\n <BlastOutput>\n   <BlastOutput_program>blastp</BlastOutput_program>\n-  <BlastOutput_version>BLASTP 2.2.30+</BlastOutput_version>\n+  <BlastOutput_version>BLASTP 2.5.0+</BlastOutput_version>\n   <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>\n   <BlastOutput_db></BlastOutput_db>\n-  <BlastOutput_query-ID>sp|Q9BS26|ERP44_HUMAN</BlastOutput_query-ID>\n+  <BlastOutput_query-ID>Q9BS26</BlastOutput_query-ID>\n   <BlastOutput_query-def>Endoplasmic reticulum resident protein 44 OS=Homo sapiens GN=ERP44 PE=1 SV=1</BlastOutput_query-def>\n   <BlastOutput_query-len>406</BlastOutput_query-len>\n   <BlastOutput_param>\n@@ -20,7 +20,7 @@\n <BlastOutput_iterations>\n <Iteration>\n   <Iteration_iter-num>1</Iteration_iter-num>\n-  <Iteration_query-ID>sp|Q9BS26|ERP44_HUMAN</Iteration_query-ID>\n+  <Iteration_query-ID>Q9BS26</Iteration_query-ID>\n   <Iteration_query-def>Endoplasmic reticulum resident protein 44 OS=Homo sapiens GN=ERP44 PE=1 SV=1</Iteration_query-def>\n   <Iteration_query-len>406</Iteration_query-len>\n <Iteration_hits>\n@@ -29,8 +29,8 @@\n     <Statistics>\n       <Statistics_db-num>0</Statistics_db-num>\n       <Statistics_db-len>0</Statistics_db-len>\n-      <Statistics_hsp-len>30</Statistics_hsp-len>\n-      <Statistics_eff-space>119568</Statistics_eff-space>\n+      <Statistics_hsp-len>42</Statistics_hsp-len>\n+      <Statistics_eff-space>657748</Statistics_eff-space>\n       <Statistics_kappa>0.041</Statistics_kappa>\n       <Statistics_lambda>0.267</Statistics_lambda>\n       <Statistics_entropy>0.14</Statistics_entropy>\n@@ -40,17 +40,17 @@\n </Iteration>\n <Iteration>\n   <Iteration_iter-num>2</Iteration_iter-num>\n-  <Iteration_query-ID>sp|Q9BS26|ERP44_HUMAN</Iteration_query-ID>\n-  <Iteration_query-def>Endoplasmic reticulum resident protein 44 OS=Homo sapiens GN=ERP44 PE=1 SV=1</Iteration_query-def>\n-  <Iteration_query-len>406</Iteration_query-len>\n+  <Iteration_query-ID>Q9NSY1</Iteration_query-ID>\n+  <Iteration_query-def>BMP-2-inducible protein kinase OS=Homo sapiens GN=BMP2K PE=1 SV=2</Iteration_query-def>\n+  <Iteration_query-len>1161</Iteration_query-len>\n <Iteration_hits>\n </Iteration_hits>\n   <Iteration_stat>\n     <Statistics>\n       <Statistics_db-num>0</Statistics_db-num>\n       <Statistics_db-len>0</Statistics_db-len>\n-      <Statistics_hsp-len>30</Statistics_hsp-len>\n-      <Statistics_eff-space>119568</Statistics_eff-space>\n+      <Statistics_hsp-len>50</Statistics_hsp-len>\n+      <Statistics_eff-space>1954249</Statistics_eff-space>\n       <Statistics_kappa>0.041</Statistics_kappa>\n       <Statistics_lambda>0.267</Statistics_lambda>\n       <Statistics_entropy>0.14</Statistics_entropy>\n@@ -60,17 +60,17 @@\n </Iteration>\n <Iteration>\n   <Iteration_iter-num>3</Iteration_iter-num>\n-  <Iteration_query-ID>sp|Q9BS26|ERP44_HUMAN</Iteration_query-ID>\n-  <Iteration_query-def>Endoplasmic reticulum resident protein 44 OS=Homo sapiens GN=ERP44 PE=1 SV=1</Iteration_query-def>\n-  <Iteration_query-len>406</Iteration_query-len>\n+  <Iteration_query-ID>P06213</Iteration_query-ID>\n+  <Iteration_query-def>Insulin receptor OS=Homo sapiens GN=INSR PE=1 SV=4</Iteration_query-def>\n+  <Iteration_query-len>1382</Iteration_query-len>\n <Iteration_hits>\n </Iteration_hits>\n   <Iteration_stat>\n     <Statistics>\n       <Statistics_db-num>0</Statistics_db-num>\n       <Statistics_db-len>0</Statistics_db-len>\n-      <Statistics_hsp-len>30</Statistics_hsp-len>\n-      <Statistics_eff-space>119568</Statistics_eff-space>\n+      <Statistics_hsp-len>51</Statistics_hsp-len>\n+      <Statistics_eff-space>2333243</Statistics_eff-space>\n       <Statistics_kappa>0.041</Statistics_kappa>\n       <'..b'    <Hsp_positive>336</Hsp_positive>\n+      <Hsp_identity>290</Hsp_identity>\n+      <Hsp_positive>322</Hsp_positive>\n       <Hsp_gaps>1</Hsp_gaps>\n-      <Hsp_align-len>348</Hsp_align-len>\n-      <Hsp_qseq>MNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVSKTETSQVAPA</Hsp_qseq>\n-      <Hsp_hseq>MNGTEGPNFYVPFSNKTGVVRSPFEAPQYYLAEPWQFSMLAAYMFLLIMLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLVGWSRYIPEGMQCSCGID-YTPHEETNNESFVIYMFVVHFIIPLIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWLPYAGVAFYIFTHQGSDFGPIFMTIPAFFAKTSAVYNPVIYIMMNKQFRNCMVTTLCCGKNPLGDDEASTTVSKTETSQVAPA</Hsp_hseq>\n-      <Hsp_midline>MNGTEGPNFYVPFSN TGVVRSPFE PQYYLAEPWQFSMLAAYMFLLI+LGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMV GGFT+TLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPL GWSRYIPEG+QCSCGID YT   E NNESFVIYMFVVHF IP+I+IFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICW+PYA VAFYIFTHQGS+FGPIFMTIPAFFAK++A+YNPVIYIMMNKQFRNCM+TT+CCGKNPLGDDEAS TVSKTETSQVAPA</Hsp_midline>\n+      <Hsp_align-len>342</Hsp_align-len>\n+      <Hsp_qseq>MNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEA-SATVSKTE</Hsp_qseq>\n+      <Hsp_hseq>MNGTEGPNFYIPMSNKTGVVRSPFEYPQYYLAEPWQYSILCAYMFLLILLGFPINFMTLYVTIQHKKLRTPLNYILLNLAFANHFMVLCGFTVTMYSSMNGYFILGATGCYVEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFSENHAVMGVAFTWIMALSCAVPPLLGWSRYIPEGMQCSCGVDYYTLKPEVNNESFVIYMFVVHFTIPLIIIFFCYGRLVCTVKEAAAQQQESATTQKAEKEVTRMVIIMVVFFLICWVPYASVAFFIFSNQGSEFGPIFMTVPAFFAKSSSIYNPVIYIMLNKQFRNCMITTLCCGKNPFGEDDASSAATSKTE</Hsp_hseq>\n+      <Hsp_midline>MNGTEGPNFY+P SN TGVVRSPFEYPQYYLAEPWQ+S+L AYMFLLI+LGFPINF+TLYVT+QHKKLRTPLNYILLNLA A+ FMVL GFT T+Y+S++GYF+ G TGC +EGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRF ENHA+MGVAFTW+MAL+CA PPL GWSRYIPEG+QCSCG+DYYTLKPEVNNESFVIYMFVVHFTIP+IIIFFCYG+LV TVKEAAAQQQESATTQKAEKEVTRMVIIMV+ FLICWVPYASVAF+IF++QGS FGPIFMT+PAFFAKS++IYNPVIYIM+NKQFRNCM+TT+CCGKNP G+D+A SA  SKTE</Hsp_midline>\n     </Hsp>\n   </Hit_hsps>\n </Hit>\n-</Iteration_hits>\n-  <Iteration_stat>\n-    <Statistics>\n-      <Statistics_db-num>0</Statistics_db-num>\n-      <Statistics_db-len>0</Statistics_db-len>\n-      <Statistics_hsp-len>29</Statistics_hsp-len>\n-      <Statistics_eff-space>101761</Statistics_eff-space>\n-      <Statistics_kappa>0.041</Statistics_kappa>\n-      <Statistics_lambda>0.267</Statistics_lambda>\n-      <Statistics_entropy>0.14</Statistics_entropy>\n-    </Statistics>\n-  </Iteration_stat>\n-</Iteration>\n-<Iteration>\n-  <Iteration_iter-num>24</Iteration_iter-num>\n-  <Iteration_query-ID>sp|P08100|OPSD_HUMAN</Iteration_query-ID>\n-  <Iteration_query-def>Rhodopsin OS=Homo sapiens GN=RHO PE=1 SV=1</Iteration_query-def>\n-  <Iteration_query-len>348</Iteration_query-len>\n-<Iteration_hits>\n <Hit>\n-  <Hit_num>1</Hit_num>\n+  <Hit_num>6</Hit_num>\n   <Hit_id>gi|12583665|dbj|BAB21486.1|</Hit_id>\n   <Hit_def>fresh water form rod opsin [Conger myriaster]</Hit_def>\n   <Hit_accession>BAB21486</Hit_accession>\n@@ -652,8 +257,8 @@\n     <Statistics>\n       <Statistics_db-num>0</Statistics_db-num>\n       <Statistics_db-len>0</Statistics_db-len>\n-      <Statistics_hsp-len>29</Statistics_hsp-len>\n-      <Statistics_eff-space>101761</Statistics_eff-space>\n+      <Statistics_hsp-len>41</Statistics_hsp-len>\n+      <Statistics_eff-space>556591</Statistics_eff-space>\n       <Statistics_kappa>0.041</Statistics_kappa>\n       <Statistics_lambda>0.267</Statistics_lambda>\n       <Statistics_entropy>0.14</Statistics_entropy>\n'
b
diff -r b46c041afbe4 -r 60d0c6c1a71f test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular
--- a/test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular Fri May 15 05:56:41 2015 -0400
+++ b/test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular Fri Feb 03 12:38:33 2017 -0500
[
b'@@ -1,6 +1,6 @@\n-sp|P08100|OPSD_HUMAN\tgi|57163783|ref|NP_001009242.1|\t96.55\t348\t12\t0\t1\t348\t1\t348\t0.0\t701\tgi|57163783|ref|NP_001009242.1|\t1808\t336\t343\t0\t98.56\t1\t1\tMNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVSKTETSQVAPA\tMNGTEGPNFYVPFSNKTGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTLPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTGSKTETSQVAPA\t348\t348\trhodopsin [Felis catus]\n-sp|P08100|OPSD_HUMAN\tgi|3024260|sp|P56514.1|OPSD_BUFBU\t84.80\t342\t51\t1\t1\t341\t1\t342\t0.0\t619\tgi|3024260|sp|P56514.1|OPSD_BUFBU\t1595\t290\t322\t1\t94.15\t1\t1\tMNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEA-SATVSKTE\tMNGTEGPNFYIPMSNKTGVVRSPFEYPQYYLAEPWQYSILCAYMFLLILLGFPINFMTLYVTIQHKKLRTPLNYILLNLAFANHFMVLCGFTVTMYSSMNGYFILGATGCYVEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFSENHAVMGVAFTWIMALSCAVPPLLGWSRYIPEGMQCSCGVDYYTLKPEVNNESFVIYMFVVHFTIPLIIIFFCYGRLVCTVKEAAAQQQESATTQKAEKEVTRMVIIMVVFFLICWVPYASVAFFIFSNQGSEFGPIFMTVPAFFAKSSSIYNPVIYIMLNKQFRNCMITTLCCGKNPFGEDDASSAATSKTE\t348\t354\tRecName: Full=Rhodopsin\n-sp|P08100|OPSD_HUMAN\tgi|283855846|gb|ADB45242.1|\t94.82\t328\t17\t0\t11\t338\t1\t328\t0.0\t653\tgi|283855846|gb|ADB45242.1|\t1684\t311\t321\t0\t97.87\t1\t1\tVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVS\tVPFSNKTGVVRSPFEHPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGLALTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWLPYAGVAFYIFTHQGSNFGPIFMTLPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS\t348\t328\trhodopsin [Cynopterus brachyotis]\n-sp|P08100|OPSD_HUMAN\tgi|283855823|gb|ADB45229.1|\t94.82\t328\t17\t0\t11\t338\t1\t328\t0.0\t631\tgi|283855823|gb|ADB45229.1|\t1627\t311\t323\t0\t98.48\t1\t1\tVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVS\tVPFSNKTGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVANLFMVFGGFTTTLYTSMHGYFVFGATGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGLAFTWVMALACAAPPLAGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVVAFLICWLPYASVAFYIFTHQGSNFGPVFMTIPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS\t348\t328\trhodopsin [Myotis pilosus]\n-sp|P08100|OPSD_HUMAN\tgi|223523|prf||0811197A\t93.10\t348\t23\t1\t1\t348\t1\t347\t0.0\t673\tgi|223523|prf||0811197A\t1736\t324\t336\t1\t96.55\t1\t1\tMNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVSKTETSQVAPA\tMNGTEGPNFYVPFSNKTGVVRSPFEAPQYYLAEPWQFSMLAAYMFLLIMLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFG'..b'YTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVSKTETSQVAPA\tMNGTEGPNFYVPFSNKTGVVRSPFEAPQYYLAEPWQFSMLAAYMFLLIMLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLVGWSRYIPEGMQCSCGID-YTPHEETNNESFVIYMFVVHFIIPLIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWLPYAGVAFYIFTHQGSDFGPIFMTIPAFFAKTSAVYNPVIYIMMNKQFRNCMVTTLCCGKNPLGDDEASTTVSKTETSQVAPA\t348\t347\trhodopsin [Bos taurus]\n+P08100\tgi|283855846|gb|ADB45242.1|\t94.817\t328\t17\t0\t11\t338\t1\t328\t0.0\t653\tgi|283855846|gb|ADB45242.1|\t1684\t311\t321\t0\t97.87\t1\t1\tVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVS\tVPFSNKTGVVRSPFEHPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGLALTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWLPYAGVAFYIFTHQGSNFGPIFMTLPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS\t348\t328\trhodopsin [Cynopterus brachyotis]\n+P08100\tgi|283855823|gb|ADB45229.1|\t94.817\t328\t17\t0\t11\t338\t1\t328\t0.0\t631\tgi|283855823|gb|ADB45229.1|\t1627\t311\t323\t0\t98.48\t1\t1\tVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEASATVS\tVPFSNKTGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVANLFMVFGGFTTTLYTSMHGYFVFGATGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGLAFTWVMALACAAPPLAGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVVAFLICWLPYASVAFYIFTHQGSNFGPVFMTIPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS\t348\t328\trhodopsin [Myotis pilosus]\n+P08100\tgi|3024260|sp|P56514.1|OPSD_BUFBU\t84.795\t342\t51\t1\t1\t341\t1\t342\t0.0\t619\tgi|3024260|sp|P56514.1|OPSD_BUFBU\t1595\t290\t322\t1\t94.15\t1\t1\tMNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPLGDDEA-SATVSKTE\tMNGTEGPNFYIPMSNKTGVVRSPFEYPQYYLAEPWQYSILCAYMFLLILLGFPINFMTLYVTIQHKKLRTPLNYILLNLAFANHFMVLCGFTVTMYSSMNGYFILGATGCYVEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFSENHAVMGVAFTWIMALSCAVPPLLGWSRYIPEGMQCSCGVDYYTLKPEVNNESFVIYMFVVHFTIPLIIIFFCYGRLVCTVKEAAAQQQESATTQKAEKEVTRMVIIMVVFFLICWVPYASVAFFIFSNQGSEFGPIFMTVPAFFAKSSSIYNPVIYIMLNKQFRNCMITTLCCGKNPFGEDDASSAATSKTE\t348\t354\tRecName: Full=Rhodopsin\n+P08100\tgi|12583665|dbj|BAB21486.1|\t82.164\t342\t60\t1\t1\t341\t1\t342\t0.0\t599\tgi|12583665|dbj|BAB21486.1|\t1544\t281\t314\t1\t91.81\t1\t1\tMNGTEGPNFYVPFSNATGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLAVADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFTWVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTTICCGKNPL-GDDEASATVSKTE\tMNGTEGPNFYIPMSNATGVVRSPFEYPQYYLAEPWAFSALSAYMFFLIIAGFPINFLTLYVTIEHKKLRTPLNYILLNLAVADLFMVFGGFTTTMYTSMHGYFVFGPTGCNIEGFFATLGGEIALWCLVVLAIERWMVVCKPVTNFRFGESHAIMGVMVTWTMALACALPPLFGWSRYIPEGLQCSCGIDYYTRAPGINNESFVIYMFTCHFSIPLAVISFCYGRLVCTVKEAAAQQQESETTQRAEREVTRMVVIMVISFLVCWVPYASVAWYIFTHQGSTFGPIFMTIPSFFAKSSALYNPMIYICMNKQFRHCMITTLCCGKNPFEEEDGASATSSKTE\t348\t354\tfresh water form rod opsin [Conger myriaster]\n'
b
diff -r b46c041afbe4 -r 60d0c6c1a71f test-data/blastp_four_human_vs_rhodopsin_top3.tabular
--- a/test-data/blastp_four_human_vs_rhodopsin_top3.tabular Fri May 15 05:56:41 2015 -0400
+++ b/test-data/blastp_four_human_vs_rhodopsin_top3.tabular Fri Feb 03 12:38:33 2017 -0500
[
@@ -1,5 +1,5 @@
 #Query BLAST hit 1 BLAST hit 2 BLAST hit 3
-sp|Q9BS26|ERP44_HUMAN
-sp|Q9NSY1|BMP2K_HUMAN
-sp|P06213|INSR_HUMAN
-sp|P08100|OPSD_HUMAN gi|57163783|ref|NP_001009242.1| rhodopsin [Felis catus] gi|3024260|sp|P56514.1|OPSD_BUFBU RecName: Full=Rhodopsin gi|283855846|gb|ADB45242.1| rhodopsin [Cynopterus brachyotis]
+Q9BS26
+Q9NSY1
+P06213
+P08100 gi|57163783|ref|NP_001009242.1| rhodopsin [Felis catus] gi|223523|prf||0811197A rhodopsin [Bos taurus] gi|283855846|gb|ADB45242.1| rhodopsin [Cynopterus brachyotis]
b
diff -r b46c041afbe4 -r 60d0c6c1a71f test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular
--- a/test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular Fri May 15 05:56:41 2015 -0400
+++ b/test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular Fri Feb 03 12:38:33 2017 -0500
[
@@ -1,2 +1,2 @@
 #Query BLAST hit 1 BLAST hit 2 BLAST hit 3
-sp|P08100|OPSD_HUMAN gi|57163783|ref|NP_001009242.1| rhodopsin [Felis catus] gi|3024260|sp|P56514.1|OPSD_BUFBU RecName: Full=Rhodopsin gi|283855846|gb|ADB45242.1| rhodopsin [Cynopterus brachyotis]
+P08100 gi|57163783|ref|NP_001009242.1| rhodopsin [Felis catus] gi|223523|prf||0811197A rhodopsin [Bos taurus] gi|283855846|gb|ADB45242.1| rhodopsin [Cynopterus brachyotis]
b
diff -r b46c041afbe4 -r 60d0c6c1a71f tools/blastxml_to_top_descr/README.rst
--- a/tools/blastxml_to_top_descr/README.rst Fri May 15 05:56:41 2015 -0400
+++ b/tools/blastxml_to_top_descr/README.rst Fri Feb 03 12:38:33 2017 -0500
b
@@ -96,12 +96,12 @@
 Planemo commands (which requires you have set your Tool Shed access details in
 ``~/.planemo.yml`` and that you have access rights on the Tool Shed)::
 
-    $ planemo shed_upload --shed_target testtoolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
+    $ planemo shed_update -t testtoolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
     ...
 
 or::
 
-    $ planemo shed_upload --shed_target toolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
+    $ planemo shed_update -t toolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
     ...
 
 To just build and check the tar ball, use::
b
diff -r b46c041afbe4 -r 60d0c6c1a71f tools/blastxml_to_top_descr/blastxml_to_top_descr.py
--- a/tools/blastxml_to_top_descr/blastxml_to_top_descr.py Fri May 15 05:56:41 2015 -0400
+++ b/tools/blastxml_to_top_descr/blastxml_to_top_descr.py Fri Feb 03 12:38:33 2017 -0500
[
@@ -15,16 +15,14 @@
     print "v0.1.1"
     sys.exit(0)
 
-if sys.version_info[:2] >= ( 2, 5 ):
+if sys.version_info[:2] >= (2, 5):
     import xml.etree.cElementTree as ElementTree
 else:
     from galaxy import eggs
-    import pkg_resources; pkg_resources.require( "elementtree" )
+    import pkg_resources
+    pkg_resources.require("elementtree")
     from elementtree import ElementTree
 
-def stop_err( msg ):
-    sys.stderr.write("%s\n" % msg)
-    sys.exit(1)
 
 usage = """Use as follows:
 
@@ -55,7 +53,7 @@
 (options, args) = parser.parse_args()
 
 if len(sys.argv) == 4 and len(args) == 3 and not options.out_file:
-    stop_err("""The API has changed, replace this:
+    sys.exit("""The API has changed, replace this:
 
 $ python blastxml_to_top_descr.py input.xml output.tab 3
 
@@ -67,9 +65,9 @@
 """)
 
 if not args:
-    stop_err("Input filename missing, try -h")
+    sys.exit("Input filename missing, try -h")
 if len(args) > 1:
-    stop_err("Expects a single argument, one input filename")
+    sys.exit("Expects a single argument, one input filename")
 in_file = args[0]
 out_file = options.out_file
 topN = options.topN
@@ -77,12 +75,12 @@
 try:
     topN = int(topN)
 except ValueError:
-    stop_err("Number of hits  argument should be an integer (at least 1)")
+    sys.exit("Number of hits  argument should be an integer (at least 1)")
 if topN < 1:
-    stop_err("Number of hits  argument should be an integer (at least 1)")
+    sys.exit("Number of hits  argument should be an integer (at least 1)")
 
 if not os.path.isfile(in_file):
-    stop_err("Missing input file: %r" % in_file)
+    sys.exit("Missing input file: %r" % in_file)
 
 
 def get_column(value):
@@ -92,11 +90,12 @@
         value = value[1:]
     try:
         col = int(value)
-    except:
-        stop_err("Expected an integer column number, not %r" % value)
+    except ValueError:
+        sys.exit("Expected an integer column number, not %r" % value)
     if col < 1:
-        stop_err("Expect column numbers to be at least one, not %r" % value)
-    return col - 1 # Python counting!
+        sys.exit("Expect column numbers to be at least one, not %r" % value)
+    return col - 1  # Python counting!
+
 
 def tabular_hits(in_file, qseqid, sseqid, salltitles):
     """Parse key data from tabular BLAST output.
@@ -126,6 +125,7 @@
         # Final query
         yield current_query, current_hits
 
+
 def blastxml_hits(in_file):
     """Parse key data from BLAST XML output.
 
@@ -133,19 +133,19 @@
     """
     try:
         context = ElementTree.iterparse(in_file, events=("start", "end"))
-    except:
+    except Exception:
         with open(in_file) as handle:
             header = handle.read(100)
-        stop_err("Invalid data format in XML file %r which starts: %r" % (in_file, header))
+        sys.exit("Invalid data format in XML file %r which starts: %r" % (in_file, header))
     # turn it into an iterator
     context = iter(context)
     # get the root element
     try:
         event, root = context.next()
-    except:
+    except Exception:
         with open(in_file) as handle:
             header = handle.read(100)
-        stop_err("Unable to get root element from XML file %r which starts: %r" % (in_file, header))
+        sys.exit("Unable to get root element from XML file %r which starts: %r" % (in_file, header))
 
     re_default_query_id = re.compile("^Query_\d+$")
     assert re_default_query_id.match("Query_101")
@@ -164,7 +164,8 @@
         if event == "end" and elem.tag == "Iteration":
             # Expecting either this, from BLAST 2.2.25+ using FASTA vs FASTA
             # <Iteration_query-ID>sp|Q9BS26|ERP44_HUMAN</Iteration_query-ID>
-            # <Iteration_query-def>Endoplasmic reticulum resident protein 44 OS=Homo sapiens GN=ERP44 PE=1 SV=1</Iteration_query-def>
+            # <Iteration_query-def>Endoplasmic reticulum resident protein 44
+            # OS=Homo sapiens GN=ERP44 PE=1 SV=1</Iteration_query-def>
             # <Iteration_query-len>406</Iteration_query-len>
             # <Iteration_hits></Iteration_hits>
             #
@@ -175,10 +176,10 @@
             # <Iteration_hits>...
             qseqid = elem.findtext("Iteration_query-ID")
             if qseqid is None:
-                stop_err("Missing <Iteration_query-ID> (could be really old BLAST XML data?)")
+                sys.exit("Missing <Iteration_query-ID> (could be really old BLAST XML data?)")
             if re_default_query_id.match(qseqid):
-                #Place holder ID, take the first word of the query definition
-                qseqid = elem.findtext("Iteration_query-def").split(None,1)[0]
+                # Place holder ID, take the first word of the query definition
+                qseqid = elem.findtext("Iteration_query-def").split(None, 1)[0]
             if current_query is None:
                 # First hit
                 current_query = qseqid
@@ -204,14 +205,13 @@
                 # <Hit_def>gi|57163783|ref|NP_001009242.1| rhodopsin [Felis catus]</Hit_def>
                 # <Hit_accession>Subject_1</Hit_accession>
                 #
-                #apparently depending on the parse_deflines switch
-                sseqid = hit.findtext("Hit_id").split(None,1)[0]
+                # apparently depending on the parse_deflines switch
+                sseqid = hit.findtext("Hit_id").split(None, 1)[0]
                 hit_def = sseqid + " " + hit.findtext("Hit_def")
-                if re_default_subject_id.match(sseqid) \
-                and sseqid == hit.findtext("Hit_accession"):
-                    #Place holder ID, take the first word of the subject definition
+                if re_default_subject_id.match(sseqid) and sseqid == hit.findtext("Hit_accession"):
+                    # Place holder ID, take the first word of the subject definition
                     hit_def = hit.findtext("Hit_def")
-                    sseqid = hit_def.split(None,1)[0]
+                    sseqid = hit_def.split(None, 1)[0]
                 assert hit_def not in hit_descrs
                 hit_descrs.append(hit_def)
             # prevents ElementTree from growing large datastructure
@@ -229,12 +229,12 @@
     salltitles = get_column(options.salltitles)
     hits = tabular_hits(in_file, qseqid, sseqid, salltitles)
 else:
-    stop_err("Unsupported format: %r" % options.format)
+    sys.exit("Unsupported format: %r" % options.format)
 
 
 def best_hits(descriptions, topN):
     if len(descriptions) < topN:
-        return descriptions +  [""] * (topN - len(descriptions))
+        return descriptions + [""] * (topN - len(descriptions))
     else:
         return descriptions[:topN]
 
@@ -243,7 +243,7 @@
     outfile = sys.stdout
 else:
     outfile = open(out_file, 'w')
-outfile.write("#Query\t%s\n" % "\t".join("BLAST hit %i" % (i+1) for i in range(topN)))
+outfile.write("#Query\t%s\n" % "\t".join("BLAST hit %i" % (i + 1) for i in range(topN)))
 for query, descrs in hits:
     count += 1
     outfile.write("%s\t%s\n" % (query, "\t".join(best_hits(descrs, topN))))
b
diff -r b46c041afbe4 -r 60d0c6c1a71f tools/blastxml_to_top_descr/repository_dependencies.xml
--- a/tools/blastxml_to_top_descr/repository_dependencies.xml Fri May 15 05:56:41 2015 -0400
+++ b/tools/blastxml_to_top_descr/repository_dependencies.xml Fri Feb 03 12:38:33 2017 -0500
b
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
 <repositories description="Requires BLAST XML and database datatype definitions.">
-<repository changeset_revision="da92fef90117" name="blast_datatypes" owner="devteam" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+<repository changeset_revision="623a3fbe5340" name="blast_datatypes" owner="devteam" toolshed="https://testtoolshed.g2.bx.psu.edu" />
 </repositories>