Mercurial > repos > da-intersect > test_ap11
changeset 10:27fd6bbf6b2f
Uploaded
author | da-intersect |
---|---|
date | Thu, 11 Apr 2013 01:44:03 -0400 |
parents | 609151fd424c |
children | 3f8a5e98cf36 |
files | tar.py |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tar.py Thu Apr 11 01:44:03 2013 -0400 @@ -0,0 +1,22 @@ +from galaxy.datatypes.metadata import MetadataElement +from galaxy.datatypes.binary import Binary +from galaxy.datatypes import metadata +from galaxy.datatypes.sniff import * +from galaxy import eggs +import pkg_resources +pkg_resources.require( "bx-python" ) +from urllib import urlencode, quote_plus +import zipfile, gzip +import os, subprocess, tempfile, tarfile +import struct + +class Tar( Binary ): + """Class describing a BAM binary file""" + file_ext = "tar" + def sniff( self, filename ): + try: + if tarfile.is_tarfile(filename): + return True + except: + return False +