Open mr-c opened 9 years ago
@jmchilton
I've been wanting to split out datatypes completely, and start from the ground up with magic numbers and a re-architecture of it. I made some progress but not enough to say "let's seriously consider it". :+1: for the python filemagic module to detect magic numbers. Would save MANY lines of code.
For example: khmer provides filetype detection definitions in the form of a "magic" config for the unix file command: https://github.com/dib-lab/khmer/blob/master/lib/magic
The Galaxy datatype sniffers for the khmer/oxli format are a re-implementation of the logic in this magic file. It would be useful to just supply a mapping from the output of the
file
command instead of recoding the sniffing.Or even just map from a media/mime-type.
FYI: I just registered the above media type; should hear back within a week.