Mercurial > repos > devteam > ncbi_blast_plus
comparison tools/ncbi_blast_plus/blastxml_to_tabular.py @ 14:2fe07f50a41e draft
Uploaded v0.1.01 - Requires blastdbd datatype (blast_datatypes v0.0.19). Support for makeprofiledb to create protein domain databases and use them in RPS-BLAST and RPS-TBLASTN. Tools now support GI and SeqID filters, and embed the citations.
author | peterjc |
---|---|
date | Mon, 01 Dec 2014 05:59:16 -0500 |
parents | 623f727cdff1 |
children | c16c30e9ad5b |
comparison
equal
deleted
inserted
replaced
13:623f727cdff1 | 14:2fe07f50a41e |
---|---|
64 import re | 64 import re |
65 import os | 65 import os |
66 from optparse import OptionParser | 66 from optparse import OptionParser |
67 | 67 |
68 if "-v" in sys.argv or "--version" in sys.argv: | 68 if "-v" in sys.argv or "--version" in sys.argv: |
69 print "v0.1.00" | 69 print "v0.1.01" |
70 sys.exit(0) | 70 sys.exit(0) |
71 | 71 |
72 if sys.version_info[:2] >= ( 2, 5 ): | 72 if sys.version_info[:2] >= ( 2, 5 ): |
73 try: | 73 try: |
74 from xml.etree import cElementTree as ElementTree | 74 from xml.etree import cElementTree as ElementTree |
83 sys.stderr.write("%s\n" % msg) | 83 sys.stderr.write("%s\n" % msg) |
84 sys.exit(1) | 84 sys.exit(1) |
85 | 85 |
86 if len(sys.argv) == 4 and sys.argv[3] in ["std", "x22", "ext"]: | 86 if len(sys.argv) == 4 and sys.argv[3] in ["std", "x22", "ext"]: |
87 #False positive if user really has a BLAST XML file called 'std' or 'ext'... | 87 #False positive if user really has a BLAST XML file called 'std' or 'ext'... |
88 stop_err("ERROR: The script API has changed, sorry.") | 88 stop_err("""ERROR: The script API has changed, sorry. |
89 | |
90 Instead of the old style: | |
91 | |
92 $ python blastxml_to_tabular.py input.xml output.tabular std | |
93 | |
94 Please use: | |
95 | |
96 $ python blastxml_to_tabular.py -o output.tabular -c std input.xml | |
97 | |
98 For more information, use: | |
99 | |
100 $ python blastxml_to_tabular.py -h | |
101 """) | |
89 | 102 |
90 usage = """usage: %prog [options] blastxml[,...] | 103 usage = """usage: %prog [options] blastxml[,...] |
91 | 104 |
92 Convert one (or more) BLAST XML files into a single tabular file. | 105 Convert one (or more) BLAST XML files into a single tabular file. |
93 | 106 |