Java validation library for ISA-TAB?

68 views
Skip to first unread message

Ramon

unread,
Aug 14, 2012, 7:57:10 PM8/14/12
to isaf...@googlegroups.com
Hi --

Is there a java library for providing basic ISA-TAB validation (i.e. without requiring a custom configuration)? For example, something that could be called from either the commandline or a Java method, pointing to a set of ISA-TAB files and list out any validation errors / issues that it finds?

Thanks,

Ramon

Philippe

unread,
Aug 15, 2012, 5:03:13 PM8/15/12
to isaf...@googlegroups.com, Ramon
Hello Ramon,

ISA validator/converter can be run as a command line tool and fed a set
of ISA-TAB files

More information is available from github here:

https://github.com/ISA-tools/ISAvalidator-ISAconverter-BIImanager/blob/master/import_layer/src/main/README

the document details how to call the validator, but also other scripts
to convert to different format (calling ISAconverter), or managing
ownership and permission if you are using BII store.

One still has to specify a isa configuration but the default one can be
set once and for all.

Each folder containing an ISA archive and listed as a target for the
validator will, following validation, hold a log listing all warnings,
errors found.


Best wishes

Philippe
> --
> --
>
> You received this message because you are subscribed to the Google
> Groups "ISAforum" group.
> To post to this group, send email to isaf...@googlegroups.com
> To unsubscribe from this group, send email to
> isaforum+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/isaforum?hl=en-GB
>
> Visit the ISAtools website at http://isa-tools.org

Ramon

unread,
Aug 15, 2012, 6:10:24 PM8/15/12
to ISAforum
Hi Philippe --

Thanks for the pointer. It doesn't look like the ISAvalidator-
ISAconverter-BIImanager project you pointed me to has any binaries or
pre-compiled JARs in it so I downloaded ISA-validator-1.5 from the
main site. The README suggests that on windows you can call "validate"
and it will run the Windows batch file equivalent of "validate.sh".
There is no such file in that release. There is a version on GitHub
but it looks a bit spare:

https://github.com/ISA-tools/ISAvalidator-ISAconverter-BIImanager/blob/master/import_layer/src/main/bin/validate.bat

Where can I get a binary of the validator to work with?

Thanks!

Ramon

On Aug 15, 2:03 pm, Philippe <proccase...@gmail.com> wrote:
> Hello Ramon,
>
> ISA validator/converter can be run as a command line tool and fed a set
> of ISA-TAB files
>
> More information is available from github here:
>
> https://github.com/ISA-tools/ISAvalidator-ISAconverter-BIImanager/blo...

Eamonn Maguire

unread,
Aug 16, 2012, 2:55:05 AM8/16/12
to felc...@gmail.com, ISAforum
Hi Ramon,

Do you use maven at all for build management, If so I can give you the
pointer to the repository to pull in the validator dependencies.

If not then the jar you downloaded either as the converter, validator
or BII data manager (all jars are the same they just call different
components for the user interface) has all the API components you
need. However I believe the BII data manager download will have all
the scripts for validating and loading from the command line. There is
some documentation in the wiki for that project on GitHub for
programmatic validation conversion and loading when the downloaded jar
is included in your class path.

I'm currently on holidays so I don't have all the links at hand (sending from my
Phone) but Philippe will have the link to the wiki page and I can send
further examples should you require them when I get back on Sunday.

Many thanks,

Eamonn

--
Eamonn Maguire
Sent from my iPhone with tiny buttons

Ramon

unread,
Aug 17, 2012, 6:32:00 PM8/17/12
to ISAforum
Hi Eamonn --

I downloaded BII-data-manager 1.5 and don't see any obvious scripts
for validation so perhaps we can follow up when you return. Enjoy your
holiday!

Ramon

On Aug 15, 11:55 pm, Eamonn Maguire <eamonn...@gmail.com> wrote:
> Hi Ramon,
>
> Do you use maven at all for build management, If so I can give you the
> pointer to the repository to pull in the validator dependencies.
>
> If not then the jar you downloaded either as the converter, validator
> or BII data manager (all jars are the same they just call different
> components for the user interface) has all the API components you
> need. However I believe the BII data manager download will have all
> the scripts for validating and loading from the command line. There is
> some documentation in the wiki for that project on GitHub for
> programmatic validation conversion and loading when the downloaded jar
> is included in your class path.
>
> I'm currently on holidays so I don't have all the links at hand (sending from my
> Phone) but Philippe will have the link to the wiki page and I can send
> further examples should you require them when I get back on Sunday.
>
> Many thanks,
>
> Eamonn
>
> --
> Eamonn Maguire
> Sent from my iPhone with tiny buttons
>
> On 16 Aug 2012, at 00:10, Ramon <felci...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi Philippe --
>
> > Thanks for the pointer. It doesn't look like the ISAvalidator-
> > ISAconverter-BIImanager project you pointed me to has any binaries or
> > pre-compiled JARs in it so I downloaded ISA-validator-1.5 from the
> > main site. The README suggests that on windows you can call "validate"
> > and it will run the Windows batch file equivalent of "validate.sh".
> > There is no such file in that release. There is a version on GitHub
> > but it looks a bit spare:
>
> >https://github.com/ISA-tools/ISAvalidator-ISAconverter-BIImanager/blo...

