Question: Validating Multiple input dataset names in the xml tool
1
gravatar for crisl
8 months ago by
crisl10
crisl10 wrote:

I am really a Galaxy noob, so please bear with me.

For the tool I have developed, the user has an opportunity to provide a number of datasets and I would like to verify that the name of each dataset selected conforms to a required convention. I could do that work in the tool itself. But I was wondering whether it is possible to do it in the xml tool file. I thought that the regex validation might work but I don't really know how (if possible) to tease out each dataset names for testing.

<param name="bigwig_files" type="data" multiple="true" format="bigwig" label="Bigwig files:"> <validator type="regex?" &gt;="" something="" that="" requires="" each="" dataset="" name="" match="" a="" specific="" pattern="" (e.g.,="" ^<em="">_mydata_$) </validator> </param>

Is there a way to do this or should I just have the tool do the validation internally and error if any of the input datasets are misnamed?

Any and all advice is most appreciated.

  • Cris
galaxy • 268 views
ADD COMMENTlink modified 8 months ago • written 8 months ago by crisl10

Why do you want to validate the name of the input datasets(s)? Is your tool going to refuse execution if the datasets are not named using the convention? It does not tell you anything about the actual contents so this looks to me like an unnecessary burden on the user.

ADD REPLYlink modified 8 months ago • written 8 months ago by Martin Čech ♦♦ 4.9k

Well....I am exporting the datafiles to a system that is expecting the names to have .bw or .bigwig extensions. I know the user can rename bigwig file leaving off the extension. I want to prevent them from doing that.

ADD REPLYlink written 8 months ago by crisl10

Can your tool rename them as part of the export process?

ADD REPLYlink written 8 months ago by Martin Čech ♦♦ 4.9k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 166 users visited in the last hour