[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MIME and Applied Biosystems chromatograms.



Am Montag, den 21.01.2008, 11:58 +0900 schrieb Charles Plessy:
> Hi Daniel, many thanks for your precious answers.

I have some more ;)

> Le Mon, Jan 21, 2008 at 02:19:33AM +0100, Daniel Leidert a écrit :
> > Ok, first thing, I guess you are referring to this format:
> > http://www.appliedbiosystems.com/support/software_community/ABIF_File_Format.pdf
> 
> Exactly (I did not manage to find the spec). If I want to document this
> within the file, I have to use a comment, isn't it? The
> <cm:specification> tag is specific to chemical-mime-data?

Yes, I bound some extension to a faked namespace to extend the original
database format for my needs without developing a completely new format.

> > Hm. Following the format description, it seems that you misinterpret the
> > format. The ".e" stands for "two bytes" (seems, there you find the
> > version number, see the above format description). So you probably want to
> > use a mask:
> > 
> > <!-- offset 4 and 5 stand for the version number -->
> > <match type="string" offset="0"
> >        value="ABIF??tdir"
> >        mask="ffffffff0000ffffffff" />
> 
> Exactly. Actually, I cut-and-pasted the original value from the following URL:
> http://filext.com/file-extension/AB1

Be careful with this service. This is not the only wrong information :)
But to be honest: I like this service.

> Some sample .ab1 files are available at the following URL:
> http://www.appliedbiosystems.com/support/software_community/data_sets.cfm

Thanks. Downloaded and tested. Works. Tested with

for i in *; do gnomevfs-info $i | grep ^MIME\ type; done

(and + -s switch too).

> After using your <match> declaration (corrected by adding 0x at the
> beginning of the mask), the autodetection with gnomevfs works well.
> 
>  - .ab1 files are detected as x-dna by gnomevfs-info with and without
>    the -s option.
>  - If I delete the suffix, only gnomevfs-info -s detects the type (I
>    think that it is the expected behaviour).
> For the applicaiton/ab1 type, it was a typo. Some sites ask their users
> to configure their browsers to use application/abi1, so I will declare
> this as an alias of application/x-dna, which is not such a good name in
> the end.

Ok. Here something comes to my mind I forgot to tell you. Vendors are
allowed to use the "vnd." prefix (also written in one of the related
MIME RfCs). E.g. check /usr/share/mime/packages/freedesktop.org.xml for
this prefix. For example OO.o uses it. So I think, maybe a better name
would be:

application/vnd.appliedbiosystems-abif

or similar. This prefix is (also AFAIK) allowed for unregistered formats
too.

BTW: From what I read, the .fsa suffixed files use the same format,
right? Maybe you should add the .fsa suffix too.

> When things work well, maybe it would be better to ask Applied
> Biosystems what they think about this.

Maybe Biosystems is interested to officially use the vnd.-prefixed MIME
type (especially if they do not plan to register it soon)?

> Strangely, even after correcting the typo my GNOME desktop still detects
> the files as application/ab1. Therefore, I can not test if the .desktop
> file works now.

You probably need to restart nautilus. Not sure.

> I have commited corrected .mime, .destkop, and .sharedmimeinfo in the
> SVN.

Please note, that the application/octet-stream MIME type is the general
fallback. All files, that have not explicitly set another "top" class
(or in other words: do not use a sub-class-of tag) are automatically a
sub-class-of application/octet-stream. So you can (and maybe should)
remove this tag.

HTH and regards, Daniel


Reply to: