Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigation File not found #61

Open
chrisgorgo opened this issue Jun 2, 2016 · 7 comments
Open

Investigation File not found #61

chrisgorgo opened this issue Jun 2, 2016 · 7 comments

Comments

@chrisgorgo
Copy link

sr16-7c932ec82d:ISA-validator-1.6.5 filo$ ./run.sh
isa/a_assay.txt
isa/i_investigation.txt
2016-06-01 17:30:41,689 []: Invalid ISA-TAB: Investigation File not found in /Users/filo/data
.Please, Check your submission or specify the ISATAB investigation file.
org.isatools.tablib.exceptions.TabMissingResourceException: Invalid ISA-TAB: Investigation File not found in /Users/filo/data
.Please, Check your submission or specify the ISATAB investigation file.
    at org.isatools.isatab.ISATABLoader.<init>(ISATABLoader.java:119)
    at org.isatools.isatab_v1.ISATABLoader.<init>(ISATABLoader.java:88)
    at org.isatools.isatab.gui_invokers.GUIISATABValidator.validate(GUIISATABValidator.java:92)
    at org.isatools.isatab.gui_invokers.GUIISATABValidator.validate(GUIISATABValidator.java:80)
    at org.isatools.gui.CommonUI.validateFile(CommonUI.java:194)
    at org.isatools.gui.CommonUI$6$1.run(CommonUI.java:336)
    at java.lang.Thread.run(Thread.java:745)

with the following file isa.zip

@proccaserra
Copy link
Member

@chrisfilo,
there are several problems with the input files:

On the minor sides, looking at the investigation file, I think it would be best the change the Measurement Type and Technology Type to the following

MT: "functional imaging" (instead of 'nuclear magnetic resonance assay')
TT: "nuclear magnetic resonance" (instead of 'MRI Scanner')

then on the major side:

  1. the assay table contains an unrecognized header = "Type of MRI assay".
    declare a ParameterValue[MRI assay type] associated to the Protocol REF

Is it really needed or do you mean to report the actual instrument used?
Should the field strength be mentionned in this report? as well as the acquisition modelity (e.g. T1, T2)

  1. the column order in that assay table is incorrect.
    Protocol REF should appear between 'nodes' such as Sample Name and Assay Name
    Parameter Value fields must be associated to a Protocol REF
  2. 'Raw Data File' should follow immediately 'Assay Name'.

Was the ISA files programmatically or manually generated? If the former, can you point us to the code you are using to generated those files?

let us know

best

@chrisgorgo
Copy link
Author

chrisgorgo commented Jun 2, 2016

Thanks for your feedback.

On Thu, Jun 2, 2016 at 6:07 AM, Philippe Rocca-Serra <
[email protected]> wrote:

@chrisfilo https://github.com/chrisfilo,
there are several problems with the input files:

On the minor sides, looking at the investigation file, I think it would be
best the change the Measurement Type and Technology Type to the following

MT: "functional imaging" (instead of 'nuclear magnetic resonance assay')

Could we use something more generic than functional imaging? MRI in
general?

TT: "nuclear magnetic resonance" (instead of 'MRI Scanner')

What would be the ontological references (ontology URL + Term ID) for
those?

then on the major side:

  1. the assay table contains an unrecognized header = "Type of MRI
    assay". declare a ParameterValue[MRI assay type] associated to the Protocol
    REF

How do you associate something to Protocol REF?

Is it really needed or do you mean to report the actual instrument used?
Should the field strength be mentionned in this report? as well as the
acquisition modelity (e.g. T1, T2)

What is the convention for reporting those three parameters? "Type of MRI
assay" is de facto modality in my example.

the column order in that assay table is incorrect.
Protocol REF should appear between 'nodes' such as Sample Name and
Assay Name
Parameter Value fields must be associated to a Protocol REF

How do you associate Parameter Value with Protocol REF?

'Raw Data File' should follow immediately 'Assay Name'.

Was the ISA files programmatically or manually generated? If the former,
can you point us to the code you are using to generated those files?

Those were programmatically generated using
https://github.com/INCF/BIDS2ISATab. Since you seem to be much more
knowlegable in those issue maybe you could help us out with a PR.

Best,
Chris

@alhufton
Copy link

alhufton commented Jun 3, 2016

Hi @chrisfilo,

Parameters need to be formally declared in the Investigation File. For an example, you can see the ISA-tab record behind your 2015 Sci. Data publication, which includes the use of Parameters:
sdata201454-isa1.zip

But, it might just be sufficient to just encase any custom fields in a Comment declaration, e.g.

Comment[Type of MRI scanner]

It's not as semantically rich as a parameter declaration, but it should pass validation without further modifying the Investigation file output. Just putting out that option. My python skills are poor, so unfortunately I can't help with modifying the code directly.

@chrisgorgo
Copy link
Author

chrisgorgo commented Jun 3, 2016

I have encased custom fields in Comment declarations and reordered the columns (new order: "Sample Name Protocol REF Assay Name Raw Data File").

The validator still crashes with the "Investigation File not found" error.

isa.zip

@proccaserra
Copy link
Member

@chrisfilo May I ask you which version of the validator you are running ? (as well as java version and OS)?

  1. I have just run the validation from our tools (isacreator.1.7.7) and the validator and they point immediately to a problem in the investigation file at line 52 in the i_investigation file , which is missing a REF.
    Study Design Type Term Source
    instead of
    Study Design Type Term Source REF
    and this causes the validation to fail, report the error accurately and stop.

the first thing to do would be to amend your investigation template accordingly:
https://github.com/INCF/BIDS2ISATab/blob/master/bids2isatab/i_investigation_template.txt

The error is reported directly when trying to open your output with ISAcreator. Have you tried it?

  1. then depending on the version of ISACreator you may be using, and depending on the configurations,
    the tool will report the following:
    As I fixed this first error, our tool reports the following:

warning - a_assay.txt
Assay with measurement nuclear magnetic resonance assay & technology MRI Scanner is not recognised. Please ensure you are using the correct configuration!

which can be solved by declaring a new assay in the configuration or using a more recent version of ISAcreator. (please let us know which version you have used so we can best advise)

  1. No information about the Study is provided

this is the next reason why the validator would choke. While using the investigation file as template, the code you generated does not provide a 'study title', a 'study identifier' or a 'study description'. All of these are raised by the validator

  1. Finally, the validator fails on the Assay
    as pointed out in my previous correspondence, this can be fixed easily in your code, something you have done already it seems

hope this helps

let us know

Best
Philippe

@chrisgorgo
Copy link
Author

Hi,

I am using ISA-validator-1.6.5 listed here and downloaded from here. I'm using 64-bit Java 1.8.0 b14. I have not tried to use the ISACreator for validating files.

Thanks to input from @alhufton I managed to track down the reason for the ISAValidator to crash. It was an additional folder in the zip file. For example this file:

sr16-7c932ec82d:data filo$ unzip -l isa.zip
Archive:  isa.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
     2150  06-03-16 15:26   isa/a_assay.txt
     4033  06-03-16 15:26   isa/i_investigation.txt
     1185  06-03-16 15:26   isa/s_study.txt
 --------                   -------
     7368                   3 files

will lead to a "Investigation File not found" error on the console output (with a stack trace and everything) and no output in the UI (which is confusing for users).

However when the top directory is removed. For example in this file:

sr16-7c932ec82d:isa filo$ unzip -l isa.zip
Archive:  isa.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
     2150  06-03-16 15:27   a_assay.txt
     4033  06-03-16 15:27   i_investigation.txt
     1185  06-03-16 15:27   s_study.txt
 --------                   -------
     7368                   3 files

the validator runs and provides meaningful feedback (in my case it was The study titled "null" has no accession number - indeed the files I was generating was missing the accession number).

So how can we move forward?

  1. It seems that we were not using and talking about the same tools. I was using ISAValidator and you were referring to ISACreator. Is it just a miscommunication or is ISAValidator deprecated and users should use ISACreator instead? If so it should be removed from the isa-tools website to avoid further confusion.
  2. If ISAValidator is supported and intended as a tool for validating ISA-Tab packets a more meaningful error should be returned to the user. I would suggest catching the "Investigation File not found" exception and providing the user (through the UI - not just the console) an error message such as "Investigation file was not found. Make sure it exists and is placed in the root of the .zip file instead of a subfolder".

I hope this helps!

@proccaserra
Copy link
Member

@chrisfilo, Thanks for feedback. So ISAcreator invokes the ISAvalidator so it is returning the same errors.
As you know I am sure, catching all possible cases of error that users can throw is not always possible. The one sure thing is that using ISAcreator would have help you to home in rapidly on the error as well as check that the ISA tab being produced by your exporter would display properly.

Overall, the fixes to the BIDS converter are very straightforward and should be easy to implement. If you have other, more complex experiments in different modalities, feel free to sent us the export if you run into further issues (even if you don't !) so we can assist you debugging or ensuring the exporter passes basic checks.

On a side note, as we are also moving to provide JSON serialization, we are currently developing a new validator in python and a web service around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants