Hi Nicklas,

That's excellent -- well spotted. That has sorted the problem. If I
specify the entire header row it no longer picks up unsuitable configs. 

What had happened was that I did try initially to specify whole header
rows but the file parse test kept on failing so I just went on to
specify something short like Block\tRow\tColumn.* (as suggested by the
interface, and that worked. 

What I should have done is kept trying, but I am rubbish at regular
expressions (and a lazy git). I have done that now and I have worked out
that what stopped the whole header from working was that I didn't escape
characters like "+", "(" and ")". These are pretty commonplace in e.g.
Genepix file formats.

I am copying this to the users list because this is of concern not just
for the developers -- apologies for the cross-post.

Cheers
Micha

==================================
Dr Micha M Bayer
Bioinformatics Specialist
Genetics Programme
The Scottish Crop Research Institute
Invergowrie
Dundee
DD2 5DA
Scotland, UK
Telephone +44(0)1382 562731 ext. 2309
Fax +44(0)1382 562426
http://www.scri.sari.ac.uk/MichaBayer.htm
=============================
 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:basedb-devel-
> [EMAIL PROTECTED] On Behalf Of Nicklas Nordborg
> Sent: 13 August 2007 07:19
> To: BASE dev
> Subject: Re: [basedb-devel] problem with auto detection of raw data
import
> configurations
> 
> I think this most likely is a problem with too unspecific regular
> expression in the file format configurations. The isImportable()
method
> will only scan the file until it finds a line which matches the "Data
> header" regular expression. The rest of the file is not checked.
> 
> /Nicklas
> 
> 
> Micha Bayer wrote:
> > Hi,
> >
> > I have come across a problem with how import configurations are
> > autodetected, and wanted to check with the list whether this is an
issue
> > with my code or a genuine bug in the API.
> >
> > I am trying to autodetect in my code plugin configs that are
suitable
> > for importing raw data from a given file. I supply a reference to
the
> > file I want to import, open a stream from it, and then call
> > RawDataFlatFileImporter.isImportable():
> >
> >
> > //this is the importer plugin
> > RawDataFlatFileImporter importer =
> > plugin.newInstance(RawDataFlatFileImporter.class,null, sc, config,
> > null);
> >
> > //get a stream from the file
> > InputStream in = file.getDownloadStream(0);
> >
> > //check for importability
> > if (importer.isImportable(in))
> > {
> >     configs.add(config);
> > }
> >
> >
> > Now that returns import configs that definitely do not (and should
not)
> > work. This could be a problem with how I have coded this of course
but
> > more likely I think it is a problem with API since I seem to be
getting
> > the same problem when I try to manually import data into a raw
bioassay
> > and I get a choice of several configs, some of which do not work.
The
> > BASE source uses similar code in this context (I have, in fact,
ripped
> > it off from there.... :-) and it makes me think there is a problem
with
> > the isImportable method.
> >
> > Please let me know if you think this is a proper bug and I'll file
in
> > the bug tracker system. I am using BASE 2.3.0.
> >
> > thanks
> >
> > Micha
> >
> > ==================================
> > Dr Micha M Bayer
> > Bioinformatics Specialist
> > Genetics Programme
> > The Scottish Crop Research Institute
> > Invergowrie
> > Dundee
> > DD2 5DA
> > Scotland, UK
> > Telephone +44(0)1382 562731 ext. 2309
> > Fax +44(0)1382 562426
> > http://www.scri.sari.ac.uk/MichaBayer.htm
> > =============================
> >
> >
> > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
> _ _
> >
> > SCRI, Invergowrie, Dundee, DD2 5DA.
> > The Scottish Crop Research Institute is a charitable company limited
by
> guarantee.
> > Registered in Scotland No: SC 29367.
> > Recognised by the Inland Revenue as a Scottish Charity No: SC
006662.
> >
> >
> > DISCLAIMER:
> >
> > This email is from the Scottish Crop Research Institute, but the
views
> > expressed by the sender are not necessarily the views of SCRI and
its
> > subsidiaries.  This email and any files transmitted with it are
> confidential
> > to the intended recipient at the e-mail address to which it has been
> > addressed.  It may not be disclosed or used by any other than that
> addressee.
> > If you are not the intended recipient you are requested to preserve
this
> > confidentiality and you must not use, disclose, copy, print or rely
on
> this
> > e-mail in any way. Please notify [EMAIL PROTECTED] quoting the
> > name of the sender and delete the email from your system.
> >
> > Although SCRI has taken reasonable precautions to ensure no viruses
are
> > present in this email, neither the Institute nor the sender accepts
any
> > responsibility for any viruses, and it is your responsibility to
scan
> the email
> > and the attachments (if any).
> >
> >
> >
------------------------------------------------------------------------
> -
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a
browser.
> > Download your FREE copy of Splunk now >>  http://get.splunk.com/
> > _______________________________________________
> > basedb-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/basedb-devel
> 
> 
>
------------------------------------------------------------------------
-
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a
browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> basedb-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/basedb-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
The BASE general discussion mailing list
basedb-users@lists.sourceforge.net
unsubscribe: send a mail with subject "unsubscribe" to
[EMAIL PROTECTED]

Reply via email to