galaxy icon indicating copy to clipboard operation
galaxy copied to clipboard

Extraction of the header names from a data_column fails if the data is csv ?

Open jeremyfix opened this issue 1 year ago • 4 comments

Hello,

I 'm working on a tool to be integrated in tools-ecology : https://github.com/galaxyecology/tools-ecology/pull/83

My issue comes when declaring a parameter as being a data column :

        <param name="lat_key" label="The key of the column for the latitude" type="data_column" data_ref="input" use_header_names="true"/>

As I also indicated there,

  1. If I remove use_header_names, planemo proposes me several columns , labeled "Column 1", "Column 2", ...
  2. If I set use_header_names="True", only one column is proposed and its label is the merge of all the column names from the first line of the data file

The first lines of the data file I'm using are

FID,Key,SurveyID,Country,Ecoregion,Realm,SiteCode,Site,SiteLat,SiteLong,SurveyDate,Depth,Phylum,Class,Family,Taxon,Block,Total,Diver,geom
M1_DATA.213611,213611,912342199,Italy,Adriatic Sea,Temperate Northern Atlantic,IT2,La Vela,43.55,13.63,2012-09-22T14:00:00Z,6,Chordata,Actinopterygii,Atherinidae,Atherina hepsetus,2,30,BS,POINT (13.63 43.55)

Would it be possible that the detection of the header names does not work correctly for CSV files , although may work for, for example Tabular data ?

From the screenshot below , you will see the data I was using are of format CSV. My tool declares its input as "csv" as well;

image

Thanks for your help

jeremyfix avatar Feb 14 '24 10:02 jeremyfix

Yes, csv is currently not supported. But I think it can be .. but this needs a change in the code which needs some time.

bernt-matthias avatar Feb 14 '24 16:02 bernt-matthias

Ok, thank you for the feedback ; I let you decide on whether you want to keep this issue open or close.

jeremyfix avatar Feb 17 '24 17:02 jeremyfix

I'm working on a fix, but this will only be available from 24.0 https://github.com/galaxyproject/galaxy/pull/17478. So if you want to use it you would need a profile of 24.0 (which is probably to limiting).

bernt-matthias avatar Feb 17 '24 17:02 bernt-matthias

I changed my code so that it takes tabular data rather than csv as inputs and that "fixed" my issue on my side.

By the way, thank you for taking the time to fix this !

jeremyfix avatar Feb 17 '24 18:02 jeremyfix