# HG changeset patch # User jorrit # Date 1360698536 18000 # Node ID ef086bb44e6cb10d34e881d3d17805f7bd0a4f5c # Parent d455c48f74fa5ba481855200c840600f98cef19a Uploaded diff -r d455c48f74fa -r ef086bb44e6c annotation.py --- a/annotation.py Tue Feb 12 14:13:23 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -""" -Annotation datatypes - -""" -import pkg_resources -pkg_resources.require( "bx-python" ) - -import logging, os, sys, time, tempfile, shutil -import data -from galaxy import util -from galaxy.datatypes.sniff import * -from galaxy.web import url_for -from cgi import escape -import urllib -from bx.intervals.io import * -from galaxy.datatypes import metadata -from galaxy.datatypes.metadata import MetadataElement -from galaxy.datatypes.tabular import Tabular -import math - -log = logging.getLogger(__name__) - -class Gaf( Tabular ): - """Tab delimited data in Gene Ontology Association File (GAF) format""" - file_ext = "gaf" - - def init_meta( self, dataset, copy_from=None ): - data.Text.init_meta( self, dataset, copy_from=copy_from ) - def sniff( self, filename ): - """ - Determines whether the file is in GAF format - """ - headers = get_headers( filename, '\t' ) - try: - for hdr in headers: - if hdr and hdr[0].startswith( '!gaf-version:' ) : - return True - return False - except: - return False - - diff -r d455c48f74fa -r ef086bb44e6c datatypes_conf.xml --- a/datatypes_conf.xml Tue Feb 12 14:13:23 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff -r d455c48f74fa -r ef086bb44e6c ontology.py --- a/ontology.py Tue Feb 12 14:13:23 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -""" -Ontology datatypes - -""" -import pkg_resources -pkg_resources.require( "bx-python" ) - -import logging, os, sys, time, tempfile, shutil -import data -from galaxy import util -from galaxy.datatypes.sniff import * -from galaxy.web import url_for -from cgi import escape -import urllib -from bx.intervals.io import * -from galaxy.datatypes import metadata -from galaxy.datatypes.metadata import MetadataElement -from galaxy.datatypes.tabular import Tabular -import math - -log = logging.getLogger(__name__) - -class Ontology( data.Text ): - """Any ontology Format""" - file_ext = "ontology" - - def init_meta( self, dataset, copy_from=None ): - data.Text.init_meta( self, dataset, copy_from=copy_from ) - - -class Obo( Ontology ): - """OBO Format""" - file_ext = "obo" - - def init_meta( self, dataset, copy_from=None ): - data.Text.init_meta( self, dataset, copy_from=copy_from ) - def sniff( self, filename ): - """ - Determines whether the file is in OBO format - """ - headers = get_headers( filename, '\n' ) - try: - for hdr in headers: - if hdr and hdr[0].startswith( 'format-version:' ) : - return True - return False - except: - return False - -class Owl( Ontology ): - """OWL""" - file_ext = "owl" - - def init_meta( self, dataset, copy_from=None ): - data.Text.init_meta( self, dataset, copy_from=copy_from ) - def sniff( self, filename ): - """ - Determines whether the file is in OWL RDF-XML format - """ - headers = get_headers( filename, '\n' ) - try: - for hdr in headers: - if hdr and hdr[0].find( ' -1 : - return True - if hdr and hdr[0].find( 'http://www.w3.org/2002/07/owl' ) > -1 : - return True - return False - except: - return False - - -class OwlRdfXML( Owl ): - """OWL RDF/XML""" - - def init_meta( self, dataset, copy_from=None ): - data.Text.init_meta( self, dataset, copy_from=copy_from ) - def sniff( self, filename ): - """ - Determines whether the file is in OWL RDF-XML format - """ - headers = get_headers( filename, '\n' ) - try: - for hdr in headers: - if hdr and hdr[0].find( ' -1 : - return True - return False - except: - return False - - diff -r d455c48f74fa -r ef086bb44e6c repository_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/repository_dependencies.xml Tue Feb 12 14:48:56 2013 -0500 @@ -0,0 +1,4 @@ + + + + diff -r d455c48f74fa -r ef086bb44e6c termenrichment.py --- a/termenrichment.py Tue Feb 12 14:13:23 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -""" -Term enrichment datatypes - -""" -import pkg_resources -pkg_resources.require( "bx-python" ) - -import logging, os, sys, time, tempfile, shutil -import data -from galaxy import util -from galaxy.datatypes.sniff import * -from galaxy.web import url_for -from cgi import escape -import urllib -from bx.intervals.io import * -from galaxy.datatypes import metadata -from galaxy.datatypes.metadata import MetadataElement -from galaxy.datatypes.tabular import Tabular -import math - -log = logging.getLogger(__name__) - -class TermEnrichmentResult( data.Text ): - """Any term enrichment format""" - file_ext = "enrichment" - - def init_meta( self, dataset, copy_from=None ): - data.Text.init_meta( self, dataset, copy_from=copy_from ) - - -class TerfTab( TermEnrichmentResult ): - """TERF TSV Format""" - file_ext = "terf" - - def init_meta( self, dataset, copy_from=None ): - data.Text.init_meta( self, dataset, copy_from=copy_from ) - def sniff( self, filename ): - """ - Determines whether the file is in TERF format - """ - headers = get_headers( filename, '\n' ) - try: - for hdr in headers: - if hdr and hdr[0].startswith( '##terf-version' ) : - return True - return False - except: - return False - - -