# HG changeset patch # User peterjc # Date 1395240662 14400 # Node ID 939a600f45e9a009ab8d0249b6febfbf7b9262c0 # Parent e36c60d13c94998f04ebe07cd7fb469623ac0c96 Uploaded v0.0.19, domain databases and PSSM diff -r e36c60d13c94 -r 939a600f45e9 README.rst --- a/README.rst Mon Nov 25 10:55:07 2013 -0500 +++ b/README.rst Wed Mar 19 10:51:02 2014 -0400 @@ -31,16 +31,21 @@ first release via the Tool Shed v0.0.13 - Uses blast.py instead of xml.py to define the datatypes v0.0.14 - Includes datatypes for protein and nucleotide BLAST databases - (based on work by Edward Kirton) + (``blastdbp`` and ``blastdbn``, based on work by Edward Kirton) v0.0.15 - Fixes a MetadataElement bug and includes more of the optional BLAST database files (contribution from Nicola Soranzo) v0.0.16 - Adopt standard MIT License. - Use reStructuredText for this README file. - Development moved to GitHub, https://github.com/peterjc/galaxy_blast - Nucleotide database definition aware of MegaBLAST index superheader -v0.0.17 - Add maskinfo-asn1 and maskinfo-asn1-binary sub-datatypes +v0.0.17 - Add ``maskinfo-asn1`` and ``maskinfo-asn1-binary`` sub-datatypes v0.0.18 - Add retries to BLAST XML merge code. - Modify display_data method to allow unit tests to function. +v0.0.19 - Add ``blastdbp`` datatype for BLAST protein domain databases, for use + with makeprofiledb and rpsblast (contribution from Bjoern Gruening). + - Add ``pssm-asn1`` datatype for Position Specific Scoring Matrices + (PSSMs) stored in NCBI's "scoremat" ASN.1 format (usually named + as *.smp), used as input files for makeprofiledb. ======= ====================================================================== @@ -54,23 +59,29 @@ =================== Normally you would install this via the Galaxy ToolShed, which would move -the provided blast.py file into a suitable location and process the -datatypes_conf.xml entry to be combined with your local configuration. +the provided ``blast.py`` file into a suitable location and process the +``datatypes_conf.xml`` entries to be combined with your local configuration. -However, if you really want to this should work for a manual install. Add -the following lines to the datatypes_conf.xml file in the Galaxy main folder:: +However, if you really want to this should work for a manual install. First +update the ``datatypes_conf.xml`` file in the Galaxy main folder by inserting +the contents of the ```` and ```` sections from the +small ``datatypes_conf.xml`` file provided in the tar-ball. + +For the ```` section you would add several ```` +lines, one per new datatype:: - - + ... -and later in the sniffer section:: +Similarly, some of the new dataypes have ```` lines used to +automatically recognise the datatype when uploaded into Galaxy:: + ... -Also create the file lib/galaxy/datatypes/blast.py by moving, copying or linking -the blast.py file provided in this tar-ball. Finally add 'import blast' near -the start of file lib/galaxy/datatypes/registry.py (after the other import +Also create the file ``lib/galaxy/datatypes/blast.py`` by moving, copying or linking +the ``blast.py`` file provided in this tar-ball. Finally add ``import blast`` near +the start of file ``lib/galaxy/datatypes/registry.py`` (after the other import lines). @@ -84,14 +95,14 @@ Developers ========== -BLAST+ datatypes and wrappers, and other tools were originally developed on the +These BLAST+ datatypes and associated tools were originally developed on the following hg branch: http://bitbucket.org/peterjc/galaxy-central/src/tools As of July 2013, development is continuing on a dedicated GitHub repository: https://github.com/peterjc/galaxy_blast For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball I use -the following command from the blast_datatypes folder:: +the following command from the ``blast_datatypes`` folder:: $ tar -czf blast_datatypes.tar.gz README.rst datatypes_conf.xml blast.py @@ -103,7 +114,7 @@ blast.py For development, rather than having a local ToolShed running, I currently -use a symlink from lib/galaxy/datatypes/blast.py to the actual file as +use a symlink from ``lib/galaxy/datatypes/blast.py`` to the actual file as described above. diff -r e36c60d13c94 -r 939a600f45e9 blast.py --- a/blast.py Mon Nov 25 10:55:07 2013 -0500 +++ b/blast.py Wed Mar 19 10:51:02 2014 -0400 @@ -3,7 +3,7 @@ """ from galaxy.datatypes.data import get_file_peek -from galaxy.datatypes.data import Text, Data +from galaxy.datatypes.data import Text, Data, GenericAsn1 from galaxy.datatypes.xml import GenericXml from galaxy.datatypes.metadata import MetadataElement @@ -180,8 +180,10 @@ title = "This is a nucleotide BLAST database" elif self.file_ext =="blastdbp": title = "This is a protein BLAST database" + elif self.file_ext =="blastdbd": + title = "This is a domain BLAST database" else: - #Error? + #Error? title = "This is a BLAST database." msg = "" try: @@ -259,3 +261,22 @@ # self.add_composite_file('blastdb.pab', is_binary=True, optional=True) # self.add_composite_file('blastdb.pac', is_binary=True, optional=True) # The last 3 lines should be repeated for each WriteDB column, with filename extensions like ('.pba', '.pbb', '.pbc'), ('.pca', '.pcb', '.pcc'), etc. + + +class BlastDomainDb( _BlastDb, Data ): + """Class for domain BLAST database files.""" + file_ext = 'blastdbd' + allow_datatype_change = False + composite_type = 'basic' + + def __init__(self, **kwd): + Data.__init__(self, **kwd) + self.add_composite_file('blastdb.phr', is_binary=True) + self.add_composite_file('blastdb.pin', is_binary=True) + self.add_composite_file('blastdb.psq', is_binary=True) + self.add_composite_file('blastdb.freq', is_binary=True, optional=True) + self.add_composite_file('blastdb.loo', is_binary=True, optional=True) + self.add_composite_file('blastdb.psd', is_binary=True, optional=True) + self.add_composite_file('blastdb.psi', is_binary=True, optional=True) + self.add_composite_file('blastdb.rps', is_binary=True, optional=True) + self.add_composite_file('blastdb.aux', is_binary=True, optional=True) diff -r e36c60d13c94 -r 939a600f45e9 datatypes_conf.xml --- a/datatypes_conf.xml Mon Nov 25 10:55:07 2013 -0500 +++ b/datatypes_conf.xml Wed Mar 19 10:51:02 2014 -0400 @@ -7,8 +7,10 @@ + +