From 8126d3f0fa6ea0d94085ea8af83b3662fe642e0d Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Mon, 27 May 2013 15:02:06 +0200 Subject: [PATCH] Fix detection of 2bit files when uploading them. When 2bit files are uploaded, they were not detected as 2bit files: Example: test.2bit empty format: twobit, database: hg19 The uploaded binary file contains inappropriate content This issue is solved by registering the TwoBit file format in: ./lib/galaxy/datatypes/binary.py --- lib/galaxy/datatypes/binary.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/datatypes/binary.py b/lib/galaxy/datatypes/binary.py index 2a478d7f6df..0bd799db6e2 100644 --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -399,3 +399,5 @@ class TwoBit (Binary): return dataset.peek except: return "Binary TwoBit format nucleotide file (%s)" % (data.nice_size(dataset.get_size())) + +Binary.register_sniffable_binary_format("twobit", "twobit", TwoBit)