Eamonn Maguire

unread,
Aug 20, 2012, 4:12:12 AM8/20/12
to ISAforum, Ramon
Hi Ramon,

So, it seems that the scripts were separated up. In the validator download, there is a validate.sh script in the archive. In the BII data manager download there are several scripts, namely: load.sh; unload.sh and reindex.sh. 

So, if you just copy the script available here https://github.com/ISA-tools/ISAvalidator-ISAconverter-BIImanager/blob/master/val_conv_manager_gui/src/main/bin/validator/validate.sh into the directory you now have for the BII data manager, you will be able to do validation from the command line. 

I hope this now answers your question. If you would like more information about how to use everything programmatically, you can consult this wiki page (which will be added to) that contains technical information on how to use the program in your tools.

Many thanks,

Eamonn

On 18 August 2012 10:48, Philippe <procc...@gmail.com> wrote:
Hi Ramon,

Apologies for the confusing information we've sent.
It seems we fell behind regarding the documentation on this bit of
functionality.

We have set things up for a collaborator in Australia for batch loading
but have not documented it well enough.

I am working on this and we will get back to you on this on Monday.

Best wishes

Philippe



--
-------------------------------------------------------------
Eamonn Maguire				      
Lead Software Engineer - ISA tools													      
University of Oxford		Tel: +44(0)1865 610788
Oxford e-Research Center	
7 Keble Road, Oxford		skype: maguire1986
OX1 3QG, UK			
-------------------------------------------------------------

Marco Brandizi

unread,
Aug 20, 2012, 6:54:35 AM8/20/12
to isaf...@googlegroups.com
Hi Ramon,

Although I don't work on this project any more, the situation about your issues seems to be still the same as when I first arranged it via Maven. This is what I remember about:

- there is a 'command line' package, which you can build from the 'import_layer' module, via 'package.sh'. The result will be a zip that, when exploded, will create a directory with all the needed code dependencies and .sh scripts necessary to run various commands available from the ISA Tools.

- validation (as pretty much any other piece of end-user functionality) can also be invoked programmatically. Have a look at AbstractImportLayerShellCommand.loadIsaTab() to get an idea of how to do that.

- the validator performs some common-requirements validation independently on what one defines with the ISA-Configurator. You can exclude the latter completely by going on the validator installation directory and removing/renaming/moving from there the 'config/isa_configurator/' directory. This way, there will be no information coming from the ISA-configurator and hence only basic validation will be run. This trick should still work with the command-lines or programmatically, I don't remember exactly how the GUIs work with this.

- when I created the above-mentioned .sh scripts, the equivalent .bat commands for Windows were not a priority (not for developers at least, those who are more interested in command-lines) and hence I've left them behind. However, there are a few of such .bat files which I completed and should still be working (e.g., reindex.bat). It should not be difficult to take one of them as model, copy/paste, look at the equivalent .sh and write the .bat that are still missing. if you want to go for this route, I guess your results can be integrated in the existing code-base and be useful to other people. A quicker alternative could be using .sh files under Windows, via a tool like win-bash (http://win-bash.sourceforge.net/) or Cygwin (http://www.cygwin.com/), but keep in mind I've never tried that (win-bash should work and it's smaller and less complicated to install). Reporting back experience with this other approach could be useful to ISA-Tools users too.

Hope it helps,
Marco.
-- 

===============================================================================
Marco Brandizi, PhD <bran...@ebi.ac.uk>

Functional Genomics Group - Sr Software Engineer
http://www.ebi.ac.uk/microarray

European Bioinformatics Institute
Hinxton, CB10 1SD, United Kingdom
Office A3141

Tel.: +44 (0)1223 492 613 
Fax: +44 (0)1223 492 620  

http://www.marcobrandizi.info


Reply all
Reply to author
Forward
0 new messages